Better gaming
Jonni Bidwell assures us it’s game on, despite Linux’s small Steam market.
Jonni Bidwell takes a look at how you can get more from the Wine-based Proton and those fancy Steam Controller drivers.
Recently it has been an exciting time for Linux gaming. What was once a pretty niche hobby involving either Tux Racer/kart or screaming at Wine has evolved into a perfectly reasonably pastime. Linux titles began appearing in Humble Bundles in 2010, and the Source and Unreal engines came to Linux in 2012. But by far the most dominant force in getting games on Linux has been Steam.
Steam Machines and their bespoke distro Steamos may not have (or ever) enjoyed the success Valve hoped for, but the Steam client coming to Linux in 2013 has slowly but surely brought thousands of titles to our favourite OS. Steam Play, Valve’s latest attempt to get yet more titles on Linux through its Proton layer (a Wine fork) has and will up this number even more. So we thought a summary of how to get Steam and associated entities running beautifully on your system is called for.
Installing the Steam client is pretty straightforward these days; you’ll find it in the Ubuntu Software Centre or if you’re traditional you can do a good old-fashioned:
$ sudo apt install steam
Both Debian and Fedora, because of their free software policies, require external repositories to be added. You’ll find information about installing Steam on Debian in our Chromebooks tutorial (see page 36).
Fedora users can enable the required repos either through GNOME Software or with:
$ sudo dnf install fedora-workstation-repositories $ sudo dnf config-manager --set-enabled rpmfusionnonfree-steam
$ sudo dnf install steam
A Flatpak build of Steam also exists, so if you want to be distro-agnostic and you have Flatpak and the Flathub repo set up (see https://flatpak.org/setup),
you can install and run with:
$ sudo flatpak install flathub com.valvesoftware.steam $ flatpak run com.valvesoftware.steam
This is a relatively new approach, despite being
launched two years ago, and a few issues have been reported. These are mostly concerned with Flatpak’d apps not having access to various things, and there are a few workarounds listed at http://bit.ly/ lxf250steamfaq.
While Valve might delight in us running a tutorial telling you how to give them all your money during Steam sales, that’s not what we’re here for. However, we want your purchases to run smoothly and so, as it turns out, does game-port maestro Feral Interactive. In April 2018 it released a Gamemode tool for improving the Linux gaming experience in general. This first release did little more than switch the CPU governor to performance mode, clawing back the precious microseconds lost by frequency switching according to demand, but now several features have been added.
In particular, on supported kernels – ones using the CK patchset – Gamemode can use soft real-time scheduling, it can boost I/O priorities for games processes, and it will do you the courtesy of disabling your screen saver. Most recently, Gamemode now boasts experimental overclocking controls for AMD and Nvidia graphics cards.
Gamemode can be installed in Ubuntu 18.10 (Cosmic Cuttlefish) with:
$ sudo apt install gamemode
There’s no official package for 18.04 (Bionic) but you can build it yourself by following the instructions at
http://bit.ly/lxf250gamemode. Gamemode
packages exist for most other distributions. Once installed, you can invoke it from the command line by running your game with:
$ gamemoderun /path/to/game
That’s quite tedious with Steam titles though, so you’ll probably want to right click the game in your library,
select Properties > Set Launch Options and enter gamemoderun %command% Gamemode can be configured through a file placed at ~/.config/gamemode.ini and you’ll find a rundown of available options on the project’s Github.
Steam Controller
The Steam Controller is a fantastic bit of kit, at least once you get used to its weird haptic controls. However, it can be a little tricky to make it work outside of Steam.
In fact, if you’re running Ubuntu 18.10, or indeed anything running Kernel 4.18, such as Ubuntu 18.04 with the hardware enablement stack, you might even have some trouble using it with Steam.
The issue (or one of them, anyway) is that Kernel 4.18 introduced a native driver for the controller, so that it could be used as a regular HID device or as a regular controller for non-steam titles. The driver can also read the controller’s battery level, which is handy. Before, such antics were only possibly with third-party utilities such as Sc-controller (see https://github.com/ kozec/sc-controller).
Unfortunately the kernel module, hid_steam, has caused problems with some titles. A kernel patch was released soon after, but it’s possible your distro did not pick this up. So if your controller works before firing up
Steam, but games crash or the controller otherwise stops working afterwards, you might be experiencing this conflict. To be sure, close Steam and then unload the offending kernel module with:
$ sudo rmmod hid_steam
Now start Steam again and see if whatever you were trying to do before works. If so, congrats, you’ve been bitten by an old bug. You can ensure the kernel driver doesn’t get in the way again by running:
echo blacklist hid_steam | sudo tee /etc/modprobe.d/ sc.conf
Or, since as you’re reading this Ubuntu 19.04 (Disco Dingo) and Fedora 30 are probably hitting the mirrors, you could see how things behave with a newer kernel. If it still doesn’t work, then congrats, you’ve been bitten by an unknown bug.
Integration by parts
While he was still in charge of Solus (which is on the DVD in case you missed it), Ikey Doherty developed a terribly useful tool called Linux Steam Integration (LSI).
This tool streamlines lots of fixes and workarounds, as well as performing the not insignificant task of intercepting library calls to use system libraries wherever possible, rather than relying on a fixed set of runtime libraries. Since Ikey now works at Intel, LSI is developed alongside Intel’s Clear Linux distro, but don’t fret: it is and always has been a distro-agnostic affair.
For now it seems that newer LSI packages are only available for Arch and Fedora, but since a Snap package was available before the project became Intel’s, it’s reasonable to assume this will one day be updated. Keep an eye on the project’s new home at http://bit. ly/lxf250lsi to stay updated.
If you want to try out the old Snap package, which still works, you can do so with:
$ sudo snap install --edge solus-runtime-gaming $ sudo snap install --devmode --edge linux-steamintegration
This shouldn’t interfere with your current Steam installation, but if it does, or it just doesn’t solve your problems, both packages can be removed with sudo snap remove .
We couldn’t very well write a Steam tutorial in the current climate without mentioning Proton, Valve’s fork of Wine that pretty much overnight made several hitherto Windows-only AAA titles work flawlessly on Linux. It also made potentially thousands of titles ‘sort of work’ – that is if you were willing to take your chances using Proton to run untested games, or run a beta version of it.
This hasn’t converted everyone into a Linux gamer, and if we were younger and more optimistic maybe we’d hold out more hope of this happening. Alas, we’re a cynical bunch, and all we see is Linux usage on Steam holding strong at around 0.8 per cent.
But don’t stop here turn the page to discover how well Steamvr runs on Linux with the HTC Vive…