This is an automated archive made by the Lemmit Bot.
The original was posted on /r/fedora by /u/MackThax on 2023-11-04 11:08:16.
Requirements:
- An AMD GPU - I have a 6700 XT
- An HDR display - I have a Samsung s95B
- A good enough cable - in my case, HDMI 2.1
The wonderful GloriousEggroll created a distro based on Fedora, called Nobara.
It includes a bunch of packages that make this process easy. Fortunately, it is possible to install these on Fedora too!
Steps:
-
Install Steam if you haven’t already.
-
Add the nobara repo:
dnf copr enable gloriouseggroll/nobara
-
Configure the repo so that it doesn’t override all of the packages. Instead, pick the ones we need:
- Edit
/etc/yum.repos.d/_copr:copr.fedorainfracloud.org:gloriouseggroll:nobara.repo
: - There are two sections […nobara] and […nobara.ml]. You likely only need to edit the former, but I edited both just in case.
- Set a lower priority that default (which ironically increases the priority of the repo): add
priority=98
- Cherry pick the packages we need: add
includepkgs=gamescope gamescope-session gamescope-libs kernel mesa mesa-freeworld mesa-libGLU mesa-vulkan-drivers
(mesa, mesa-freeworld, mesa-libGLU aren’t strictly needed but I included everything related to mesa)
- Edit
-
Upgrade the installed packages:
dnf upgrade --refresh
This should install the kernel with fsync
and HDR patches.
5. Install the packages we need: dnf install gamescope mesa-vulkan-drivers
You can also install gamescope-session
, but I’ll explain below what it is and why I don’t use it.
6. Reboot with the new kernel (if it doesn’t select the new kernel automatically, hold shift while booting to enter GRUB and select the kernel).
After boot, you can check the active kernel with uname -r
. The kernel should contain fsync
in the name.
7. Open a TTY (ctrl+alt+F4 or another F-key) and login.
8. Set some variables:
export DXVK_HDR=1 export STEAM_GAMESCOPE_HDR_SUPPORTED=1 export ENABLE_GAMESCOPE_WSI=1
9. Run Steam in gamescope: gamescope --hdr-enabled --hdr-itm-enable -e -W 2560 -H 1440 --disable-color-management -- steam -gamepadui -steamos3 -steampal -steamdeck -pipewire-dmabuf
Set -W
and -H
to your preferred resolution. You can also set the -O
flag to select the display on which to run. E.g. -O HDMI-A-0
. Use xrandr
to check which output exist.
If everything went right, Steam should run full screen in Steam Deck mode.
I created a script that does steps 7 and 8 and placed it in ~/.local/bin
. Don’t forget to chmod +x
.
Steps, part II
For me, Steam wouldn’t update on the welcome screen and it wouldn’t let me past that screen. I solved this by just spamming A on the controller. That seems to convince it.
From what I can tell, this seems to be an issue with it not having the sudo
privilege. I don’t care enough to fix this.
- Once logged in, go to settings > Display.
- Scroll down and there should be an option to enable experimental HDR support. Enable it.
- Scroll back to the top, and if everything went right, there should be an option to “Use HDR”. Enable it.
- Run a game and enable HDR in game.
You should be able to exit Steam by selecting “Switch to Desktop”. If you are greeted with a black screen, just press any key.
Troubleshooting
I don’t really know what I’m doing so I probably won’t be able to offer concrete help here in the comments. Ask anyway.
However, if you use gamescope-session
, there should be logs, both from gamescope and Steam hidden in your home directory.
Also, there is useful info on the Arch wiki and another Reddit post:
gamescope-session
gamescope-session
is pretty cool. It adds an entry in GDM (the login screen), in the bottom right, that allows you to log in directly into Steam in gamecope
.
It does a bunch of stuff I don’t fully understand. You can check /usr/share/gamescope-session/gamescope-session-script
.
I have two problems with it:
- I had to edit it’s script in
/usr/bin/gamescope-session
to be able to return to desktop (which I don’t think is a good idea). - I can’t get Steam to run in 120Hz with it and I don’t know why. It might just be VRR but it’s just easier for me to run gamescope manually than to bother with configurations and editing scripts I shouldn’t be editing.
If you want to run gamescope-session
, in /usr/bin/gamescope-session
there is an if
statement that does weird stuff when you switch between Steam and desktop. It also makes it very hard to kill Steam. I just added exit 0
before the if
statement to make it drop down to GDM when you select “Switch to Desktop”.
Also, you will find info to use ~/.config/environment.d/gamescope-session.conf
to configure gamescope-session
. You will find examples that have an if
statement in them:
if [ "$XDG_SESSION_DESKTOP" = "gamescope" ] ; then...
.
This didn’t work for me. XDG_SESSION_DESKTOP
was either gamescope-session
when run from GDM or gnome-xorg
when running from the TTY (lolwut).
Deleting the if
clause altogether doesn’t seem to pose any issue.
Thanks
Thanks to companies like AMD and Valve that keep investing in the open source community,
but very special thanks to people like GloriousEggroll, the folks that contribute to Arch Wiki and everyone else helping in their spare time!
And to you! Have fun and happy gaming!