gamescope icon indicating copy to clipboard operation
gamescope copied to clipboard

vulkan: vkCreateDevice failed (VkResult: -7)

Open konradmb opened this issue 8 months ago • 36 comments

Compiled from master

$ gamescope
No CAP_SYS_NICE, falling back to regular-priority compute and threads.
Performance will be affected.
wlserver: [backend/headless/backend.c:68] Creating headless backend
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
MESA-INTEL: warning: Haswell Vulkan support is incomplete
vulkan: selecting physical device 'Intel(R) HD Graphics 4400 (HSW GT2)': queue family 0 (general queue family 0)
vulkan: physical device supports DRM format modifiers
vulkan: vkCreateDevice failed (VkResult: -7)
Failed to initialize Vulkan

git bisect:

git bisect start
# status: waiting for both good and bad commits
# good: [c5269642a293ce5e91d3d644ee15a3f3bcc3c5f3] build: fix ci
git bisect good c5269642a293ce5e91d3d644ee15a3f3bcc3c5f3
# status: waiting for bad commit, 1 good commit known
# bad: [d1eb70bb1a17072b48f7545af0fcf5f16d677aee] steamcompmgr: Overwrite SDL_VIDEODRIVER before nested app launch
git bisect bad d1eb70bb1a17072b48f7545af0fcf5f16d677aee
# good: [659e55011fdf2ebb3bd5d06b7b31761fde398ae9] steamcompmgr: Default SDR content brightness to 203
git bisect good 659e55011fdf2ebb3bd5d06b7b31761fde398ae9
# good: [38d2f04ba97f6ac152ea87bdb937c584a1650166] steamcompmgr: Fix lut3d output override check
git bisect good 38d2f04ba97f6ac152ea87bdb937c584a1650166
# good: [95368ea7eff78f5c474c76d3a20d368780e8a9f2] protocol: Add presentation-time xml + build
git bisect good 95368ea7eff78f5c474c76d3a20d368780e8a9f2
# good: [2aa742b0805114a5999dc571f227098ffd392f43] reshade: Fix GAMESCOPE_SDR_ON_HDR_NITS define
git bisect good 2aa742b0805114a5999dc571f227098ffd392f43
# bad: [42343857f05be32bc4c33156e235c3ae42e26c63] layer: Limit max number of past present timings
git bisect bad 42343857f05be32bc4c33156e235c3ae42e26c63
# bad: [476ca5d835e74ad5ccf39a1d5ace119faf4009c9] layer: Only override window when we can bypass
git bisect bad 476ca5d835e74ad5ccf39a1d5ace119faf4009c9
# bad: [5151250d9433f978429cf7572b5159394c082355] main: Use SDL_VIDEODRIVER wayland by default, force on present wait
git bisect bad 5151250d9433f978429cf7572b5159394c082355
# good: [3fa5e7a61616390139567035d5596a6f32410d4d] reshade: Hook up "mousepoint" uniform
git bisect good 3fa5e7a61616390139567035d5596a6f32410d4d
# bad: [1bb7ef50ba6b44811ea7349df4365fec41652aee] layer: Implement VK_GOOGLE_display_timing + present wait/id for nested
git bisect bad 1bb7ef50ba6b44811ea7349df4365fec41652aee
# good: [fc6e2295060ae853cfc6e9c3bafb5080eef3ee7f] layer: Implement GetPhysicalDeviceSurfaceCapabilities2KHR
git bisect good fc6e2295060ae853cfc6e9c3bafb5080eef3ee7f
# first bad commit: [1bb7ef50ba6b44811ea7349df4365fec41652aee] layer: Implement VK_GOOGLE_display_timing + present wait/id for nested

konradmb avatar Oct 17 '23 00:10 konradmb

Is your Mesa version too old to support present wait + wayland?

Joshua-Ashton avatar Oct 17 '23 10:10 Joshua-Ashton

No, I don't think so. I've checked just now with mesa-git, same error.

$ glxinfo -B
name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Intel (0x8086)
    Device: Mesa Intel(R) HD Graphics 4400 (HSW GT2) (0xa16)
    Version: 23.3.0
    Accelerated: yes
    Video memory: 1536MB
    Unified memory: yes
    Preferred profile: core (0x1)
    Max core profile version: 4.6
    Max compat profile version: 4.6
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) HD Graphics 4400 (HSW GT2)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 23.3.0-devel
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.6 (Compatibility Profile) Mesa 23.3.0-devel
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.2 Mesa 23.3.0-devel
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
$ dnf info mesa
Last metadata expiration check: 0:00:20 ago on Tue Oct 17 14:34:22 2023.
Available Packages
Name         : mesa
Version      : 23.3.0
Release      : 0.3.20231017.10.d6613de.fc38
Architecture : src
Size         : 29 M
Source       : None
Repository   : copr:copr.fedorainfracloud.org:xxmitsu:mesa-git
Summary      : Mesa 3D Graphics Library, git version
URL          : http://www.mesa3d.org
License      : MIT
Description  : Mesa 3D Graphics Library, git version.

Name         : mesa
Version      : 23.3.0
Release      : 0.3.20231017.10.d6613de.fc38
Architecture : src
Size         : 29 M
Source       : None
Repository   : copr:copr.fedorainfracloud.org:xxmitsu:mesa-git:ml
Summary      : Mesa 3D Graphics Library, git version
URL          : http://www.mesa3d.org
License      : MIT
Description  : Mesa 3D Graphics Library, git version.
$ ./build-master/src/gamescope            
No CAP_SYS_NICE, falling back to regular-priority compute and threads.
Performance will be affected.
wlserver: [backend/headless/backend.c:68] Creating headless backend
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
MESA-INTEL: warning: Haswell Vulkan support is incomplete
vulkan: selecting physical device 'Intel(R) HD Graphics 4400 (HSW GT2)': queue family 0 (general queue family 0)
vulkan: physical device supports DRM format modifiers
vulkan: vkCreateDevice failed (VkResult: -7)
Failed to initialize Vulkan

konradmb avatar Oct 17 '23 12:10 konradmb

I can confirm this also happens on a AMD Graphics Card as well.

$ gamescope -- supertuxkart
No CAP_SYS_NICE, falling back to regular-priority compute and threads.
Performance will be affected.
wlserver: [backend/headless/backend.c:68] Creating headless backend
vulkan: selecting physical device 'AMD Radeon RX 570 Series': queue family 1 (general queue family 0)
vulkan: physical device supports DRM format modifiers
vulkan: vkCreateDevice failed (VkResult: -7)
Failed to initialize Vulkan
$
$ glxinfo -B
name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: AMD (0x1002)
    Device: AMD Radeon RX 570 Series (polaris10, LLVM 16.0.6, DRM 3.54, 6.5.7-arch1-1) (0x67df)
    Version: 23.2.1
    Accelerated: yes
    Video memory: 8192MB
    Unified memory: no
    Preferred profile: core (0x1)
    Max core profile version: 4.6
    Max compat profile version: 4.6
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2
Memory info (GL_ATI_meminfo):
    VBO free memory - total: 6970 MB, largest block: 6970 MB
    VBO free aux. memory - total: 7232 MB, largest block: 7232 MB
    Texture free memory - total: 6970 MB, largest block: 6970 MB
    Texture free aux. memory - total: 7232 MB, largest block: 7232 MB
    Renderbuffer free memory - total: 6970 MB, largest block: 6970 MB
    Renderbuffer free aux. memory - total: 7232 MB, largest block: 7232 MB
Memory info (GL_NVX_gpu_memory_info):
    Dedicated video memory: 8192 MB
    Total available memory: 16141 MB
    Currently available dedicated video memory: 6970 MB
OpenGL vendor string: AMD
OpenGL renderer string: AMD Radeon RX 570 Series (polaris10, LLVM 16.0.6, DRM 3.54, 6.5.7-arch1-1)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 23.2.1-arch1.2
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.6 (Compatibility Profile) Mesa 23.2.1-arch1.2
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.2 Mesa 23.2.1-arch1.2
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

$

uristdwarf avatar Oct 18 '23 09:10 uristdwarf

Same is happening for me on Intel HD 4000 with 3.12.6 and 3.12.7, if I downgrade to 3.12.5 it works.

gbpi avatar Oct 18 '23 23:10 gbpi

I can confirm this also happens on a AMD Graphics Card as well.

Follow up on this: I tried testing an earlier version as well, and that led me to another error, which lead me to the solution. The problem was that amdvlk was still installed for some reason and was conflicting with radv. After removing amdvlk it now works on both master and the latest version tag.

uristdwarf avatar Oct 19 '23 12:10 uristdwarf

I can confirm this also happens on a AMD Graphics Card as well.

Follow up on this: I tried testing an earlier version as well, and that led me to another error, which lead me to the solution. The problem was that amdvlk was still installed for some reason and was conflicting with radv. After removing amdvlk it now works on both master and the latest version tag.

I am on a fresh arch install, no amdvlk - only radv is present - and am getting OP's error.

[owner@Turin ~]$ glxinfo -B
name of display: :1
display: :1  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: AMD (0x1002)
    Device: AMD Radeon RX 6900 XT (navi21, LLVM 16.0.6, DRM 3.54, 6.5.7-2-cachyos-lto) (0x73bf)
    Version: 23.3.0
    Accelerated: yes
    Video memory: 16384MB
    Unified memory: no
    Preferred profile: core (0x1)
    Max core profile version: 4.6
    Max compat profile version: 4.6
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2
Memory info (GL_ATI_meminfo):
    VBO free memory - total: 15274 MB, largest block: 15274 MB
    VBO free aux. memory - total: 15861 MB, largest block: 15861 MB
    Texture free memory - total: 15274 MB, largest block: 15274 MB
    Texture free aux. memory - total: 15861 MB, largest block: 15861 MB
    Renderbuffer free memory - total: 15274 MB, largest block: 15274 MB
    Renderbuffer free aux. memory - total: 15861 MB, largest block: 15861 MB
Memory info (GL_NVX_gpu_memory_info):
    Dedicated video memory: 16384 MB
    Total available memory: 32391 MB
    Currently available dedicated video memory: 15274 MB
OpenGL vendor string: AMD
OpenGL renderer string: AMD Radeon RX 6900 XT (navi21, LLVM 16.0.6, DRM 3.54, 6.5.7-2-cachyos-lto)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 23.3.0-devel (git-9c2212f9b3)
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.6 (Compatibility Profile) Mesa 23.3.0-devel (git-9c2212f9b3)
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.2 Mesa 23.3.0-devel (git-9c2212f9b3)
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

Update

Resolved by downgrading gamescope from 3.12.7 to 3.12.6.

ninjaquick avatar Oct 20 '23 01:10 ninjaquick

I can confirm that uninstalling amdvlk fixed this issue for me. I tried first downgrading gamescope to 3.12.6 and that did nothing.

HaydonBaddock avatar Oct 30 '23 21:10 HaydonBaddock

I can indeed confirm that despite specifically loading the radeon driver via AMD_VULKAN_ICD=RADV it still doesn't fix the issue. Only after completely uninstalling the amdvlk drivers it fixed my problem.

Still a bug though. I think this should be fixed or at least mentioned somewhere.

Toorero avatar Nov 09 '23 19:11 Toorero

I can also confirm that uninstalling AMDVLK fixed the issue despite there not being any reason Gamescope should have been attempting to use it. I didn't attempt downgrading gamescope before resolving the problem but will try confirming that once I have some more time.

caseif avatar Nov 29 '23 02:11 caseif

If setcap has been run on the binary it counts as "elevated" so user controls of what to load are ignored, like VK_ICD_FILENAMES and AMD_VULKAN_ICD, so it will default to AMDVLK, also causing this error.

https://github.com/KhronosGroup/Vulkan-Loader/blob/main/docs/LoaderLayerInterface.md#exception-for-elevated-privileges

https://github.com/KhronosGroup/Vulkan-Loader/blob/main/docs/LoaderInterfaceArchitecture.md#elevated-privilege-caveats

DianaNites avatar Nov 30 '23 23:11 DianaNites

I have the same error on Intel, I don't have amdvlk installed. As far as I know the only vulkan driver I have installed is vulkan-intel:

EDIT: I tested and gamescope works as expected until version 3.12.5 in version 3.12.6 it breaks for me and I get the same error as OP:

No CAP_SYS_NICE, falling back to regular-priority compute and threads.
Performance will be affected.
wlserver: [backend/headless/backend.c:68] Creating headless backend
vulkan: selecting physical device 'Intel(R) HD Graphics 5500 (BDW GT2)': queue family 0 (general queue family 0)
vulkan: physical device supports DRM format modifiers
vulkan: vkCreateDevice failed (VkResult: -7)
Failed to initialize Vulkan

Mesa info:

[ vabenil@arch-pc: ~/Downloads ]$ glxinfo -B
name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Intel (0x8086)
    Device: Mesa Intel(R) HD Graphics 5500 (BDW GT2) (0x1616)
    Version: 23.3.1
    Accelerated: yes
    Video memory: 3808MB
    Unified memory: yes
    Preferred profile: core (0x1)
    Max core profile version: 4.6
    Max compat profile version: 4.6
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) HD Graphics 5500 (BDW GT2)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 23.3.1-arch1.1
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.6 (Compatibility Profile) Mesa 23.3.1-arch1.1
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.2 Mesa 23.3.1-arch1.1
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

vabenil avatar Dec 24 '23 16:12 vabenil

I have the same issue on 2 systems.

System 1:

  • Radeon HD 7970 (amdgpu)
  • Debian 12

The gamescope packaged by Debian works fine since it's version 3.11.49 but the gamescope in Flatpak is broken. Downgrading the flatpak to 3.12.5 fixes it. (flatpak update --commit=9e2ba1b79351dde28e2984b75b11701cbfba1444ba1b0260b61f45ad159c8c74 org.freedesktop.Platform.VulkanLayer.gamescope/x86_64/23.08) I also tried compiling gamescope 3.12.5, 3.12.6 and 3.12.7 from source and 3.12.5 worked fine while 3.12.{6,7} crashed with vkCreateDevice failed, which confirms that the issue was introduced between 3.12.5 and 3.12.6.

System 2:

  • Intel HD Graphics 4000
  • Arch Linux

The gamescope packaged by Arch and the flatpak are both broken. Downgrading the flatpak (as above) fixes it and downgrading the Arch packaged gamescope to 3.12.5-1 from https://archive.archlinux.org/packages/g/gamescope/ fixes that. Versions 3.12.6-1 and above crash with vulkan: vkCreateDevice failed (VkResult: -7)

Sandelinos avatar Dec 28 '23 20:12 Sandelinos

It seems the minimum Vulkan version has been bumped up to 1.2, which leaves out early AMD GCN cards and Intel 4000 series.

gbpi avatar Dec 30 '23 23:12 gbpi

But radv supports vulkan 1.3 on everything except GCN 1(GFX6) where it supports all required extensions for vulkan 1.3 except for VK_EXT_scalar_block_layout which is a required extension for vulkan 1.2. Does gamescope require/use VK_EXT_scalar_block_layout? source: https://mesamatrix.net/

TheW0LVERIN3 avatar Jan 04 '24 13:01 TheW0LVERIN3

But radv supports vulkan 1.3 on everything except GCN 1(GFX6) where it supports all required extensions for vulkan 1.3 except for VK_EXT_scalar_block_layout which is a required extension for vulkan 1.2. Does gamescope require/use VK_EXT_scalar_block_layout? source: https://mesamatrix.net/

Since most of the people in this issue have said that gamescope 3.12.5 works ok, but 3.12.6 gives you the error, I looked at the changes made from 3.12.5->3.12.6 : https://github.com/ValveSoftware/gamescope/compare/a8471d81b36ea1d9dc90a7d35f9ad0631feaf1ae...ValveSoftware:gamescope:d11567122daaba250860c24219810931ace4ce5c#diff-0ca179f8adb820354aba0b6a063350f9e32689950ead39e8bbeca021fa8ba0e0R3033

not sure if this is the sole issue, but it seems like version 3.12.6 actually bumped the vulkan version to 1.3

but I'm not sure if the minimum vulkan version is actually the issue, since everyone in this issue is getting VkResult: -7 aka VK_ERROR_EXTENSION_NOT_PRESENT

also, it looks like gamescope 3.12.6 also adds VkPhysicalDeviceVulkan13Features features13 (which it only uses to try to set .dynamicRendering=true) when running CVulkanDevice::createDevice(), which probably also causes createDevice() to fail when running w/ gpus that don't support vulkan 1.3

Though I will say that gamescope version 3.12.6 also adds the extensions VK_KHR_PRESENT_ID_EXTENSION_NAME (aka VK_KHR_present_id) and VK_KHR_PRESENT_WAIT_EXTENSION_NAME (aka VK_KHR_present_wait) to the required vulkan extensions. Not sure how to look up online whether a specific gpu supports either of the two present extensions, because even though I've ran the lastest versions of gamescope (built from the ValveSoftware/master) w/ my intel igpu perfectly fine, neither of the two extensions show up when I run vulkaninfo...

sharkautarch avatar Jan 05 '24 03:01 sharkautarch

I have the same issue, gamescope 3.13.19-1 packaged by Arch linux

vblank: Using timerfd.
wlserver: [backend/headless/backend.c:67] Creating headless backend
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
vulkan: selecting physical device 'Intel(R) Iris(R) Graphics 6100 (BDW GT3)': queue family 0 (general queue family 0)
vulkan: physical device supports DRM format modifiers
vulkan: vkCreateDevice failed (VkResult: -7)
Failed to initialize

glxinfo -B

name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Intel (0x8086)
    Device: Mesa Intel(R) Iris(R) Graphics 6100 (BDW GT3) (0x162b)
    Version: 23.3.4
    Accelerated: yes
    Video memory: 7848MB
    Unified memory: yes
    Preferred profile: core (0x1)
    Max core profile version: 4.6
    Max compat profile version: 4.6
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) Iris(R) Graphics 6100 (BDW GT3)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 23.3.4-arch1.2
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.6 (Compatibility Profile) Mesa 23.3.4-arch1.2
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.2 Mesa 23.3.4-arch1.2
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

ngiololollo avatar Jan 30 '24 14:01 ngiololollo

@ngiololollo I looked up your intel gpu on https://vulkan.gpuinfo.org/displayreport.php?id=27018#extensions, and according to the extensions list in the report, your gpu doesn't seem to support VK_KHR_present_id or VK_KHR_present_wait which gamescope currently requires since version 3.12.6

EDIT: I looked up my igpu on https://vulkan.gpuinfo.org, and realized that the website doesn't list VK_KHR_present_id or VK_KHR_present_wait in the extension list, even though running vulkan hardware caps viewer on my computer shows VK_KHR_present_wait and VK_KHR_present_id as being supported, and I am able to run the latest version of gamescope on my igpu. So perhaps https://vulkan.gpuinfo.org doesn't show whether any gpus support VK_KHR_present_id or VK_KHR_present_wait???

also, I just noticed there was an issue posted about VK_KHR_present_id/VK_KHR_present_wait not being detected w/ vulkaninfo/vulkan hardware caps viewer for people on wayland?!?!? https://github.com/KhronosGroup/Vulkan-Tools/issues/757 not sure if that's still an issue people are having... (probably not an issue with gamescope)

EDIT EDIT: looks like present wait support for wayland was merged five days ago (?) https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27275 tho I'm not sure if means that VK_KHR_present_id/VK_KHR_present_wait was not working on wayland and thus causing this error for versions of mesa before said merge???

@ngiololollo if you are on wayland, maybe try installing mesa-git for now

sharkautarch avatar Jan 30 '24 16:01 sharkautarch

@sharkautarch i tried to install mesa-git but i have the same behaviour

ngiololollo avatar Jan 30 '24 21:01 ngiololollo

@ngiololollo I looked up your intel gpu on https://vulkan.gpuinfo.org/displayreport.php?id=27018#extensions, and according to the extensions list in the report, your gpu doesn't seem to support VK_KHR_present_id or VK_KHR_present_wait which gamescope currently requires since version 3.12.6

Intel iris graphics 6100 doesn't use the intel anv vulkan driver on linux, it uses the split off hasvk driver because iris graphics 6100 is intel gen 8 architecture based. Hasvk has a lot less features and according to https://mesamatrix.net/ does not support VK_KHR_present_wait . So yes @ngiololollo 's igpu is unsupported by gamescope if gamescope requires VK_KHR_present_wait. However this is not the same issue as any of the other gpu's in this thread.

TheW0LVERIN3 avatar Feb 01 '24 17:02 TheW0LVERIN3

However this is not the same issue as any of the other gpu's in this thread.

Correction: Some, but not all, other people in this thread do seem to be in the same boat, stuck with the hasvk vulkan driver on pre gen 9 intel igpu hardware. As HASVK lacks VK_KHR_present_wait support, I guess gamescope won't work. Pinging those affected in this issue: @konradmb @gbpi @vabenil (and @Sandelinos (only your intel hd 4000 igpu system falls under this not your amd one)) and of course as previously pinged @ngiololollo

TheW0LVERIN3 avatar Feb 01 '24 18:02 TheW0LVERIN3

Btw, can we get/is there a list of vulkan extensions that gamescope requires. Because it would really help in debugging and confirming these types of issues.

On the AMD front(GCN2 to be specific): Does gamescope require VK_EXT_index_type_uint8? I'd prefer official word on this as that vulkan extension is the only thing I can find as to why RADV on GCN2 wouldn't support gamescope. If that's not it then bugs need to be filed.

TheW0LVERIN3 avatar Feb 01 '24 18:02 TheW0LVERIN3

Btw, can we get/is there a list of vulkan extensions that gamescope requires. Because it would really help in debugging and confirming these types of issues.

On the AMD front(GCN2 to be specific): Does gamescope require VK_EXT_index_type_uint8? I'd prefer official word on this as that vulkan extension is the only thing I can find as to why RADV on GCN2 wouldn't support gamescope. If that's not it then bugs need to be filed.

I actually started some work on allowing gamescope to work on gpus that don't support certain features/extensions. Right now, I have a branch that currently falls back to vulkan 1.2 if vulkan 1.3 isn't supported: https://github.com/sharkautarch/gamescope/tree/gs_vk_1_2_comp Note: vulkan 1.2-only gpus currently are unable to run reshade on gamescope (should otherwise run normally, and still able to use gamescope's builtin-shaders tho) I think it should also be possible to allow gamescope to still work when VK_KHR_present_wait isn't supported, tho not entirely sure how much work that'll take...

sharkautarch avatar Feb 01 '24 19:02 sharkautarch

@konradmb @gbpi @vabenil @Sandelinos @ngiololollo I've just updated https://github.com/sharkautarch/gamescope/tree/gs_vk_1_2_comp to allow gamescope to work on gpus that don't support the present_wait extension

how to build:

Cloning from my fork and running setup:

git clone https://github.com/sharkautarch/gamescope
cd gamescope
git checkout gs_vk_1_2_comp
git submodule update --init --recursive
CXX=g++ CC=gcc meson setup --wipe build --buildtype=debugoptimized -Db_ndebug=true -Db_lto_threads=$(nproc) -Db_lto=true -Db_lto_mode=default

then if you want to build and install to system: meson install -C build

OR if you don't want to install my version of gamescope to system (/usr) directories:
ninja -C build

sharkautarch avatar Feb 03 '24 19:02 sharkautarch

@konradmb @gbpi @vabenil @Sandelinos @ngiololollo Update: I made a new branch targeted against latest gamescope upstream version: gs_vk_1_2_comp_target_HEAD Had to rewrite it against the recent backend refactors, but hopefully it'll still work ok w.r.t. devices that don't support vulkan 1.3 and/or present_wait

sharkautarch avatar Mar 05 '24 18:03 sharkautarch

@sharkautarch

Doesn't seem to work on Intel 4000.

vulkan: Failed to load vulkan module. (VkResult: -3)

gbpi avatar Apr 01 '24 04:04 gbpi

@sharkautarch

Doesn't seem to work on Intel 4000.

vulkan: Failed to load vulkan module. (VkResult: -3)

@gbpi Just pushed out a fix to the branch do a git pull to fetch the fix

sharkautarch avatar Apr 01 '24 12:04 sharkautarch

@sharkautarch Doesn't seem to work on Intel 4000. vulkan: Failed to load vulkan module. (VkResult: -3)

@gbpi Just pushed out a fix to the branch do a git pull to fetch the fix

Thanks.

Still getting an error, but a new error.

No CAP_SYS_NICE, falling back to regular-priority compute and threads.
Performance will be affected.
MESA-INTEL: warning: Ivy Bridge Vulkan support is incomplete
vulkan: selecting physical device 'Intel(R) HD Graphics 4000 (IVB GT2)': queue family 0 (general queue family 0)
Notice: GPU device does not support present_wait extension
continuing with present_wait disabled.

xdg_backend: Seat name: seat0
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
MESA-INTEL: warning: Ivy Bridge Vulkan support is incomplete
vulkan: selecting physical device 'Intel(R) HD Graphics 4000 (IVB GT2)': queue family 0 (general queue family 0)
vulkan: physical device supports DRM format modifiers
vulkan: vkCreateDevice failed (VkResult: -8)
Failed to create backend.

gbpi avatar Apr 02 '24 05:04 gbpi

Replying to https://github.com/ValveSoftware/gamescope/issues/991#issuecomment-2031113257

Hmmm VkResult of -8 means VK_ERROR_FEATURE_NOT_PRESENT

Hmmm, there’s an unsupported vulkan device feature being requested @gbpi make sure you have vulkan validation layers installed (on arch it’s the vulkan-validation-layers package) Then run gamescope like so: VK_LOADER_LAYERS_ENABLE=*validation* gamescope … Hopefully the vulkan validation layers will tell us the specific unsupported vulkan device feature that’s being requested

sharkautarch avatar Apr 02 '24 15:04 sharkautarch

Hmmm VkResult of -8 means VK_ERROR_FEATURE_NOT_PRESENT

Hmmm, there’s an unsupported vulkan device feature being requested @gbpi make sure you have vulkan validation layers installed (on arch it’s the vulkan-validation-layers package) Then run gamescope like so: VK_LOADER_LAYERS_ENABLE=*validation* gamescope … Hopefully the vulkan validation layers will tell us the specific unsupported vulkan device feature that’s being requested

@sharkautarch Unfortunately no change in the error message.

gbpi avatar Apr 03 '24 00:04 gbpi

Hmmm VkResult of -8 means VK_ERROR_FEATURE_NOT_PRESENT Hmmm, there’s an unsupported vulkan device feature being requested @gbpi make sure you have vulkan validation layers installed (on arch it’s the vulkan-validation-layers package) Then run gamescope like so: VK_LOADER_LAYERS_ENABLE=*validation* gamescope … Hopefully the vulkan validation layers will tell us the specific unsupported vulkan device feature that’s being requested

@sharkautarch Unfortunately no change in the error message.

Ok, I looked through the feature support database for your specific intel igpu, and I've figured out what unsupported feature is being requested: uniformAndStorageBuffer8BitAccess

I'm pretty sure that gamescope no longer uses 8bit integers in the shader storage/uniforms/buffers so hopefully simply toggling that feature off will do the trick!

sharkautarch avatar Apr 03 '24 02:04 sharkautarch