How to disable vsync on Intel card / Linux

Just a small post to explain how to disable vsync on an Intel integrated graphic card on Linux to run a java application from eclipse (or any other application for that matter).

You might have some problem for example if you run a LibGdx game and setting the vSyncEnabled configuration option does not work at all (don’t forget to also update foregroundFPS).

To run a program and disabling vsync it’s quite easy, just set the vblank_mode environment variable to 0, for example :

$ glxgears 
Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
304 frames in 5.0 seconds = 60.797 FPS

$ vblank_mode=0 glxgears
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: default value of option vblank_mode overridden by environment.
27598 frames in 5.0 seconds = 5519.494 FPS

$ export vblank_mode=0
$ glxgears 
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: default value of option vblank_mode overridden by environment.
27929 frames in 5.0 seconds = 5585.793 FPS

 

To do the same thing to test an application under eclipse you can just change its run configuration :

capture_2015-04-10_13-24-02_0246_Run_Configurations_

Just set it to 1 when you are done (or delete the variable)

 

Comments are closed.