protonscr

IMMEDIATE Presentation mode by default in vkd3d?

protonclosed Feature Request
ValveSoftware/Proton#8336 · opened 2024-12-23 by pollux78 · updated 2025-05-03 · 5 comments · github
Ppollux78 2024-12-23 github

Feature Request

Switching to IMMEDIATE from FIFO

I confirm:

  • [ ✅] that I haven't found another request for this feature.
  • [ ✅] that I have checked whether there are updates for my system available that
    contain this feature already.

Description

By default it seems most proton games under vkd3d default to FIFO instead of IMMEDIATE, why is that? on cs2 a native linux game defaults to IMMEDITATE all the time so im wondering why this is the default, same goes with DXVK, and if this can be changed in proton or if its up to the desktop environment to do this, as I have tearing enabled in KDE plasma 6.2.4 but it doesn't switch the game to IMMEDIATE presentation mode when launching a dx12/vkd3d game, and so i have to manually force it with something like goverlay + mangohud

Justification [optional]

You get better latency in games under wayland especially iv noticed compared to x11

Risks [optional]

I dont think there is much ngl, iv been forcing it on mangohud for a while now and i dont have any major issues either on amd or nvidia hardware

References [optional]

Mmbriar 2024-12-26 github

It's up to the game to choose a present mode, proton doesn't set any default. DXVK only translates what the game sets in DXGI to the vulkan equivalent. And forcing IMMEDIATE by default would have the obvious drawback that it would introduce tearing (if you disallow tearing in e.g. the KDE settings IMMEDIATE will behave like MAILBOX and not tear)

Ppollux78 2024-12-26 github

It's up to the game to choose a present mode, proton doesn't set any default. DXVK only translates what the game sets in DXGI to the vulkan equivalent. And forcing IMMEDIATE by default would have the obvious drawback that it would introduce tearing (if you disallow tearing in e.g. the KDE settings IMMEDIATE will behave like MAILBOX and not tear)

Ok, so if a game like the finals for example on windows it would do immediate probably right? While on Linux by default it chooses FIFO, more than 90% of my games were choosing FIFO by default when I have tearing enabled in KDE plasma or the desktop that supports the tearing protocol, shouldn't the desktop tell the game set IMMEDIATE as user has tearing enabled? That would be nice, idk how to do that and I'm not a developer so I'll stick with mangohud for right now but just a thought I had as it doesn't make sense having tearing enabled if the game itself is using FIFO by default

Mmbriar 2024-12-26 github

The kde 'allow tearing' option doesn't tell the game anything. The only thing it does is allow IMMEDIATE to work like IMMEDIATE on wayland in the first place. Without the option set on wayland, IMMEDIATE is emulated with MAILBOX.

For windows games, DXGI syncInterval == 0 gets translated to IMMEDIATE, while syncInterval == 1 gets translated to FIFO. Most games will have a setting called 'Vsync on/off' in their settings menu. If you turn that off you get syncInterval == 0 and consequently IMMEDIATE on vulkan. There should really be no difference in behavior between windows and linux there.

Ppollux78 2024-12-26 github

The kde 'allow tearing' option doesn't tell the game anything. The only thing it does is allow IMMEDIATE to work like IMMEDIATE on wayland in the first place. Without the option set on wayland, IMMEDIATE is emulated with MAILBOX.

For windows games, DXGI syncInterval == 0 gets translated to IMMEDIATE, while syncInterval == 1 gets translated to FIFO. Most games will have a setting called 'Vsync on/off' in their settings menu. If you turn that off you get syncInterval == 0 and consequently IMMEDIATE on vulkan. There should really be no difference in behavior between windows and linux there.

I see well some games must be not turning it off as I always make sure vsync is off in fps games like the finals and it uses FIFO still but thanks for teaching me something :)

Mmbriar 2024-12-26 github

Mangohud also can't show the used present mode correctly for anything using dynamic present modes with VK_EXT_swapchain_maintenance1, which dxvk and vkd3d-proton are using for a while now: https://github.com/flightlessmango/MangoHud/issues/1190#issuecomment-1963112237

Nothing extracted yet.