Missing nvidia-drm_gbm.so symlink in debian12 cuda packages

Using https://developer.download.nvidia.com/compute/cuda/repos/debian12/x86_64/ with apt on Debian SID, I ran into the problem where libnvidia-allocator1 545.23.08-1 is installing nvidia-drm_gbm.so in /usr/lib/x86_64-linux-gnu/nvidia/current/

The problem is that everything is looking for it in /usr/lib/x86_64-linux-gnu/gbm/

This results in all wayland compositors failing to start successfully.

Making a symlink seems to fix the issue quite well: sudo ln -s /usr/lib/x86_64-linux-gnu/nvidia/current/nvidia-drm_gbm.so /usr/lib/x86_64-linux-gnu/gbm/

This definitely took me a few days to sort out.

(I can generate the nvidia-bug-report data if need be, but due to various debugging efforts this boot, it’s not exactly a clean run, with over 62,000 lines in the file, and it being 852k compressed. Given that the root is a missing symlink, I skipped that for now.)

I did the same with Debian Trixie but nvidia-setting gets a segmentation fault, it is a useless tool under wayland.

The diversion of those files is likely happening because of the installation of glx-alternatives and related packages on your system.

These date from a previous mode of operation, pre-glvnd, where manually swapping in different version of the libGL.so, etc. libraries, appropriate for the particular hardware implementation, was necessary to achieve correct operation.

I believe these diversion packages are no longer necessary and removing them should cause the file diversions to be undone and correct behaviour restored.

The NVIDIA maintainers may wish to add Conflicts: and Replaces: as appropriate for these packages?

Best wishes,
dwm