Skip to main content

Configure your GPU

A physical graphics processor (GPU) is required to run Steam Headless. In a remote gaming container, your GPU performs two distinct, critical tasks:

  1. 3D Graphics Rendering: Rendering game scenes, physics, textures, and the KDE Plasma desktop using hardware Vulkan and OpenGL drivers (utilised by Proton, DXVK, and VKD3D).
  2. Video Capture & Hardware Encoding: Capturing compositor frames directly from memory via PipeWire DMA-BUF and compressing them into an H.264 stream in real time (using VA-API or NVENC) for transmission across your network.
Software rendering and encoding are not supported

Software rasterisation (llvmpipe) cannot deliver playable frame rates in 3D gaming titles. Similarly, software video encoders (such as OpenH264 or libx264) consume excessive CPU cycles and suffer severe frame dropping during high-motion 1080p gaming. Hardware acceleration for both rendering and encoding is essential.

The image already contains the video codecs and Intel, AMD, and NVIDIA encoding software it needs. Do not install graphics packages inside the container. Your host still needs its normal kernel graphics driver, and NVIDIA hosts also need the NVIDIA Container Toolkit described below.


Discovering your GPU device nodes​

Linux exposes GPU interfaces through Direct Rendering Manager (DRM) character devices located in /dev/dri/:

  • Render Nodes (/dev/dri/renderD*): Specialised device nodes designed for unprivileged off-screen 3D rendering and hardware video encoding. They do not require display ownership (DRM Master permissions) and can be safely shared across multiple containers simultaneously.
  • Card Nodes (/dev/dri/card*): Primary nodes controlling physical video outputs, connectors, and hardware mode-setting.

To inspect the GPU device nodes present on your host, execute:

ls -l /dev/dri/

Example output on a host with an integrated Intel GPU and a discrete AMD card:

total 0
crw-rw----+ 1 root video 226, 0 Sep 11 00:00 card0
crw-rw----+ 1 root video 226, 1 Sep 11 00:00 card1
crw-rw----+ 1 root render 226, 128 Sep 11 00:00 renderD128
crw-rw----+ 1 root render 226, 129 Sep 11 00:00 renderD129

Checking driver and capability details​

To confirm which driver and card corresponds to each render node, you can inspect PCI devices on the host (lspci -nnk -d ::0300) or run hardware capability checks directly inside your running container (avoiding the need to install desktop packages on minimal host distributions):

  1. Verify Vulkan driver support:

    # Inside a running Steam Headless container:
    sudo docker compose exec desktop-a vulkaninfo --summary

    Look for the deviceName and driverInfo fields to identify your GPU model and confirming hardware 3D acceleration.

  2. Verify video encode entry points (VA-API):

    # Inside a running Steam Headless container:
    sudo docker compose exec desktop-a vainfo --display drm --device /dev/dri/renderD128

    Ensure VAProfileH264ConstrainedBaseline or VAProfileH264Main is listed with entry point VAEntrypointEncSlice or VAEntrypointEncSliceLP.


Vendor-specific configuration guides​

The examples below show the device settings that differ by GPU brand. The display, GPU, and encoder options reference lists the environment settings available when the defaults do not suit your setup.

Intel Graphics (iGPU & Arc)​

Intel integrated graphics (Iris Pro, UHD, Iris Xe) and discrete Intel Arc graphics cards run using open-source kernel drivers and the Intel Media Driver (iHD).

  • Supported Drivers: Kernel i915 (Gen9 Skylake through 12th Gen Core) or kernel xe (Intel Arc Alchemist, Battlemage, and newer Core Ultra architectures).
  • Host Device Node: Typically /dev/dri/renderD128.
  • Hardware Encoding: VA-API (intel-ihd). The Steam Headless container image includes full-featured RPM Fusion userspace drivers that provide hardware H.264 constrained-baseline encoding. (Older Gen8/Gen9 hardware can fall back to the legacy i965 driver).

Docker Compose snippet (Intel)​

services:
desktop-a:
devices:
- /dev/dri/renderD128:/dev/dri/renderD128
- /dev/fuse:/dev/fuse
- /dev/uinput:/dev/uinput
- /dev/uhid:/dev/uhid

AMD Radeon (RDNA, Vega & Polaris)​

AMD Radeon discrete and integrated GPUs use the in-tree Linux amdgpu driver and Mesa's radeonsi Gallium VA-API driver.

  • Supported Drivers: Kernel amdgpu.
  • Host Device Node: /dev/dri/renderD128 (or /dev/dri/renderD129 if your system also possesses an Intel integrated GPU).
  • Hardware Encoding: Mesa VA-API (vah264enc).
  • Low-Latency Tuning: The container pipeline automatically sets ref-frames=1 b-frames=0, restricting the Decoded Picture Buffer (DPB) capacity to 1 frame with zero reordering delay. This eliminates client playback buffering and delivers sub-30 ms frame delivery.

Docker Compose snippet (AMD)​

If your AMD Radeon card is /dev/dri/renderD129 on the host, keep that same path inside the container:

services:
desktop-a:
devices:
- /dev/dri/renderD129:/dev/dri/renderD129
- /dev/fuse:/dev/fuse
- /dev/uinput:/dev/uinput
- /dev/uhid:/dev/uhid

NVIDIA GeForce & RTX​

Configuring NVIDIA GPUs (GeForce GTX 750/900/10/16-series, RTX-series, or external eGPUs) requires a compatible NVIDIA Linux driver stack and the NVIDIA Container Toolkit. Turing or newer cards (GTX 16 series and all RTX models) should use NVIDIA's open GPU kernel modules; Maxwell and Pascal cards (GTX 900 series, GTX 10 series, TITAN V, and Maxwell-based GTX 750/750 Ti) require the proprietary 580xx kernel module flavour. Follow your host preparation guide for the correct packages and driver branch.

Host prerequisites​

  1. NVIDIA Container Toolkit: Ensure nvidia-container-toolkit is installed on your host and configured in Docker (sudo docker info | grep -i runtime should list nvidia).

  2. Mandatory Kernel Mode Setting (nvidia_drm.modeset=1): KWin Wayland uses Generic Buffer Management (GBM) surface allocation. If the NVIDIA kernel module is loaded without mode-setting (modeset=0), KWin cannot allocate surfaces using the NVIDIA DRM driver; Mesa falls back to software rasterisation (kms_swrast) and floods system logs with DRM_IOCTL_MODE_CREATE_DUMB failed: Permission denied, degrading streaming latency to over 180 ms.

    • Fedora Server / RHEL: Create /etc/modprobe.d/nvidia.conf:
      options nvidia-drm modeset=1
      Regenerate your initramfs (sudo dracut -f) and reboot.
    • Ubuntu Server / Debian Server: Add nvidia-drm.modeset=1 to GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub, run sudo update-grub, and reboot.
    • TrueNAS SCALE: Run via SSH:
      midclt call system.advanced.update '{"kernel_extra_options": "nvidia_drm.modeset=1"}'
      Reboot the TrueNAS host.

    Verify on the host:

    cat /sys/module/nvidia_drm/parameters/modeset
    # Expected output: Y

Docker Compose configuration (NVIDIA)​

NVIDIA device mapping

The NVIDIA Container Toolkit injects host-created /dev/nvidia* devices into the container. Map the GPU's /dev/dri/renderD* node separately so the desktop can render. Do not map a /dev/dri/card* primary node.

services:
desktop-a:
runtime: nvidia
environment:
NVIDIA_VISIBLE_DEVICES: 'all'
NVIDIA_DRIVER_CAPABILITIES: 'all'
devices:
- /dev/dri/renderD128:/dev/dri/renderD128
- /dev/fuse:/dev/fuse
- /dev/uinput:/dev/uinput
- /dev/uhid:/dev/uhid

NVENC ultra-low-latency tuning and DPB buffer sizing​

SHUI configures GStreamer's nvh264enc element with:

preset=p4 tune=ultra-low-latency b-frames=0 zerolatency=true
Understanding the Decoded Picture Buffer (DPB) delay​

In traditional video encoding, B-frames and multi-frame reference buffers improve compression efficiency by referencing up to 4–5 frames forward and backward in time. When a client web browser (such as Google Chrome using hardware Intel VA-API or Apple VideoToolbox) decodes an H.264 stream that lacks explicit zero-reorder bitstream restriction flags, the hardware decoder buffers 5 full frames in hardware memory before presenting anything:

Buffering delay = 5 frames × 33.3 ms = 166.7 ms

SHUI's ultra-low-latency configuration forces NV_ENC_TUNING_INFO_ULTRA_LOW_LATENCY and zeroReorderDelay=1, rewriting the H.264 SPS VUI header to set bitstream_restriction_flag=1 and max_num_reorder_frames=0. This eliminates hardware holdback on the client, ensuring instant sub-20 ms glass-to-glass rendering.

Sunshine on older NVIDIA drivers

Steam Headless includes a separate Sunshine build for NVIDIA drivers older than 610. It selects that compatible build automatically, so a supported older driver does not force Sunshine to encode on the CPU.

32-bit Steam launcher log messages

During startup, the 32-bit Steam launcher queries Mesa for 32-bit GLX drivers and may log failed to load driver: nvidia-drm. This is purely cosmetic for the launcher window; 64-bit games and 3D Vulkan/Proton titles execute with full hardware acceleration.


Display resolution and refresh rate options​

You can change the starting resolution and refresh rate for a fresh desktop profile with the display options. After the first start, choose the display mode in KDE Display Configuration; KDE saves that choice and uses it on later starts. SHUI bitrate and encoder choices are listed separately under streaming options.


Verifying GPU acceleration​

After starting your container, confirm that 3D rendering and video encoding are active:

  1. Check SHUI hardware encoder probe results:

    sudo docker compose logs desktop-a | grep -i "probe"

    You should see a message confirming the candidate probe passed:

    Probe passed: backend=intel-ihd driver=iHD device=/dev/dri/renderD128 codec=h264

    Or for NVIDIA:

    Probe passed: backend=nvidia-nvenc driver=nvcodec device=cuda:0 codec=h264
  2. Verify KWin Wayland rendering:

    sudo docker compose exec desktop-a journalctl -u steam-headless-plasma.service -g "kwin"

    Ensure KWin reports using the hardware DRM backend and not llvmpipe.

If you encounter issues during GPU initialisation, refer to GPU and encoding troubleshooting. For advanced setups featuring multiple physical graphics cards, see Multiple GPUs.