Revision [1712]

Last edited on 2011-10-18 20:03:43 by TobiasWolf
Additions:
achieved:
<https://wiki.ubuntu.com/RealTime>
Deletions:
achieved:</br>
<https://wiki.ubuntu.com/RealTime></br>


Revision [1711]

Edited on 2011-10-18 20:01:50 by TobiasWolf [it appears this wiki has some usability issues]
Additions:
computer, because it looks fancy."
problem as on Windows Vista/7 and OS/X with their desktop compositors.
useless but harmful.
and timestamping and to reduce the performance impact of a compositor.
standby mode.
Appearance -> Desktop effects -> "Off" or something like that.
On 11.04 i think you select the "Ubuntu classic (no effects)" environment.
resource consumption and no interference at all.
windows are used.
paranoia. Or manually disable it via the GUI.
nouveau at the moment.
Deletions:
computer, because it looks fancy."</br>
problem as on Windows Vista/7 and OS/X with their desktop compositors.</br>
useless but harmful.</br>
and timestamping and to reduce the performance impact of a compositor.</br>
standby mode.</br>
Appearance -> Desktop effects -> "Off" or something like that.</br>
On 11.04 i think you select the "Ubuntu classic (no effects)" environment.</br>
resource consumption and no interference at all.</br>
windows are used.</br>
paranoia. Or manually disable it via the GUI.</br>
nouveau at the moment.</br>


Revision [1710]

Edited on 2011-10-18 19:59:52 by TobiasWolf [touchups, move random 64-bit arch stuff here]
Additions:
Comment by Mario
The lowlatency kernel is simple to install, as you explained, and probably good
enough for all but the most challenging applications. For example some tables
benchmark results with respect to the minimal audio latency that can be reliably
achieved:</br>
<https://wiki.ubuntu.com/RealTime></br>
To put this into perspective, a typical os/x system won't be able to achieve
less than about 6-8 msecs, at least i haven't seen anything better in my testing
from macbookpro to 8 core mac-pro. The values they achieve (3-4 msecs) are close
to the theoretical optimum.
Even the default kernel is already at least as good as what the other operating
systems have to offer. Compiling a hard realtime kernel yourself is not that
simple for beginners, but if you'd really need it you can also download and
install a realtime kernel from an older distribution, e.g., 10.04. It would be a
tradeoff between gaining hard realtime caps and losing some functionality which
was added in later kernels.

Yep. "Ubuntu Classic (no effects)" may be even better. If you use the new Unity
UI, that's the most shiny and untested one -- i don't quite hate it as much as
many other people, but so far i don't see it adding much to the user experience.
It's the usual "let's add a smartphone or tablet GUI to a desktop/laptop
computer, because it looks fancy."</br>

Both "Ubuntu Classic" and "Unity" use a desktop compositor to create the shiny
3d'ish desktop. This is nice for ergonomy and eye-candy but it can reduce
performance and really impair exact presentation timing and timestamping. Same
problem as on Windows Vista/7 and OS/X with their desktop compositors.</br>

The Linux guys are working on a solution to make the timing and timestamping as
precise with a compositor as without it -- i'm involved in that effort. It is a
pretty difficult technical problem and progress is slow, but we'll get there at
some point. No similar efforts exist at all on OS/X or Windows afaik - At least
none that aren't known to be extremely broken to the point of being not only
useless but harmful.</br>

Psychtoolbox disables the desktop compositor when a fullscreen onscreen window
is presented on OS/X, Windows and Linux to achieve correct stimulus onset timing
and timestamping and to reduce the performance impact of a compositor.</br>

However, if you are running a machine for real data collection you may want to
manually shut down the compositor completely, because a) it is the most reliable
way to know it really doesn't interfere, and b) it frees up additional graphics
and system resources, which are usually used even if the compositor is in
standby mode.</br>

On Linux 10.10 and earlier this was achieved via Menubar -> System settings ->
Appearance -> Desktop effects -> "Off" or something like that.</br>

On 11.04 i think you select the "Ubuntu classic (no effects)" environment.</br>

This will run in a old unsexy, non 3d'ish, "flicker during Windows movements and
redraws like WindowsXP" environment, however with drastically reduced GPU
resource consumption and no interference at all.</br>

I usually do complex timing tests with the compositor shut down, but normal
testing with the compositor on and just switching to standby when fullscreen
windows are used.</br>

One catch: On Linux, PTB doesn't actively switch the compositor to standby.
Instead it uses the PsychGPUControl() command as part of the Psychtoolbox
installer/updater to configure the compositor to switch itself to standby if it
detects a fullscreen window on a display.
If you do something like install PTB while Unity is running, then switch to the
"Classic" environment, this configuration setting may not transfer. It doesn't
hurt to add the PsychGPUControl command to the top of your script for extra
paranoia. Or manually disable it via the GUI.</br>

I'll probably add some call to PsychGPUControl() to Screen's Openwindow function
in the future, so this is more fool-proof.

Mario again:
But nouveau in its current incarnation isn't yet suitable for
research grade stimulus presentation timing. It's pretty good performance- and
functionality-wise, but the display onset timing has bugs. I'm working with the
nouveau-devs to get it properly implemented for a future nouveau release, but it
probably won't be part of the 2011 Linux distros, at least not as a standard
install. PTB outputs warnings if you try to run on a too old nouveau- ie. on any
nouveau at the moment.</br>

The free software Intel (for half-way recent GPU's) and ATI (for almost all
GPU's) drivers are in a very good shape in the recent distros. Both should have
the most precise and robust timestamping you could find anywhere. Also the only
timestamping that works in all display configurations with all display types and
settings. Functionality and performance are catching up to the binary drivers in
all areas that are relevant to us. I'd expect them to be perfectly useable for
the majority of vision science experiments, and for some of them even more than
the binary drivers.
The Psychtoolbox on GNU/Linux needs the following 3rd party libraries
in order to function correctly. If you get "Invalid MEX file errors",
or similar fatal error messages, check if these are installed on your
system and if they are missing, install them via your system specific
software management tools:
~- The OpenGL utility toolkit GLUT: glut, glut-3 or freeglut are typical provider packages in most Linux distributions.
~- GStreamer multimedia framework: At least version 0.10.24 of the core runtime and the gstreamer-base plugins.
For optimal performance use the latest available versions.
A simple way to get GStreamer at least on Ubuntu Linux is to install the "rhythmbox" or
"totem" multimedia-players. You may need to install additional packages to play back all
common audio- and video file formats. See "help GStreamer".
~- libusb-1.0 USB low-level access library.
~- libdc1394 Firewire video capture library.
~- libraw1394 Firewire low-level access library.
===For PsychKinect() (See "help InstallKinect")===
~- libusb-1.0 USB low-level access library.
~- libfreenect: Kinect driver library.
===For Eyelink()===
~- The Eyelink core libraries from the SR-Research download website.
on Linux. Psychtoolbox's Screen() command will not work without GStreamer!
===== Install Instructions on 64-bit Linux =====
##cum grano salis##
General setup for PTB and Matlab on Ubuntu 11.04 64-bit:
~- install low-latency kernel (some info found here - https://help.ubuntu.com/community/UbuntuStudio/RealTimeKernel)
%%(bash)
sudo add-apt-repository ppa:abogani/ppa
sudo apt-get update
sudo apt-get install linux-lowlatency
%%
~- Install subversion:
%%(bash)
sudo apt-get install subversion
%%

~- Install Matlab 64-bit (2010b was used for these instructions)
~- Install PTB using [DownloadPSychtoolbox these instructions]
~- Need to fix a few things in matlab for PTB to work
%%(bash)
cd $MATLABROOT/sys/os/glnxa64/
sudo mv libstdc++.so.6.0.10 old_libstdc++.so.6.0.10
sudo mv libstdc++.so.6 old_libstdc++.so.6
cd $MATLABROOT/bin/glnxa64/
sudo mv libdc1394.so.22 old_libdc1394.so.22
sudo mv libdc1394.so.22.1.0 old_libdc1394.so.22.1.0
sudo apt-get install libdc1394-22
%%

~- Finally, solve a Matlab issue specific to Ubuntu 11.04:
%%
sudo ln -s /lib64/x86_64-linux-gnu/libc-2.13.so /lib64/libc.so.6
%%
~- Alternatively, you could use NeuroDebian install of octave-psychtoolbox-3 (http://neuro.debian.net), but you may still need some of the above steps
==Refresh rate setup==
This is an example based on setting this up on my rig2display machine.
~- Use gtf to generate a modeline:
%%
gtf 1024 768 100
%%
This is the output of that command on an example machine:
##
# 1024x768 @ 100.00 Hz (GTF) hsync: 81.40 kHz; pclk: 113.31 MHz
Modeline "1024x768_100.00" 113.31 1024 1096 1208 1392 768 769 772 814 -HSync +Vsync
##
cvt is another program that works basically the same way
~- Be sure the modeline is valid for the monitor. Look up the horizontal and vertical sync in the specs
~- Use %%xrandr -q%% to see the modes available and what your graphics system is called (mine is CRT1)
~- Copy that modeline to make 3 commands:
%%(bash)
xrandr --newmode "1024x768_100.00" 113.31 1024 1096 1208 1392 768 769 772 814 -HSync +Vsync
xrandr --addmode CRT1 "1024x768_100.00"
xrandr --output CRT1 --mode "1024x768_100.00"
%%
~- Paste these into the file /etc/gmd/Init/Defaults just above the /sbin/initctl command. So mine looks like:
%%(bash)
xrandr --newmode "1024x768_100.00" 113.31 1024 1096 1208 1392 768 769 772 814 -HSync +Vsync
xrandr --addmode CRT1 "1024x768_100.00"
xrandr --output CRT1 --mode "1024x768_100.00"
/sbin/initctl -q emit login-session-start DISPLAY_MANAGER=gdm
%%
~- Could also do this by modifying xorg.conf but that looks like a headache, and this works
~- lspci will tell you the name of the graphics card and other system info if you need it
Deletions:
Comment by Mario""<blockquote>
The lowlatency kernel is simple to install, as you explained, and probably good
enough for all but the most challenging applications. For example some tables
benchmark results with respect to the minimal audio latency that can be reliably
achieved:</br>
<https://wiki.ubuntu.com/RealTime></br>
To put this into perspective, a typical os/x system won't be able to achieve
less than about 6-8 msecs, at least i haven't seen anything better in my testing
from macbookpro to 8 core mac-pro. The values they achieve (3-4 msecs) are close
to the theoretical optimum.</br>
Even the default kernel is already at least as good as what the other operating
systems have to offer. Compiling a hard realtime kernel yourself is not that
simple for beginners, but if you'd really need it you can also download and
install a realtime kernel from an older distribution, e.g., 10.04. It would be a
tradeoff between gaining hard realtime caps and losing some functionality which
was added in later kernels.</blockquote""
""<blockquote>Yep. "Ubuntu Classic (no effects)" may be even better. If you use the new Unity
UI, that's the most shiny and untested one -- i don't quite hate it as much as
many other people, but so far i don't see it adding much to the user experience.
It's the usual "let's add a smartphone or tablet GUI to a desktop/laptop
computer, because it looks fancy."</br>
Both "Ubuntu Classic" and "Unity" use a desktop compositor to create the shiny
3d'ish desktop. This is nice for ergonomy and eye-candy but it can reduce
performance and really impair exact presentation timing and timestamping. Same
problem as on Windows Vista/7 and OS/X with their desktop compositors.</br>
The Linux guys are working on a solution to make the timing and timestamping as
precise with a compositor as without it -- i'm involved in that effort. It is a
pretty difficult technical problem and progress is slow, but we'll get there at
some point. No similar efforts exist at all on OS/X or Windows afaik - At least
none that aren't known to be extremely broken to the point of being not only
useless but harmful.</br>
Psychtoolbox disables the desktop compositor when a fullscreen onscreen window
is presented on OS/X, Windows and Linux to achieve correct stimulus onset timing
and timestamping and to reduce the performance impact of a compositor.</br>
However, if you are running a machine for real data collection you may want to
manually shut down the compositor completely, because a) it is the most reliable
way to know it really doesn't interfere, and b) it frees up additional graphics
and system resources, which are usually used even if the compositor is in
standby mode.</br>
On Linux 10.10 and earlier this was achieved via Menubar -> System settings ->
Appearance -> Desktop effects -> "Off" or something like that.</br>
On 11.04 i think you select the "Ubuntu classic (no effects)" environment.</br>
This will run in a old unsexy, non 3d'ish, "flicker during Windows movements and
redraws like WindowsXP" environment, however with drastically reduced GPU
resource consumption and no interference at all.</br>
I usually do complex timing tests with the compositor shut down, but normal
testing with the compositor on and just switching to standby when fullscreen
windows are used.</br>
One catch: On Linux, PTB doesn't actively switch the compositor to standby.
Instead it uses the PsychGPUControl() command as part of the Psychtoolbox
installer/updater to configure the compositor to switch itself to standby if it
detects a fullscreen window on a display.
If you do something like install PTB while Unity is running, then switch to the
"Classic" environment, this configuration setting may not transfer. It doesn't
hurt to add the PsychGPUControl command to the top of your script for extra
paranoia. Or manually disable it via the GUI.</br>
I'll probably add some call to PsychGPUControl() to Screen's Openwindow function
in the future, so this is more fool-proof.</blockquote>""
Mario again: ""<blockquote>But nouveau in its current incarnation isn't yet suitable for
research grade stimulus presentation timing. It's pretty good performance- and
functionality-wise, but the display onset timing has bugs. I'm working with the
nouveau-devs to get it properly implemented for a future nouveau release, but it
probably won't be part of the 2011 Linux distros, at least not as a standard
install. PTB outputs warnings if you try to run on a too old nouveau- ie. on any
nouveau at the moment.</br>
The free software Intel (for half-way recent GPU's) and ATI (for almost all
GPU's) drivers are in a very good shape in the recent distros. Both should have
the most precise and robust timestamping you could find anywhere. Also the only
timestamping that works in all display configurations with all display types and
settings. Functionality and performance are catching up to the binary drivers in
all areas that are relevant to us. I'd expect them to be perfectly useable for
the majority of vision science experiments, and for some of them even more than
the binary drivers.</blockquote>""
##The Psychtoolbox on GNU/Linux needs the following 3rd party libraries
in order to function correctly. If you get "Invalid MEX file errors",
or similar fatal error messages, check if these are installed on your
system and if they are missing, install them via your system specific
software management tools:
* The OpenGL utility toolkit GLUT: glut, glut-3 or freeglut are typical provider packages in most Linux distributions.
* GStreamer multimedia framework: At least version 0.10.24 of the core runtime and the gstreamer-base plugins.
For optimal performance use the latest available versions.
A simple way to get GStreamer at least on Ubuntu Linux is to install the "rhythmbox" or
"totem" multimedia-players. You may need to install additional packages to play back all
common audio- and video file formats. See "help GStreamer".
* libusb-1.0 USB low-level access library.
* libdc1394 Firewire video capture library.
* libraw1394 Firewire low-level access library.
===For PsychKinect() (See "help InstallKinect"):===
* libusb-1.0 USB low-level access library.
* libfreenect: Kinect driver library.
===For Eyelink():===
* The Eyelink core libraries from the SR-Research download website.
on Linux. Psychtoolbox's Screen() command will not work without GStreamer!##


Revision [1693]

The oldest known version of this page was created on 2011-08-08 19:58:20 by IanA [touchups, move random 64-bit arch stuff here]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki