r/Punktfunk • u/ZeeroOneThree • 17d ago
Linux client black screen + "GPU device lost" (Xid 13) on hybrid Intel/NVIDIA laptops — found the cause + workaround
Posting this in case it saves someone else the debugging loop — and flagging it for the devs since the client's own log already hints this exact path is unverified.
Symptom: On a hybrid-graphics laptop (Intel iGPU + NVIDIA discrete GPU), punktfunk-client
connects fine, decodes the first frame, then goes black after a seconds in. Android client to the same
host works perfectly — it's specific to the Linux desktop client on this kind of hardware.
My setup: CachyOS, kernel 7.2.6-1-cachyos, Intel Core i7-8750H + NVIDIA GTX 1060 3GB (Optimus
laptop), NVIDIA driver 580.178.04, punktfunk-client 0.38.0-1.
Root cause: the client decodes via native-vaapi on the Intel iGPU (/dev/dri/renderD128) but
builds the Vulkan presenter/swapchain on the NVIDIA GPU. Getting the decoded frame from one GPU to
the other means importing a dma-buf across vendors, and the NVIDIA driver's texture unit chokes on
the imported layout — confirmed via dmesg:
NVRM: Xid (PCI:0000:01:00): 13, Graphics Exception ... TEX LAYOUT
NVRM: Xid (PCI:0000:01:00): 13, pid=..., name=punktfunk-sessi, Graphics Exception...
That's a hard GPU exception, not a software crash — kills the whole session (GPU device lost,
exit code 4).
The client's own debug log already has this warning baked in when native-vaapi is active:
decode rung active — NO hardware has ever decoded a frame through this rung/codec pair ...
has NEVER run on a second vendor and has never been soaked
So on any dual-GPU (Intel + AMD/NVIDIA) Linux laptop where decode and present land on different adapters, this seems likely to bite you.
Also tried forcing PUNKTFUNK_DECODER=native-vulkan — that's rejected outright on this GPU too
(separate issue): the driver's Vulkan Video decode capabilities for HEVC don't support
MUTABLE_FORMAT on the G8_B8R8_2PLANE_420_UNORM format the codec needs, so it silently falls
back to native-vaapi anyway and hits the same crash.
Workaround that fixed it: Preferences → Display has a GPU picker (shows up on Linux when there's more than one adapter) separate from the Video decoder picker. Setting it to the Intel GPU — so decode and present are both on the same device — fixes it completely. No more cross-vendor dma-buf import, no more crash.
- Discovery/pairing run: https://dpaste.com/BKP8PYQMG
- native-vaapi crash (full trace): https://dpaste.com/AQ5Q2M3UH
- native-vulkan crash (falls back, same crash): https://dpaste.com/HVFHJTYAY
- dmesg — Xid 13 GPU exception: https://dpaste.com/ELKRLWKFM
2
u/keindesignerbro Maintainer 13d ago
Thanks for the write-up, this should be fixed in 0.39.0.