forked from ValveSoftware/steamos-compositor
-
Notifications
You must be signed in to change notification settings - Fork 230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Regression] - Titles that use 32-bit executables crash with up-to-date 32-bit Gamescope WSI layer #1718
Open
4 of 6 tasks
Comments
regressing commit is: 4da5e4a edit: reverting does work |
matte-schwartz
changed the title
Half-Life 2 crashes with up-to-date 32-bit Gamescope WSI layer present
[Regression] - Half-Life 2 crashes with up-to-date 32-bit Gamescope WSI layer
Jan 23, 2025
HL2 game dump uploaded here from In addition, Grand Theft Auto IV also crashes gamescope with an up-to-date 32-bit layer:
|
6 tasks
matte-schwartz
changed the title
[Regression] - Half-Life 2 crashes with up-to-date 32-bit Gamescope WSI layer
[Regression] - Titles that use 32-bit executables crash with up-to-date 32-bit Gamescope WSI layer
Feb 1, 2025
matte-schwartz
added a commit
to matte-schwartz/gamescope
that referenced
this issue
Feb 1, 2025
fprintf pointers added in "layer: Fix oldSwapchain when going in/out of XWayland bypassing" will crash when executed in the 32-bit WSI layer. The compiler also warns about pointer usage: 1085 | fprintf(stderr, "[Gamescope WSI] Destroying swapchain: %p\n", swapchain); | ~^ ~~~~~~~~~ | | | | void* VkSwapchainKHR {aka long long unsigned int} | %lld 1087 | fprintf(stderr, "[Gamescope WSI] Destroyed swapchain: %p\n", swapchain); | ~^ ~~~~~~~~~ | | | | void* VkSwapchainKHR {aka long long unsigned int} | %lld 1167 | fprintf(stderr, "[Gamescope WSI] Creating swapchain for xid: 0x%0x - oldSwapchain: %p - provided minImageCount: %u - minImageCount: %u - format: %s - colorspace: %s - flip: %s\n", | ~^ | | | void* | %lld 1168 | gamescopeSurface->window, 1169 | pCreateInfo->oldSwapchain, | ~~~~~~~~~~~~~~~~~~~~~~~~~ | | | long long unsigned int 1248 | fprintf(stderr, "[Gamescope WSI] Created swapchain for xid: 0x%0x swapchain: %p - imageCount: %u\n", | ~^ | | | void* | %lld 1249 | gamescopeSurface->window, 1250 | *pSwapchain, | ~~~~~~~~~~~ | | | VkSwapchainKHR {aka long long unsigned int} Address these issues by casting the pointers to void, ensuring both 64-bit and 32-bit layers perform as expected. Closes: ValveSoftware#1718 Closes: ValveSoftware#1736
matte-schwartz
added a commit
to matte-schwartz/gamescope
that referenced
this issue
Feb 1, 2025
Some fprintf pointers added in "layer: Fix oldSwapchain when going in/out of XWayland bypassing" will crash when executed in the 32-bit WSI layer. GCC also warns about the pointer usage with: ``` 1085 | fprintf(stderr, "[Gamescope WSI] Destroying swapchain: %p\n", swapchain); | ~^ ~~~~~~~~~ | | | | void* VkSwapchainKHR {aka long long unsigned int} | %lld 1087 | fprintf(stderr, "[Gamescope WSI] Destroyed swapchain: %p\n", swapchain); | ~^ ~~~~~~~~~ | | | | void* VkSwapchainKHR {aka long long unsigned int} | %lld 1167 | fprintf(stderr, "[Gamescope WSI] Creating swapchain for xid: 0x%0x - oldSwapchain: %p - provided minImageCount: %u - minImageCount: %u - format: %s - colorspace: %s - flip: %s\n", | ~^ | | | void* | %lld 1168 | gamescopeSurface->window, 1169 | pCreateInfo->oldSwapchain, | ~~~~~~~~~~~~~~~~~~~~~~~~~ | | | long long unsigned int 1248 | fprintf(stderr, "[Gamescope WSI] Created swapchain for xid: 0x%0x swapchain: %p - imageCount: %u\n", | ~^ | | | void* | %lld 1249 | gamescopeSurface->window, 1250 | *pSwapchain, | ~~~~~~~~~~~ | | | VkSwapchainKHR {aka long long unsigned int} ``` To keep it simple, let's just cast the problematic pointers to void*. Closes: ValveSoftware#1718 Closes: ValveSoftware#1736
matte-schwartz
added a commit
to matte-schwartz/gamescope
that referenced
this issue
Feb 1, 2025
Some fprintf pointers added in "layer: Fix oldSwapchain when going in/out of XWayland bypassing" will crash when executed in the 32-bit WSI layer. GCC also warns about the pointer usage when compiling the 32-bit layer: "warning: format ‘%p’ expects argument of type ‘void*’, but argument 3 has type ‘VkSwapchainKHR’ {aka ‘long long unsigned int’} [-Wformat=]" To keep it simple, let's just reinterpret_cast the problematic pointers to void*. Closes: ValveSoftware#1718 Closes: ValveSoftware#1736
matte-schwartz
added a commit
to matte-schwartz/gamescope
that referenced
this issue
Feb 1, 2025
Some fprintf pointers added in "layer: Fix oldSwapchain when going in/out of XWayland bypassing" will crash when executed in the 32-bit WSI layer. GCC also warns about the pointer usage when compiling the 32-bit layer: "warning: format ‘%p’ expects argument of type ‘void*’, but argument 3 has type ‘VkSwapchainKHR’ {aka ‘long long unsigned int’} [-Wformat=]" To keep it simple, let's just reinterpret_cast the problematic pointers to void*. Closes: ValveSoftware#1718 Closes: ValveSoftware#1736
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there an existing issue for this?
Are you using any gamescope patches or a forked version of gamescope?
Current Behavior
When an up-to-date lib32-gamescope layer is present alonside the 64-bit layer of the same version, Half-Life 2 fails to launch unless you disable WSI with
ENABLE_GAMESCOPE_WSI=0
. Gamescope and lib32-gamescope are both built off the 3.16.1 tag, and I've confirmed the issue on SteamOS, Arch Linux, and Fedora. Sometimes the game just hangs indefinitely in gamescope-session, othertimes it does crash gamescope itself. The hang can be reproduced on nested Wayland withgamescope -e -- steam -steamdeck
and then launching HL2 from there.Steps To Reproduce
It should either hang indefinitely or crash gamescope at this point.
Hardware information
Software information
Which gamescope backends have the issue you are reporting?
Logging, screenshots, or anything else
gamescope-session gamescope crash while launching linux native half-life 2
SteamOS system report that shows a hang and game crash rather than a gamescope crash:
systemreport-20250122120839.txt
The text was updated successfully, but these errors were encountered: