--- In
psychtoolbox@yahoogroups.com, Lutz Ostkamp <lostkamp@...> wrote:
>
> Hi,
Hi
>
> I'm using PTB3 on Kubuntu 12.10. Yesterday I ran UpdatePsychtoolbox, to
> try to fix a problem with the text rendering plugin. After that, Screen
> wasn't working anymore. I don't remember the exact error message, it was
> something with "invalid mex file" and that Screen.mex couldn't be found.
>
You are not meant to run UpdatePsychtoolbox or SetupPsychtoolbox if your toolbox comes from Neurodebian or the package management of your Linux distro. It only updates ptb's downloaded from us. If the Neurodebian ptb gets an update, your systems update manager will notify you of that automatically, no need to run UpdatePsychtoolbox or such. That said, i think we don't have any safeguards against somebody doing that. I'll ask Yaroslav to remove those scripts from those distros in the future. Only the DownloadAdditionsForNeuroDebian is meant to get additional mex files for Matlab, once the octave ptb has been successfully installed by the package manager.
You could run DownloadPsychtoolbox to override the ptb from Neurodebian with the one from us, although you might need to delete psychtoolbox paths manually first in Matlab, i'm not sure atm. if our downloader would cope with existing non-standard paths or not.
> Anyways, at some point I decided to delete the whole Psychtoolbox and do
> a fresh install. I have the Neurodebian repository in my software
> sources, so I used sudo apt-get remove octave-psychtoolbox-3, and I
> deleted all PTB entries from the Matlab search path, and also the
> directories /usr/share/octave/site/m/psychtoolbox-3 and
> /usr/share/psychtoolbox-3.
>
> Then I re-installed the package with apt-get, and when I ran the
> DownloadAdditionsForNeuroDebian script for Matlab, I got:
> ??? Undefined function or variable 'PsychtoolboxVersion'.
>
> I checked the install directory usr/share/octave/site/m/psychtoolbox-3
> (which is actually a link to /usr/share/psychtoolbox-3), and it only
> contains two subfolders, PsychBasic and PsychHardware, both with some
> mex files in them. I guess there should be some more files and folders
> in that directory.
>
Yes, there should be more, e.g., the missing PsychtoolboxVersion.m script. Something went wrong. Probably deleting those directories manually wasn't very healthy and the package manager is now confused.
The octave-psychtoolbox-3 package only contains the octave mex files ...
(see
http://packages.ubuntu.com/quantal/amd64/octave-psychtoolbox-3/filelist)
... and lists all other packages that are needed for a fully functional ptb, e.g., psychtoolbox-3-common
(
http://packages.ubuntu.com/quantal/all/psychtoolbox-3-common/filelist)
which contains all the m-files which are shared between octave and matlab.
So what happened is that your apt-get remove only removed the mex files, but left the m-files as they are in the psychtoolbox-3-common package, which was untouched. Then you deleted those directories manually, behind the back of the package manager, so the system thinks only octave-psychtoolbox-3 is not installed when actually the whole toolbox was manually wiped out. Your reinstallation therefore just added the mex files back, all m-files are missing, but the system doesn't know this.
You could try the "repair packages" option somewhere in the package manager (if you use synaptics). Or try to uninstall all ptb packages:
octave-psychtoolbox-3, psychtoolbox-3-common, psychtoolbox-3-lib, and psychtoolbox-3-dbg if it was installed. And then reinstall octave-psychtoolbox-3 which will then pull in all the other packages.
There are also commands like
apt-get install --force-reinstall true
to force the package manager to reinstall stuff that it thinks is already installed.
A manual DownloadPsychtoolbox is always an option, but that's more inconvenient, if you have to figure out and install all the libraries and stuff needed by ptb manually.
All that said, a new ptb is about to be released within days and that should simplify the use of the neurodebian/debian/ubuntu ptb with matlab somewhat, hopefully making the DownloadAdditionsForNeuroDebian script redundant.
Btw. what was the text rendering problem you had?
Oh, and if you use KDE, as KUbuntu implies, make sure that fullscreen windows are unredirected by the KWin desktop manager, otherwise stimulus onset timing/performance and timestamping will be bad/inaccurate. Psychtoolbox usually makes sure that compositing 3d desktops based on compiz (e.g., Gnome-2 and Unity) have the option "unredirect_fullscreen_windows" enabled, at least when using the regular installer. Since a few days Ubuntu 12.10 and soon 12.04 will enable this by default:
(
http://www.ubuntuvibes.com/2012/12/unredirect-fullscreen-windows-now.html)
I don't know what the default on KUbuntu for KDE is, but at least past ptb's won't automatically take care of it, if it should be off by default. This thread
http://phoronix.com/forums/showthread.php?76256-Ubuntu-12-10-Now-Unredirects-Fullscreen-Windows
suggests it is off by default, which is not what you want. The setting would be probably somewhere where you change the desktop effects settings.
However, the upcoming ptb beta should auto-disable the compositor at least on KDE, if everything goes well, as i just found a blog post by the KWin maintainer that explains how to do this - currently only possible on KDE, as the method isn't yet standardized across desktop environments:
<
http://blog.martin-graesslin.com/blog/2011/04/turning-compositing-off-in-the-right-way/>
ciao,
-mario