193 points · by bdz · 7y ago · 122 comments
Still, as a full-time Linux user, I'm over the moon. I've always used Linux on my development laptop, but struggled to keep it on my desktop because the lure of gaming with remote friends has been too strong. However, after literally decades of trying to give up Windows entirely, between Proton, kernel contributions and efforts like this, I can play most of my backlog without having to resort to dual-booting or even VFIO. Even many fresh releases work without strife.
To anyone at Valve who reads HN: thanks. I know we're a tiny minority, and I'm really grateful for the continued on-going support.
This is interesting to me because I spend 99.5% of my time on Linux (even for most of my gaming), but I still boot into a different OS when I want to use Steam, so I don't show up on the stat sheet. I wish I did. Two reasons I do this:
1. The Steam installation is kind of messy on my OS (Arch Linux). It involves a big client that doesn't integrate into the OS very well, requires a lot of 32 bit compatibility libraries that I wouldn't otherwise need, and leaves a bunch of large data files all over my home folder.
2. It simply feels weird and uncomfortable to run closed-source DRM-including software on Linux. I can't explain it any better than that, because it really is just a mental "purity" thing. I'd rather completely separate the "foreign" software that I have this instinctive distrust for onto a separate system entirely, where I already don't trust the OS.
I'm still grateful to Valve for the support, because it encourages developers to get their software to run on Linux, even if most of the games I play are DRM-free binaries purchased from the developer.
It doesn't bother me to turn on multilib support in a rootfs I only boot in a container just to run steam client and its games. Though I do have to reboot into a kernel w/32-bit support first which can be annoying.
Isn't that in by default on pretty much everything? I'm not aware of any distro shipping an x86 kernel with 32-bit support disabled, anyways. Are you intentionally building your own kernels and removing 32-bit compatibility? Seems like an easier thing to fix than having to reboot every time.... (Unless I've misremembered and that is a default, in which case please correct me because that throws it the other way)
Isn't that just because the system is less structured in general, so you've been beaten into submission?
After spending years on Linux pretty much everything on Windows feels like it's potentially spewing ick all over the place (registry, arbitrary folders, etc, not to mention the lack of reproducibility)!
Just because the Microsoft Store didn't pan out a few years ago doesn't mean they won't try again.
Every year since XP I keep reading how PC gamers will switch in droves to Linux because of X, instead those of us that really enjoy gaming and high performance graphics are on Apple, Microsoft, Google, Sony and Nintendo platforms.
>Apple >Nintendo
What? Nintendo and apple do not provide high performance graphics for gaming. Apple actively tries to kill gaming on their platform by not supporting vulkan and killing open gl and nintendo has never had high performance graphics.
I do also worry that it'll eventually stop, but right now, with the competition essentially actively discouraging native Linux ports (EGS exclusives with no support for Linux downloads)... well, I'll take whatever I can get with open arms.
It's easier to count the games that are hostile to Linux these days, and they're usually exclusive to Epic anyway.
While this is true, I can also definitely see the logic in continuing to invest in a Plan B to protect the company from future external threats. I'm thinking along the lines of Apple maintaining an x86 port of MacOS for years before it ever became a public thing just in case.
Valve certainly has the resources to keep such an escape hatch open for themselves.
So why not continue support? It’s always, always nice to have an escape hatch you can point to should Microsoft get that look in their eyes again.
There is also a program that lets a remote player connect and play with your local computer. This way, you can play couch multi player games via the internet together.
Also, there was a reveal regarding steam gaming cloud recently: https://youtu.be/GqY5WYBDyyQ
And yes, seriously, _thank you_ Valve!
I believe the running theory has been that it's a defense against Microsoft being Microsoft. If MS tries to do something like force all NT apps through their own store and take a cut of every sale, or anything else that poses too much threat to Valve, then Valve has an escape hatch in the form of Linux support. "You want 30% of our sales? Screw you, we'll tell our users to switch to Linux!" is a bit extreme, but it just needs to be a deterrent.
Valve, if you are reading this, just please make sure source 2 has a linux compatible editor! One thing I miss is modding source games.
Not sure how relevant are the first 3 of those in this context. Battle.net, UPlay and Origin are basically just download/update systems for Blizzard, Ubisoft, EA and not a real competing store that could take over the whole market.
Epic's store is the only one that sells 3rd party titles.
More relevant competition would be GOG and to some extent itch.io (recently surpassed 200k titles in their catalog, but it's mostly very small indie games).
Linux may have a 1% market share, but when you release on Windows, you will not only target a larger audience, but you will have to share that audience with a large number of studios. The AAA studios will take the lion share of the revenue.
I think in Linux there's still some room for indie games to thrive. Sometimes all it takes if you are using a game engine like Unity is to simply create a cross platform build that may work out of the box.
https://web.archive.org/web/20160201000000*/http://store.ste...
Ever since Steam published their non-Windows clients, we randomly get support requests from Steam users on Linux and macOS because the (all stacks) backtrace contains references to the WFMO WIN32 events library I open sourced many, many years back [0]. Always makes me smile though, my small contribution to Linux gaming. (Somewhat ironically, even Microsoft now uses this for cross-platform projects with VS Code being the primary example.)
I think all library developers (open source or otherwise) would probably do well to adopt the etilqs hack, you never know where your code will end up.
[0]: https://neosmart.net/blog/2011/waitformultipleobjects-and-wi...
Part of this is that Steam can still use 32-bit libraries even when the host Linux distribution has fully moved to 64-bit.
See recent discussion at https://ubuntu.com/blog/statement-on-32-bit-i386-packages-fo...
While you would have expected from Valve to use an existing container platform, they went ahead and used directly the security features of the Linux kernel in Steam.
Now if only most other Linux software could do that.
Valve is already in the best position for this, since they're the dominant market player and gamers already have their game libraries in Steam. Buying a game from Valve makes more sense than buying a game from Google Steam users get to keep a playable product even if the streaming product is a flop.
[1] https://www.gamingonlinux.com/articles/looks-like-valve-coul...
So I just run Steam itself in a Docker container. The home directory inside the container is mounted to a subdirectory of my home on the host, so even if Steam wipes everything from it the only thing I'd lose is Steam itself.
rm -f ~/docker-games/root/.Xauthority
touch ~/docker-games/root/.Xauthority
xauth nlist "$DISPLAY" | sed -e 's/^..../ffff/' | xauth -f ~/docker-games/root/.Xauthority nmerge -
chmod 0444 ~/docker-games/root/.Xauthority
XSOCK="$(realpath /tmp/.X11-unix/*)"
DBUS_SESSION_BUS_PATH="$(echo "$DBUS_SESSION_BUS_ADDRESS" | sed -e 's/^unix:path=//')"
docker run -it --rm \
--device '/dev/dri:/dev/dri' \
-v "$XSOCK:$XSOCK" \
-v "$(realpath ~/docker-games/root):/home/arnavion" \
-v "$(realpath ~/.config/pulse/cookie):/home/arnavion/.config/pulse/cookie" \
-v "$DBUS_SESSION_BUS_PATH:$DBUS_SESSION_BUS_PATH" \
-e "DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS" \
-e "DISPLAY=$DISPLAY" \
-e "PULSE_SERVER=$(ip -4 addr show enp4s0 | grep -Po 'inet \K[^/]+'):4713" \
-e 'XAUTHORITY=/home/arnavion/.Xauthority' \
--shm-size '1G' \
--hostname arnavion-docker-games \
docker-games \
$COMMAND
The XSOCK mount allows it to talk to the host X server, and the .Xauthority mount allows it to auth with the host X server. Apart from that:* ~/docker-games/root is the home directory inside the container.
* The DBUS mount and env var is to allow Steam to show its icon in the system tray of the host DE. There's also a symlink for `~/.steam/public/steam_tray_mono.png` -> `~/docker-games/root/.steam/public/steam_tray_mono.png` so that the host DE can find the icon based on the path inside the container.
* The pulseaudio mount and env var is to allow sound. It requires pulseaudio to be set up to allow network clients.
Here's the full gist: https://gist.github.com/Arnavion/3212232d0761d49d9636f796c5a...
Mount namespaces are not a big deal to use, as long as you freely bind-mount from /dev and /sys whatever your software might need. The effect is mostly protecting your home directory against both reading and modification and isolating your system installations against version and configuration conflicts.
Uid namespaces are really challenging if you try to make some complex software system work. They give a lot of isolation from the host system, some would say also new risks that the isolation has unexpected privilege escalations.
Disclaimer: Not a gamer on any platform, so I don't know Steam other than from hearsay that it's the only serious one running on Linux.
For example, I can't run the GOG version of Legend of Grimrock on Fedora 31 because of libraries. This is the type thing that would that problem.
Namespaces are default feature within the Linux Kernel. If a process isn't isolated in any way, it's automatically assigned the default namespace. So what they've done is simply run the game processes in the a separate namespace. Therefore there should be negligible performance impact if at all.
With namespaces and cgroups and chroot and bind mounts you can cobble together an isolated linux distro running on the same kernel as yours. So for example, Steam can target having a game run on Ubuntu 16.04, and ensure that it runs well there, while you can go ahead and use Arch, or Fedora 31 or whatever. It's like virtualization except that it doesn't translate every instruction, it only adds some overhead to certain syscalls.
[1] https://github.com/KhronosGroup/MoltenVK [2] https://www.khronos.org/news/permalink/vulkan-support-for-do...
Indie game developers though, which Steam have a sizable amount of, likely do not have the same resources.