Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Blacklist module only for certain device
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Kresp
n00b
n00b


Joined: 17 Oct 2016
Posts: 73

PostPosted: Sun Apr 30, 2017 2:28 pm    Post subject: Blacklist module only for certain device Reply with quote

I have two nvidia GPUS, I need to run one with nvidia driver, the other - with nouveau.

How do I blacklist nouveau for one of those? As far as I understand, I can only blacklist it completely, and modprobe afterwards will try loading it for both devices.

When modprobe checks install section, does it pass device ids when it calls those /bin/{true,false} for checking? Is it possible to make a script that will return 1 when called for one GPU, and 0 - for the rest?


Last edited by Kresp on Sun Apr 30, 2017 9:11 pm; edited 1 time in total
Back to top
View user's profile Send private message
Maxxx
Guru
Guru


Joined: 12 Jan 2016
Posts: 515
Location: Italia

PostPosted: Sun Apr 30, 2017 2:59 pm    Post subject: Reply with quote

Maybe you need to see this link:

https://wiki.gentoo.org/wiki/Nouveau_%26_nvidia-drivers_switching
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7071

PostPosted: Sun Apr 30, 2017 3:29 pm    Post subject: Reply with quote

You can blacklist a module as a kernel parameter, making it easy to do two menus
kernel /boot/vmlinuz root=/dev/sd... blacklist=nouveau
kernel /boot/vmlinuz root=/dev/sd... blacklist=nvidia
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7089
Location: Saint Amant, Acadiana

PostPosted: Sun Apr 30, 2017 3:35 pm    Post subject: Reply with quote

I understand Kresp wants two different nVidia cards simultaneously. Interesting problem. Open source driver does not work without KMS and nVidia blob will not work when KMS is loaded (it has its own). Maybe loading nouveau KMS later when the system is already up using blob will work.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Kresp
n00b
n00b


Joined: 17 Oct 2016
Posts: 73

PostPosted: Sun Apr 30, 2017 9:31 pm    Post subject: Reply with quote

Yep, my problem is running those two side by side, not switchign between them.

Currently I have nouveau blacklisted, so xorg only starts on nvidia GPU (my current GPU driver does not support the second card, so it does not load). If I modprobe nouveau after that, than module picks up the second card, but from now on using GLX on nvidia card crashes X server.

If I log into console shell first, do modprobe mouveau, and then startx - then xorg handles both cards, nvidia and nouveau. However, using nvidia implementation of openGL stops working on DISPLAY associated with nvidia card, like openGL is not even supported.

What I wonder about is whether nouveau tries to bind to the first card even though it is already taken by nvidia blob, thus causing problems.
If there is an option to modprobe module only for certain device, I'll be able to look whether there's interference this way. Or, at least, try loading nouveau - first, and nvidia - second.

If ther is no such option, well then I'm out of luck, it seems - unless it's possible to have two different - old, and new - nvidia driver versions installed and running side by side on Gentoo, which does not seem to be the case.

Sigh... Should've bought RX 480.
Back to top
View user's profile Send private message
Kresp
n00b
n00b


Joined: 17 Oct 2016
Posts: 73

PostPosted: Sun Apr 30, 2017 11:00 pm    Post subject: Reply with quote

There's another question, kind of related.

Can I change which GPU linux uses by default when KMS is not set and X is not running?

Use case is following (for VFIO setup (I have options vfio-pci ids=10de:1401,10de:0fba in modprobe.d)):
Code:

# Ctrl + Alt + F2 to tty2
# login
modprobe vfio-pci # now I'm blind
modprobe nouveau
# Ctrl + D
# Ctrl + Alt + F1 to tty1
# login to DM
# now I have X running of secondary GPU with nouveau

It's basically same, but vfio-pci instead of nvidia for main GPU.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum