ValveSoftware / gamescope

SteamOS session compositing window manager
Other
2.82k stars 186 forks source link

Crash when using flags "--hdr-enabled --hdr-itm-enable" on HDMI (Nvidia) #1334

Open Algorithm0 opened 1 month ago

Algorithm0 commented 1 month ago

Configuration:

OS: Fedora 40, Device: Nvidia GeForce RTX 4070 Ti, Driver: 550-555, Gamescope version: 3.14.*-3.14.18, Displays: LG 49UK6200PLA (HDMI), Samsung U28R550UQI (DisplayPort)

Problem:

I use Gamescope, running it standalone as a separate session (not on top of Gnome or KDE). I have two displays. Both support HDR. And so when I use the command

/home/aurum/Projects/Other/gamescope/build-3.14.18/src/gamescope --hdr-enabled --hdr-itm-enable -e -W 3840 -H 2160 --xwayland-count 2 -O DP-4 --default-touch-mode 4 --hide-cursor-delay 3000 --fade-out-duration 200 --prefer-vk-device 10de:2782 -R /run/user/1000/gamescope.tu07RpR/startup.socket -T /run/user/1000/gamescope.tu07RpR/stats.pipe -- steam -gamepadui -steamos3 -steampal -steamdeck

then everything runs fine on my monitor.

If I change the port in this command (-O DP-4 -> -O HDMI-A-2), I see a crash (I have attached the crash log: gamescope-stdout.log). At the same time, excluding the HDR flags (--hdr-enabled --hdr-itm-enable) launches Steam well both on the TV and on the monitor.

brain-anti-freeze commented 1 month ago

I have noticed that I can start gamescope with --hdr-enabled on a HDMI connection (I don't have a display port monitor to test with) and it will only crash if I also specify -W and -H. Perhaps try without those ?

Algorithm0 commented 1 month ago

@brain-anti-freeze, I tried this, unfortunately it didn't help me at all. I'm seeing the same problem. Can you tell me more about your case? What video card do you have? What command exactly do you launch the gamescope?

brain-anti-freeze commented 1 month ago

@brain-anti-freeze, I tried this, unfortunately it didn't help me at all. I'm seeing the same problem. Can you tell me more about your case? What video card do you have? What command exactly do you launch the gamescope?

I'm using gamescope session plus. RTX2070 (with Nvidia open modules driver 555.42.02 but its been this way for a few versions). Connected to a Samsung TV using HDMI.

With a command line like this - gamescope -e --xwayland-count 2 --rt --adaptive-sync --immediate-flips --hdr-enabled --prefer-vk-device 10de:1f10 -R /run/user/1001/gamescope.ALi8urN/startup.socket -T /run/user/1001/gamescope.ALi8urN/stats.pipe

it all seems like it's working. No crashes or errors in logs. The TV reports HDR is enabled (drm_info shows that the connector's colorspace is BT2020_RGB and HDR_OUTPUT_METADATA is set on it). I have a different issue (which I ought to log ...) with enabling ENABLE_GAMESCOPE_WSI so I can't actually try setting HDR in any apps (I don't even know if it's possible on Nvidia at present).

If I add -W and -H to the command line to specify the resolution then gamescope crashes at startup and the log shows

xwm: got the same buffer committed twice, ignoring.
drmModeAtomicCommit: Operation not permitted
xwm: We failed our modeset and have no mode to fall back to! (Initial modeset failed?): Invalid argument

Without --hdr-enabled there is no issue setting -W and -H.