Starting a new, more descriptive topic as I cannot edit the topic of my previous post: Chrome does not work in GUI enabled containers - #6 by wexi79
@simosx do you have any idea on what might be wrong here? I know you’re a guru with GUI enabled containers…
It seems that there is some issue on how the GPU is accessible from the containers as some GUI apps work and some do not; they start but fail to render properly. I’ve tried to figure this out but with no luck.
LXD profile (created a copy for debugging purposes):
name: guinvidia-test
description: GUI LXD profile
config:
environment.DISPLAY: :0
environment.PULSE_SERVER: unix:/var/pulse-native
nvidia.driver.capabilities: all
nvidia.runtime: "true"
raw.idmap: both 1000 1000
user.user-data: |
#cloud-config
runcmd:
- 'sed -i "s/; enable-shm = yes/enable-shm = no/g" /etc/pulse/client.conf'
packages:
- x11-apps
- mesa-utils
- pulseaudio
write_files:
- owner: root:root
permissions: '0644'
append: true
content: |
PULSE_SERVER=unix:/var/pulse-native
path: /etc/environment
devices:
PASocket1:
bind: container
connect: unix:/run/user/1000/pulse/native
gid: "1000"
listen: unix:/var/pulse-native
mode: "0777"
security.gid: "1000"
security.uid: "1000"
type: proxy
uid: "1000"
X0:
bind: container
connect: unix:@/tmp/.X11-unix/X0
listen: unix:@/tmp/.X11-unix/X0
security.gid: "1000"
security.uid: "1000"
type: proxy
mygpu:
gid: "44"
type: gpu
used_by:
- /1.0/instances/test
project: default
The GPU seems to be ok in the container:
ubuntu@test:~$ nvidia-smi
Mon Jun 2 22:57:34 2025
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 570.133.07 Driver Version: 570.133.07 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 RTX A4000 Off | 00000000:2D:00.0 On | Off |
| 41% 39C P5 20W / 140W | 9997MiB / 16376MiB | 28% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
+-----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
+-----------------------------------------------------------------------------------------+
But if I try to run for example Chrome in the container I get a window on the host desktop that does not render and the following in the container console:
ubuntu@test:~$ google-chrome
[1010:1010:0602/225915.082974:ERROR:content/browser/gpu/gpu_process_host.cc:955] GPU process exited unexpectedly: exit_code=512
Any help would be greatly appreciated as this issue is affecting both my laptop and workstation and makes getting work done much harder.
Hmm, it seems that Vulkan is not working in the GUI enabled containers and also in other snaps, not just LXD so this might not be only a LXD issue but something might be broken with snapd and/or the OS itself…
You might need to wait for an lxd snap that uses a newer base than core22
where the newer mesa graphics interface exists …
The strange thing is that when my OS was in version 24.10, things worked just fine…
I will do a clean install with Kubuntu 24.10 on another computer with a Nvidia card and see how the GUI containers behave there and report the results
Ok, so I did a clean install with Kubuntu 24.10 and the issue is also present there, so it’s not the OS version. So something has been updated that broke the Nvidia passthru with the GUI containers.
Well well, now I did a clean installation with Kubuntu 24.04 LTS and tada, Chrome works in the GUI enabled container. It seems hoewever that Chrome is not able to use GPU acceleration when run in the container…
I’ll test Ubuntu 25.04 next to see if this is related to KDE/Plasma…
Same problem with Ubuntu 25.04, so it’s not the desktop environment…
I’ll try how Kubuntu 25.04 will behave if I use Wayland instead of X11 next.