GUI Apps Segfault on Ubuntu 22.04+
Is your feature request related to a problem:
Hi, this isn't a feature request/enhancement, but there seems to be something broken with the issue templates -- there's no bug report template. I was actually confused, so at first I reported this on the main WSL repo, but since this is quite clearly something graphics related I decided to also report it here.
Windows Version
Microsoft Windows [Version 10.0.22631.4317]
WSL Version
2.3.24.0
Are you using WSL 1 or WSL 2?
- [x] WSL 2
- [ ] WSL 1
Kernel Version
5.15.153.1-microsoft-standard-WSL2
Distro Version
Ubuntu 22.04.5 LTS, Ubuntu 24.04.1 LTS
Other Software
No response
Repro Steps
Install Ubuntu 22.04 or Ubuntu 24.04 (via the Microsoft store, the terminal, or by importing a custom WSL Ubuntu distribution). Run
sudo apt update
sudo apt upgrade
sudo apt install mesa-utils
glxgears
Expected Behavior
I expect a window to open showing three gears. In fact, this works WSL for Ubuntu 20.04.6 LTS:
Actual Behavior
It segfaults:
Segmentation fault (core dumped)
This happens when I try to run any (GPU-accelerated) app that I can think of. I've tried many different drivers and mesa PPA's, but none of them do the trick.
Diagnostic Logs
WslLogs-2024-10-21_19-12-01.zip
nvidia-smi
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 565.51.01 Driver Version: 565.90 CUDA Version: 12.7 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA GeForce GTX 1650 On | 00000000:01:00.0 Off | N/A |
| N/A 37C P8 2W / 25W | 0MiB / 4096MiB | 0% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
ldd /usr/bin/glxgears
linux-vdso.so.1 (0x00007fffb8dd9000)
libGL.so.1 => /lib/x86_64-linux-gnu/libGL.so.1 (0x00007f7ce0097000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f7cdffb0000)
libX11.so.6 => /lib/x86_64-linux-gnu/libX11.so.6 (0x00007f7cdfe70000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f7cdfc47000)
libGLdispatch.so.0 => /lib/x86_64-linux-gnu/libGLdispatch.so.0 (0x00007f7cdfb8f000)
libGLX.so.0 => /lib/x86_64-linux-gnu/libGLX.so.0 (0x00007f7cdfb5b000)
/lib64/ld-linux-x86-64.so.2 (0x00007f7ce012d000)
libxcb.so.1 => /lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f7cdfb2f000)
libXau.so.6 => /lib/x86_64-linux-gnu/libXau.so.6 (0x00007f7cdfb29000)
libXdmcp.so.6 => /lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f7cdfb21000)
libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007f7cdfb09000)
libmd.so.0 => /lib/x86_64-linux-gnu/libmd.so.0 (0x00007f7cdfafc000)
Running with GDB gives:
(gdb) run
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /usr/bin/glxgears
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffe1293640 (LWP 803)]
Thread 1 "glxgears" received signal SIGSEGV, Segmentation fault.
0x00007fffffff9c30 in ?? ()
fwiw, I had tons of segfault issues on my i9-13950HX, but it wasn't limited to GUIs, and it wasn't happening consistently. I fixed them by disabling the power saving settings in my laptop's BIOS.
I have the same problem!
~$ nvidia-smi glxinfo | grep "direct rendering" Sat Mar 15 01:34:36 2025 +---------------------------------------------------------------------------------------+ | NVIDIA-SMI 535.183.01 Driver Version: 572.60 CUDA Version: 12.8 | |-----------------------------------------+----------------------+----------------------+ | GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |=========================================+======================+======================| | 0 NVIDIA GeForce RTX 4060 ... On | 00000000:01:00.0 On | N/A | | N/A 48C P8 2W / 125W | 383MiB / 8188MiB | 0% Default | | | | N/A | +-----------------------------------------+----------------------+----------------------+
+---------------------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=======================================================================================| | No running processes found | +---------------------------------------------------------------------------------------+ X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 148 (GLX) Minor opcode of failed request: 24 (X_GLXCreateNewContext) Value in failed request: 0x0 Serial number of failed request: 50 Current serial number in output stream: 51