Open demanuPL opened 7 months ago
I'm getting the same error with polaris card in nested mode, but embedded works fine. Tested 82e3632504bc9252def1a10096942bc032ae544d gamescope: ../gamescope/src/wayland_backend.cpp:1170: virtual void gamescope::CWaylandBackend::GetPreferredOutputFormat(VkFormat, VkFormat) const: Assertion `u8BitFormat != VK_FORMAT_UNDEFINED' failed.
I'm getting the same error with polaris card in nested mode, but embedded works fine. Tested 82e3632 gamescope: ../gamescope/src/wayland_backend.cpp:1170: virtual void gamescope::CWaylandBackend::GetPreferredOutputFormat(VkFormat, VkFormat) const: Assertion `u8BitFormat != VK_FORMAT_UNDEFINED' failed.
Haven't tested this (besides making sure it compiles w/o errors), but see if this branch/fork I made works: https://github.com/sharkautarch/gamescope/tree/format_modifier_issue_fix_attempt
(clone from my fork, and then do git checkout format_modifier_issue_fix_attempt
)
Replying to https://github.com/ValveSoftware/gamescope/issues/1218#issuecomment-2023243305
I've build it but it has error connecting to wayland:
`No CAP_SYS_NICE, falling back to regular-priority compute and threads.
Performance will be affected.
xdg_backend: libdecor: GTK cannot connect to Wayland compositor`
In DMESG: [ 3454.113709] gamescope[25225]: segfault at 0 ip 00007f66dd383877 sp 00007ffe7231f970 error 4 in libdecor-0.so.0.200.0[7f66dd382000+3000] likely on CPU 5 (core 1, socket 0)
Replying to https://github.com/ValveSoftware/gamescope/issues/1218#issuecomment-2023407169
Ok, I know there was another issue related to gamescope wayland backend having problems w/ libdecor
So I rebased my branch to remove all of the libdecor-related stuff
So try doing git pull
and rebuilding and running gamescope again
now testing it with vkcube I'm gettiing the same error as on generic one (I've checked branch and its correct)
./gamescope -- vkcube No CAP_SYS_NICE, falling back to regular-priority compute and threads. Performance will be affected. xdg_backend: Seat name: ATTENTION: default value of option vk_khr_present_wait overridden by environment. ATTENTION: default value of option vk_khr_present_wait overridden by environment. vulkan: selecting physical device 'AMD Radeon RX 570 Series (RADV POLARIS10)': queue family 1 (general queue family 0) vulkan: physical device does not support DRM format modifiers wlserver: [backend/headless/backend.c:67] Creating headless backend vulkan: supported DRM formats for sampling usage: gamescope: types/wlr_linux_dmabuf_v1.c:526: feedback_compile: Assertion `table_len > 0' failed.
Replying to https://github.com/ValveSoftware/gamescope/issues/1218#issuecomment-2024110330
¯_(ツ)_/¯
Replying to #1218 (comment)
¯(ツ)/¯
Tried your branch ./gamescope -- vkcube No CAP_SYS_NICE, falling back to regular-priority compute and threads. Performance will be affected. xdg_backend: Seat name: seat0 ATTENTION: default value of option vk_khr_present_wait overridden by environment. vulkan: selecting physical device 'AMD Radeon RX 560 Series (RADV POLARIS11)': queue family 1 (general queue family 0) vulkan: physical device does not support DRM format modifiers wlserver: [backend/headless/backend.c:67] Creating headless backend vulkan: supported DRM formats for sampling usage: vulkan: AR24 (0x34325241) vulkan: XR24 (0x34325258) vulkan: AB24 (0x34324241) vulkan: XB24 (0x34324258) vulkan: RG16 (0x36314752) vulkan: NV12 (0x3231564E) vulkan: AB4H (0x48344241) vulkan: XB4H (0x48344258) vulkan: AB48 (0x38344241) vulkan: XB48 (0x38344258) vulkan: AB30 (0x30334241) vulkan: XB30 (0x30334258) vulkan: AR30 (0x30335241) vulkan: XR30 (0x30335258) gamescope: ../src/wayland_backend.cpp:1021: virtual void gamescope::CWaylandBackend::GetPreferredOutputFormat(VkFormat, VkFormat) const: Assertion `u8BitFormat != VK_FORMAT_UNDEFINED' failed.
Your GPU is too old to support modifiers. I need to add a non-modifier fallback.
I am having the same issue with the 3.14.3 version and the latest git:
gamescope -- glxgears
No CAP_SYS_NICE, falling back to regular-priority compute and threads.
Performance will be affected.
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
vulkan: selecting physical device 'AMD Radeon RX 570 Series (RADV POLARIS10)': queue family 1 (general queue family 0)
vulkan: physical device does not support DRM format modifiers
wlserver: [backend/headless/backend.c:67] Creating headless backend
xdg_backend: Seat name: seat0
vulkan: supported DRM formats for sampling usage:
gamescope: ../gamescope/src/wayland_backend.cpp:1280: virtual void gamescope::CWaylandBackend::GetPreferredOutputFormat(VkFormat*, VkFormat*) const: Assertion `u8BitFormat != VK_FORMAT_UNDEFINED' failed.
Abortado (imagem do núcleo gravada)
Downgrading to 3.14.2 for now. Bisected to 82e3632504bc9252def1a10096942bc032ae544d
To help people searching to find this issue:
3.14.2:
vulkan: selecting physical device 'AMD Radeon RX 570 Series (RADV POLARIS10)': queue family 1 (general queue family 0)
vulkan: physical device does not support DRM format modifiers
wlserver: [backend/headless/backend.c:67] Creating headless backend
vulkan: supported DRM formats for sampling usage:
vulkan: AR24 (0x34325241)
vulkan: XR24 (0x34325258)
vulkan: AB24 (0x34324241)
vulkan: XB24 (0x34324258)
vulkan: RG16 (0x36314752)
vulkan: NV12 (0x3231564E)
vulkan: AB4H (0x48344241)
vulkan: XB4H (0x48344258)
vulkan: AB48 (0x38344241)
vulkan: XB48 (0x38344258)
vulkan: AB30 (0x30334241)
vulkan: XB30 (0x30334258)
vulkan: AR30 (0x30335241)
vulkan: XR30 (0x30335258)
after 82e3632504bc9252def1a10096942bc032ae544d :
vulkan: selecting physical device 'AMD Radeon RX 570 Series (RADV POLARIS10)': queue family 1 (general queue family 0)
vulkan: physical device does not support DRM format modifiers
wlserver: [backend/headless/backend.c:67] Creating headless backend
xdg_backend: Seat name: seat0
vulkan: supported DRM formats for sampling usage:
gamescope: ../gamescope/src/wayland_backend.cpp:1276: virtual void gamescope::CWaylandBackend::GetPreferredOutputFormat(VkFormat*, VkFormat*) const: Assertion `u8BitFormat != VK_FORMAT_UNDEFINED' failed.
fish: Job 1, 'gamescope --nested-width 1920 -…' terminated by signal SIGABRT (Abort)
Does latest git work for you?
https://github.com/ValveSoftware/gamescope/commit/4ca3986582d7a45162da9c99e85044a8b9a0fd65 should hopefully fix it.
I cloned the project, did the checkout of that commit and built the binary, but I still get this:
vulkan: selecting physical device 'AMD Radeon RX 480 Graphics (RADV POLARIS10)': queue family 1 (general queuefamily 0)
vulkan: physical device does not support DRM format modifiers
wlserver: [backend/headless/backend.c:67] Creating headless backend
xdg_backend: Seat name:
vulkan: supported DRM formats for sampling usage:
gamescope: types/wlr_linux_dmabuf_v1.c:532: feedback_compile: Assertion `table_len > 0' failed.
fish: Job 1, './build/src/gamescope vkcube' terminated by signal SIGABRT (Abort)
Does latest git work for you?
4ca3986 should hopefully fix it.
That commit works for me:
>build/src/gamescope vkcube (4ca39865)|BISECTING|3.9s|22:16:51
No CAP_SYS_NICE, falling back to regular-priority compute and threads.
Performance will be affected.
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
vulkan: selecting physical device 'AMD Radeon RX 570 Series (RADV POLARIS10)': queue family 1 (general queue family 0)
vulkan: physical device does not support DRM format modifiers
wlserver: [backend/headless/backend.c:67] Creating headless backend
xdg_backend: Seat name: seat0
vulkan: supported DRM formats for sampling usage:
vulkan: AR24 (0x34325241)
vulkan: XR24 (0x34325258)
vulkan: AB24 (0x34324241)
vulkan: XB24 (0x34324258)
vulkan: RG16 (0x36314752)
vulkan: NV12 (0x3231564E)
vulkan: AB4H (0x48344241)
vulkan: XB4H (0x48344258)
vulkan: AB48 (0x38344241)
vulkan: XB48 (0x38344258)
vulkan: AB30 (0x30334241)
vulkan: XB30 (0x30334258)
vulkan: AR30 (0x30335241)
vulkan: XR30 (0x30335258)
...
I'll attach the entire terminal log, in case I got something wrong during compile or during the switch to that https://github.com/ValveSoftware/gamescope/commit/4ca3986582d7a45162da9c99e85044a8b9a0fd65: gamescope build with branch.txt
Does latest git work for you?
4ca3986 should hopefully fix it.
Thanks! Nested works on my old rx560, tried embedded - didn't work
Archlinux with KDE Plasma Version: 6.0.4
Kernel Version: 6.9.1-2-cachyos (64-bit)
CPU: Intel Xeon E3-1230 V2
Graphics Processor: AMD Radeon RX 470 Graphics
Installed gamescope from AUR via the package gamescope-git
which got commit 932a7bb
Still getting this with gamescope vkcube
:
vulkan: selecting physical device 'AMD Radeon RX 470 Graphics (RADV POLARIS10)': queue family 1 (general queue family 0)
vulkan: physical device does not support DRM format modifiers
wlserver: [backend/headless/backend.c:67] Creating headless backend
xdg_backend: Seat name:
vulkan: supported DRM formats for sampling usage:
gamescope: types/wlr_linux_dmabuf_v1.c:532: feedback_compile: Assertion 'table_len > 0' failed.
Aborted (core dumped)
While running it via TTY bash login shell with gamescope vkcube
:
vulkan: selecting physical device 'AMD Radeon RX 470 Graphics (RADV POLARIS10)': queue family 1 (general queue family 0)
vulkan: physical device does not support DRM format modifiers
wlserver: [backend/headless/backend.c:67] Creating headless backend
wlserver: [libseat] [libseat/backend/seatd.c:64] Could not connect to socket /run/seatd.sock: No such file or directory
wlserver: [libseat] [libseat/libseat.c:76] Backend 'seatd' failed to open seat, skipping
wlserver: [libseat] [libseat/libseat.c:73] Seat opened with backend 'logind'
wlserver: [backend/session/session.c:108] Successfully loaded libseat session
drm: opening DRM node '/dev/dri/card0'
drm: Connector DVI-D-1 -> HWP - HP x20LED
drm: [colorimetry]: EDID with colorimetry detected. Using it
drm: [colorimetry]: r 0.630859 0.348633
drm: [colorimetry]: g 0.340820 0.622070
drm: [colorimetry]: b 0.152344 0.057617
drm: [colorimetry]: w 0.313477 0.329102
drm: Connector DVI-D-1 -> HWP - HP x20LED
drm: [colorimetry]: EDID with colorimetry detected. Using it
drm: [colorimetry]: r 0.630859 0.348633
drm: [colorimetry]: g 0.340820 0.622070
drm: [colorimetry]: b 0.152344 0.057617
drm: [colorimetry]: w 0.313477 0.329102
drm: Connectors:
drm: DVI-D-1 (connected)
drm: HDMI-A-2 (disconnected)
drm: HDMI-A-1 (disconnected)
drm: DP-2 (disconnected)
drm: DP-1 (disconnected)
drm: selecting connector DVI-D-1
drm: selecting mode 1600x900@60Hz
vulkan: supported DRM formats for sampling usage:
vulkan: AR24 (0x34325241)
vulkan: XR24 (0x34325258)
vulkan: AB24 (0x34324241)
vulkan: XB24 (0x34324258)
vulkan: RG16 (0x36314752)
vulkan: NV12 (0x3231564E)
vulkan: AB4H (0x48344241)
vulkan: XB4H (0x48344258)
vulkan: AB48 (0x38344241)
vulkan: XB48 (0x38344258)
vulkan: AB30 (0x30334241)
vulkan: XB30 (0x30334258)
vulkan: AR30 (0x30335241)
vulkan: XR30 (0x30335258)
drm: drmModeAddFB2 failed: Invalid argument
drm: drmModeAddFB2 failed: Invalid argument
drm: drmModeAddFB2 failed: Invalid argument
drm: drmModeAddFB2 failed: Invalid argument
wlserver: Using explicit sync when available
wlserver: Running compositor on wayland display 'gamescope-0'
wlserver: [backend/headless/backend.c:17] Starting headless backend
wlserver: [backend/libinput/backend.c:88] Starting libinput backend
wlserver: [backend/libinput/events.c:69] Adding Power Button [0:1]
wlserver: [backend/libinput/events.c:69] Adding Power Button [0:1]
wlserver: [backend/libinput/events.c:69] Adding TTGK Technology Co.,Ltd CX31993 384Khz HIFI AUDIO Consumer Control [13058:13157]
wlserver: [backend/libinput/events.c:69] Adding USB Gaming Mouse [1241:64607]
wlserver: [backend/libinput/events.c:69] Adding USB Gaming Mouse [1241:64607]
wlserver: [backend/libinput/events.c:69] Adding USB Gaming Mouse Consumer Control [1241:64607]
wlserver: [backend/libinput/events.c:69] Adding SINO WEALTH Keyboard [9610:42]
wlserver: [backend/libinput/events.c:69] Adding SINO WEALTH Keyboard Mouse [9610:42]
wlserver: [backend/libinput/events.c:69] Adding SINO WEALTH Keyboard System Control [9610:42]
wlserver: [backend/libinput/events.c:69] Adding SINO WEALTH Keyboard Consumer Control [9610:42]
wlserver: [backend/libinput/events.c:69] Adding SINO WEALTH Keyboard [9610:42]
wlserver: [backend/libinput/backend.c:127] libinput successfully initialized
wlserver: Successfully initialized libei for input emulation!
wlserver: [xwayland/sockets.c:64] Failed to bind socket @/tmp/.X11-unix/X0: Address already in use
wlserver: [xwayland/server.c:107] Starting Xwayland on :2
wlserver: [types/wlr_compositor.c:771] New wlr_surface 0x5f721ce1f310 (res 0x5f721d0a4850)
wlserver: [xwayland/server.c:272] Xserver is ready
pipewire: stream state changed: connecting
pipewire: stream state changed: paused
pipewire: stream available on node ID: 83
xwm: Embedded, no cursor set. Using left_ptr by default.
vblank: Using timerfd.
drm: drmModeAddFB2 failed: Invalid argument
drm: drmModeAddFB2 failed: Invalid argument
drm: drmModeAddFB2 failed: Invalid argument
drm: drmModeAddFB2 failed: Invalid argument
pipewire: renegotiating stream params (size: 1600x900)
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
Selected GPU 0: AMD Radeon RX 470 Graphics (RADV POLARIS10), type: DiscreteGpu
[Gamescope WSI] Creating Gamescope surface: xid: 0x400000
[Gamescope WSI] Atom of T was wrong type. Expected XCB_ATOM_CARDINAL.
wlserver: [types/wlr_compositor.c:771] New wlr_surface 0x5f721cce8270 (res 0x5f721cfb1570)
wlserver: [types/wlr_compositor.c:771] New wlr_surface 0x5f721cd50410 (res 0x5f721d05bd90)
[Gamescope WSI] Made gamescope surface for xid: 0x400000
[Gamescope WSI] Surface state:
steam app id: 0
window xid: 0x400000
wayland surface res id: 5
layer client flags: 0x0
server hdr output enabled: false
hdr formats exposed to client: false
[Gamescope WSI] Forcing on VK_EXT_swapchain_maintenance1.
drm: drmModeAddFB2 failed: Invalid argument
xwm: got the same buffer committed twice, ignoring.
xwm: We failed our modeset and have no mode to fall back to! (Initial modeset failed?): Invalid argument
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning: Unsupported maximum keycode 708, clipping.
> X11 cannot support keycodes above 255.
> Warning: Could not resolve keysym XF86KbdInputAssistPrevgrou
> Warning: Could not resolve keysym XF86KbdInputAssistNextgrou
Errors from xkbcomp are not fatal to the X server
Downgrading back to 3.14.2 works for me without error.
4ca3986582d7a45162da9c99e85044a8b9a0fd65 should hopefully fix it.
Funny enough, even eliminating 82e3632504bc9252def1a10096942bc032ae544d change completely does not fix the issue.
I.e. applying
diff --git a/src/wayland_backend.cpp b/src/wayland_backend.cpp
index c5b33cf..2fcb1ff 100644
--- a/src/wayland_backend.cpp
+++ b/src/wayland_backend.cpp
@@ -1273,22 +1273,8 @@ namespace gamescope
void CWaylandBackend::GetPreferredOutputFormat( VkFormat *pPrimaryPlaneFormat, VkFormat *pOverlayPlaneFormat ) const
{
- VkFormat u8BitFormat = VK_FORMAT_UNDEFINED;
- if ( SupportsFormat( DRM_FORMAT_ARGB8888 ) )
- u8BitFormat = VK_FORMAT_B8G8R8A8_UNORM;
- else if ( SupportsFormat( DRM_FORMAT_ABGR8888 ) )
- u8BitFormat = VK_FORMAT_R8G8B8A8_UNORM;
-
- VkFormat u10BitFormat = VK_FORMAT_UNDEFINED;
- if ( SupportsFormat( DRM_FORMAT_ABGR2101010 ) )
- u10BitFormat = VK_FORMAT_A2B10G10R10_UNORM_PACK32;
- else if ( SupportsFormat( DRM_FORMAT_ARGB2101010 ) )
- u10BitFormat = VK_FORMAT_A2R10G10B10_UNORM_PACK32;
-
- assert( u8BitFormat != VK_FORMAT_UNDEFINED );
-
- *pPrimaryPlaneFormat = u10BitFormat != VK_FORMAT_UNDEFINED ? u10BitFormat : u8BitFormat;
- *pOverlayPlaneFormat = u8BitFormat;
+ *pPrimaryPlaneFormat = VK_FORMAT_A2B10G10R10_UNORM_PACK32;
+ *pOverlayPlaneFormat = VK_FORMAT_B8G8R8A8_UNORM;
}
bool CWaylandBackend::ValidPhysicalDevice( VkPhysicalDevice pVkPhysicalDevice ) const
Still produces the same result for me
vulkan: selecting physical device 'AMD Radeon RX 580 Series (RADV POLARIS10)': queue family 1 (general queue family 0)
vulkan: physical device does not support DRM format modifiers
wlserver: [backend/headless/backend.c:67] Creating headless backend
xdg_backend: Seat name:
vulkan: supported DRM formats for sampling usage:
gamescope: types/wlr_linux_dmabuf_v1.c:532: feedback_compile: Assertion `table_len > 0' failed.
Well, ditching the Wayland backed and switching back to SDL backend (as it was in 3.14.2) works for me.
diff --git a/src/main.cpp b/src/main.cpp
index 88c4c7c..972b2ab 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -762,7 +762,7 @@ int main(int argc, char **argv)
if ( eCurrentBackend == gamescope::GamescopeBackend::Auto )
{
if ( g_pOriginalWaylandDisplay != NULL )
- eCurrentBackend = gamescope::GamescopeBackend::Wayland;
+ eCurrentBackend = gamescope::GamescopeBackend::SDL;
else if ( g_pOriginalDisplay != NULL )
eCurrentBackend = gamescope::GamescopeBackend::SDL;
else
Although, it's a dirty solution. Users should not need to patch the source to do that. We need a CLI option to explicitly set the backend.
Something like --backend=auto|drm|sdl|openvr|headless|wayland
to represent the enum
Presumably, also deprecate existing --headless
and --openvr
.
Well, ditching the Wayland backed and switching back to SDL backend (as it was in 3.14.2) works for me.
Worked for me too, here is the output of `gamescope vkcube' after using your patch on the commit 932a7bb:
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
vulkan: selecting physical device 'AMD Radeon RX 470 Graphics (RADV POLARIS10)': queue family 1 (general queue family 0)
vulkan: physical device does not support DRM format modifiers
wlserver: [backend/headless/backend.c:67] Creating headless backend
vulkan: supported DRM formats for sampling usage:
vulkan: AR24 (0x34325241)
vulkan: XR24 (0x34325258)
vulkan: AB24 (0x34324241)
vulkan: XB24 (0x34324258)
vulkan: RG16 (0x36314752)
vulkan: NV12 (0x3231564E)
vulkan: AB4H (0x48344241)
vulkan: XB4H (0x48344258)
vulkan: AB48 (0x38344241)
vulkan: XB48 (0x38344258)
vulkan: AB30 (0x30334241)
vulkan: XB30 (0x30334258)
vulkan: AR30 (0x30335241)
vulkan: XR30 (0x30335258)
vulkan: Creating Gamescope nested swapchain with format 64 and colorspace 0
wlserver: Using explicit sync when available
wlserver: Running compositor on wayland display 'gamescope-0'
wlserver: [backend/headless/backend.c:17] Starting headless backend
xkbcommon: ERROR: Unrecognized RMLVO variant "qwerty" was ignored
wlserver: Successfully initialized libei for input emulation!
wlserver: [xwayland/sockets.c:64] Failed to bind socket @/tmp/.X11-unix/X0: Address already in use
wlserver: [xwayland/server.c:107] Starting Xwayland on :2
wlserver: [types/wlr_compositor.c:771] New wlr_surface 0x58c766a11100 (res 0x58c7669ecb90)
wlserver: [xwayland/server.c:272] Xserver is ready
pipewire: stream state changed: connecting
pipewire: stream state changed: paused
pipewire: stream available on node ID: 79
vblank: Using timerfd.
vulkan: Creating Gamescope nested swapchain with format 64 and colorspace 0
pipewire: renegotiating stream params (size: 1280x720)
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
Selected GPU 0: AMD Radeon RX 470 Graphics (RADV POLARIS10), type: DiscreteGpu
[Gamescope WSI] Creating Gamescope surface: xid: 0x400000
[Gamescope WSI] Atom of T was wrong type. Expected XCB_ATOM_CARDINAL.
wlserver: [types/wlr_compositor.c:771] New wlr_surface 0x58c7669c4c00 (res 0x58c7669ed640)
[Gamescope WSI] Made gamescope surface for xid: 0x400000
[Gamescope WSI] Surface state:
steam app id: 0
window xid: 0x400000
wayland surface res id: 5
layer client flags: 0x0
server hdr output enabled: false
hdr formats exposed to client: false
[Gamescope WSI] Forcing on VK_EXT_swapchain_maintenance1.
wlserver: [types/wlr_compositor.c:771] New wlr_surface 0x58c7669c22f0 (res 0x58c7669ed760)
xwm: got the same buffer committed twice, ignoring.
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning: Unsupported maximum keycode 708, clipping.
> X11 cannot support keycodes above 255.
> Warning: Could not resolve keysym XF86KbdInputAssistPrevgrou
> Warning: Could not resolve keysym XF86KbdInputAssistNextgrou
Errors from xkbcomp are not fatal to the X server
[Gamescope WSI] Creating swapchain for xid: 0x400000 - minImageCount: 3 - format: VK_FORMAT_B8G8R8A8_UNORM - colorspace: VK_COLOR_SPACE_SRGB_NONLINEAR_KHR - flip: true
[Gamescope WSI] Created swapchain for xid: 0x400000 - imageCount: 3
[Gamescope WSI] Swapchain recieved new refresh cycle: 16.67ms
vulkan: Creating Gamescope nested swapchain with format 64 and colorspace 0
pipewire: renegotiating stream params (size: 1600x900)
vulkan: Creating Gamescope nested swapchain with format 64 and colorspace 0
pipewire: renegotiating stream params (size: 1280x720)
gamescope: Received Terminated signal, forwarding to child!
gamescope: Received Terminated signal, attempting shutdown!
gamescope: children shut down!
I made a PR with new CLI option. #1321
It makes possible to select the backend on the fly, e.g. set --backend=sdl
as a workaround in our case.
using --backend=sdl works for me
this is fixed for me too when explicitly setting sdl, it would be nice if backend=auto would detect the card and set it automatically to sdl with these cards
this is fixed for me too when explicitly setting sdl, it would be nice if backend=auto would detect the card and set it automatically to sdl with these cards
Something like this, and/or maybe also detecting such an issue and falling back to SDL instead of throwing a segfault. Is that possible?
are there plans to get the wayland-backend (or drm) on polaris-gpus (without modifiers and without doing the workaround with the sdl-backend)?
I do not have a polaris GPU to look into this with. I have tested on other devices without modifiers and forced them off and it seems to work fine, so I don't know what the issue is.
The only thing I can think is that UsesModifiers
is returning true when it should not. It might be worth trying to force that off and seeing what changes.
Other than that, it really just needs someone with a Polaris GPU to go and actually debug the issue.
it really just needs someone with a Polaris GPU to go and actually debug the issue.
Sure. What exactly we need to debug?
Had a look at this and it seems like forcing UsesModifiers
to return false fixes it.
Seems like CWaylandBackend::Wayland_Modifier
gets called 2 times for each format, one with ulModifier
as 0xffffffffffffff (DRM_FORMAT_MOD_INVALID)
and one as 0
. Where the 0 one gets added to m_FormatModifiers
and makes UsesModifiers return true.
This makes this check return from the function, and sampledDRMFormats
in turn becomes empty.
Running this on kwin if that makes any diffrence.
What hardware are you using? And can you send the output of drm_info?
I pushed some stuff to master that might help, can you give it a try?
I pushed some stuff to master that might help, can you give it a try?
Wayland backend works now! But SDL backend crashes instead lol.
Tried the changes, and seems to work pefectly for Wayland backend.
As mentioned above it doesnt seem to work for sdl. I believe the reason for this is other backends return an empty span for supported modifiers while the new changes in backend.h checks if it contains invalid, without a check for UsesModifiers
?
Making backends like SDL return a span with DRM_FORMAT_MOD_INVALID
for GetSupportedModifiers
seems to work, but unsure of other implications.
Changing this line to if ( GetBackend()->UsesModifiers() && !GetBackend()->SupportsFormat( drmFormat ) )
also seems to fix it.
Mh I'm now having that error, which I didn't before. strace:
write(2, "gamescope: types/wlr_linux_dmabu"..., 96gamescope: types/wlr_linux_dmabuf_v1.c:532: feedback_compile: Assertion `table_len > 0' failed.
) = 96
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x79d286a01000
rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0
gettid() = 1352856
getpid() = 1352856
tgkill(1352856, 1352856, SIGABRT) = 0
--- SIGABRT {si_signo=SIGABRT, si_code=SI_TKILL, si_pid=1352856, si_uid=1000} ---
+++ killed by SIGABRT (core dumped) +++
fish: Job 1, 'strace gamescope' terminated by signal SIGABRT (Abort)
I've installed gamescope with the gamescope-git AUR package (current version is from the latest commit to this date, d87f6d9). I'm not on Wayland.
I pushed some stuff to master that might help, can you give it a try?
Wayland backend works now! But SDL backend crashes instead lol.
damn :rofl:
edit: the 3 recent commits didn't change a thing
you can build from 7a27374, last commit that works on X, which broke with 0110109
@awsms @misyltoad
I can confirm myself that commit https://github.com/ValveSoftware/gamescope/commit/01101093445af20ea25ad386fd872d5f92266c2c is causing this assert fail for me too, and reverting it fixes it
I think that somehow that commit is causing this loop starting here: https://github.com/sharkautarch/gamescope/commit/01101093445af20ea25ad386fd872d5f92266c2c#diff-0ca179f8adb820354aba0b6a063350f9e32689950ead39e8bbeca021fa8ba0e0R2777 to not process modifiers correctly, which then latter triggers the assert in wlserver_init()
Also, seems like the modifiers listed w/ vulkan: supported DRM formats for sampling usage:
is empty on nested X11 due to that commit...
Issue occurs for me on commit gddf0d76
, with and without --backend=sdl
and with both AMD Radeon 780M
and AMD Radeon RX 7700S
GPUs.
$ DRI_PRIME=1 gamescope vkcube
[gamescope] [Info] console: gamescope version 3.15.9-8-gddf0d76 (gcc 14.2.0)
No CAP_SYS_NICE, falling back to regular-priority compute and threads.
Performance will be affected.
Your Wayland compositor does NOT support wp_presentation/presentation-time which is required for VK_KHR_present_wait and VK_KHR_present_id.
Please complain to your compositor vendor for support. Falling back to X11 window with less accurate present wait.
[gamescope] [Error] xdg_backend: Couldn't create Wayland objects.
[gamescope] [Info] vulkan: selecting physical device 'AMD Radeon RX 7700S (RADV NAVI33)': queue family 1 (general queue family 0)
[gamescope] [Info] vulkan: physical device supports DRM format modifiers
[gamescope] [Info] wlserver: [backend/headless/backend.c:67] Creating headless backend
[gamescope] [Info] vulkan: supported DRM formats for sampling usage:
[gamescope] [Info] vulkan: Creating Gamescope nested swapchain with format 44 and colorspace 0
gamescope: types/wlr_linux_dmabuf_v1.c:532: feedback_compile: Assertion `table_len > 0' failed.
[1] 163677 IOT instruction (core dumped) DRI_PRIME=1 gamescope vkcube
$ DRI_PRIME=1 gamescope --backend=sdl vkcube
[gamescope] [Info] console: gamescope version 3.15.9-8-gddf0d76 (gcc 14.2.0)
No CAP_SYS_NICE, falling back to regular-priority compute and threads.
Performance will be affected.
Your Wayland compositor does NOT support wp_presentation/presentation-time which is required for VK_KHR_present_wait and VK_KHR_present_id.
Please complain to your compositor vendor for support. Falling back to X11 window with less accurate present wait.
[gamescope] [Info] vulkan: selecting physical device 'AMD Radeon RX 7700S (RADV NAVI33)': queue family 1 (general queue family 0)
[gamescope] [Info] vulkan: physical device supports DRM format modifiers
[gamescope] [Info] wlserver: [backend/headless/backend.c:67] Creating headless backend
[gamescope] [Info] vulkan: supported DRM formats for sampling usage:
[gamescope] [Info] vulkan: Creating Gamescope nested swapchain with format 44 and colorspace 0
gamescope: types/wlr_linux_dmabuf_v1.c:532: feedback_compile: Assertion `table_len > 0' failed.
[1] 163836 IOT instruction (core dumped) DRI_PRIME=1 gamescope --backend=sdl vkcube
@MaxandreOgeret it's commit ddf0d76. Gamescope is broken since 0110109, read my previous post
Can confirm, https://github.com/ValveSoftware/gamescope/commit/01101093445af20ea25ad386fd872d5f92266c2c works in Wayland on my RX580. SDL backend also works along with this patch.
Still broken as of 06a6225 BTW
Of course, because #1548 is still not merged.
since update to 3.14.2 I'm facing this error every time I running something through gamescope, it crashes immediately. It worked fine with 3.13.16
Here is an example with vkcube:
No CAP_SYS_NICE, falling back to regular-priority compute and threads. Performance will be affected. xdg_backend: Seat name: xdg_backend: PreferredMetadata: Red: 0.64 0.33, Green: 0.3 0.6, Blue: 0.15 0.06, White: 0.3127 0.329, Max Luminance: 100 nits, Min Luminance: 0 nits, Max Full Frame Luminance: 100 nits ATTENTION: default value of option vk_khr_present_wait overridden by environment. ATTENTION: default value of option vk_khr_present_wait overridden by environment. vulkan: selecting physical device 'AMD Radeon RX 570 Series (RADV POLARIS10)': queue family 1 (general queue family 0) vulkan: physical device does not support DRM format modifiers wlserver: [backend/headless/backend.c:67] Creating headless backend vulkan: supported DRM formats for sampling usage: gamescope: types/wlr_linux_dmabuf_v1.c:526: feedback_compile: Assertion `table_len > 0' failed.