ValveSoftware / gamescope

SteamOS session compositing window manager
Other
3.18k stars 213 forks source link

Broken colors with steam and --hdr-enabled #1497

Open orbea opened 2 months ago

orbea commented 2 months ago

OS: Gentoo GPU: [AMD/ATI] Navi 10 [Radeon RX 5600 OEM/5600 XT / 5700/5700 XT] (rev c1) Monitor: Odyssey G70NC Linux: 6.10.7 gamescope: 3.15.3 mesa: Mesa 24.3.0-devel (git-94e470a32d) vulkan-headers: 1.3.290.0 vulkan-loader- 1.3.290.0 wayland: 1.23.0 wayland-protocols: 1.36 wayland-scanner: 1.23.0 xwayland: 23.2.6

I am trying to get HDR to work with steam, so following the arch wiki I start steam in tty2.

#!/bin/sh

set -euf

cd -- "$HOME"/games/steam-launcher

export SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS=0
export XDG_RUNTIME_DIR='/tmp/runtime-steam'

mkdir -p -- "$XDG_RUNTIME_DIR"

export STEAM_RUNTIME=1
export ENABLE_GAMESCOPE_WSI=1

gamescope=" \
  --adaptive-sync \
  --hdr-enabled \
  --hdr-itm-enable \
  --output-height 3840 \
  --output-width 2160 \
  --steam \
  --xwayland-count 2"
eval "set -- $gamescope"
/usr/bin/gamescope "$@" -- ./steam -bigpicture

However this results by breaking the colors for my whole system, including the x11 session in tty1. The colors end up wrong and extremely vivid until I reboot the system. This only occurs when using --hdr-enabled and removing the hdr command-line options avoids the issue. Otherwise steam mostly works and games do boot and run (At a low resolution). Am I doing something wrong? Additionally there were no HDR settings in the Steam settings. Note that in the log I had to force steam to close because the Switch to Desktop doesn't work yet.

[gamescope] [Info]  console: gamescope version undefined
[gamescope] [Info]  vulkan: selecting physical device 'AMD Radeon RX 5700 XT (RADV NAVI10)': queue family 1 (general queue family 0)
[gamescope] [Info]  vulkan: physical device supports DRM format modifiers
[Gamescope WSI] Forcing on VK_EXT_swapchain_maintenance1.
[gamescope] [Info]  wlserver: [backend/headless/backend.c:67] Creating headless backend
[gamescope] [Info]  wlserver: [libseat] [libseat/libseat.c:73] Seat opened with backend 'seatd'
[gamescope] [Info]  wlserver: [libseat] [libseat/backend/seatd.c:212] Enabling seat
[gamescope] [Info]  wlserver: [backend/session/session.c:108] Successfully loaded libseat session
[gamescope] [Info]  drm: opening DRM node '/dev/dri/card0'
[gamescope] [Info]  drm: Connector DP-3 -> SAM - Odyssey G70NC
[gamescope] [Info]  drm: [colorimetry]: EDID with colorimetry detected. Using it
[gamescope] [Info]  drm: [colorimetry]: r 0.682617 0.309570
[gamescope] [Info]  drm: [colorimetry]: g 0.258789 0.687500
[gamescope] [Info]  drm: [colorimetry]: b 0.148438 0.043945
[gamescope] [Info]  drm: [colorimetry]: w 0.313477 0.329102
[gamescope] [Info]  drm: Connector DP-3 -> SAM - Odyssey G70NC
[gamescope] [Info]  drm: [colorimetry]: EDID with colorimetry detected. Using it
[gamescope] [Info]  drm: [colorimetry]: r 0.682617 0.309570
[gamescope] [Info]  drm: [colorimetry]: g 0.258789 0.687500
[gamescope] [Info]  drm: [colorimetry]: b 0.148438 0.043945
[gamescope] [Info]  drm: [colorimetry]: w 0.313477 0.329102
[gamescope] [Info]  drm: Connectors:
[gamescope] [Info]  drm:   HDMI-A-1 (disconnected)
[gamescope] [Info]  drm:   DP-2 (disconnected)
[gamescope] [Info]  drm:   DP-3 (connected)
[gamescope] [Info]  drm:   DP-1 (disconnected)
[gamescope] [Info]  drm: selecting connector DP-3
[gamescope] [Info]  drm: selecting mode 3840x2160@120Hz
[gamescope] [Info]  vulkan: supported DRM formats for sampling usage:
[gamescope] [Info]  vulkan:   AR24 (0x34325241)
[gamescope] [Info]  vulkan:   XR24 (0x34325258)
[gamescope] [Info]  vulkan:   AB24 (0x34324241)
[gamescope] [Info]  vulkan:   XB24 (0x34324258)
[gamescope] [Info]  vulkan:   RG16 (0x36314752)
[gamescope] [Info]  vulkan:   NV12 (0x3231564E)
[gamescope] [Info]  vulkan:   AB4H (0x48344241)
[gamescope] [Info]  vulkan:   XB4H (0x48344258)
[gamescope] [Info]  vulkan:   AB48 (0x38344241)
[gamescope] [Info]  vulkan:   XB48 (0x38344258)
[gamescope] [Info]  vulkan:   AB30 (0x30334241)
[gamescope] [Info]  vulkan:   XB30 (0x30334258)
[gamescope] [Info]  vulkan:   AR30 (0x30335241)
[gamescope] [Info]  vulkan:   XR30 (0x30335258)
[gamescope] [Info]  wlserver: Using explicit sync when available
[gamescope] [Info]  wlserver: Running compositor on wayland display 'gamescope-0'
[gamescope] [Info]  wlserver: [backend/headless/backend.c:17] Starting headless backend
[gamescope] [Info]  wlserver: Successfully initialized libei for input emulation!
[gamescope] [Info]  wlserver: [xwayland/server.c:107] Starting Xwayland on :1
[gamescope] [Info]  wlserver: [xwayland/server.c:107] Starting Xwayland on :2
[gamescope] [Info]  xwm: Embedded, no cursor set. Using left_ptr by default.
[gamescope] [Info]  xwm: Embedded, no cursor set. Using left_ptr by default.
[gamescope] [Info]  vblank: Using timerfd.
[gamescope] [Info]  wlserver: Updating mode for xwayland server #0: 3840x2160@120
/home/steam/.local/share/Steam/steam.sh: line 190: DISTRIB_RELEASE: unbound variable
Couldn't import apt, please install python3-apt or update steamdeps for your distribution.
/home/steam/.local/share/Steam/steam.sh: line 190: DISTRIB_RELEASE: unbound variable
steam.sh[11454]: Running Steam on gentoo  64-bit
steam.sh[11454]: STEAM_RUNTIME is enabled by the user
setup.sh[11521]: Steam runtime environment up-to-date!
[gamescope] [Warn]  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.
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
> Warning:          Could not resolve keysym XF86KbdInputAssistPrevgrou
> Warning:          Could not resolve keysym XF86KbdInputAssistNextgrou
Errors from xkbcomp are not fatal to the X server
[gamescope] [Error] xwm: waylandres but no win
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Unsupported maximum keycode 708, clipping.
>                   X11 cannot support keycodes above 255.
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
> Warning:          Could not resolve keysym XF86KbdInputAssistPrevgrou
> Warning:          Could not resolve keysym XF86KbdInputAssistNextgrou
Errors from xkbcomp are not fatal to the X server
[gamescope] [Info]  wlserver: [libseat] [libseat/backend/seatd.c:207] Disabling seat
[gamescope] [Info]  wlserver: Session paused
drmModeAtomicCommit: Permission denied
drmModeAtomicCommit: Permission denied
drmModeAtomicCommit: Permission denied
drmModeAtomicCommit: Permission denied
drmModeAtomicCommit: Permission denied
drmModeAtomicCommit: Permission denied
drmModeAtomicCommit: Permission denied
drmModeAtomicCommit: Permission denied
drmModeAtomicCommit: Permission denied
drmModeAtomicCommit: Permission denied
drmModeAtomicCommit: Permission denied
[repeated]
AgentScrubbles commented 2 months ago

I can confirm this is happening to me as well, the best way I can describe it is that it's "Overly vivid". Orange sand looks beet red. Forrest Greens turn lime green.

My issue happens on a fresh install of the current Bazzite, no changes, with HDR enabled. LG OLED screen with an AMD 7900XTX card. My first assumption was that it was something in my distro, so I tried a different distro with a fully clean install and verified the exact same problem was happening. I then tried to assume it was something about my setup, but finding more people having the problem I think I can pretty confidently say that the issue is within gamescope.

Desktop mode everything looks perfect, only when I enable gamescope (either by switching to the full gamescope session or by using arguments in steam to start gamescope with a game) do the colors go wrong.

All UIs have the more vivid colors, Big Picture, games, apps, anything launched with gamescope.

I'm happy to provide any logs I can, or dumps, or any info. I'll plan to add some pictures tomorrow of it happening.

gavtroy commented 2 months ago

I saw this in a couple of (non-hdr) games that launched at low resolution. When I set them to run at native resolution the saturation was normal.