Hi everyone, I figured I’d start posting things I use clear for to encourage people to start posting. I’ve been messing around with this for a few months on and on, and created a video, but now I’ve rebuilt this a few times and have a better understanding of what I need to do and I’ve been getting feedback from random redditors so I figured I should start writing this down:
Ok so first things first, I’m using a Hades Canyon NUC for this, but have had success with prebuilt systems, and even all-AMD Ryzen/Vega systems. Generally speaking if it has open drivers this should work.
Install Clear Linux
We’re building some things so you might want to grab
desktop-dev. If you’re on an older installation make sure you switch over to network-manager as you need this for Steam’s wireless manager to work when you’re in big picture mode.
I used to do this via the flatpak via flathub (in the video), but I was having problems with controller permissions, controlling shutdown/reboot via the client, not getting sound in the session and even occasional game(!) problems. So I just installed Steam via a tarball that Valve provides. This solved like 90% of the problems I was having in the video!
Before you need to run steam at least once so it downloads/updates itself, and then log in, perhaps play some games to make sure it’s working right.
Install the compositor
I set up
steamcompmgr, when we run this in a dedicated session it will ensure games launch fullscreen and give us that slick console-like experience.
Grab the latest tarball from this directory, and you’re going to go in there and do the usual ./configure, make, make install. Depending on what you have installed you might need to install some devpkg’s from clear, I still need to make a list of what to install, but generally speaking if you have
desktop-dev installed this should work.
I then copied the
steamcompmgr binary into
/usr/bin and the session files that came with it. On my system they were in
Now you have the compositor and
/usr/bin/steamos-session. At the bottom of this file it just launches a steam binary, which you probably don’t have installed in a pathable place, so for me the last line of that file looks like:
/home/jorge/steam/steam -tenfoot -steamos -enableremotecontrol
You need to install
uinput, and then I made
/etc/modules-load.d/modules.conf and then added a
uinput line in the file, and that was it. (Either manually
modprobe uinput after that or reboot.)
I use a steam controller so I copied this file, into
/etc/udev/rules.d and this allows me to connect and use the controller . Valve’s steamos includes support for all controllers, so that you can just add any Xbox or PS4 controller from steam and it all just works, I haven’t investigated other controllers though, and I think it would be real useful to figure that out for people who want to use those controllers. Like I think we’d need to load the xpad module for xbox controllers?
Custom Session bits
This will make it so that there is a Steam option in GDM so you can log into steam directly instead of loading up your desktop. Make a
/usr/share/xsessions/steamos.desktop and put this in there:
[Desktop Entry] Encoding=UTF-8 Name=Steam Comment=Steam Exec=/usr/bin/steamos-session Type=Application
Then just try it, boot up the machine, select that from the menu, and steam should fire up, go into the settings, add your controller, etc.
Autologin into the session
If you intend to use the machine also as a desktop, you can just ignore this part, adding the steam session to GDM will give you the console experience if you need it, and then if you want to do desktop stuff you can just select the normal GNOME session in the gdm gear menu thing and use your computer normally.
However, since my NUC is a dedicated gaming machine I do the last step to get a clean boot right into steam big picture mode, make a
/etc/gdm/custom.conf and then:
[daemon] AutomaticLogin=jorge AutomaticLoginEnable=True
This will just autologin my user to whatever session I was in last, which by now is the steam session.
So, this was kind of convoluted, but, the nice thing is there’s no maintenance. I’ve been running this on my hades canyon for a few months now, the steam client bits and games auto-update themselves, and
swupd does it’s thing in the background, all I do is use the machine and it’s continuously keeping itself up to date in the background. Since I get fresh kernels and mesa the gaming toolchain is always up to date, which is really nice.
From an end user experience they don’t see any linux at all. When I show it to people I hit the power button, they see the uefi logo, and a few seconds later steam fires up and we’re playing.
Updating on Demand
Steam has a little button in big picture mode that let’s you explictly update the OS in the “System” section called “Check for SteamOS updates”:
Ends up this calls a
/usr/bin/steamos-update file, which I found online.
Lots of this is debian specific, so I trimmed mine down to this. Steam expects an
/etc/lsb-release in the UI, which doesn’t exist in clear, so I read
/etc/os-release and generate a partial one:
#! /bin/sh echo $$ > /tmp/steamos-update.pid /usr/bin/swupd update version=`printf '%b\n' "$(cat /etc/os-release | grep VERSION_ID)"| sed 's/[^0-9]*//g'` destdir=/etc/lsb-release if [ -f "$destdir" ] then echo "DISTRIB_DESCRIPTION=\"Clear Linux $version\"" > "$destdir" fi rm /tmp/steamos-update.pid
Don’t forget to chmod +x the file. The file location seems hardcoded in steam. Then in
ALL ALL=NOPASSWD: /usr/bin/steamos-update
This will allow the updater to run when you click on that button. (Thanks to u/wesbl for that tip!)
I think if I figure out how to ask
clr-service-restart if I need to reboot I can replicate refreshing the steam inbox, or just keep that stanza in the file and touch a