Force OpenGL Vsync

Currently I’m using Ubuntu 14.04.2 with a GTX 750 Ti and the 346.47 drivers.

Once upon a time, in an earlier version of Ubuntu, using an older nVidia graphics card, if I went to the nVidia control panel > OpenGL Settings and checked the box “Sync to VBlank”, that would force every OpenGL application / game to vsync, whether the game had built-in support for vsync or not.

Later, I upgraded to both Ubuntu 14.04 and the GTX 750 Ti at about the same time.

Ever since the upgrade (clean install of Ubuntu), checking “Sync to VBlank” doesn’t do anything. If the game has built-in support for vsync, the vsync will work. If the game doesn’t have built-in support for vsync, I’ll get tearing in both windowed and full-screen modes, regardless of how the Sync to VBlank option is set.

I should add that I am not now, nor was I before, using compositing (LXDE destkop). Compositing has never been a part of this equation. Nor do I want to use compositing.

So, forcing vsync in all OpenGL applications used to work. It doesn’t anymore. Is there some new way to do it?

Please post glxgears output.

Something like that:

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

VSync has been enabled by default for the past several years. Perhaps your problem is different. BTW, try enabling triple buffering and see if it helps.

Section "Device"
	Identifier	"Videocard0"
	BusID		"PCI:1:0:0"
	Driver		"nvidia"
	VendorName	"NVIDIA"
	BoardName	"NVIDIA Corporation GK106 [GeForce GTX 660] (rev a1)"
	Option		"Coolbits" "12"
	Option		"RegistryDwords" "RMUseSwI2c=0x01; RMI2cSpeed=100"
	Option		"Metamodes" "HDMI-0: 1920x1080 { ForceCompositionPipeline = On }"
	Option		"TripleBuffer" "On"

# This is a trailing line, it is needed so that End Section is not the last line