Nvidia drivers in dom0 still works? (need to get a GTX 1070 off the ground)

3,621 views
Skip to first unread message

daltong defourne

unread,
Dec 12, 2016, 1:45:33 PM12/12/16
to qubes-users
Hi!
Does this procedure still work:
https://www.qubes-os.org/doc/install-nvidia-driver/

?

I have a box I want qubes on, but it has GTX 1070. I can temporarily swap the card out for a less obnoxious one (like, some Northern Islands Radeon, which I have lying around somewhere), but I'd prefer to put the 1070 back in eventually.

Since nouveau support for this GPU is in its infancy (and frankly nouveau is not very good) I'd like to install Nvidia's proprietary drivers.

Has anyone succeeded in using the "official" procedure from link above (the RpmFusion packages version of procedure specifically) on Qubes 3.2 ?

Are there any things beyond what is in that link that I should keep in mind?


P.S.:
For the purpose of this discussion, folks at rpmfusion and Nvidia are considered trustworthy ;-)

Tom Lowenthal

unread,
Dec 13, 2016, 3:02:11 PM12/13/16
to qubes-users
I believe that Nvidia binary drivers do not work under Xen. I spent a while trying unsuccessfully before reading some documentation to that effect which I considered reliable at the time, but can't immediately recall. If you find credible evidence that there's some workaround, I'd love to see it (and get my own Nvidia card working under Xen in Qubes!). Unfortunately, I currently believe that it is impossible.

johny...@sigaint.org

unread,
Dec 14, 2016, 11:48:37 AM12/14/16
to qubes-users, Tom Lowenthal
Sorry I can't give you direct advice, as I haven't tried it on Qubes yet
(don't want to upset my working configuration, nor increase attack surface
using proprietary drivers), but...

I have installed the nvidia drivers (304 version) on Xen/Debian and it
worked fine. Same version of Xen, so it should be possible to get the
nvidia drivers working, and I have heard of others having success on
Qubes.

In installing the "alternative" drivers, if you install the wrong one
(some older cards need the 304 version, not the newer 340 version, I
think), and try to recover, the configuration can get messy.

I still don't fully understand why mesa (free version of glx) adds another
layer of alternative redirection on top of things, nor necessarily how it
all is supposed to work. (There's the alternatives system, then mesa also
redirects things somehow, so it's hard to know what drivers are active at
times.)

Oh yeah, when I did successfully install the nvidia drivers, once a day or
so, when running an accelerated program, things would freeze and crash.
Even though the default nouveau drivers are slower, they do seem to be a
more reliable.

On a side note, one of Qubes strengths is the fast vchan-based gui/guid
system. Using shared memory, it updates the screen a lot faster than,
say, VNC (the typical way of using Xen), allowing playing videos and such,
even under nouveau.

Cheers,

-jj

Foppe de Haan

unread,
Dec 14, 2016, 2:52:35 PM12/14/16
to qubes-users, flam...@gmail.com, johny...@sigaint.org
On Wednesday, December 14, 2016 at 5:48:37 PM UTC+1, johny...@sigaint.org wrote:
> On a side note, one of Qubes strengths is the fast vchan-based gui/guid
> system. Using shared memory, it updates the screen a lot faster than,
> say, VNC (the typical way of using Xen), allowing playing videos and such,
> even under nouveau.

Well, playing videos at ~1080p max, on a ~1080p screen. 1080p on a 2160p screen is quite laggy already, never even mind 2160p@2160p. :)

Mathew Evans

unread,
Dec 18, 2016, 5:33:23 PM12/18/16
to qubes-users
Just to update.

I am currently running Nvidia drivers without a issue.

dom0 Kernel: 4.4.31-11
Nvidia: 375.20
Kernel-module: compiled in dom0;

Quick Guide:
1. dom0: qubes-dom0-update install gcc devel-kernel ksmod linux-headers
2. appvm: download NVIDIA-Linux-375.20-install.run (any appvm)
3. dom0: qvm-run --pass-io <APPVM> 'cat /PATH/TO/NVIDIA.run' > NVIDIA.run
4. dom0: ./NVIDIA.run --ui=none --no-x-check --keep --extract-only
5: dom0: cp NVIDIA-*/kernel/; IGNORE_XEN_PRESENCE=y CC="gcc -DNV_VMAP_4_PRESENT -DNV_SIGNAL_STRUCT_RLIM" make module;
6: dom0: cp nvidia.ko /lib/modules/4.4.31-11.pvops.qubes.x86_64/extra/.
7: dom0: depmod -a; modinfo nvidia (all working will show up fine)
8: dom0: EDIT GRUB or EFI; add rd.driver.blacklist=nouveau
9: dom0; reboot and enjoy nvidia support.

additional: you can install nvidia extra apps etc.. if you so wish just run ./nvidia.run --no-kernel-module -a


Hopefully this will help those of you wanting Nvidia driver instead of Nouveau.
Please note this is a ruff write up and guide not a perfect solution, and assumptions are made that you are always fimilar enough with *nix operating systems to figure out that parts i've missed out or aint put in detail.

Foppe de Haan

unread,
Dec 19, 2016, 7:12:55 AM12/19/16
to qubes-users

Thanks. Corrected a few typos / improved readability:

1. dom0: qubes-dom0-update gcc kernel-devel kmod kernel-headers; (qubes-dom0-update --enablerepo=qubes-dom0-unstable if using newer kernel)


2. appvm: download NVIDIA-Linux-375.20-install.run (any appvm)

3. dom0: qvm-run --pass-io <APPVM> 'cat /PATH/TO/NVIDIA.run' > NVIDIA.run; chmod +x NVIDIA.run;


4. dom0: ./NVIDIA.run --ui=none --no-x-check --keep --extract-only

5: dom0: cd NVIDIA-*/kernel/; make module IGNORE_XEN_PRESENCE=y CC="gcc -DNV_VMAP_4_PRESENT -DNV_SIGNAL_STRUCT_RLIM";
6: dom0: sudo cp nvidia.ko /lib/modules/4.4.31-11.pvops.qubes.x86_64/extra/.
7: dom0: sudo depmod -a; modinfo nvidia (all working will show up fine)
8: dom0: EDIT GRUB or EFI; add rd.driver.blacklist=nouveau (to kernel options)
9: dom0; reboot and enjoy nvidia support. (First boot will likely take a while.)

daltong defourne

unread,
Jan 6, 2017, 6:48:16 AM1/6/17
to qubes-users

Thanks a lot!

I will try this out as soon as I gather some much needed bravery.

So far I have bought a new mobo (asus Hero VIII) and was getting some very ... curious behavior on it (making a writeup right now) that I was able to reproduce on a different box with same model of motherboard and CPU.

Frankly, I am very looking forward to using proprietary drivers and the GPU (IGFx on Skylake Core i7 is ... weird.)

Once again, thank you very much!

daltong defourne

unread,
Jan 7, 2017, 9:46:37 AM1/7/17
to qubes-users
On Monday, December 19, 2016 at 3:12:55 PM UTC+3, Foppe de Haan wrote:

Attempt to extract the driver results in "extraction failed TERMINATED"

No further info.

Where do I go from here ?

daltong defourne

unread,
Jan 7, 2017, 10:17:38 AM1/7/17
to qubes-users

Found out the reason - had too little free space out there in dom0 land (dumb nvidia installer could have at least said something about not having enough space in /tmp/). Built the module in a special folder I made in /var/... Installing now... wish me luck

daltong defourne

unread,
Jan 7, 2017, 11:03:15 AM1/7/17
to qubes-users
On Monday, December 19, 2016 at 3:12:55 PM UTC+3, Foppe de Haan wrote:

Poor thing just stopped after I entered my LUKS password (I pressed escape to see if there are any errors there - nope), switched to a black screen and that's ... all.
Nothing more happens.

Should I like, wait more? It's been at least 10 minutes...

testo...@gmail.com

unread,
Jan 7, 2017, 12:53:12 PM1/7/17
to qubes-users
looks like your lightdm died, Daltong.
Had exactly same thing.

That's about as far as I got myself a month ago

Maybe some Xorg driver is needed or some other magic.

P.S.
Also, for me, despite all my efforts nouveau still was present and probed for some device or other during boot, and I'm very certain I've edited grub allright. I then created a blacklist.conf to "off nouveau for good" but that did not solve my weird lightdm issues.

daltong defourne

unread,
Jan 7, 2017, 6:44:31 PM1/7/17
to qubes-users

Okay, this is indeed lightdm dying (also, xorg doesn't start, so I guess the reason for lightdm's death is that xorg is not starting)

I tried to install nvidia's xorg stuff by running:

./nvidia.run --no-kernel-module -a

the results ended up very dubious (xorg died again and rebooting with Intel graphics did not "resurrect" it)

Managed to restore "intel compatible" xorg.conf with some trial and error (note to self: Backups!) and am writing this from qubes running with IGfx.

Foppe de Haan, Mathew Evans, could you please share your xorg.confs for Nvidia driver ?

daltong defourne

unread,
Jan 7, 2017, 7:36:37 PM1/7/17
to qubes-users

Did you run into a fatal xorg crash when trying to get xorg use nvidia driver?
If yes, how did you beat it?

I get a "Failed to allocate sofware rendering cache surface: out of memory" error which, according to Google, is pretty damn bad
https://www.google.se/search?q=NVIDIA+xorg+Failed+to+allocate+sofware+rendering+cache+surface:+out+of+memory.

Full log of my Xorg's sad demise when using Nvidia driver

http://pastebin.com/E9Guuea4

P.S.:
If I may ask, what nvidia card are you using?

Foppe de Haan

unread,
Jan 8, 2017, 3:07:55 AM1/8/17
to qubes-users

I got (to) the same (point). Have not managed to get it to work so far. Same error, too, though I got multiple (depending on how I tried to initialize X). gtx 950.

daltong defourne

unread,
Jan 8, 2017, 12:42:35 PM1/8/17
to qubes-users

I hope Mathew Evans has the secret (he said he is running the driver "without an issue" ... (intense finger crossing)

mj.enge...@gmail.com

unread,
Aug 4, 2017, 7:30:22 AM8/4/17
to qubes-users

Having the same issue. It's very clear that NVIDIA is not supporting Xen according to this chat https://devtalk.nvidia.com/default/topic/691565/linux/geforce-driver-problem-on-centos-6-4-with-xen-installed/2/?offset=26#5197554

jpmen...@gmail.com

unread,
Aug 23, 2018, 4:16:35 PM8/23/18
to qubes-users
The detailed instructions above were rolled with no issue however as soon as xtarting does not work with dom0. Same system without xen works. The Nvidia drivers are a pain in the neck as always. Returning this GTX1080 and reusing my GeForce 210 which is perfect with the Nouveau driver ... and perfectly compatible with everything.
Reply all
Reply to author
Forward
0 new messages