Screen tearing with VSYNC disabled

hi, i have noticed that disabling VSYNC from my Intel video drivers, video quality of retroarch games is very bad: the scrolling is tearing.

video example: https://1fichier.com/?vanz9i9150

(VSYNC on audio/video settings of retroarch are enabled and i use “gl” for video driver)

CPU is Intel J1900 with integrated GPU Intel HD Graphics (Bay Trail). OS is ArchLinux 64-bit

glxgears with VSYNC enabled:

$ glxgears
304 frames in 5.0 seconds = 60.667 FPS
300 frames in 5.0 seconds = 59.976 FPS
300 frames in 5.0 seconds = 59.978 FPS
XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0.0"
      after 968 requests (42 known processed) with 0 events remaining.

glxgears with VSYNC disabled:

$ vblank_mode=0 glxgears
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: option value of option vblank_mode ignored.
15119 frames in 5.0 seconds = 3023.734 FPS
15596 frames in 5.0 seconds = 3119.106 FPS
15134 frames in 5.0 seconds = 3026.777 FPS
XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0.0"
      after 47694 requests (42 known processed) with 0 events remaining.

When you outright disable V-Sync from your videocard drivers, I think it forces that state onto any application, even if you enable the internal V-Sync option contained within the software that you are using.

At least that’s what happens with my nVidia card (GTX 970) and corresponding drivers. If I set V-Sync to off from the drivers interface either globally or for a certain application, it will force it off regardless of other internal settings.

i have disabled VSYNC making this ~/.drirc file:

$ cat ~/.drirc
<device screen="0" driver="dri2">
	<application name="retroarch">
		<option name="vblank_mode" value="0"/>
	</application>
</device>

i also tried using this command:

vblank_mode=0 retroarch

but the result is the same.

i think is an unsolvable problem :expressionless: i need to disable VSYNC because with it enabled, “fast forward” of retroarch doesn’t work.

vsync exists to prevent tearing. It’s no surprise that removing it introduces tearing…

then is impossible to have “fast forward” without VSYNC and “Threaded video”.

this isn’t a problem with retroarch, it’s intel’s gfx drivers, specifically the opengl drivers (i think…). this started about a year or so ago, it used to be if you disabled vsync globally in X (note: it used to be an setting in the X driver, now it’s dri) the setting would become application controlled. now if you try and do that you’ll still get throttled page flipping, except there’s tearing that’s, at least in my experiences, consistent in its position on the display.

i’d say try using vulkan drivers, as they seem to be able to bypass this nonsense, but intel’s vulkan drivers kind of blow, too. i guess you’re just going to have to pick your poison.

Do you guys think that it would be reasonable to switch to triple buffering when fast-forwarding? I didn’t find any way to disable VSync in KMS with the open source radeon drivers, but I noticed that with triple buffering fast-forward works.