gamescope icon indicating copy to clipboard operation
gamescope copied to clipboard

`error 0: Windows scRGB is not supported` on GNOME, Hyprland

Open Lawstorant opened this issue 1 year ago • 59 comments

Is there an existing issue for this?

  • [x] I have searched the existing issues

Are you using any gamescope patches or a forked version of gamescope?

  • [x] The issue occurs on upstream gamescope without any modifications

Current Behavior

AS of https://github.com/ValveSoftware/gamescope/commit/cb3fdea3e4c000f4a1d618b3826d44fd0cbeaafe gamescope is broken. Tested as standalone session and in Gnome 48.

libdecor is installed and plugins are in system.

Steps To Reproduce

Run anything with gamescope from current master

Hardware information

- Distro: Arch Linux
- CPU: Ryzen 7 5800X3D
- GPU: Radeon 9070 XT
- Driver Version: 25.0.4

Software information

- Desktop environment: Gnome 48
- Session type: wayland
- Gamescope version: https://github.com/ValveSoftware/gamescope/commit/cb3fdea3e4c000f4a1d618b3826d44fd0cbeaafe
- Gamescope launch command(s): gamescope

Which gamescope backends have the issue you are reporting?

  • [x] Wayland (default for nested gamescope)
  • [ ] DRM (default for embedded gamescope, i.e. gamescope-session)
  • [ ] SDL
  • [ ] OpenVR

Logging, screenshots, or anything else

gamescope_crash.log

Lawstorant avatar Apr 25 '25 19:04 Lawstorant

i could reproduce this on gnome earlier but was waiting for that original reporter to file an issue, it seems to be https://github.com/ValveSoftware/gamescope/commit/8a3864f52390baefedd3aebea2fcdaf7ce61d24f

kde is fine however

matte-schwartz avatar Apr 25 '25 20:04 matte-schwartz

This also occurs on the latest release of Hyprland with the same error.

effects3d avatar Apr 25 '25 23:04 effects3d

This also occurs on the latest release of Hyprland with the same error.

On Hyprland you can do debug:full_cm_proto=true to trick gamescope into thinking Hyprland supports windows scRGB, then with the --hdr-debug-force-output option it will work, although it appears to be using Frog CM instead of Upstream.

LionHeartP avatar Apr 26 '25 07:04 LionHeartP

@misyltoad is scRGB support necessary for gamescope?

Lawstorant avatar Apr 29 '25 12:04 Lawstorant

Yes

misyltoad avatar Apr 29 '25 13:04 misyltoad

OK, created mutter issue https://gitlab.gnome.org/GNOME/mutter/-/issues/4083

Lawstorant avatar Apr 29 '25 14:04 Lawstorant

On Hyprland you can do debug:full_cm_proto=true to trick gamescope into thinking Hyprland supports windows scRGB, then with the --hdr-debug-force-output option it will work, although it appears to be using Frog CM instead of Upstream.

It just worked after enabling that Hyprland debug option. Running it with --hdr-debug-force-output wasn't necesary.

effects3d avatar May 15 '25 09:05 effects3d

Running into this issue as well, on Gnome/mutter. As I understood, it's related to HDR color management. Following I tried to enable HDR for my monitor, and that didn't help.

Is there any workaround one may apply to make it run under mutter? E.g. run into a nested compositor, or enable/disable gamescope hdr?

Would be great to have some instruction's 'cause it doesn't seem to be resolved fast.

FooBarrior avatar May 20 '25 13:05 FooBarrior

The two possible resolutions are:

  1. Muter implements the get_windows_scrgb()
  2. Gamescope uses a workaround when get_windows_scrgb() is not available.

Lawstorant avatar May 20 '25 14:05 Lawstorant

@FooBarrior Depending on your goals you could also use the SDL backend with --backend sdl

ColinKinloch avatar May 20 '25 14:05 ColinKinloch

@ColinKinloch

Thanks for the hint! Just tried --backend sdl - it basically works, however, crashes at least in 4K, see #1857

FooBarrior avatar May 20 '25 16:05 FooBarrior

Should --disable-color-management not prevent the create_windows_scrgb call? Tried to run with that flag as well, but the application still crashed with the same error sequence. The WAYLAND_DEBUG=1 log confirms wp_color_manager_v1.create_windows_scrgb is still called and leads to the wl_display.error.

(on Gnome + nvidia + no HDR) as a workaround --backend sdl does work, yes.

tiramizue avatar May 21 '25 13:05 tiramizue

I mean, a lot of people use gamescope exactly FOR HDR so that's not much of an improvement :P

Lawstorant avatar May 21 '25 16:05 Lawstorant

Weren't you asking for a workaround / fallback when scrgb is not available? But apparently even the manual 'fallback' does not seem to have any effect, how do you expect anything automatic then :P

tiramizue avatar May 21 '25 17:05 tiramizue

This also occurs on the latest release of Hyprland with the same error.

On Hyprland you can do debug:full_cm_proto=true to trick gamescope into thinking Hyprland supports windows scRGB, then with the --hdr-debug-force-output option it will work, although it appears to be using Frog CM instead of Upstream.

It worked fine for me with 'debug:full_cm_proto=true' added into my hyprland.conf, just make sure to restart hyprland and gamescope will work again

ElgMoes avatar May 25 '25 21:05 ElgMoes

Replying to https://github.com/ValveSoftware/gamescope/issues/1825#issuecomment-2908092365

this did not work for me at all on any game with gamescope. changing the backend to SDL has not worked either.

thatONEjustin avatar Jun 12 '25 18:06 thatONEjustin

this did not work for me at all on any game with gamescope. changing the backend to SDL has not worked either.

Build with #1867 and gamescope will start. HDR won't though on Hyprland. Use wine-wayland for now if possible.

LionHeartP avatar Jun 12 '25 19:06 LionHeartP

@LionHeartP what is debug:full_cm_proto=true? i can't find it documented anywhere

RainGameDev avatar Jul 03 '25 15:07 RainGameDev

@LionHeartP what is debug:full_cm_proto=true? i can't find it documented anywhere

https://wiki.hypr.land/Configuring/Variables/#debug

LionHeartP avatar Jul 03 '25 16:07 LionHeartP

i was getting error: [gamescope] [Error] xdg_backend: Couldn't create Wayland input objects., and fixed it by debug:full_cm_proto=true.

then i was getting error: [gamescope] [Error] xdg_backend: Compositor released us but we were not acquired. Oh no., which was again fixed with --backend sdl.

everything worked fine with gamescope --backend sdl -- vkcube and gamescope --backend sdl -- glxgears. and even with gamescope --backend sdl -- steam works.

problem when i add this same in launch option, it wont start. with error:

ERROR: ld.so: object '/home/mro/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
failed to inherit capabilities: Operation not permittedGame Recording - would start recording game 11650186326162014208, but recording for this game is disabled

Hardware information

- Distro: NixOS 25.11 (Xantusia)
- CPU: 13th Gen Intel i5-13600K
- GPU: Radeon 7800 XT
- Driver Version: Mesa 25.1.5

Software information

- Desktop environment: Hyprland 0.49.0
- Session type: wayland
- Gamescope version: gamescope version 3.16.14 (gcc 14.3.0)
- Gamescope launch command(s): gamescope --backend sdl -- %command%

MROvaiz avatar Jul 12 '25 08:07 MROvaiz