Vsync does not work while using PRIME Render offloading optimus NVIDIA GPU

This issue seems to only affect DXVK/D9VK. Every other non DXVK game that I have tried, including native Vulkan, Vsync works. I’ve talked to the developer of DXVK and he said it’s a driver issue.

I can confirm this issue: games running through DXVK and D9VK do not enable vsync when using PRIME Render Offload.
The native games I used for testing are Xonotic for OpenGL and Feral’s port of Shadow of the Tomb Raider for Vulkan. Their respective vsync options work, tearing is removed and __GL_SHOW_GRAPHICS_OSD=1 also reports it correctly.
As for non-native games, I tested at least a dozen games with DXVK and a few with D9VK, all have the same tearing issue, enabling vsync in these games has no effect. The only work-around is to disable unredirection and let the compositor handle vsync.

Hi, i would just like to know what you mean by “disable unredirection and let the compositor handle vsync.” do you mean to use the nvidia mode? also there is another way to lock FPS, it doesn’t fix vsync not working, but can prevent the GPU and CPU from working harder than needed. By using libstrangle you can limit the FPS of games to just 60 FPS or lower to save battery, or higher for high refresh rate displays.

Sorry, I shouldn’t have called it vsync. What I meant was tell the compositor not to give the application direct control of the buffer from which the display reads so that you never get a partially refreshed frame. I use Gnome Shell which has an extension that let you do that but unfortunately it is not per-application.

Yes, I’m aware of libstrangle, but it’s good that you mentioned it because it prompted me to give its VSYNC option a go. Turns out that also doesn’t work, in fact even just the limiter doesn’t do anything on DXVK games, does it work for you? I tried with vkcube and a simple OpenGL game (Devil Daggers) and it works fine with those, so I think I’m using it right.

I guess I should mention that when I was using the NVIDIA GPU as a source provider and the iGPU as just output (I think it’s called Reverse PRIME?) I didn’t have this tearing issue. PRIME Synchronization worked after setting everything up as instructed in the driver’s README. Now there’s no mention of PRIME Synchronization in xrandr --verbose, I wonder if that’s normal or not.

Hi,

I am facing this issue on two optimus laptop.

One with a GTX 980m under Ubuntu Budgie 20.04 (kernel 5.4) and the one with a GTX 1060 Max-Q under Solus os Budgie (kernel 5.5).

When using prime render offload the vsync doesn’t work anymore not matter what I try using DXVK.

Budgie DE is normally using vsync.

I disable unredirection to no avail.

Is there a command that we can use to force vsync when launching the game ?

@wpierce

Is there anything you can help with?

Could this be linked to this bug : Hangs/Freezes when Vulkan v-sync (VK_PRESENT_MODE_FIFO_KHR) is enabled

DXVK use this option to enable vsync VK_PRESENT_MODE_FIFO

I tried using libstrangle to force vsync to no avail, but at least I can limit the fps which prevent the CPU/GPU from overheating.

Thank you in advance.

Hi Any news on that?

@wpierce

Is the vsync issue when using prime render offload resolved with the driver 440.66.11?

Thank you.

The fix to that bug did not try to fix the bug reported here.

Is this issue still present in driver version 440.66.11?

Also please confirm any last driver version where it worked (if any)

Hi,

So far is has never work on either of the laptops. (gtx 980m or gtx 1060 max-q)

Tried different OS and flavour :

Ubuntu 18.04 to 20.04 all flavour.

Solus OS all flavour.

I will be testing this weekend on the 1060 max-q when the latest beta drivers will be available on Solus OS (normally this friday).

Hi dv-longinus,

Please let us know your test results with driver 440.66.11

Hi dv-longinus,

Please let us know your test results with driver 440.66.11

Hi dv-longinus,

Please let us know your test results with driver 440.66.11

We’ve found a bug in our driver that causes losing VSYNC on PRIME render offload and DXVK. Internally, it was a mostly harmless oversight that went completely unnoticed in nearly all cases but DXVK just happened to trigger the bug at its most pathological form. We have a fix for that bug and I have good reasons to believe it’s the same issue that has caused the problems discussed in this thread.

For now, and pending full verification, I can’t comment on the availability of the fix in upcoming releases but I wanted to let you know that there has been progress with regard to the issue.

1 Like

So we still need to wait for next release? Any walkaround ?

Hi!

Sooo whats the status on this issue? Does driver version 450.66 resolve this issue?

Best regards

Yes, It has been fixed in driver 450.66
Please verify the same and share your tests results with us.

@amrits I can’t check it, because __GL_SHOW_GRAPHICS_OSD stopped working for me.


Or are there other ways to test it?

I also can’t get __GL_SHOW_GRAPHICS_OSD=1 to work (ArchLinux, kernel 5.8.8).

Still, I could visually confirm that the vsync bug is gone. I tested 2 DXVK games (The Surge, Automachef) and a D9VK one (Magrunner): tearing is clearly visible when their respective vsync options are disabled and goes away when enabled.

Hi, This is not working here with Vulkan. It’s tested with Eve Online.

There’s a strange thing here requiring an external monitor to get it to work (at least, while plugged in…).
Can someone confirm the same strange behavior that I’m experiencing, and I do believe linked to the same issue ?

(more detailed thread here) in the hope it will help the devs to find out the issue

have a great day