460.73.01 fails to load in Xorg under PRIME render offload (Debian 11)

460.73.01 works fine when I disable the integrated graphics on my laptop (a Thinkpad P52). But when I reenable integrated graphics, and attempt to use render offload (as per https://wiki.debian.org/NVIDIA%20Optimus and Chapter 34. PRIME Render Offload), Xorg seems unable to find the nvidia driver. Forcing it to load the driver results in this error.

(EE) Failed to load module "nvidia" (module does not exist, 0)

The kernel modules appear to exist fine (lsmod reports they’re loaded; nvidia-smi provides useful results).

nvidia-bug-report.log.gz (1.7 MB)

Thank you.

The driver should be in the package
xserver-xorg-video-nvidia
But since it’s installed in a debian-specific directory /usr/lib/nvidia/current the xserver has to be pointed to it, e.g.
/etc/X11/xorg.conf.d/11-nvidia-driver.conf

Section "OutputClass"
    Identifier "nvidia-driver"
    MatchDriver "nvidia-drm"
    Driver "nvidia"
    Option "AllowEmptyInitialConfiguration"
    ModulePath "/usr/lib/nvidia/current"
EndSection

Thank you. That does work. I have reported this issue to Debian here https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=988200.