PTB Warning question

Hi,

We are getting the following error while running one of our experimental scripts.

"PTB-WARNING: Call to PsychAvSetMmMaxThreadCharacteristics() for Vista-MMCSS scheduling failed for threadhandle 00007FFCF5DCA460. Setting thread priority to HIGHEST as a work-around… "

But our script works on another computer, so is it a hardware problem ? Do you have an idea to fix this bug ?

Thanks,
Adrien.

Info:

We are running latest PTB
Matlab R2019a 64bit
Intel Core i5-8250U @1,60 Ghz -1,80 Ghz
RAM 8GB
Win 10
Intel UHD Graphics 620

It’s a warning, because it couldn’t enable MMCSS scheduling for a thread, most likely because some other thread already enabled it, and only one thread in an application seems to be able to do so.

MMCSS scheduling is currently used if you call Priority(1), or Priority(2) as a non-admin user, or during Screen(‘OpenWindow’) for running the timing tests and calibrations, or if you use async flips, or request frame-sequential stereo on graphics cards that don’t support this, so we use our own homegrown stereo implementation.

MMCSS scheduling also may be used by your operating systems audio-driver if you use PsychPortAudio. If you’d call Priority() in your script after starting up PsychPortAudio playback tasks or use stereo/async-flips, it may trigger this warning, because there can only be one thread using MMCSS.

There are various limitations in MS Windows wrt. realtime scheduling, so these conflictas and drawbacks are not solvable. One of many reasons we recommend Linux for timing sensitive tasks or other demanding tasks.

If you say the same script works on another machine, it could be that you are using audio, but that machine has a different driver/soundcard with different MMCSS behaviour.

Or your script aborted with some error and you didn’t call “clear all” as recommended, so some MMCSS related tasks are still running, sabotaging successive re-runs of your script. To be safe, quitting and restarting Matlab may help here.

In any case, the warning states that the problem is being worked around as good as possible. And really demanding scenarios would use Linux anyway.

One little trick: If you use Priority(2) on Windows and you are running Matlab/Octave under an administrator account, then PTB may be able to get Priority(2) realtime scheduling without using MMCSS, so MMCSS can be used for some other realtime thread, e.g., audio or frame sequential stereo, or async flips.

In the end these are all workarounds for an OS not well suitable for realtime.