Nvidia driver installation

nobody a solution how to get this working? it is really disappointing to be stucked at the last step:D @Rnd3sB3g13rng did u find anything else what can solve this problem?

So I will try that again… I am now at the last step again where I need to edit the grub.cfg and disable noveau driver. If I installed Qubes in legacy mode and don*t have an efi bios then I need to update the etc/default/grub.cfg instead of the efi or doesn’t that matter?

and another problem I noticed is that with kernel 5.9 or 5.10x I only can connect via wifi to the network and sys-net recognizes my network card, but it has not set up the wired connection. maybe I have to set up it manual?

unfortunately I am always getting the same or an similiar error. loading plymouth service …starting hold until boot process… ctrl alt f1 dont bring anything new. I tried it with lightdm and sddm because I hope that the display manager is the problem ,but no… I don’t know what we can do. @dhn u cannot say anythings to this problem? Tried it with ur Kernel 5.9 ,the new Kernel 5.10x but never boots…
have a nice weekend…

Just an overview. I am running 2 x 980m nivdia cards and and intel core i7 -I need the driver running in dom0 or is there a other solution with gpu passthrough for me to the vm? It will be very nice to use the nvidia high definition audio controller and the video cards in a vm. I know that I will weak security but it should be better as dual booting, and it will increase my performance for my working vm. Is there a doc about gpu passthrough ? Please tell me how I can try that.

Now I am trying to run through the description again but always getting 2 make errors, that complier dont support fentry as an error. And I dont know how to fix that again that I can compile the nvida.ko driver. These errors are at ur build 5.9 kernel and the new kernel 5.10x, too

back to kernel 5.9.14 only make is working until the last step the error at the boot screen…
so I am trying to get the newest nvidia driver working and working but always getting stucked wit the boot error. I noticed that maybe it is a problem the the noveau driver ist not blacklisted right ,if we do it with vim ? Because the blacklist.conf is not here and I have to create that file first. What is the correct syntax for blacklist nouveau in that file or what is the best soltuion I can try to blacklist nouveau definitely. Perhaps then it will be working.
@GWeck do u know how to blacklist nouveau?

I did the update to the new kernel today 5.10.13 and there it is exactly the same error and stucked at the bootscreen without running the nvidida drivers. The lightdm display manager could not load however. With sddm there is a black screen only with a blinking _ .So I think it may be a problem with the display managers. But I don’'t know it. Strange that the newest kernel has the same error without nvidia drivers as kernel 5.9.14 trying to run nvidia drivers and add the line to the grub…
The loockscreen to enter the password has some interface errors, too . Ur able to enter ur luks passphrase but it looks completely different and if u enter the pass then it will boot everything fine until the last step booting and showing up display manager failed…so it should not be a problem of the nvida driver only, the kernel could be the problem as well, but without nvidia kernel 5.9.14-10 is runing, just the problem with the wired network I cannot fix until now and have to use wireless lan… maybe anybody knows now what could be the problem.
I am very thankful for ur help, stay healthy and have a nice weekend!

Hey, 1 month later it looks a bit better :wink:
I added rd.driver.blacklist=nouveau in the first GRUB_cmdline_linux ,created the sudo vim /etc/modprobe.d/blacklist.conf with blacklist nouveau written in it and installed the sddm display manager,completely switched to KDE and now I don’t get Starting Hold until boot process finishes up and can boot in the system and it seems that it is working with all my kernels 5.4.98 and higher. To compile the driver I used the kernel 5.9.1-4 he posted here. But I don’t know blacklist=nouveau in the grub line is right and don’t know the command how to check if I am using nvidia driver now. And I have to look what advantages it will bring, and have to test if in my fedora template there is a better video resolution and playing videos in fullscreen is possible now or something like that, that didn’t work before. Will update after testing more but now the steps 12 steps posted on the top @dhn are working.

I even noticed that with kernel 5.10x there was a similiar problem and it didn’t show the luks passwort gui and then hangs on boot. This was fixed by the team of qubes the last weeks and is working now, too. Maybe there was the fix with the plymouth service /display manager and now it is working with lightdm, too. :slight_smile:
BTW: Qubes 4.1 is much more compatible with templates, Hardware and else like my other Qubes 3.2 and 4.0 before and I am running it as a daily work system, because of this. You are amazing ! As soon I’ll have some time the next days I will make and summarized a structured post about installing KDE and and else on 4.1 and how I prefer to customize it for daily and usual ,none development uses.
Update: with lightdm it is working, too. This bug definitely was fixed by the amazing teams of qubes in any kernel update the last weeks. :slight_smile:

Update: I don’t think that with this method dom0 uses nvidia instead of nouveau, because I run glxinfo | egrep “OpenGL vendor|OpenGl renderer” and it says: OpenGL vendor string: nouveau . So it is not using my nvdiida and nouveau is not disabled or? But how to disable it to 100 % ? :wink:
Much blesses
Next I tried to make an overview again how it is working and included the corrected steps and tried to write it more detail for new user :slight_smile:
1. Install the necessary tools:
in dom0: sudo qubes-dom0-update gcc kmod grub2-tools perl-bignum make
2. Install kernel-devel package from RPM files; (Kerneldevel59, kernellatest59, Kernelqubesvm59)
Download from here: qubes-thinkpad-x1-extreme-gen3/rpm at main · dhn/qubes-thinkpad-x1-extreme-gen3 · GitHub and copy files to dom0 and install them.
in dom0: for example sudo dnf install kernel-latest-devel-5.9.14-1.qubes.x86_64.rpm
3. Download the latest Nvidia driver from www.nvidia.com/en-us/geforce/drivers/
In my case “ NVIDIA-Linux-x86_64-460.67.run ” but I suggest you to rename it to nvidia.run for easier use in the command lines then you dont need to write the numbers everytime :wink:
4. Copy the downloaded driver to dom0:
in dom0: qvm-run --pass-io APPVM ‘cat FOLDERAPPVM/FILENAME.file’ > /home/USERNAME/Downloads/FILENAME.file (of course u have to replace APPVM with yours for example personal FolderAPPVM with the path of the file like Downloads and the USERNAME with your one:) But with this command you always can copy files from a vm to dom0
in dom0
chmod +x NVIDIA-Linux-x86_64-455.45.01.run (or nivida.run or whatever u renamed it:)
5. Extract driver sources
in dom0: ./NVIDIA-Linux-x86_64-455.45.01.run --ui=none --no-x-check --keep --extract-only
6. Build nvidia.ko kernel driver
in dom0: Enter the folder NVIDIA-*/kernel/ with cd command or in file manager and then run
sudo make module IGNORE_XEN_PRESENCE=y CC=“gcc -DNV_VMAP_4_PRESENT -DNV_SIGNAL_STRUCT_RLIM”
7. Copy compiled driver to /lib/modules/$(uname -r)/extra
in dom0: sudo cp nvidia.ko /lib/modules/$(uname -r)/extra/
8. Load the driver and check
in dom0 sudo depmod -a; modinfo nvidia
9. Edit grub2 entry add rd.driver.blacklist=nouveau to the end of GRUB_CMDLINE_LINUX (the first grub_cmdline_linux)
in dom0: sudo vim /etc/sysconfig/grub
10. Update grub.cfg for UEFI
in dom0: grub2-mkconfig -o /boot/efi/EFI/qubes/grub.cfg
11. Disable nouveau driver; add to blacklist ; frist run sudo -i for root before then this step is working fine,too:)
in dom0: echo “blacklist nouveau” >> /etc/modprobe.d/blacklist.conf"
12. Reboot the system and enjoy the Nvidia driver

Today I run a qubes-dom0-update and in the stable repo is the kernel 5.11x now. This unfortunately is not working anymore and has the same error as everytime hanging on boot and with the wrong luks gui. Of course it destroyed the setup of my kernel 5.9.14 with nvidia,too and I hope doing all these steps again will fix it. So next step if it is working again to mark /prevent this kernel from updating /any changes. Can anybody tell me how to do this? I saw a documenation /command line about it a few days ago, but did not know the topic / page anymore. Thank you very much :slight_smile:

Update: If u do the steps 7-12 again, it is working with kernel 5.9.14 like before.

So be careful updating ur system if u have a working solution!

5 Likes

Has anyone managed to install nvidia drivers in dom0 with Qubes 4.1 and kernel 5.10? I tried to do it in 4.1.0-beta-1 with the instructions posted above, but it failed because of a kernel and a loopback-dkms error.

1 Like

For what purpose are you going to use the nvidia driver, as far as I know, in qubes, gpu virtualization is not supported?

I wanted to use it to record better with OBS and test qubes-video-companion (GitHub - elliotkillick/qubes-video-companion: Securely stream webcams and share screens across virtual mac) with my GPU, since using only my CPU is making it heat up too much and it slows down a lot.
If it’s not currently possible, It’s no big deal, we’ll have to wait for the 4.1 release, I think there will be better support by this time.

Hello, I’m new to this forrum but I have used Qubes before. I was wondering if it would be possible to use vGPU or Virgil3D with this.

Afaik Virgil3D does work already: [Xen-devel] [PATCH 1/2] libxl: Add virtio vga interface support for qemu - Chris Patterson - com.xensource.lists.xen-devel - MarkMail

but what about vgpu? has someone been able to try it? do we just use mdevctl to create the virtual device as usual?

I looked a bit at the link you provided, but I don’t really understand how to use it. Do you have to patch / modify the xen lib files in dom0, or is there something to install also ?
It looks interesting, maybe you could open up a topic to discuss this potential solution.

I installed the nvdia driver in dom0. Now how do I run games?

first, there will no 3d acceleration outside dom0, so playing game is not a good idea
also you shouldn’t run anything in dom0
anyway, if accept the risk, what game you what to play

1 Like

Are there any way of checking hash or signature of NVIDIA drivers?

Why do you add rd.driver.blacklist=nouveau and disable it in 11? If you install the driver, you want to use it, but now you diable it.

nouveau is the open-source driver, you need to disable it to be able to use the driver from nvidia

Are there two drivers for Nvidia cards? One is nouveau and the other is from Nividia website like NVIDIA-Linux-x86_64-460.67.run?

nouveau is a free and open-source graphics device driver for Nvidia video cards

Yes, it’s two different drivers.

Have error for 5.10.90 kernel. I didn’t install 5.9.14 kernel you mentioned because I think 5.10 is greater than it.
This command succeeded qubes-dom0-update gcc kmod grub2-tools perl-bignum make

$ sudo make module IGNORE_XEN_PRESENCE=y CC="gcc -DNV_VMAP_4_PRESENT -DNV_SIGNAL_STRUCT_RLIM"
make: *** No rule to make target 'module'.  Stop.

But isn’t a bad idea to build software on Dom0?
(Genuine question, I have 0 idea about it and I’m also having trouble with drivers.)

Best regards,
- me.

I installed my Nvidia drivers (I think) I used NVIDIA_Linux_x86_64-515.57.run . It installed perfectly with no errors, it asked me to modify the xorg. I selected yes. No errors at all…

but… Step 6 doesn’t work for me

Hi, at point 6 I got an error.

[user@dom0 kernel]$ sudo make module IGNORE_XEN_PRESENCE=y CC="gcc -DNV_VMAP_4_PRESENT -DNV_SIGNAL_STRUCT_RLIM"
make[1]: *** /lib/modules/6.3.9-1.qubes.fc32.x86_64/build: No such file or directory.  Stop.
make: *** [Makefile:80: modules] Error 2

then I checked

[user@dom0 kernel]$ uname -r
6.3.9-1.qubes.fc32.x86_64

[user@dom0 kernel]$ ll /lib/modules
total 12
drwxr-xr-x 7 root root 4096 May 23 18:20 5.15.94-1.qubes.fc32.x86_64
drwxr-xr-x 7 root root 4096 Jul 14 10:51 6.1.35-1.qubes.fc32.x86_64
drwxr-xr-x 7 root root 4096 Jul 15 14:21 6.3.9-1.qubes.fc32.x86_64

[user@dom0 kernel]$ ll /lib/modules/6.3.9-1.qubes.fc32.x86_64/
total 5220
lrwxrwxrwx  1 root root      42 Jun 22 05:00 build -> /usr/src/kernels/6.3.9-1.qubes.fc32.x86_64
drwxr-xr-x  2 root root    4096 Jun 22 05:00 extra
drwxr-xr-x 13 root root    4096 Jul 14 10:03 kernel
-rw-r--r--  1 root root 1260528 Jul 15 14:21 modules.alias
-rw-r--r--  1 root root 1235756 Jul 15 14:21 modules.alias.bin
-rw-r--r--  1 root root    1557 Jun 22 05:00 modules.block
-rw-r--r--  1 root root   11399 Jun 22 05:00 modules.builtin
-rw-r--r--  1 root root   31759 Jul 15 14:21 modules.builtin.alias.bin
-rw-r--r--  1 root root   14385 Jul 15 14:21 modules.builtin.bin
-rw-r--r--  1 root root   91905 Jun 22 05:00 modules.builtin.modinfo
-rw-r--r--  1 root root  507325 Jul 15 14:21 modules.dep
-rw-r--r--  1 root root  698297 Jul 15 14:21 modules.dep.bin
-rw-r--r--  1 root root     375 Jul 15 14:21 modules.devname
-rw-r--r--  1 root root     241 Jun 22 05:00 modules.drm
-rw-r--r--  1 root root      34 Jun 22 05:00 modules.modesetting
-rw-r--r--  1 root root    2282 Jun 22 05:00 modules.networking
-rw-r--r--  1 root root  174089 Jun 22 05:00 modules.order
-rw-r--r--  1 root root    1165 Jul 15 14:21 modules.softdep
-rw-r--r--  1 root root  569006 Jul 15 14:21 modules.symbols
-rw-r--r--  1 root root  690937 Jul 15 14:21 modules.symbols.bin
lrwxrwxrwx  1 root root       5 Jun 22 05:00 source -> build
drwxr-xr-x  3 root root    4096 Jul 14 10:03 updates
drwxr-xr-x  3 root root    4096 Jul 14 10:03 vdso
drwxr-xr-x  2 root root    4096 Jun 22 05:00 weak-updates

[user@dom0 kernel]$ ll /usr/src/kernels/
total 8
drwxr-xr-x 23 root root 4096 May 23 18:16 5.15.94-1.qubes.fc32.x86_64
drwxr-xr-x 24 root root 4096 Jul  6 11:26 6.1.35-1.qubes.fc32.x86_64

I know this is a slightly older thread, so hope I can ask for some help.
Relatively new Qubes user & am having bad jerky video playback if viewing youtube or even gifs in “personal” qube.

Can someone please advise on how to get Nvidia working?
Specs are: Laptop

M7-12R5N5-668: Infinity M7 - 17.3, i5, RTX 3050 4GB graphics
RAM (memory): 32GB DDR4 3200Mhz RAM (2 x 16GB)
M.2 SSD slot 1 PCIe Gen4: 512GB PCIe Gen4 SSD (Solid State Drive)
Graphics: NVIDIA GeForce RTX 3050 with 4GB GDDR6 graphics