1

Is it possible to allow my chroot to use the same Nvidia Drivers as my host os? Drivers are proprietary / not included in the Kernel.

1 Answer 1

1

The proprietary Nvidia driver consists of multiple parts:

  • kernel modules: nvidia-drm.ko, nvidia.ko, nvidia-modeset.ko, and in newer versions, also nvidia-peermem.ko and nvidia-uvm.ko. If DKMS is used, these can be found in /lib/modules/$(uname -r)/updates/dkms/. Since a chroot uses the same kernel as the host OS, you don't need to copy these into a chroot.
  • some utilities in /usr/lib/nvidia/
  • some utilities in /usr/bin/nvidia-*
  • a number of OpenGL, OpenCL and VDPAU libraries in /usr/lib[64]/ or /usr/lib/x86_64-linux-gnu/, depending on distribution
  • configuration file /usr/share/X11/xorg.conf.d/nvidia-drm-outputclass.conf
  • an X.org X11 server driver in /usr/lib/xorg/modules/drivers/nvidia_drv.so (or wherever your distribution places the X server driver modules)
  • an X.org X11 server extension module in /usr/lib/xorg/modules/drivers/libglxserver_nvidia.so* (or wherever your distribution places the X server extension modules)

Unless you run a separate hardware-accelerated X server (and thus a separate physical display) for your chroot, you'll only need the libraries and maybe the utilities, depending on what the chroot is actually for.

You can certainly copy (or perhaps mount --bind) the libraries and the utilities into your chroot. I'd recommend writing a script or a Makefile to handle the actual copying, to make it easier to re-copy things into the chroot after a driver update.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.