10 - Installation
Run the installer
./NVIDIA-Linux-x86_64-570.124.04.run --dkmsACCEPT when it offers to handle existing
nouveaudriverACCEPT when it offers to
rebuild initrafmsREFUSE when it asks for 32bit compability drivers
REFUSE when asked if you want to update Xserver config.
systemctl rebootOptional - Blacklisting generic drivers
If for some reason the installation fails instead of gracefully handling existing drivers
echo -e "blacklist nouveau\nblacklist nvidia*\noptions nouveau modeset=0" > /etc/modprobe.d/blacklist-nouveau.conf
update-grub
update-initramfs -u -k all
systemctl rebootRun the installation again
Verify the installation
ls -al /dev/nvidia*If everything went well, you should see /dev/nvidia0and /dev/nvidiactl
Run nvtop to double-check.
Check if IOMMU is enabled:
dmesg | grep -e DMAR -e IOMMU -e AMD-ViVerify IOMMU interrupt remapping is enabled:
dmesg | grep 'remapping'Check if VFIO is already enabled for some random reason:
lsmod | grep vfioIf not, we'll need to add three lines in /etc/modules
echo "vfio" >> /etc/modules
echo "vfio_iommu_type1" >> /etc/modules
echo "vfio_pci" >> /etc/modulesAdd these lines in /etc/udev/rules.d/100-nvidia.rules
KERNEL=="nvidia", RUN+="/bin/bash -c '/usr/bin/nvidia-smi -L && /bin/chmod 666 /dev/nvidia*'"
KERNEL=="nvidia_uvm", RUN+="/bin/bash -c '/usr/bin/nvidia-modprobe -c0 -u && /bin/chmod 0666 /dev/nvidia-uvm*'"
SUBSYSTEM=="module", ACTION=="add", DEVPATH=="/module/nvidia", RUN+="/usr/bin/nvidia-modprobe -m"Once you're done, apply the changes:
update-initramfs -u -k all
systemctl rebootOptional - Persistence Services
To avoid the driver/kernel module getting unloaded whenever the GPU is unused.
cp /usr/share/doc/NVIDIA_GLX-1.0/samples/nvidia-persistenced-init.tar.bz2 .bunzip2 nvidia-persistenced-init.tar.bz2tar -xf nvidia-persistenced-init.tarchmod +x nvidia-persistenced-init/install.sh;
./nvidia-persistenced-init/install.shrm -rf nvidia-persistenced-init*Last updated