Steam is a gaming platform that sells and manages games on Windows and Linux. Since FreeBSD has some pretty good Linux emulation, it is possible – with some footnotes – to run Linux Steam Games on FreeBSD. This was already possible in 2016 but the tooling keeps being updated, so let’s take a look at how things work.

I’m writing about things that other people have built. It’s their efforts in the Open Source world that enable my entertainment, so show some appreciation to the (otherwise largely anonymous) folks who make this possible.

Edit: some comments from shkhln in the FreeBSD discord server have prompted me to update this. Errors remain my own.

nVidia? Nah

While most of the time nVidia graphics cards give excellent results on FreeBSD – with the proprietary drivers – I have not been able to get mine to do anything useful. I’m told that it’s supposed to work and that most success reports come in that way, but personally don’t get any further than some vague X errors and a hang, on the workstation that runs my KDE Plasma desktop the rest of the week (with a GT 730).

Installing Steam Bits

Getting started with Steam on FreeBSD is relatively straightforward (unless you get stuck with something like nVidia-driver-problems, above, or specific-game-problems, below):

  • Install the helper package
    # pkg install linux-steam-utils
    

    This pulls in a whole bunch of Linux userland, and then spits out a bunch of instructions to follow, which are the following steps.

  • Create a dedicated user I made one called steam. The instructions specifically call out a non-wheel user. I used adduser to do the work. (edit) It’s a good idea to put this user into the video and operator groups.
    # adduser
    
  • Load kernel modules There are five modules to load; it is convenient to load them on system start, so we’ll add them to the system configuration.
    # kldload linux linux64 linprocfs linsysfs fdescfs
    # sysrc kld_list+="linux linux64 linprocfs linsysfs fdescfs"
    

    (edit) Much easier is # sysrc linux_enable=yes

  • Mount filesystems The various Linux-compatibility filesystems need to be available. Here are four lines to add to /etc/fstab to make it work:
    linprocfs /compat/linux/proc     linprocfs rw 0 0
    linsysfs  /compat/linux/sys      linsysfs  rw 0 0
    tmpfs     /compat/linux/dev/shm  tmpfs     rw 0 0 
    fdescfs   /dev/fd                fdescfs   rw 0 0
    

    This is automatically available after a system restart, or mount -a to pick up the changes.

  • Make shm writable This is one I have not managed to automate on reboot; it may require some scripting in rc.local. The shared-memory tmpfs needs to be writable for the dedicated user; I run this after boot:
    # chown steam /compat/linux/dev/shm
    

First User Impression

After all that work as root, log in as the dedicated user, start X if that doesn’t happen automatically, open a terminal and run the script to fetch Steam preliminaries, and then run Steam itself:

$ steam-install
$ steam

Presumably you’ll need to go through the login and verification rigamarole; after that you get the same Steam overview window that you would get on a Linux system.

Note that steam as run here is a Ruby script: if any of the pre-requisites are missing, it will complain in an informative way.

Some Games

Only games that run natively on Linux will run on FreeBSD this way; not all of them will, either. Games that use Wine or other technologies are a different story, one I have not tried at all.

I tested four games out of my library, two of which are the things I play right now (on a spare Linux machine). Since my workstation and its nVidia card doesn’t like Steam, I ended up using my Slimbook for this testing. That severely limits what is possible: the iGPU in the i5 10th generation chip – Comet Lake-U GT2 UHD Graphics – is not meant for heavy pixel-pushing. I’ll mention some guessed-at framerates. Again, these framerates apply only to this one machine.

  • Don’t Starve Works out-of-the-box. 5-10 fps on full-screen, not playable for fun.
  • OpenTTD Works out-of-the-box. Playable in fullscreen.
  • Tooth and Tail Needs a workaround. Playable in fullscreen.
  • Unrailed Broken. On startup, message about version GLIBC 2.25 missing.

OpenTTD is an Open Source transport-tycoon game. It’s available from FreeBSD ports as well, so there’s no need to go through Steam for this, but I just wanted to double-check.

There is a compatibility list with tested games and workarounds.

Workarounds can be applied via the Launch Options in a game: right-click on a game from the games list (left-hand panel in Steam) and pick properties, or, on the game page itself, click on the gear-icon that is off to the right of the green play button.

Screenshot showing RMB menu and settings page
Screenshot showing RMB menu and settings page

The screenshot shows what to do: choose properties, then on the general tab of the properties dialog, find the launch options textbox. It looks a lot like a shell-command input box. Fill in something there: the compatibility list suggests various kinds of workarounds that can be tried.

Takeaway

It works pretty well! And, like there is an explosion of gaming-on-Linux content, there’s a similar explosion of gaming-on-FreeBSD enthusiasm. If I can get my workstation to run games at all – swapping around video cards if need be – then that’s one fewer machine I need to keep around for fun.