Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] How To Not AutoLoad Nvidia-Drivers During Boot?
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
jagdpanther
l33t
l33t


Joined: 22 Nov 2003
Posts: 729

PostPosted: Fri Feb 20, 2015 6:06 pm    Post subject: [Solved] How To Not AutoLoad Nvidia-Drivers During Boot? Reply with quote

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
View user's profile Send private message
Naib
Watchman
Watchman


Joined: 21 May 2004
Posts: 6051
Location: Removed by Neddy

PostPosted: Fri Feb 20, 2015 6:39 pm    Post subject: Reply with quote

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
View user's profile Send private message
Jaglover
Watchman
Watchman


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

PostPosted: Fri Feb 20, 2015 6:42 pm    Post subject: Reply with quote

Actually I just tried it on my laptop, didn't even need an alias, when X starts it loads the module (which is blacklisted for kernel and friends).
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3509

PostPosted: Fri Feb 20, 2015 7:11 pm    Post subject: Reply with quote

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
View user's profile Send private message
jagdpanther
l33t
l33t


Joined: 22 Nov 2003
Posts: 729

PostPosted: Fri Feb 20, 2015 7:55 pm    Post subject: Reply with quote

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
View user's profile Send private message
jagdpanther
l33t
l33t


Joined: 22 Nov 2003
Posts: 729

PostPosted: Fri Feb 20, 2015 10:09 pm    Post subject: Reply with quote

blacklisting the nvidia kernel module solved the problem.

Thanks
Back to top
View user's profile Send private message
ulenrich
Veteran
Veteran


Joined: 10 Oct 2010
Posts: 1480

PostPosted: Sat Feb 21, 2015 10:03 pm    Post subject: Reply with quote

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
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