Segfault in fullscreen on Wayland with NVIDIA Vulkan WSI (hybrid GPU)
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 37k
- Forks
- 3.5k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 22
Description
mpv version and platform
- mpv v0.40.0
- libplacebo v7.349.0
- FFmpeg 7.1.1
- Ubuntu 25.10 (kernel 6.17.0-14-generic)
- GNOME Shell 49.0 / Mutter 49.0 (Wayland)
- NVIDIA driver 590.48.01 (proprietary,
nvidia-dkms-590) - Vulkan loader 1.4.321.0
Hardware
- Dell XPS 17 9700 (hybrid GPU, no MUX)
- iGPU: Intel CometLake-H GT2 [UHD Graphics] (PCI 00:02.0)
- dGPU: NVIDIA TU106M [GeForce RTX 2060 Max-Q] (PCI 01:00.0)
- Internal eDP panel (1920x1200 @ 60Hz), physically wired to Intel iGPU
- NVIDIA set as primary compositor GPU via udev rule (
mutter-device-preferred-primary)
Description
mpv segfaults in the "vo" thread when entering Wayland fullscreen with Vulkan rendering on NVIDIA. The crash is inside libnvidia-glcore.so.590.48.01 during swapchain recreation triggered by xdg_toplevel.set_fullscreen.
Windowed mode works perfectly. Only true Wayland fullscreen crashes.
Reproducer
# Crashes — native Wayland Vulkan fullscreen:
mpv --fs --vo=gpu --gpu-api=vulkan \
--vulkan-device="NVIDIA GeForce RTX 2060 with Max-Q Design" \
any_video_file.mkv
# Works — windowed:
mpv --no-fs --vo=gpu --gpu-api=vulkan \
--vulkan-device="NVIDIA GeForce RTX 2060 with Max-Q Design" \
any_video_file.mkv
# Works — XWayland Vulkan context:
mpv --fs --vo=gpu --gpu-api=vulkan --gpu-context=x11vk \
--vulkan-device="NVIDIA GeForce RTX 2060 with Max-Q Design" \
any_video_file.mkv
# Works — maximized borderless (avoids xdg fullscreen):
mpv --no-fs --window-maximized=yes --no-border --vo=gpu --gpu-api=vulkan \
--vulkan-device="NVIDIA GeForce RTX 2060 with Max-Q Design" \
any_video_file.mkv
Key observations
- Not format-specific: crashes with any video file
- Not hwdec-specific: crashes with
--hwdec=no(pure software decode) - Not renderer-specific: crashes with both
vo=gpuandvo=gpu-next - Wayland WSI-specific:
gpu-context=waylandvkcrashes;gpu-context=x11vkworks - Fullscreen-specific: only
xdg_toplevel.set_fullscreentriggers it; maximized does not - OpenGL mode (
--gpu-api=opengl) doesn't segfault but Mutter fails with:failed to import supplied dmabufs: Could not bind the given EGLImage to a CoglTexture2D
Stack trace
Thread 31 "vo" received signal SIGSEGV, Segmentation fault.
#0 0x00007fff19301132 in ??? () at /lib/x86_64-linux-gnu/libnvidia-glcore.so.590.48.01
#1 0x00007fff19301ea8 in ??? () at /lib/x86_64-linux-gnu/libnvidia-glcore.so.590.48.01
#2 0x00007fff19302a16 in ??? () at /lib/x86_64-linux-gnu/libnvidia-glcore.so.590.48.01
#3 0x00007ffff2f20635 in ??? () at /lib/x86_64-linux-gnu/libvulkan.so.1
#4 0x00007ffff39421d8 in ??? () at /lib/x86_64-linux-gnu/libplacebo.so.349
#5 0x00007ffff3943473 in ??? () at /lib/x86_64-linux-gnu/libplacebo.so.349
#6 0x0000555555759d44 in ??? () [mpv vo thread]
#7 0x00005555556dc81c in ??? () [mpv vo thread]
#8 0x00005555556e6030 in ??? () [mpv vo thread]
#9 0x00007ffff2ca3d64 in start_thread () at ./nptl/pthread_create.c:448
Registers at crash:
rsi = 0xffffffffffffff (corrupt size/offset value)
Analysis
The crash path is:
- mpv enters fullscreen → Wayland compositor sends
xdg_toplevel.configurewith new dimensions - mpv's vo thread handles resize → libplacebo calls
pl_swapchain_resize - libplacebo calls
vkCreateSwapchainKHRto recreate swapchain - Inside
libnvidia-glcore.so, the swapchain creation/teardown dereferences an invalid pointer, causing SIGSEGV
This appears to be the same underlying NVIDIA driver bug reported in:
- NVIDIA Forums: Vulkan fullscreen swapchain creation failure causes segfault on surface destruction
- Possibly related to libplacebo #200 (race in swapchain recreation)
Related mpv issues
- #14385 — Fullscreen video freezing in Wayland (NVIDIA)
- #17239 — Fullscreen + swapchain errors (NVIDIA 580/590)
Workaround
Use XWayland Vulkan context:
# ~/.config/mpv/mpv.conf
gpu-context=x11vk
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The report names no mpv source file or test. Reproduce the native Wayland Vulkan command, then inspect the vo-thread fullscreen resize path where libplacebo recreates the swapchain; compare it with the working x11vk and maximized cases. Done means fullscreen no longer segfaults, or the issue is narrowed to the NVIDIA driver with a confirmed workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, linux, ubuntu
- Domain
- desktop, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100