Window.flip() slower than expected on ubuntu

See other discussions of this:
https://groups.google.com/forum/#!topic/psychopy-users/7RoZoJBLfdQ
https://github.com/psychopy/psychopy/issues/1139

It isn’t to do with things being too slow as such. This is a specific interaction with some linux systems and psychopy’s waitBlanking setting. We haven’t worked out exactly what systems show the problem so struggling to know how to get rid of it properly.

PsychoPy’s waitBlanking system forces OpenGL to wait until the physical screen refresh before continuing the script but what (I think) is happening is that some part of your ubuntu system is doing the same. Because both systems are waiting for a physical screen refresh we end up getting a double frame for each frame. Make sense? The easy workaround is to turn off waitBlanking in your visual.Window and let the system do it in your case.

The question is where this extra delay is occurring. Graphics card driver? Window compositor? I upgraded my 14.04 ubuntu to 16.04 and I don’t have the issue nay more, but I’ve also changed my graphics card drivers many times so I no longer know what fixed it.

If you are planning to update ubuntu to 16.04 I’d like to know what happens when you do.

Alternatively, Dan fixed it on his nVidia card by turning off vsync in his nvidia driver settings (using the proprietary driver not the open-source Nouveau driver).

I’m keen to know what happens on your system so we can work out how to detect/fix this, but there are several workarounds if you just need to get up and running.

best wishes
Jon

2 Likes