Two Graphic cards: one for X and one for GPU computing

Kernels & Hardware, configuring network, installing services

Two Graphic cards: one for X and one for GPU computing

Postby larry77 » 2020-06-22 12:38

Dear All,
I run debian stable on my box with the liquorix kernel and I have the nouveau driver installed.
I have a seasoned nvidia card which works without a glitch (just to watch movies, no gaming or computing).
I would like to buy a second, more powerful nvidia card for computing.
Is it complicated to set up the following: use the old card for the desktop graphical environment and the new one for computing only?
I found some tutorials onlines, but they are all a bit seasoned and things may have changed in the last 2-3 years.
Any suggestion is welcome
Thanks!
User avatar
larry77
 
Posts: 530
Joined: 2006-09-24 17:59

Re: Two Graphic cards: one for X and one for GPU computing

Postby ruwolf » 2020-06-24 02:07

In my opinion, it should work, because you can specify used card in xorg.conf by BusID.
User avatar
ruwolf
 
Posts: 429
Joined: 2008-02-18 05:04
Location: Slovakia, Banovce nad Bebravou, Matice slovenskej 1260/4-7

Re: Two Graphic cards: one for X and one for GPU computing

Postby larry77 » 2020-06-26 05:47

Thanks. Can you point me to a recent example/tutorial?
User avatar
larry77
 
Posts: 530
Joined: 2006-09-24 17:59

Re: Two Graphic cards: one for X and one for GPU computing

Postby ruwolf » 2020-06-26 13:23

I think, you can understand it e.g from this pseudo-bug report and solution:
bugs.FreeDesktop.org: BusID disregarded in xorg.conf in dual graphics card and single monitor setup
As you see, BusID in xorg.conf differs a bit from denoting in Xorg.0.log (different order and separator):
The format is assumed to be "bus@domain:device:func", where domain bus, device and func are decimal integers. domain and func may be omitted and assumed to be zero, although doing this isn't encouraged.

So, what is in Xorg.0.log specified as
Code: Select all
PCI: (1:6:0:0)

it is in xorg.conf specified as
Code: Select all
BusID   "PCI:6@1:0:0"
User avatar
ruwolf
 
Posts: 429
Joined: 2008-02-18 05:04
Location: Slovakia, Banovce nad Bebravou, Matice slovenskej 1260/4-7

Re: Two Graphic cards: one for X and one for GPU computing

Postby larry77 » 2020-06-26 13:43

Thanks again.
As soon as I get the card, I will cross my fingers and give it a go.
Have a nice weekend.
User avatar
larry77
 
Posts: 530
Joined: 2006-09-24 17:59

Re: Two Graphic cards: one for X and one for GPU computing

Postby CwF » 2020-06-26 13:52

Similar, resist creating a master xorg.conf:
viewtopic.php?f=6&t=146368&p=721632&hilit=hint+file#p721672

Will the "gpu compute" component be requiring Nvidia drivers? Cuda is not supported by nouveau.
CwF
 
Posts: 815
Joined: 2018-06-20 15:16

Re: Two Graphic cards: one for X and one for GPU computing

Postby larry77 » 2020-06-26 14:33

Hello,
For what I have in mind, I see no way to avoid installing nvidia-driver.
I plan to use that in combination with the liquorix kernel.
I had horrible experiences with nvidia drivers in the past, but it looks like a necessary evil.
Also, I am waiting for a gtx 1070 8GB. It is a reasonable card in my budget. The idea is to be able to prototype stuff on my home workstation and deploy somewhere else.
Wish me good luck!
User avatar
larry77
 
Posts: 530
Joined: 2006-09-24 17:59

Re: Two Graphic cards: one for X and one for GPU computing

Postby CwF » 2020-06-26 19:15

larry77 wrote: I see no way to avoid installing nvidia-driver.

maybe not...
In an area I've been playing, I suggest it might be possible to use both drivers.
This would depend on how nice the nvidia driver is and a failure would be the nividia drivers fault, file the bug with them.

Anyway, my guess is to install the nvidia driver, remove any nouveau blacklist, and delete any generated xorg.conf. The theory from there is the machine boots up on the first seen (bios boot gpu) and loads nouveau and works fine. With no declarations on what to do with the secondary card the system should ignore it, but you should find it also bound to nouveau.

Checkpoint - no idea if nvidia's packages will allow this? They should.

Now we unbind the secondary card from nouveau and rebind it to nvidia. I'll be lazy and not correct the following, but it gives the idea. directory would be 'nvidia' or 'nouveau' and the addresses and pcid's according to your hardware.
Code: Select all
echo "10de 1380" > /sys/bus/pci/drivers/nvidia/new_id
echo "0000:04:00.0" > /sys/bus/pci/devices/0000:04:00.1/driver/unbind
echo "0000:04:00.0" > /sys/bus/pci/drivers/nvidia/bind
echo "10de 1380" > /sys/bus/pci/drivers/nvidia/remove_id

Checkpoint - should work out without affecting the primary card and it's desktop. Did it blow up?
I assume the cuda stuff doesn't need interaction with xorg and actually does not run an independent display. If that is the case then there is no need for any declarations for xorg concerning the secondary card. Maybe...

Obviously the nvidia package could object, no idea. IF this works up to this point then it is up to whatever packages you run to have the sense to not error on sensing a nouveau in the system and stopping, and/or being able to be directed to the right hardware, maybe finding it itself, maybe... The 4:00.1 audio subsystem might need attention too? ? Unbind it and let it float in limbo?

I have a dual nvidia and might get to this in 6 months and a day. Code for not likely. So I'm guessing, nouveau and radeon are graceful with this, amdgpu is mostly nice, no idea with nvidia.

Enjoy!
CwF
 
Posts: 815
Joined: 2018-06-20 15:16


Return to System configuration

Who is online

Users browsing this forum: No registered users and 15 guests

fashionable