Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 566242 - x11-drivers/nvidia-drivers[kms] - rmmod nvidia fails due to nvidia_modeset module dependency
Summary: x11-drivers/nvidia-drivers[kms] - rmmod nvidia fails due to nvidia_modeset mo...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Jeroen Roovers (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-19 16:41 UTC by Adam Shea
Modified: 2015-12-06 05:32 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Shea 2015-11-19 16:41:23 UTC
When nvidia_modeset is loaded by an nvidia driver built with the USE="kms" flag, running rmmod nvidia fails due to nvidia_modeset depending on nvidia.

modprobe -r nvidia also doesn't work.

This issue causes bumblebee to fail to shutdown the dGPU and causes lockups after sleep if the nvidia driver isn't unloaded before sleeping.

This is the same problem as in Bug 506168 but with nvidia_modeset rather than nvidia-uvm.  A similar fix will work, adding a 

    remove nvidia modprobe -r --ignore-remove nvidia_modeset nvidia

line into /etc/modeprobe.d/ and bumping bumblebee to a version using modprobe -r rather than rmmod.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2015-11-24 06:39:01 UTC
What happens if you get combinations of nvidia-uvm|nvidia-modeset + nvidia ?
Comment 2 Adam Shea 2015-12-01 16:39:43 UTC
Changing the line in /etc/modprobe.d/nvidia-uvm.conf to

    remove nvidia modprobe -r --ignore-remove nvidia-uvm nvidia-modeset nvidia

works with all combinations of nvidia_modeset and nvidia_uvm.

I'm not sure why the - vs. _ doesn't matter as lsmod lists the modules with _ but having - in modprobe.d works.  This solution still needs a new enough bumblebee to use modeprobe -r rather than rmmod.
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2015-12-06 05:32:55 UTC
Should be set in 358.16-r1.