Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Can nvidia-drivers be slotted?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6639
Location: The soundosphere

PostPosted: Sat Mar 17, 2018 7:20 pm    Post subject: Can nvidia-drivers be slotted? Reply with quote

Just set up a new Gentoo install with rt-sources. (This isn't about rt-sources.) The video card is Nvidia, which means older version of rt-sources + older version of nvidia-drivers.

I want to emerge gentoo-sources and boot into that with the latest nvidia-drivers so I can set up Steam and play games. The rt stuff is for live audio/MIDI/etc.

nvidia-drivers isn't slotted. Is it possible to emerge two different versions so that I can use /etc/conf.d/modules to load different versions for booting into rt-sources and gentoo-sources?
_________________
decibel Linux: https://decibellinux.org
Github: https://github.com/Gentoo-Music-and-Audio-Technology
Facebook: https://www.facebook.com/decibellinux
Discord: https://discord.gg/73XV24dNPN
Back to top
View user's profile Send private message
devilheart
l33t
l33t


Joined: 17 Mar 2005
Posts: 848
Location: Villach, Austria

PostPosted: Mon Mar 19, 2018 8:14 am    Post subject: Reply with quote

My guess would be that you could select the kernel (with eselect), build nvidia-drivers, select the other kernel and rebuild the drivers. Module will be placed in the proper place in /lib/modules, but it becomes cumbersome when you update your sources
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54220
Location: 56N 3W

PostPosted: Mon Mar 19, 2018 4:52 pm    Post subject: Reply with quote

audiodef,

devilhearts solution works for the kernel but not for userspace.

There is an ugly hack. Install the versions you want with the kernels you want and make binary packages as you go.
This will leave the kernel bits correct and give you two binary packages.

When you switch kernels, fix the /usr/src/linux symlink and emerge -K1 the right version of nvidia-drivers.
Scripting that is left as an exercise for the reader. :)

In practice, only the user space part will be changed, even though both parts will be installed.

Even dirtier hack ...
Script switching userspace files at boot only.

Either way, kernel updates will be messy.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Mon Mar 19, 2018 5:31 pm    Post subject: Reply with quote

kernel command line or openrc power:
- use nouveau with rt-kernel and nvidia with newer kernel, then just blacklist nouveau or nvidia depending on kernel you boot, either by using module blacklist kernel command line, or openrc intelligent module handling able to blacklist per kernel versions a module.
- or you may just blacklist nvidia-drivers with the rt kernel and just go with vesa drivers instead of nouveau if card performance is not the question but doing the less to keep maximum rt (assuming vesa is doing less while still perform ok for the wanted task).

If you really want both nvidia versions install, you will goes into dirty hacks.
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6639
Location: The soundosphere

PostPosted: Mon Mar 19, 2018 9:08 pm    Post subject: Reply with quote

Thanks, Neddy. Yes, quite dirty.

Hm, didn't think to go with vesa for the very reason you stated. Nice idea, thanks, Krinn.
_________________
decibel Linux: https://decibellinux.org
Github: https://github.com/Gentoo-Music-and-Audio-Technology
Facebook: https://www.facebook.com/decibellinux
Discord: https://discord.gg/73XV24dNPN
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3339
Location: Rasi, Finland

PostPosted: Mon Mar 19, 2018 9:56 pm    Post subject: Reply with quote

If nvidia drivers were slotted and selectable via eselect (which is possible, but not implemented), then it would be just a matter of creating local.d or actual init script to run eselect nvidia-drivers (or just manually symlink files in the script) based on the running kernel name+version (or better some custom parameter on kernel command line as krinn said).

But since nvidia-drivers aren't slotted it requires more hacking.
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming 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