Skip to content

Steam

SteamOS LSIO

The Linux Server people have a steamos image that works VERY well! … HOWEVER there's are few things that need to be tweaked since I'm using podman rather than docker.

YMMV as I'm doing this with AMD and not Nvidia.

Here's my docker-compose.yml file that I'm using with podman-compose

version: "3"
services:
  steamos:
    image: lscr.io/linuxserver/steamos:latest
    container_name: steamos
    hostname: steamos
    cap_add:
      - NET_ADMIN
    security_opt:
      - seccomp:unconfined
      - apparmor:unconfined
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
      - DRINODE=/dev/dri/renderD128
      - HOST_IP=10.10.10.1
      - STARTUP=KDE
      - RESOLUTION=1920x1080
    volumes:
      - ./config:/config
      - /dev/input:/dev/input
      - /run/udev/data:/run/udev/data
      - /var/games:/games #MountPoint with all my games
    devices:
      - /dev/dri:/dev/dri
    shm_size: "1gb"
    restart: unless-stopped
    networks:
      vlan:
        ipv4_address: 10.10.10.100
networks:
  vlan:
    driver: macvlan
    driver_opts:
      parent: enp9s0.10
    ipam:
      config:
        - subnet: "10.10.10.10/24"
          ip_range: "10.10.10.10/24"
          gateway: "10.10.10.1"

The Changes

So there's a few things that differ from the documentation mostly because I'm using macvlan rather than a bridge. This means I don't have to worry about any of the ports and their mappings. It's a damn mess and podman doesn't like dealing with them. I suspect docker has a problem too.

Using macvlan means that you CANNOT access the container from the host system. So you'll need another system to access things.

So starting with the HOST_IP var should be changed to the gateway as it controls the default route in the container. It's not documented as such but that that's what it does.

Next remove all the port mappings and add in the network section with your IP address for the container with ipv4_address: .

Docker/Podman doesn't like dealing with ipv6. As sad as that makes me, we're not going to be messing around with NATs anyway so not that big of loss IMO.

The network section is important, it will do the podman create network for us so that the correct settings in the required json file in the /etc/containers/network. In this case it should be /etc/containers/networks/steamos_vlan.json file.

Enabling DHCP

If for some reason you're feeling spicy you can enable dhcp by removing the ipv_address: in your compose file and editing the network json file changing the ipam driver to dhcp.

To see the ip address assigned by DHCP then you'll need to inspect the container

podman inspect steamos | jq ".[].NetworkSettings.Networks"

OR

podman inspect steamos --format "{{.NetworkSettings.Networks.steamos_vlan}}"

FROM

    "ipam_options": {  
         "driver": "host-local"  
    }

TO

    "ipam_options": {  
         "driver": "dhcp"  
    }

Speed Up Shader Pre-Caching

Flatpak:

printf "%s" "unShaderBackgroundProcessingThreads $(nproc)" | tee $HOME/.var/app/com.valvesoftware.Steam/data/Steam/steam_dev.cfg

Distro:

printf "%s" "unShaderBackgroundProcessingThreads $(nproc)" | tee $HOME/.local/share/Steam/steam_dev.cfg

Looking Glass

https://blandmanstudios.medium.com/tutorial-the-ultimate-linux-laptop-for-pc-gamers-feat-kvm-and-vfio-dee521850385
https://passthroughpo.st/simple-per-vm-libvirt-hooks-with-the-vfio-tools-hook-helper/
https://github.com/PassthroughPOST/VFIO-Tools/tree/master/libvirt_hooks
https://github.com/joeknock90/Single-GPU-Passthrough/tree/master