View previous topic :: View next topic |
Author |
Message |
VinzC Watchman
Joined: 17 Apr 2004 Posts: 5098 Location: Dark side of the mood
|
Posted: Thu Sep 20, 2012 8:18 pm Post subject: Let "nouveau" and "nvidia" cohabit: poss |
|
|
Hi all.
Is is possible to configure my system so as to select either nouveau or nvidia for Xorg at boot time using appropriate kernel arguments? (sub-question: which ones?) It could be through the use of an initramfs (which I'm already using since the root filesystem in on LVM) or whatever.
Thanks in advance for any hint or suggestion. _________________ Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739! |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54237 Location: 56N 3W
|
Posted: Thu Sep 20, 2012 8:26 pm Post subject: |
|
|
VinzC,
I think you need two different kernel trees to do this, one set up for niVida, one for nouveau as nVidia will not build against a kernel that has KMS and nouveau.
Now you boot the kernel you want and pass a parameter in the kernel line in grub, which you can parse from /proc/cmdline with a script in /etc/local.d/ to do whatever you want.
Choose a parameter thats easy to parse and that the kernel will ignore.
Your script can choose the right xorg.conf and anything else you need. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6098 Location: Dallas area
|
Posted: Thu Sep 20, 2012 8:35 pm Post subject: |
|
|
I used to have my system set up to boot with neither nividia or nouveau.
They were built as modules, with both blacklisted and I just selected one along with copying a preset up xorg conf file for one or the other.
I'm not sure if that is still possible as I haven't kept up with nouveau in the last year or so.
Edit to add:
I had this in /etc/modprobe.d/blacklist.conf
Code: | blacklist drm
blacklist ttm
blacklist nouveau
blacklist nvidia
|
and this in my .bashrc file
Code: | nvidia() {
sudo modprobe -r nouveau
sudo modprobe nvidia
sudo eselect opengl set 1
sudo cp ~/doc/nvidia.conf /etc/X11/xorg.conf.d/30-video.conf
echo ------> Nvidia drivers loaded <------
}
nouveau() {
sudo modprobe -r nvidia
sudo modprobe nouveau
sudo eselect opengl set 2
sudo cp ~/doc/nouveau.conf /etc/X11/xorg.conf.d/30-video.conf
echo ------> Nouveau drivers loaded <------
}
|
This was all pre KMS nouveau days, don't know if it will still work.
Edit to add 2:
I suppose you could build two kernels, one set up for nouveau and the other for nvidia, and boot the appropriate one from grub/lilo.
Edit to add 3:
https://wiki.archlinux.org/index.php/Nouveau _________________ PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland |
|
Back to top |
|
|
s4e8 Guru
Joined: 29 Jul 2006 Posts: 311
|
Posted: Fri Sep 21, 2012 5:42 am Post subject: |
|
|
You need to unbind fbcon before rmmod nouveau:
echo 0 > /sys/class/vtconsole/vtcon1/bind
echo 1 > /sys/class/vtconsole/vtcon0/bind
rmmod nouveau
vbetool post |
|
Back to top |
|
|
VinzC Watchman
Joined: 17 Apr 2004 Posts: 5098 Location: Dark side of the mood
|
Posted: Fri Sep 21, 2012 9:59 pm Post subject: |
|
|
Thanks NeddySeagoon et al.
I'm currently trying to configure my system with both modules in the same kernel tree. Fact is I already installed nvidia proprietary drivers prior to recompiling the kernel with requried modules for nouveau. From your hints I believe it's all possible if I blacklist all modules (nouveau and nvidia). Looks like nvidia gets loaded before running X so it's the easiest part.
In the meantime I'm also trying to keep my bootsplash screen so if nvidia is selected, uvesafb must be loaded. If nouveau is selected, I must update the video=xxx argument accordingly. The tricky part is to write the appropriate xorg configuration file before X starts. I hope local.start is the right place for that.
So thanks for your hints. I'll report here whatever I will have found out.
@s4e8:
I don't really need to unbind in fact for I'll just reboot to switch video drivers. At least in the beginning. Thanks for pointing that anyway. _________________ Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739! |
|
Back to top |
|
|
|