Here is my setup:
Psychtoolbox version: 3.0.13 - Flavor: beta - Corresponds to SVN Revision 8129
Matlab version: 9.1.0.441655 (R2016b)
OS: Fedora 24
--> Fedora is not officially supported and therefore not tested for compatibility, only Debian/*buntu is.
KbQueue functions are not working on my setup. Previously, I just had Psychtoolbox installed for Octave using the DownloadPsychtoolbox script. Everything worked fine. Then I acquired Matlab and installed it there using the DownloadPsychtooblox script as well. Everything was working fine there too, but now I ran into keyboard input problems on both Octave and Matlab. Could installing PTB for both Octave and Matlab cause these issues?
-> Unlikely. When you DownloadPsychtoolbox PTB you download it for all operating systems/runtimes/versions. You don't need two copies for Matlab/Octave, e.g., you could simply call SetupPsychtoolbox on Matlab to perform additional Matlab specific setup, e.g., for Java and adding the proper path to the mex files. I run Octave and Matlab all the time in parallel on the same PTB installation, even the same one for OSX and Windows.
I would like to fix the Matlab version first. I attached a screenshot of the KbQueueDemo output. The demo hangs at "Press the escape key to proceed to the next demo." If I press any key nothing happens. If I press the ESC key nothing happens. I can only exit the demo pressing CTRL + C. Then I see the messages about priority.
-> What else changed? E.g., did you connect an additional keyboard, or other button devices? KbQueueDemo when called without an explicit deviceIndex for the keyboard(like) device to query will only check the "default keyboard" which is chosen by some PTB specific heuristic. The heuristic is to choose the first device that identifies itself as keyboard and is obviously not something else. That default choice could get thrown off if you add devices which pretend to be "keyboards", or if Fedora is configured to use/assign very different names for keyboards than what Debian/Ubuntu do. PTB's heuristic would need updates in future releases to deal with that.
What is the full output of: [a,b,c]=GetKeyboardIndices ?
I think I should have proper permissions to adjust priority. I am part of group "psychtoolbox" and here is the output of /etc/security/limits.d/99-psychtoolboxlimits.conf:
-> Yes that looks right. But there are different security mechanisms/frameworks available for Linux to prevent malicious actions or runaway processes from creating a denial of service on the system. Possible that Fedora employs additional or different configuration for those resource controls than Debian/Ubuntu, in which case Fedora may reject some requests without some additional configuration. PTB is only tested for proper setup on Debian/Ubuntu.
However, that PTB-CRITICAL error wouldn't cause KbQueues to fail, just to have less accurate timing under high loads, so my bet is on a wrong default keyboard mapping.
-mario
# 99-psychtoolboxlimits.conf
#
# Allow members of the psychtoolbox user group
# to lock unlimited amounts of core memory and
# to use realtime scheduling up to priority
# level 50. Allows to run Matlab / Octave as
# regular user and get good realtime behaviour,
# aka a fully functional Priority() command.
@psychtoolbox - rtprio 50
@psychtoolbox - memlock unlimited
I am not sure how to fix this problem.