ValveSoftware / Proton

Compatibility tool for Steam Play based on Wine and additional components
Other
23.41k stars 1.02k forks source link

Incorrect selection of integrated graphics by many games #7820

Open amini-allight opened 1 month ago

amini-allight commented 1 month ago

My system has:

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?

Leopard1907 commented 1 month ago

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/