Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 517740

Summary: x11-misc/bumblebee - init script should rmmod bbswitch
Product: Gentoo Linux Reporter: Adam Feldman <np-hardass>
Component: [OLD] Core systemAssignee: Adam Feldman <np-hardass>
Status: RESOLVED WORKSFORME    
Severity: normal CC: kernel, mva, proxy-maint, rei4dan
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: files/bumblebee.initd

Description Adam Feldman gentoo-dev 2014-07-22 05:53:49 UTC
Halting the system works without issue, however, when attempting to reboot the system, after input to the screen is terminated, the system hangs in that state until forcible power-down.
After much experimentation, I found that the issue is the bbswitch module, provided by sys-power/bbswitch. For some reason, "modprobe -R bbswitch" fails to unload the module, however, "rmmod bbswitch" works without fail.
As such, my recommendation for fixing this issue is to add a line to the bumblebee init script to rmmod bbswitch, fixing this weird issue for which I can't seem to get any real debugging information for.  Attached is a sample of what I have on my system.

Reproducible: Always
Comment 1 Adam Feldman gentoo-dev 2014-07-22 05:55:01 UTC
Created attachment 381318 [details]
files/bumblebee.initd

Appends rmmod of bbswitch kernel module to the init script.
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2014-07-22 20:18:19 UTC
Comment on attachment 381318 [details]
files/bumblebee.initd

--- files/bumblebee.initd       2012-06-05 15:47:49.000000000 +0200
+++ -   2014-07-22 22:17:48.398035868 +0200
@@ -20,4 +20,7 @@
        ebegin "Stopping BumbleBee Daemon"
                start-stop-daemon -K -p "${PIDFILE}" -R SIGTERM/10
        eend $?
+       ebegin "Removing bbswitch module"
+               rmmod bbswitch
+       eend $?
 }
Comment 3 Pacho Ramos gentoo-dev 2014-07-23 07:59:51 UTC
Do you have parallel build enabled in openRC? Maybe it's trying to kill something prematurely. We should also get the proper errors instead of adding rmmod to random places to force module unloading :/ @kernel team, do you know how could the reporter try to get more information?
Comment 4 Adam Feldman gentoo-dev 2014-07-24 04:03:10 UTC
(In reply to Pacho Ramos from comment #3)
> Do you have parallel build enabled in openRC? Maybe it's trying to kill
> something prematurely. We should also get the proper errors instead of
> adding rmmod to random places to force module unloading :/ @kernel team, do
> you know how could the reporter try to get more information?

rc_parallel has not been set in my /etc/rc.conf file so it should be off by default.

And certainly let me know if you can figure out a way for me to collect more information for you.
Comment 5 Adam Feldman gentoo-dev 2017-05-11 11:33:27 UTC
Going to close this since I don't run into this issue on my new computer and I can't reproduce the original issue.