GPU and Hardware Encoding Troubleshooting
Steam Headless requires direct hardware GPU access for rendering and video encoding. This guide covers diagnosing graphics driver initialisation, render node permissions, kernel modesetting, encoder latency, and synthetic probe failures.
Symptoms on This Page
| What are you seeing? | Jump to Section |
|---|---|
KWin logs DRM_IOCTL_MODE_CREATE_DUMB failed: Permission denied (desktop sluggish) | Case 2.1: DRM_IOCTL_MODE_CREATE_DUMB failed: Permission denied |
NVIDIA nvh264enc is unavailable or the container cannot run nvidia-smi | Check the host driver, NVIDIA runtime, and running container |
| High streaming latency (~180 ms) with NVIDIA in client browser | Case 2.2: High Streaming Latency (~180 ms) with NVIDIA |
Steam logs failed to load driver: nvidia-drm (32-bit launcher warning) | Case 2.3: Steam 32-bit Launcher Warning |
| Sunshine logs an NVENC API version mismatch error on startup | Case 2.4: Sunshine NVENC version error on an older driver |
nvidia-smi fails and modprobe nvidia reports Key was rejected by service | Case 2.5: Fedora Server uses Nouveau after installing the NVIDIA driver |
| Proton game has audio but white or black window, or Vulkan/Wine segfaults | Case 2.6: Proton has audio but a white or black window, or Vulkan crashes |
| NVENC fails with session limit reached or falls back to CPU encoding | Case 2.7: Unlocking Concurrent NVENC Streams on Consumer GPUs |
vainfo fails: vaInitialize failed with VA_STATUS_ERROR_UNKNOWN | Case 3.1: vainfo Fails or Driver Init Error |
| Intel hardware encoding unavailable or limited to CPU fallback | Case 3.2: Fedora Free iHD vs Full-Feature iHD Driver |
SHUI crashes at boot: No supported hardware encoder passed probe | 4. SHUI Hardware Encoder Synthetic Probe |
Container cannot stop or remove (docker stop hangs, process in D state) | 5. Container Cannot Stop or Remove (GPU Driver Lockup and Uninterruptible D State) |
| Verify available host GPU DRM render nodes | 1. Headless GPU Architecture and Device Nodes |
1. Headless GPU Architecture and Device Nodes
Steam Headless isolates GPU access to Direct Rendering Manager (DRM) render nodes (/dev/dri/renderD*).
- Intel and AMD: Require only the render node (for example,
/dev/dri/renderD128). Primary card nodes (/dev/dri/card0) are neither required nor recommended, preventing containers from attempting physical display modesetting. - NVIDIA: Requires the NVIDIA Container Toolkit (
runtime: nvidia) and the host render node (for example,/dev/dri/renderD128). The toolkit injects the host-created/dev/nvidia*devices into the container. Do not map a/dev/dri/card*primary node.
How to verify host GPU nodes
Check available GPU nodes on your host:
ls -l /dev/dri/
Expected output lists one or more card* devices (owned by group video) and renderD* devices (owned by group render).
2. NVIDIA Graphics Troubleshooting
Deploying Steam Headless on NVIDIA GPUs requires the host kernel module to support Kernel Mode Setting (KMS), the NVIDIA Container Toolkit to be configured in Docker, and the proper environment variables forwarded to KWin.
Case 2.1: DRM_IOCTL_MODE_CREATE_DUMB failed: Permission denied (Software Rendering Fallback)
The host NVIDIA kernel module was loaded with modesetting disabled (modeset=0), which is common on headless servers and TrueNAS SCALE. Without KMS, the NVIDIA driver refuses to initialise its GBM allocator (libnvidia-allocator.so), forcing Mesa to fall back to software rendering.
What you see
- The desktop feels extremely sluggish and container CPU usage approaches 100%.
- KWin logs flood with dumb-buffer allocation errors:
kwin_wayland_drm: KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Permission deniedkwin_core: Rendering a layer failed!
How to confirm this issue
Query the host NVIDIA modesetting parameter:
cat /sys/module/nvidia_drm/parameters/modeset
If the output is N, kernel modesetting is disabled.
Step-by-step resolution
Enable nvidia_drm.modeset=1 on the host kernel command line:
- Fedora Server / RHEL:
sudo grubby --update-kernel=ALL --args="nvidia_drm.modeset=1"sudo reboot
- Ubuntu Server / Debian Server: Edit
/etc/default/gruband appendnvidia_drm.modeset=1toGRUB_CMDLINE_LINUX_DEFAULT:sudo update-grubsudo reboot - TrueNAS SCALE:
midclt call system.advanced.update '{"kernel_extra_options": "nvidia_drm.modeset=1"}'sudo reboot
After rebooting, confirm that cat /sys/module/nvidia_drm/parameters/modeset returns Y. The DRM_IOCTL_MODE_CREATE_DUMB log errors will cease completely.
Case 2.2: High Streaming Latency (~180 ms) with NVIDIA (DPB Holdback)
When streaming over WebRTC or WebSockets, missing bitstream restriction flags in NVIDIA encoder headers can cause client browser decoders to allocate an excessive 5-frame Decoded Picture Buffer (DPB).
What you see
- Total streaming latency is approximately 180 ms in client browsers with hardware decoding (for example, Intel Iris Xe on Linux or Windows).
- Video decode latency alone accounts for roughly 166 ms on a 30 fps stream (~83 ms on a 60 fps stream), representing 5 buffered frames held back in client hardware.
How to confirm this issue
Open the Stream Diagnostics overlay (Ctrl+Alt+Shift+D). Check the Decode Latency metric. If decode latency is ~166 ms on a 30 fps stream or ~83 ms on a 60 fps stream, DPB holdback is occurring in the client decoder.
Step-by-step resolution
Steam Headless implements active two-tier mitigation:
- Server-side SPS rewriting: SHUI intercepts NVENC Sequence Parameter Set (SPS) packets and injects
bitstream_restriction_flag = 1withmax_num_reorder_frames = 0, instructing client decoders to release frames immediately without buffering. - Client-side WebCodecs filter: The web client inspects incoming SPS headers before passing them to the browser's
VideoDecoder.
To apply this fix:
- Ensure your container image is up to date:
docker compose pulldocker compose up -d --force-recreate
- Verify that
runtime: nvidiais configured in yourdocker-compose.yml:docker-compose.ymlservices:desktop-a:# ...runtime: nvidia
Case 2.3: Steam 32-bit Launcher Warning: failed to load driver: nvidia-drm
The Steam client launcher is a 32-bit application querying DRI3 acceleration under 64-bit Xwayland. Because NVIDIA uses proprietary GLX libraries rather than Mesa DRI modules, Mesa logs a fallback warning when opening the launcher UI.
What you see
- Container logs or Steam launcher console output show GLX fallback warnings:
steam[606]: pci id for fd 15: 10de:1f08, driver (null)steam[606]: glx: failed to create dri3 screensteam[606]: failed to load driver: nvidia-drm
Step-by-step resolution
No action required: This warning is purely cosmetic and applies solely to the 32-bit Steam store and library user interface.
When a 64-bit game or Vulkan/Proton title launches, it bypasses 32-bit GLX and renders directly with full hardware acceleration using the proprietary NVIDIA Vulkan and DRM driver stack.
Case 2.4: Sunshine NVENC version error on an older driver
Sunshine failed to initialise hardware encoding because its active binary was built against a newer NVENC API version than the host NVIDIA driver provides.
What you see
- Sunshine fails to start video capture or terminates during client connection.
- Sunshine service logs report an NVENC API version mismatch:
NVENC API version mismatch: requires 13.1, driver supports 13.0
How to confirm this issue
Inspect the Sunshine service journal inside the container:
docker exec -it steam-headless-a journalctl -u steam-headless-sunshine.service -n 50 --no-pager
Check for error messages indicating NVENC API version mismatch or failures initialising nvEncodeAPI.so.
Step-by-step resolution
Steam Headless includes a compatible Sunshine build targeting NVIDIA driver versions older than 610 and selects it automatically during startup.
- Pull the latest Steam Headless image and recreate the container:
docker compose pulldocker compose up -d --force-recreate
- If the mismatch persists, download the Sunshine service logs from the SHUI Services & Logs panel and upgrade your host NVIDIA driver to the current production branch where possible.
Case 2.5: Fedora Server uses Nouveau after installing the NVIDIA driver
On UEFI systems with Secure Boot enabled, the Linux kernel refuses to load out-of-tree kernel modules built by akmods unless they are signed with an enrolled Machine Owner Key (MOK). As a result, the kernel falls back to the open-source Nouveau driver.
What you see
nvidia-smicannot communicate with the NVIDIA driver./sys/module/nvidia_drm/parameters/modesetdoes not exist.lspci -nnkreportsKernel driver in use: nouveaufor the graphics card despite the proprietary driver packages being installed.- Loading the kernel module manually fails:
modprobe: ERROR: could not insert 'nvidia': Key was rejected by service
How to confirm this issue
Run these diagnostic commands on the Fedora Server host:
mokutil --sb-state
rpm -qa | grep -E '(^|-)kmod-nvidia|akmod-nvidia'
modinfo -F version nvidia
modinfo -F signer nvidia
lspci -nnk | grep -iA3 -E 'vga|3d|display'
sudo modprobe nvidia
If Secure Boot is enabled, the NVIDIA packages and module are present, the signer is blank or untrusted, and modprobe reports Key was rejected by service, the kernel is rejecting the module due to missing MOK enrolment.
Step-by-step resolution
Create an akmods signing key if one does not already exist, then import its public certificate into the host MOK list (mokutil prompts for a temporary enrolment password):
sudo test -f /etc/pki/akmods/certs/public_key.der || sudo kmodgenca -a
sudo mokutil --import /etc/pki/akmods/certs/public_key.der
sudo reboot
During the subsequent reboot, use the blue firmware-style MOK management screen to select Enroll MOK → Continue → Yes, enter the temporary password, and reboot into Fedora Server.
Once back in Fedora Server, rebuild the NVIDIA kernel module with the newly enrolled key, rebuild the initramfs, and reboot:
sudo akmods --force --rebuild
sudo dracut --force
sudo reboot
Confirm that the rebuilt module is signed and active:
modinfo -F signer nvidia
nvidia-smi
cat /sys/module/nvidia_drm/parameters/modeset
lspci -nnk | grep -iA3 -E 'vga|3d|display'
The signer must no longer be blank, nvidia-smi must show the GPU, the modeset command must print Y, and the device must report Kernel driver in use: nvidia. Continue with the NVIDIA device-node service in the Fedora Server host preparation guide. Do not use kmodgenca --force when a key pair already exists, because replacing the key would require enrolling the replacement certificate.
Case 2.6: Proton has audio but a white or black window, or Vulkan crashes
Headless server operating systems without a physical display manager do not instantiate /dev/nvidia-modeset or /dev/nvidia-uvm automatically. Without these character nodes, Vulkan swapchains fail and Proton games cannot present frames.
What you see
- A Proton game starts and game audio plays, but the window remains solid white or black.
vkcube --wsi xcb, Xlib Vulkan applications, Proton games, or Wine crash with a segmentation fault, show a blank window, or fail to negotiate a display swapchain.- Container startup fails when mounting
/dev/nvidia-modeset:Error response from daemon: error gathering device information while adding custom device "/dev/nvidia-modeset": no such file or directory - Running
ls -la /dev/nvidia*shows/dev/nvidia0and/dev/nvidiactl, but/dev/nvidia-modesetor/dev/nvidia-uvmare missing.
How to confirm this issue
Open a terminal from the affected Steam Headless desktop and run these checks in order:
ls -la /dev/nvidia*
cat /sys/module/nvidia_drm/parameters/modeset
vkcube --wsi xcb
Add this command before vkcube when checking a host or container with shell access:
lsmod | grep -E '^nvidia(_modeset|_drm|_uvm)?'
All four NVIDIA modules must be loaded, /dev/nvidia-modeset and /dev/nvidia-uvm must exist, and the modeset query must output Y. A loaded nvidia_modeset module does not by itself prove that /dev/nvidia-modeset has been instantiated.
vkcube should select the NVIDIA GPU and display an animated 3D cube. If it crashes or remains black after the device nodes are confirmed, presentation has another fault. Include the vkcube output in a support request and ensure the image has both mesa-vulkan-drivers.x86_64 and mesa-vulkan-drivers.i686 installed.
Step-by-step resolution
On a single-GPU host, run nvidia-modprobe to create the required character device nodes immediately:
sudo /usr/bin/nvidia-modprobe -m -c 0
sudo /usr/bin/nvidia-modprobe -u -c 0
Understanding the command arguments:
-c 0(--create-nvidia-device-file=0): Instructsnvidia-modprobeto create the per-GPU character node for device minor0and ensures the master control node/dev/nvidiactlexists. For systems with multiple NVIDIA GPUs, pass additional-c <minor>flags (for example:-c 0 -c 1) to create nodes for each card.-m(--modeset): Loadsnvidia-modeset.koand creates/dev/nvidia-modeset. This is mandatory for KWin Wayland, EGL external platforms, and Vulkan WSI swapchains.-u(--unified-memory): Loadsnvidia-uvm.koand creates/dev/nvidia-uvmand/dev/nvidia-uvm-tools. This is mandatory for CUDA Unified Memory, NVENC/NVDEC video buffers, and Vulkan external memory.
Making the fix persistent across reboots:
- TrueNAS SCALE: In the WebGUI, go to System Settings → Advanced → Init/Shutdown Scripts, click Add, set Type to
Command, set Command to/usr/bin/nvidia-modprobe -m -c 0 && /usr/bin/nvidia-modprobe -u -c 0, set When toPost Init, and check Enabled. See the TrueNAS SCALE host preparation guide. - Fedora Server / Enterprise Linux: Install the multi-GPU-aware startup helper and systemd service from the Fedora Server host preparation guide.
- Debian Server: Install the multi-GPU-aware startup helper and systemd service from the Debian Server host preparation guide.
- Ubuntu Server: Install the multi-GPU-aware startup helper and systemd service from the Ubuntu Server host preparation guide.
- Unraid: Place the commands in
/boot/config/gobefore/usr/local/sbin/emhttp, then use Main → Flash → Boot Parameters to addnvidia_drm.modeset=1and apply it to the normal Unraid OS boot entry. Follow the Unraid host preparation guide.
After creating the nodes, recreate the container so the NVIDIA Container Toolkit can mount the new devices.
Case 2.7: Unlocking Concurrent NVENC Streams on Consumer GPUs (keylase/nvidia-patch)
NVIDIA imposes an artificial concurrent session limit on consumer GeForce graphics cards. When multiple streams or containers exceed this quota, the driver blocks new hardware encoding sessions.
What you see
- When running multiple concurrent containers or opening several simultaneous stream viewers, NVENC hardware encoding fails:
NVENC session limit reached (maximum concurrent sessions exceeded)
- SHUI or Sunshine falls back to CPU encoding (
openh264orlibx264), causing immediate spikes in host CPU load and degraded stream responsiveness.
How to confirm this issue
Inspect the SHUI or Sunshine service logs during multi-stream sessions:
docker exec -it steam-headless-a journalctl -u steam-headless-shui.service -u steam-headless-sunshine.service -n 50 --no-pager
Look for log lines reporting NVENC session limit reached or fallback transitions to software encoding.
Step-by-step resolution
Because Steam Headless mounts and uses the host's NVIDIA driver libraries directly, this artificial restriction can be removed on the host machine prior to launching containers by applying the community keylase/nvidia-patch.
- Apply the patch on the host:
On your Linux host, follow the instructions in the keylase/nvidia-patch repository:
# Clone the patch repository on the hostgit clone https://github.com/keylase/nvidia-patch.gitcd nvidia-patch# Apply the NVENC encoding patchsudo ./patch.sh
- Restart Docker or reboot:
Restart the Docker daemon or reboot the machine so containers mount the patched
libnvidia-encode.solibrary. - Verification: Launch multiple container streams or concurrent viewers to confirm that hardware encoding proceeds without session exhaustion.
The patch modifies the installed host NVIDIA driver libraries in place. If you update the NVIDIA driver package on your host, rerun patch.sh for the newly installed driver version.
3. Intel and AMD Graphics Troubleshooting
Intel and AMD GPUs use open-source kernel drivers (i915, xe, amdgpu) and communicate with hardware encoders through VA-API. Troubleshooting typically focuses on render node permissions and driver feature capabilities.
Case 3.1: vainfo Fails or Driver Init Error
VA-API initialisation fails when the container cannot access /dev/dri/renderD128 or when host device node permissions restrict the container user.
What you see
- Running
vainfoinside the container fails:libva info: Trying to open /usr/lib64/dri/iHD_drv_video.solibva error: /usr/lib64/dri/iHD_drv_video.so init failedvaInitialize failed with VA_STATUS_ERROR_UNKNOWN - Hardware video encoding fails to start and falls back to software rendering.
How to confirm this issue
Test VA-API hardware initialisation inside the container:
docker exec -it steam-headless-a vainfo --display drm --device /dev/dri/renderD128
If vaInitialize fails with VA_STATUS_ERROR_UNKNOWN or cannot open the driver file, the container lacks render node access.
Step-by-step resolution
- Confirm the render node exists on the host:
Ensure your host user belongs to thels -l /dev/dri/renderD128
videoandrendergroups (sudo usermod -aG video,render $USER). - Verify that your
docker-compose.ymlmaps the render node underdevices::docker-compose.ymlservices:desktop-a:# ...devices:- /dev/dri/renderD128:/dev/dri/renderD128 - If running rootless Docker or Podman, ensure the container user namespace has read and write permissions for
/dev/dri/renderD128.
Case 3.2: Fedora Free iHD vs Full-Feature iHD Driver
Upstream Fedora disables patent-encumbered H.264 and HEVC hardware encoding in the standard intel-media-driver (iHD). Steam Headless resolves this by bundling the non-free driver build from RPM Fusion.
What you see
- Intel GPU is present, but hardware H.264 encode capabilities are missing or rejected during synthetic probing.
- SHUI logs indicate falling back from
intel-ihdto legacyintel-i965or software encoding.
How to confirm this issue
Check which driver SHUI has selected in the journal:
docker exec -it steam-headless-a journalctl -u steam-headless-shui.service -n 30 --no-pager | grep -i "encoder"
On Intel Skylake and newer GPUs, SHUI should log Selected hardware encoder: intel-ihd (or fallback intel-i965).
To inspect supported VA-API profiles directly:
docker exec -it steam-headless-a vainfo --display drm --device /dev/dri/renderD128
Look for VAProfileH264ConstrainedBaseline and VAProfileH264Main with VAEntrypointEncSlice.
Step-by-step resolution
Steam Headless packages both the RPM Fusion non-free intel-media-driver and the classic libva-intel-driver (i965) inside the image.
- If your image was built from a custom or minimal base, ensure the container image is updated to the canonical release:
docker compose pulldocker compose up -d --force-recreate
- If auto-detection selects
intel-i965on a newer GPU (Gen 9 Broadwell or newer), you can explicitly enforce the full-feature iHD driver indocker-compose.yml:docker-compose.ymlservices:desktop-a:# ...environment:SHUI_ENCODER: 'intel-ihd'
4. SHUI Hardware Encoder Synthetic Probe
During container initialisation, SHUI performs an active synthetic encode probe before binding network ports or starting the desktop portal session. If no hardware encoder passes the probe gates, the service halts to prevent broken streaming sessions.
What you see
- SHUI terminates during boot or fails its readiness probe.
- Container journal logs indicate probe failure:
No supported hardware encoder passed probe
- The web interface is unreachable on port 8483 or displays a 502 Bad Gateway error.
How to confirm this issue
Inspect the SHUI service journal inside the container:
docker exec -it steam-headless-a journalctl -u steam-headless-shui.service -n 50 --no-pager
SHUI evaluates driver candidates against three mandatory functional gates:
- 8 Constrained-Baseline Access Units: Successfully encodes 8 consecutive H.264 frames.
- Live Bitrate Adaptation: Successfully applies dynamic bitrate adjustments on the fly.
- Forced IDR Response: Emits an Instantaneous Decoder Refresh (IDR) keyframe within 20 ms of an RTCP PLI request.
An encoder candidate is rejected if it fails any of these three gates.
Step-by-step resolution
1. Candidate Selection Hierarchy:
SHUI queries candidate encoders according to the GPU's PCI vendor:
| Driver Candidate | Backend | Supported Hardware |
|---|---|---|
intel-ihd | VA-API (full-feature iHD) | Intel Broadwell, Skylake, and newer |
intel-i965 | VA-API (classic i965) | Intel Haswell, Broadwell, Skylake |
amd-vaapi | VA-API (Mesa radeonsi) | AMD Polaris, Vega, RDNA 1/2/3 |
nvidia-nvenc | NVENC (nvcodec) | NVIDIA Kepler, Maxwell, Pascal, Turing, Ampere, Ada |
software | OpenH264 | Diagnostic fallback only (never selected automatically) |
2. Overriding the Encoder Candidate:
If automatic detection selects an incompatible candidate, explicitly set the desired encoder using the SHUI_ENCODER option in your docker-compose.yml:
services:
desktop-a:
# ...
environment:
SHUI_ENCODER: 'intel-ihd'
3. Adjusting Video Conversion Mode:
If direct GPU conversion produces blank frames on older hardware, configure system-memory conversion using SHUI_MEDIA_CONVERSION:
services:
desktop-a:
# ...
environment:
SHUI_MEDIA_CONVERSION: 'system'
5. Container Cannot Stop or Remove (GPU Driver Lockup and Uninterruptible D State)
When physical GPU hardware experiences a fatal hardware fault (such as an AMDGPU VCE/VCN video encoder timeout, an Intel i915 GPU hang, or an NVIDIA engine reset failure), the host Linux kernel may fail to recover the device. Processes interacting with the GPU become trapped in uninterruptible kernel sleep (D state), preventing Docker or container managers from stopping or removing the container.
What you see
- Running
docker stop <container-name>hangs indefinitely or times out. - Forcing termination with
docker kill <container-name>ordocker rm -f <container-name>fails or leaves the container wedged in aremoval in progressor running state. - Inside the desktop session, games or streaming freeze completely prior to the stop attempt.
- Restarting Docker (
systemctl restart docker) does not clear the issue. After Docker restarts, the container remains reported as running or unkillable.
Why this happens
Steam Headless exposes host GPU hardware acceleration to the container using Direct Rendering Manager (DRM) render nodes (/dev/dri/renderD*).
When GPU hardware encounters a severe execution lockup:
- The host Linux kernel attempts an internal GPU recovery or engine reset sequence.
- If the reset fails or times out, processes with outstanding GPU work (such as
Xwaylandor rendering pipelines) remain blocked waiting on kernel DMA hardware fences (dma_fence_default_wait). - The kernel places these waiting processes into uninterruptible sleep (
Dstate) to prevent system memory corruption while awaiting physical hardware. - Processes in
Dstate cannot receive or process any POSIX signals, includingSIGKILL(kill -9). - When container teardown begins, PID 1 inside the container (
systemd) shuts down ordinary services and callszap_pid_ns_processes(), which waits for all processes in the container PID namespace to exit. Because the GPU-locked process cannot be terminated, PID namespace cleanup blocks indefinitely.
Because this lockup resides inside the host kernel driver rather than user-space software, restarting Docker or containerd cannot resolve it. The user-space management daemons restart, but the host kernel process table retains the unkillable process.
This is a documented characteristic of Linux kernel graphics drivers, hardware fences, and container PID namespaces. It is not an issue specific to Steam Headless:
- freedesktop.org GitLab #1974 (AMDGPU GPU reset failure leaves processes unkillable in dma-fence wait)
- freedesktop.org GitLab #2220 (VCN/VCE ring timeout recovery failure)
- Linux kernel DRM mailing list discussions on DMA fence timeouts
- Moby/Docker Engine Issue #5618 (Container cannot be stopped when process enters D state)
How to confirm this issue
Run these diagnostic commands on the host machine (outside the container):
-
Inspect container process states and wait channels:
docker top <container-name> -o pid,stat,wchan,commIf a process displays
D(orD+,Ds) in theSTATcolumn with a wait channel (WCHAN) pointing todma_fence_default_waitor a vendor GPU recovery worker:PID STAT WCHAN COMMAND2095502 D dma_fence_default_wait Xwaylandthe process is trapped in uninterruptible kernel sleep awaiting a blocked GPU fence.
-
Check the host kernel log for GPU hardware lockups:
sudo dmesg -T | grep -E -i "(gpu|drm|ring.*timeout|fence|amdgpu|i915|nouveau|vce|reset failed)"Look for driver messages reporting engine timeouts or recovery failures, such as:
[drm:amdgpu_job_timedout] *ERROR* ring vce0 timeout[drm:amdgpu_device_gpu_recover] *ERROR* GPU Recovery Failed: -110i915 0000:00:02.0: Resetting rcs0 for stopped heartbeat on rcs0task ... blocked for more than 120 seconds
-
Inspect the kernel call stack of the stuck PID:
sudo cat /proc/<PID>/stackA blocked stack typically contains
dma_fence_default_wait, kernel DRM reservation waits, andzap_pid_ns_processes.
Step-by-step resolution
Because the lockup is held within the host kernel driver wait queues:
-
Reboot the host system: Once a GPU hardware engine locks up and its kernel recovery routine fails, only a full host system reboot will reset the PCIe hardware registers and clear the blocked kernel threads. Software commands such as
kill -9or restarting Docker cannot clear uninterruptible sleep. -
Preventing future driver hangs:
- Update host firmware and kernel: Update the host motherboard BIOS/UEFI firmware, Linux kernel, and GPU firmware (
linux-firmwarepackage or proprietary vendor driver) to the latest stable release containing recent DRM recovery and fence patches. - Balance concurrent hardware encoding sessions: On multi-container hosts sharing an integrated or consumer GPU, limit the number of simultaneous hardware-accelerated encoding streams so the physical video encoder ASIC (VCE, VCN, or NVENC) is not oversubscribed.
- Update host firmware and kernel: Update the host motherboard BIOS/UEFI firmware, Linux kernel, and GPU firmware (
Next Steps
Once hardware rendering and encoding are validated:
- If streaming connections drop or show black frames, see Browser and Moonlight Streaming Troubleshooting.
- If game controllers or sound are not functioning, consult Input and Audio Troubleshooting.
- For container resource limits and capacity management, consult Capacity Warnings and Service Failures.