| Reference | Downloads | Github

Complete refresh rate cycle done in miliseconds

The refresh rate of my laptop’s monitor is 60Hz (running ‘’‘xrandr’’’ on the terminal), however, 60 iterations using win.flip() are done in ~ 0.04 seconds. I’m using a Dell 15 N5110 laptop running Ubuntu 16.04. The GPU is an NVIDIA GeForce GT 525M/PCIe/SSE2. Python 2.7.16 and Psychopy 3.0.7.

Unchecking ‘Sync to Vblank’ on NVIDIA X SERVER Settings does not solve the problem. Adding waitBlanking=False to the Window() call neither.

The final getTime() of the following code outputs around 0.04.

from psychopy.core import Clock
from psychopy.visual import Window

win = Window()

timer = Clock()
for frameN in range(60):
    print 'Frame: ' + str(frameN)
    print 'Time: ' + str(timer.getTime())
print 'Final time: ' + str(timer.getTime())

And that is with the print() statements slowing everything down… it would presumably be even faster if you were storing these values in memory or using logging commands.

I guess this is the perennial issues of graphics driver support on Linux.
What are the results of running PsychoPy’s benchmark wizard and the demo?

Here’s the output:

Console output:
pygame 1.9.5

Hello from the pygame community. Contribute - pygame wiki

main:19: UserWarning:

This call to matplotlib.use() has no effect because the backend has already

been chosen; matplotlib.use() must be called before pylab, matplotlib.pyplot,

or matplotlib.backends is imported for the first time.

The backend was originally set to ‘module://ipykernel.pylab.backend_inline’ by the following code:

File "/home/nic/anaconda3/envs/py27/lib/python2.7/", line 174, in _run_module_as_main

"main", fname, loader, pkg_name)

File "/home/nic/anaconda3/envs/py27/lib/python2.7/", line 72, in _run_code

exec code in run_globals

File "/home/nic/anaconda3/envs/py27/lib/python2.7/site-packages/spyder_kernels/console/", line 11, in <module>


File "/home/nic/anaconda3/envs/py27/lib/python2.7/site-packages/spyder_kernels/console/", line 298, in main


File "</home/nic/anaconda3/envs/py27/lib/python2.7/site-packages/decorator.pyc:decorator-gen-121>", line 2, in initialize

File "/home/nic/anaconda3/envs/py27/lib/python2.7/site-packages/traitlets/config/", line 87, in catch_config_error

return method(app, *args, **kwargs)

File "/home/nic/anaconda3/envs/py27/lib/python2.7/site-packages/ipykernel/", line 485, in initialize


File "/home/nic/anaconda3/envs/py27/lib/python2.7/site-packages/IPython/core/", line 266, in init_code


File "/home/nic/anaconda3/envs/py27/lib/python2.7/site-packages/IPython/core/", line 292, in _run_exec_lines, store_history=False)

File "/home/nic/anaconda3/envs/py27/lib/python2.7/site-packages/ipykernel/", line 537, in run_cell

return super(ZMQInteractiveShell, self).run_cell(*args, **kwargs)

File "/home/nic/anaconda3/envs/py27/lib/python2.7/site-packages/IPython/core/", line 2724, in run_cell‘post_run_cell’)

File "/home/nic/anaconda3/envs/py27/lib/python2.7/site-packages/IPython/core/", line 74, in trigger

func(*args, **kwargs)

File "/home/nic/anaconda3/envs/py27/lib/python2.7/site-packages/ipykernel/pylab/", line 164, in configure_once


File "/home/nic/anaconda3/envs/py27/lib/python2.7/site-packages/IPython/core/", line 315, in activate_matplotlib


File "/home/nic/anaconda3/envs/py27/lib/python2.7/site-packages/matplotlib/", line 231, in switch_backend

matplotlib.use(newbackend, warn=False, force=True)

File "/home/nic/anaconda3/envs/py27/lib/python2.7/site-packages/matplotlib/", line 1422, in use


File "/home/nic/anaconda3/envs/py27/lib/python2.7/site-packages/matplotlib/backends/", line 16, in <module>

line for line in traceback.format_stack()

0.4625 WARNING Monitor specification not found. Creating a temporary one…
0.4634 WARNING User requested fullscreen with size [1280 1024], but screen is actually [1366, 768]. Using actual size
0.9447 WARNING t of last frame was 2.08ms (=1/481)
0.9462 WARNING t of last frame was 1.49ms (=1/669)
0.9476 WARNING t of last frame was 1.41ms (=1/711)
0.9490 WARNING t of last frame was 1.41ms (=1/709)
0.9505 WARNING Multiple dropped frames have occurred - I’ll stop bothering you about them!

/home/nic/anaconda3/envs/py27/lib/python2.7/site-packages/matplotlib/axes/ UserWarning: The ‘normed’ kwarg is deprecated, and has been replaced by the ‘density’ kwarg.

warnings.warn("The ‘normed’ kwarg is deprecated, and has been "

Unless your screen is running at > 500 Hz, your graphics card is not successfully set to sync to the vertical blank. PsychoPy requires this to be set, and the window should be created with waitBlanking set to True (the default).

1 Like

So, I updated Ubuntu to the 18.04 version and the problem is apparently solved. Below is the output of