** Description changed:
+ [SRU] 2.79: https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/2175701
+ [Impact]
+
+ Strictly confined snaps get no NVIDIA libraries with the compute-only
+ NVIDIA driver.
+
+ [Test Plan]
+
+ Sufficiently covered by automated testing in
+
https://github.com/canonical/snapd/pull/17976/changes#diff-f4e657ad439485a2923e460e89028e9df8334d459d951dd05305a2f509e5c304
+
+ For manual testing on a machine with an NVIDIA gpu:
+ 1. Run sudo ubuntu-drivers install --gpgpu nvidia:580, then reboot. Confirm
that nvidia-smi works and that libcuda.so.* is in /usr/lib/x86_64-linux-gnu.
+ 2. Install a strict snap that has the opengl plug, then run:
+ snap run --shell <snap>.<app> -c 'ls /var/lib/snapd/lib/gl'
+ With the current snapd, no NVIDIA libraries are listed.
+ 3. Upgrade snapd from -proposed and run step 2 again. libcuda.so* should now
be listed.
+
+ [Where problems could occur]
+
+ Only NVIDIA systems with the kernel module loaded are affected. On
+ compute-only hosts, snaps will now see the NVIDIA compute libraries. A
+ snap that assumed there was no GPU in that setup may now behave
+ differently.
+
+ ---original---
+
On Ubuntu 24.04 with the compute-only NVIDIA driver (`sudo ubuntu-
drivers install --gpgpu nvidia:580`, which installs nvidia-headless-no-
dkms-580 and libnvidia-compute-580 but not libnvidia-gl-580), strictly
confined snaps get no NVIDIA libraries at all: /var/lib/snapd/lib/gl has
no libcuda.so.1, so CUDA snaps cannot start on the GPU. nvidia-smi works
on the host and libcuda.so.1 is in /usr/lib/x86_64-linux-gnu.
Cause: sc_mount_nvidia_is_driver_in_dir() in cmd/snap-confine/mount-
support-nvidia.c uses libnvidia-glcore.so.<driver version> as the canary
for "driver present". That file is in libnvidia-gl-<N>, which a compute-
only install does not have, so snap-confine takes the /usr/lib/nvidia
bind path instead, which does not exist on Ubuntu, and none of
nvidia_globs is exposed.
Same machines and snap with `ubuntu-drivers install nvidia:580` (pulls
libnvidia-gl-580): libcuda.so.580.178.04 is linked into
/var/lib/snapd/lib/gl and loads.
Seen on Quadro T1000, T600 and T400, noble, kernel 6.8.0-147, driver
580.178.04, snapd 2.76.3; the canary is the same on 2.77 and master.
This affects servers and workstations set up for compute (the documented
path for CUDA on Ubuntu Server is `--gpgpu`), and any inference/CUDA
snap on them. Desktop installs are fine because nvidia-driver-<N> pulls
libnvidia-gl. For Myna (speech to text app) it means the GPU engine
silently serves on the CPU on such a machine.
** Also affects: snapd (Ubuntu)
Importance: Undecided
Status: New
** Also affects: snapd (Ubuntu Stonking)
Importance: Undecided
Status: New
** Also affects: snapd (Ubuntu Resolute)
Importance: Undecided
Status: New
** Also affects: snapd (Ubuntu Noble)
Importance: Undecided
Status: New
** Also affects: snapd (Ubuntu Jammy)
Importance: Undecided
Status: New
** Also affects: snapd (Ubuntu Tenacious)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2171069
Title:
snap-confine exposes no NVIDIA libraries on a compute-only driver
install (libcuda missing in snaps)
To manage notifications about this bug go to:
https://bugs.launchpad.net/snapd/+bug/2171069/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs