I’ve set gamescopeSession.enable = true, but I can’t tell from the description whether that’s necessary or sufficient. There’s no mention of “standalone” in the search page or in steam.nix.
(It’s cool that you’re maintaining your own packages, and fantastic that you’re helping to bring HDR to people. However, gaming is only one of many things I do on this machine, and I’d rather not spend too much time off of mainline nixpkgs if I can help it, so I’d rather just wait for a stable channel to include the necessary packages.)
I don’t understand your confusion. “Session” is the term used to describe a set of applications/scripts run to compose a graphical environment.
Gamescope is a wayland compositor. Wayland compositors can generally either be used as a nested client, which is usually more of a testing thing, but for gamescope it’s used to wrap a specific application to make it behave better (for managing resolution, limiting framerates, better fullscreen behavior and such).
However when run standalone, you use it as the compositor to drive your graphical session. Since it has full control over the monitor, it can then do things like support hdr and provide more efficient rendering.
I.e., this here:
Run a GameScope driven Steam session from your display-manager
Means “create a “standalone” gamescope session and launch steam in it when you select the session in gdm”.
Or is the question whether running a gamescope session is required for hdr? According to what I’ve seen currently, yes, as no other wayland compositor nor X implements it yet.
“Session” is the term used to describe a set of applications/scripts run to compose a graphical environment.
Yep, that’s one thing I did know already.
Gamescope is a wayland compositor.
Thank you, I did not know that. The rest of your paragraph adds useful info to that, but it wasn’t obvious from any of the context so far.
Run a GameScope driven Steam session from your display-manager
Means “create a “standalone” gamescope session and launch steam in it when you select the session in gdm”.
You mean at initial login to GNOME? That doesn’t seem to make sense. Why wouldn’t that just be an option in services.xserver.desktopManager in that case? Why tie it to Steam at all?
Ah! Yeah, people need better education on what gamescope actually is/does, it’s hailed as a cureall and magical performance wand when in reality it has a much narrower scope (heh).
I’m not sure how the NixOS docs could improve the situation though, besides…
My guess is that it’s because the author didn’t want to put it under xserver, because that’d make no sense, and none of the other wayland compositors are under it either (besides gnome and KDE, but those are special).
There are no standards around wayland session setup to factor into a module yet either, so presumably what could have been services.wayland.sessions.steam became programs.steam.gamescopeSession.
Because gamescope is the wayland compositor for SteamOS, it’s kind of designed to launch steam in big picture mode for the steamdeck.
And since there are no standards for wayland sessions yet, there’s no reasonable way to provide you with an actual UI to do something, besides launching steam in big picture mode which will take on that responsibility as per valve’s design.
*At initial login to your graphical session. gdm can launch other sessions besides gnome, and is not the only display manager implementation.
Woah, lots to absorb here. Thank you both for your help!
Update: The first time I tried to log in to a Gamescope session it just stayed black for a few seconds and then crashed back into the login screen. The second and third tries it showed a “Verifying installation” screen for a few seconds before also returning to the login screen. The last few lines of gdm-wayland-session output:
wlserver: [types/wlr_compositor.c:673] New wlr_surface 0x22391c0 (res 0x277b7c0)
xwm: got the same buffer commited twice, ignoring.
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning: Unsupported maximum keycode 708, clipping.
> X11 cannot support keycodes above 255.
Errors from xkbcomp are not fatal to the X server
/nix/store/2czm89w8qlyf80v6shr7g4kjvns2fya1-dconf-0.40.0-lib/lib/gio/modules/libdconfsettings.so: wrong ELF class: ELFCLASS64
Failed to load module: /nix/store/2czm89w8qlyf80v6shr7g4kjvns2fya1-dconf-0.40.0-lib/lib/gio/modules/libdconfsettings.so
/nix/store/v3sqf3iq10d0whc9bv8k1vb00b59qlbi-gvfs-1.50.4/lib/gio/modules/libgvfsdbus.so: wrong ELF class: ELFCLASS64
Failed to load module: /nix/store/v3sqf3iq10d0whc9bv8k1vb00b59qlbi-gvfs-1.50.4/lib/gio/modules/libgvfsdbus.so
GetWin32Stats: display was not open yet, good
Presumably “libgvfsdbus.so: wrong ELF class: ELFCLASS64” is the key here, but that kind of error message is completely foreign to me. Is it simply saying I’m missing the 32-bit version of that library?
It may be complicated to understand what’s going on with the logs when using a DM, so go to tty3, login in plain text, and start “steam-gamescope” executable. You can tee its output to a file (include 2>&1). Just remember that you can’t have multiple Steam started between DMs.
Bummer. dconf is part of GNOME (or rather, an underlying configuration manager for all kinds of gtk-based things). It should not be launching as part of the steam session as far as I know, so it even showing in your logs is frankly unusual.
So my suspicion is that this is something going wrong in gdm when launching this steam session, which is not all that surprising given how badly standardized wayland sessions currently are.
Have you tried @PedroHLC 's suggestion of running steam-gamescope as-is from a different tty (Ctrl+Alt+F5 should give you one, the one with gdm should be on F1, F4 or F7, not sure which on NixOS off the top of my head)? That would eliminate one point of failure.
Yep, when run in a virtual terminal it does (mostly) work. The only missing piece seems to be HDR support, because the colours all look washed out. I’ll probably just wait for the kernel patches to be mainlined (presumably by 23.11).