protonscr

Incorrect selection of integrated graphics by many games

protonopen
ValveSoftware/Proton#7820 · opened 2024-06-07 by amini-allight · updated 2024-06-08 · 1 comments · github
Aamini-allight 2024-06-07 github

My system has:

  • A 7950X CPU with integrated graphics
  • A 6900 XT dedicated graphics card
  • A monitor connected to the 6900 XT, nothing connected to the display outputs on the motherboard
  • A wlroots-derived window manager launched using the WLR_DRM_DEVICES environment variable to force the 6900 XT to be used

I have an issue under Proton where some games will favor the integrated graphics device over the dedicated one. This seems to be more common with recent high budget titles like Senua's Saga: Hellblade II and Dead Space (2023 remake). I'm not sure what the common factor between the affected games is, Unreal Engine 4/5 titles seem to make up most of the afflicted but Dead Space (2023 remake) is a Frostbite 3 title.

Using the wrong graphics device causes a massive system-wide slowdown that makes it very difficult to even open a task manager and close the game. In some cases it can cause the system to freeze entirely. If you can manage to close the game system performance returns to normal. The behavior is somewhat inconsistent, sometimes launching the game will select the wrong graphics device, sometimes it will not.

This behavior can be fixed by using the DXVK_FILTER_DEVICE_NAME environment variable in the game launch options to force Proton to select the dedicated GPU.

I'm not sure if this behavior is a bug, there is no perfect answer to graphics device selection that will behave correctly in all cases, but I think it should be treated as such because to a less experienced user this behavior is equivalent to the game failing to work entirely and the correct solution is obscure. Any solution users find online (e.g. from the ProtonDB reports for the afflicted game) can't be copy-pasted without understanding them because the correct graphics device name is system-specific. If the graphics device selection algorithm can't be improved maybe a UI element could be added to the compatibility tab in the Steam UI to display the current selection to the user and allow them to change it graphically without needing to know about DXVK_FILTER_DEVICE_NAME?

LLeopard1907 2024-06-08 github

You can combine this MESA_VK_DEVICE_SELECT_FORCE_DEFAULT_DEVICE=1 with

https://wiki.archlinux.org/title/environment_variables

2.1 Globally entry here.

https://docs.mesa3d.org/envvars.html#envvar-MESA_VK_DEVICE_SELECT_FORCE_DEFAULT_DEVICE

On Arch based distros that would need this package to be installed.

https://archlinux.org/packages/extra/x86_64/vulkan-mesa-layers/