ValveSoftware / gamescope

SteamOS session compositing window manager
Other
2.99k stars 198 forks source link

Failed to initialize Vulkan on RX 6750XT #681

Closed zoro11031 closed 1 year ago

zoro11031 commented 1 year ago

Hello,

I've been having an issue when anytime I use gamescope to launch any game, it crashes at launch with the following error:

vulkan: selecting physical device 'AMD Radeon RX 6750 XT': queue family 1
vulkan: physical device does not support DRM format modifiers
vulkan: physical device doesn't support VK_EXT_physical_device_drm
Failed to initialize Vulkan

I've double checked my drivers etc and everything seems normal. Not sure why this is happening. It's affecting both the native Steam, the Steam runtime, and Flatpak Steam from what I've tested.

System:

Distro: Arch
CPU: AMD Ryzen 5 3600X
GPU: AMD Radeon 6750XT;
Kernel: 6.0.9-zen1-1-zen 
Steam version: steam 1.0.0.75-1
Gamescope version: gamescope 3.11.48-1
Mesa and Vulkan drivers: lib32-mesa 22.2.3-1; lib32-vulkan-radeon 22.2.3-1; mesa 22.2.3-1; vulkan-radeon 22.2.3-1
Proton versions tried: Experimental; GE; stable; Next'
Games tested: Spider-Man Remastered; Nier Automatal; Nier Replicant; Dark Souls Remastered; Dark Souls III

Amdvlk is not installed on the system at all. Libdrm and lib32-libdrm are both installed as well.

mbriar commented 1 year ago

Amdvlk or the amdgpu-pro vulkan driver has to be installed of your system, with Mesa/RADV the physical device name would never be 'AMD Radeon RX 6750 XT', there would be a 'RADV NAVI22' in there. You only get that device name with amdvlk or pro.

zoro11031 commented 1 year ago

The only thing I have that would qualify is the patched drivers for AMF, but those aren't used for gaming. Here's the output from me searching "amd" in pacman:


pacman -Qs amd
local/amd-ucode 20221109.60310c2-2
    Microcode update image for AMD CPUs
local/amf-amdgpu-pro-fix 22.20.3_1462318-1 (Radeon_Software_for_Linux)
    AMDGPU Pro Advanced Multimedia Framework, patched version to enable AMF on RX 6000 series cards
local/amf-headers 1.4.26-1
    Header files for AMD Advanced Media Framework
local/vulkan-amdgpu-pro-fix 22.20.3_1462318-1 (Radeon_Software_for_Linux)
    AMDGPU Pro Vulkan driver, patched version to enable AMF on RX 6000 series cards
local/xf86-video-amdgpu 22.0.0-1 (xorg-drivers)
    X.org amdgpu video driver

And here's the output from searching Radeon:

pacman -Qs radeon
local/amf-amdgpu-pro-fix 22.20.3_1462318-1 (Radeon_Software_for_Linux)
    AMDGPU Pro Advanced Multimedia Framework, patched version to enable AMF on RX 6000 series cards
local/lib32-vulkan-radeon 22.2.3-1
    Radeon's Vulkan mesa driver (32-bit)
local/vulkan-amdgpu-pro-fix 22.20.3_1462318-1 (Radeon_Software_for_Linux)
    AMDGPU Pro Vulkan driver, patched version to enable AMF on RX 6000 series cards
local/vulkan-radeon 22.2.3-1
    Radeon's Vulkan mesa driver

I did actually find the root cause though. It was from having this environnment variable set: XDG_SESSION_TYPE=wayland. When I unset it gamescope runs fine. Not sure why this happens, as I'm running on Wayland either way. Must be a bug.

emersion commented 1 year ago

Closing, this is a misconfiguration on your side as @mbriar explained. amdvlk doesn't support the extensions required by gamescope.

mbriar commented 1 year ago

You have the proprietary vulkan driver installed (vulkan-amdgpu-pro-fix), which is pretty similar to amdvlk. You can just force the use of RADV of gamescope with VK_ICD_FILENAMES if you want to keep it installed for AMF.

zoro11031 commented 1 year ago

I’ve uninstalled the drivers in question and re-added the XDG_SESSION_TYPE=wayland environmental variable to test, and I’m still getting a crash on game start regardless, even after rebooting the system.

It seems the culprit is still the way gamescope handles that particular environmental variable regardless of drivers.