Nvidia proprietary driver installation

You can use rpm packages from rpmfusion, or you can build the driver yourself.

Word of Caution

Proprietary (NVIDIA/AMD) drivers are known to be sometimes highly problematic, or completely unsupported. Radeon driver support is prebaked in the Qubes kernel (v4.4.14-11) but only versions 4000-9000 give or take. Support for newer cards is limited until AMDGPU support in the 4.5+ kernel, which isn’t released yet for Qubes.

Built in Intel graphics, Radeon graphics (between that 4000-9000 range), and perhaps some prebaked NVIDIA card support that I don’t know about. Those are your best bet for great Qubes support.

If you do happen to get proprietary drivers working on your Qubes system (via installing them), please take the time to go to the Hardware Compatibility List (HCL) Add your computer, graphics card, and installation steps you did to get everything working.

Before continuing, you may wish to try the kernel-latest package from the current repository. This kernel may better support your card and if so, you would not have to rely on proprietary drivers. This can be installed from dom0 with:

sudo qubes-dom0-update kernel-latest

RpmFusion packages

There are rpm packages with all necessary software on rpmfusion. The only package you have to compile is the kernel module (but there is a ready built src.rpm package).

Download packages

You will need any Fedora 18 system to download and build packages. You can use Qubes AppVM for it, but it isn’t necessary. To download packages from rpmfusion - add this repository to your yum configuration (instructions are on their website). Then download packages using yumdownloader:

yumdownloader --resolve xorg-x11-drv-nvidia
yumdownloader --source nvidia-kmod

Build kernel package

You will need at least kernel-devel (matching your Qubes dom0 kernel), rpmbuild tool and kmodtool, and then you can use it to build the package:

yum install kernel-devel rpm-build kmodtool
rpmbuild --nodeps -D "kernels `uname -r`" --rebuild nvidia-kmod-260.19.36-1.fc13.3.src.rpm

In the above command, replace uname -r with kernel version from your Qubes dom0. If everything went right, you have now complete packages with nvidia drivers for the Qubes system. Transfer them to dom0 (e.g. using a USB stick) and install (using standard “yum install /path/to/file”).

Then you need to disable nouveau (normally it is done by install scripts from nvidia package, but unfortunately it isn’t compatible with Qubes…):

Edit /etc/default/grub:

GRUB_CMDLINE_LINUX="quiet rhgb nouveau.modeset=0 rd.driver.blacklist=nouveau video=vesa:off"

Regenerate grub configuration:

grub2-mkconfig -o /boot/grub2/grub.cfg

Reboot.

Manual installation

This process is quite complicated: First - download the source from nvidia.com site. Here “NVIDIA-Linux-x86_64-525.116.04” is used. Copy it to dom0. Every next step is done in dom0.

See this page for instructions on how to transfer files to Dom0 (where there is normally no networking).

WARNING: Nvidia doesn’t sign their files. To make it worse, you are forced to download them over a plaintext connection. This means there are virtually dozens of possibilities for somebody to modify this file and provide you with a malicious/backdoored file. You should realize that installing untrusted files into your Dom0 is a bad idea. Perhaps it might be a better idea to just get a new laptop with integrated Intel GPU? You have been warned.

Userspace components

Install libraries, Xorg driver, configuration utilities. This can by done by nvidia-installer:

./NVIDIA-Linux-x86_64-525.116.04.run --ui=none --no-x-check --keep --extract

Kernel module

You will need:

  • nvidia kernel module sources (left from previous step)
  • kernel-devel package installed
  • gcc, make, etc

This installation must be done manually, because nvidia-installer refuses to install it on Xen kernel.

To build the kernel module, enter NVIDIA-Linux-x86_64-525.116.04/kernel directory and execute:

make IGNORE_XEN_PRESENCE=1 CC="gcc -DNV_VMAP_4_PRESENT -DNV_SIGNAL_STRUCT_RLIM"
mv nvidia.ko /lib/modules/$(uname -r)/kernel/drivers/video/
depmod -a

Disable nouveau

Add rd.driver.blacklist=nouveau option in /etc/default/grub (at the end of line GRUB_CMDLINE_LINUX).

Install the new grub config with grub2-mkconfig -o /boot/efi/EFI/qubes/grub.cfg.

Reboot

Reboot to verify all this works. You can ensure the module is loaded by running lsmod | grep nvidia which should display a single output line, and lsmod | grep nouveau should have no output.

Troubleshooting lack of video output during installation

The GRUB menu may show up fine, the installation environment starts loading, and then the display(s) go into standby mode. This is, typically, related to some sort of an issue with the kernel’s KMS/video card modules. See the Nvidia Troubleshooting guide for troubleshooting steps.


This document was migrated from the qubes-community project
  • Page archive
  • First commit: 08 Dec 2020. Last commit: 03 Jun 2023.
  • Applicable Qubes OS releases based on commit dates and supported releases: 4.0, 4.1
  • Original author(s) (GitHub usernames): rapenne-s
  • Original author(s) (forum usernames): @solene
  • Document license: CC BY 4.0
1 Like

For the “Manual Installation” part,

I installed the kernel-open driver that way
SETUP_NOCHECK=1 ./NVIDIA-Linux-x86_64-XXXX.run --ui=none -m=kernel-open

and didn’t needed the “Kernel module” part

1 Like

Issues with Quadro T2000.

It worked to me too.

What is the benefit of doing this? Can you attach the GPU to other qubes? Why would you want this in dom0?

One time I wanted to experiment with IGPU passthrough so I needed my 4080 to handle dom0. But the nouveau driver version in dom0 was not compatible with the 4080.

I had regular crashes with nouveau with a 1060

dom0 works flawlessly with property drivers with a quadro k2000. The problem I have is inside qubes. I feel a slow performance I dont know if it is the chipset C602 or is ment sometimes to be laggy.

how and where?

I’m trying to follow this guide but not understanding it completely as each part fails for different reasons. I am new to qubes and trying out different things to learn. I’m using qubes 4.2 with kernel 6.10.10-1.

When I try to RpmFusion Packages and Download packages inside of my personal qube (this seems to fit the requirement of being fedora based and not dom0). I get the following error:

Error in resolve of packages:
    xorg-x11-drv-nvidia-3:560.35.03-5.fc40.x86_64

 Problem: package xorg-x11-drv-nvidia-3:560.35.03-5.fc40.x86_64 from rpmfusion-nonfree-updates requires /usr/sbin/grubby, but none of the providers can be installed
  - package grubby-dummy-9.0.0-4.fc40.noarch from qubes-vm-r4.2-current obsoletes grubby < 9.0.0 provided by grubby-8.40-75.fc40.x86_64 from fedora
  - package sdubby-1.0-8.fc40.noarch from fedora conflicts with grubby provided by grubby-dummy-9.0.0-4.fc40.noarch from qubes-vm-r4.2-current
  - package sdubby-1.0-11.fc40.noarch from updates conflicts with grubby provided by grubby-dummy-9.0.0-4.fc40.noarch from qubes-vm-r4.2-current
  - problem with installed package grubby-dummy-9.0.0-4.fc40.noarch
  - installed package grubby-dummy-9.0.0-4.fc40.noarch obsoletes grubby < 9.0.0 provided by grubby-8.40-75.fc40.x86_64 from fedora
  - package sdubby-1.0-8.fc40.noarch from fedora conflicts with grubby provided by grubby-dummy-9.0.0-4.fc40.noarch from @System
  - package sdubby-1.0-11.fc40.noarch from updates conflicts with grubby provided by grubby-dummy-9.0.0-4.fc40.noarch from @System
  - conflicting requests

The guide then says Manual Installation. Is this either I do the RpmFusion or Manual or is it both?

I tried to do the manual installation, I have the NVIDIA-Linux-x86_64-560.120.run inside dom0 and when I run it with the same arguments as this document it errors with unrecognized option: "--extract" so I dropped it.

That gets the installer running but then it says that it can’t find cc in the path. Running which gcc says there’s no gcc in the path. If I run sudo dnf install libgcc, it says its already installed. There’s no gcc in the repos and the guides for installing gcc in fedora use dnf groupinstall "Development Tools" which says its not available.

Can anyone help me through this process please?

Remove grubby-dummy package in your app qube and try again:

I realize this post is about a year old, but maybe others have the same question…

It’s either the RpmFusion -or- Manual, not both.

As for the gcc not being found, try either

qubes-dom0-update --action=install gcc.x86_64

or

dnf install gcc.x86_64

If the gcc package is not found try installing gcc.x86_64 after installing qubes-repo-contrib.

sudo qubes-dom0-update qubes-repo-contrib

Once gcc.x86_64 is installed the NVIDIA code should compile.

I didn’t find the rpmfusion method straight forward though.

Since a large percentage of gpus are either amd or nvidia, maybe the akmod-nvidia and xorg-x11-drv-nvidia-cuda along with the ~70 dependencies can be allowed in dom0 installs.

The install using the entire NVIDIA*.run installer, not just the nvidia.ko, completed and did make the discrete NVIDIA RTX 4060 gpu available, in addition to the amd integrated gpu, but seemed to conflict with keyboard events. I didn’t get to the point of trapping and sorting out which events were blocking before I had to return the computer (Dell G15 5535 … nice computer otherwise) The noacpi kernel parameter seemed to alleviate the keyboard lockups but could interfere/stop important functions such as the fan cooling and sleep. Just a side note, the ram was taken to 64 GB, but it’s not likely the reason for the keyboard lockups. The mouse did not seem to be affected, but it could be that it may have taken longer than the keyboard. Maybe I’ll get the Dell and install libreboot :).