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.)