View previous topic :: View next topic |
Author |
Message |
jagdpanther l33t
Joined: 22 Nov 2003 Posts: 729
|
Posted: Fri Feb 20, 2015 6:06 pm Post subject: [Solved] How To Not AutoLoad Nvidia-Drivers During Boot? |
|
|
Because I have been having an intermittent boot-time freezing issue that seems to be caused by the nvidia-driver ( [url] https://forums.gentoo.org/viewtopic-t-1011112-highlight-.html[/url] ) I do NOT want the nvidia driver to load at boot time. Instead I want to autoload the nvidia kernel module when I type 'startx' from the console.
I have removed xdm from rc-update. I have switched OpenCL implimintation to intel via 'eselect opencl'. I have removed 'nvidia' from /etc/conf.d/modules.
The nvidia kernel module is still being loaded at boot-time. From dmesg:
Code: | [ 2.947372] xhci_hcd 0000:05:00.0: new USB bus registered, assigned bus
number 3
[ 2.950221] random: nonblocking pool is initialized
[ 2.952612] nvidia: module license 'NVIDIA' taints kernel.
[ 2.952613] Disabling lock debugging due to kernel taint
[ 2.953599] AVX2 version of gcm_enc/dec engaged.
[ 2.955237] alg: No test for __gcm-aes-aesni (__driver-gcm-aes-aesni)
[ 2.958816] alg: No test for crc32 (crc32-pclmul)
[ 2.959888] vgaarb: device changed decodes:
PCI:0000:01:00.0,olddecodes=io+mem,decodes=none:owns=io+mem
[ 2.960605] [drm] Initialized nvidia-drm 0.0.0 20130102 for 0000:01:00.0 on
minor 0
[ 2.960618] NVRM: loading NVIDIA UNIX x86_64 Kernel Module 343.36 Mon Dec
1 16:18:58 PST 2014
[ 3.008128] hub 3-0:1.0: USB hub found |
Is it autoloading because 'eselect opengl' is set to nvidia?
Does it have something to do with /etc/conf.d/nvidia-persistenced ?
Grep shows that 'nvidia' is in the binary file /etc/udev/hwdb.bin.
How do I keep the nvidia driver module from loading at boot-time while keeping it available for later use?
ps. (I tried moving the acutal nvidia module, /lib/modules/3.17.8-gentoo-r1/video/nvidia.ko, and that worked, but I had to move it back before 'startx' and that is a horrible hack.)
Last edited by jagdpanther on Fri Feb 20, 2015 10:09 pm; edited 1 time in total |
|
Back to top |
|
|
Naib Watchman
Joined: 21 May 2004 Posts: 6051 Location: Removed by Neddy
|
Posted: Fri Feb 20, 2015 6:39 pm Post subject: |
|
|
Do as that thread suggests, blacklist the nvidia module. You than write an alias that insmod nvidia and startx
Odd that there is a kernel panic with the nvidia driver. Might be worth fixing that
I have been using Linux and nvidia for ... 15years or so without such a problem, so it is possible _________________
Quote: | Removed by Chiitoo |
|
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
|
Back to top |
|
|
depontius Advocate
Joined: 05 May 2004 Posts: 3509
|
Posted: Fri Feb 20, 2015 7:11 pm Post subject: |
|
|
This is the basic piece of the process for quickly switching between nouveau and nvidia. Blacklist both. All that means is that neither will load a boot time. When X starts it will demand-load he module called for in xorg.conf.
You still need to reboot to switch - I wouldn't trust rmmod then modprobe to switch between kernel modules. But at least you only have to tweak xorg.conf and not a lot of other junk in order to switch. _________________ .sigs waste space and bandwidth |
|
Back to top |
|
|
jagdpanther l33t
Joined: 22 Nov 2003 Posts: 729
|
Posted: Fri Feb 20, 2015 7:55 pm Post subject: |
|
|
Thanks for the suggestions. I need to look up how to 'blacklist' the module. I thought that was a concept not an actual procedure.
Quote: | Odd that there is a kernel panic with the nvidia driver. Might be worth fixing that
I have been using Linux and nvidia for ... 15years or so without such a problem, so it is possible |
Yes, I have been using Gentoo for a decade and Linux longer and have rarely had nvidia driver issues. I think that this time it is a combination of a new motherboard (Asus X99-A) and new video card (GTX 970). I expect that with newer nvidia-drivers these issues will disappear. |
|
Back to top |
|
|
jagdpanther l33t
Joined: 22 Nov 2003 Posts: 729
|
Posted: Fri Feb 20, 2015 10:09 pm Post subject: |
|
|
blacklisting the nvidia kernel module solved the problem.
Thanks |
|
Back to top |
|
|
ulenrich Veteran
Joined: 10 Oct 2010 Posts: 1480
|
Posted: Sat Feb 21, 2015 10:03 pm Post subject: |
|
|
Just let override /lib/udev/rules.d/99-nvidia.rules by this file
/etc/udev/rules.d/99-nvidia.rules
Code: | # ACTION=="add", DEVPATH=="/module/nvidia", SUBSYSTEM=="module", RUN+="nvidia-udev.sh $env{ACTION}"
# Previously the ACTION was "add|remove" but one user on bug #376527 had a
# problem until he recompiled udev-171-r5, which is one of the versions I
# tested with and it was fine. I'm breaking the rules out just to be safe
# so someone else doesn't have an issue
ACTION=="remove", DEVPATH=="/module/nvidia", SUBSYSTEM=="module", RUN+="nvidia-udev.sh $env{ACTION}" | I added an additional comment sign in the first line! |
|
Back to top |
|
|
|