You are not logged in.

#1 2012-10-08 22:47:20

domac
Member
Registered: 2012-08-06
Posts: 102

[solved] Module bbswitch does not load, cannot disable nvidia

Hey!

According to the title I'm unable to load the bbswitch module on load with it's given parameters. I do it the way suggest in the Arch Wiki.

I'm using linux-ck

local/linux-ck-corex 3.5.6-1 (ck-corex)
local/linux-ck-corex-headers 3.5.6-1 (ck-corex)
local/nvidia-ck-corex 304.51-2 (ck-corex)

(I heard theat graysky said that there are no problems)

My /etc/modprobe.d/bbswitch.conf looks like

options bbswitch load_state=0 unload_state=0

dmesg|tail -10 outputs:

[  121.351475] bbswitch: version 0.4.2
[  121.351486] bbswitch: Found integrated VGA device 0000:00:02.0: \_SB_.PCI0.GFX0
[  121.351497] bbswitch: Found discrete VGA device 0000:01:00.0: \_SB_.PCI0.PEG1.GFX0
[  121.351647] bbswitch: detected an Optimus _DSM function
[  121.351656] bbswitch: device 0000:01:00.0 is in use by driver 'nvidia', refusing OFF
[  121.351659] bbswitch: Succesfully loaded. Discrete card 0000:01:00.0 is on
[  135.236590] bbswitch: disabling discrete graphics
[  135.236977] bbswitch: Result of Optimus _DSM call: 01000058
[  135.250144] pci 0000:01:00.0: >Refused to change power state, currently in D0
[  135.343414] pci 0000:01:00.0: >power state changed by ACPI to D3

Any suggestions? Am I missing something? I'm thinking of adding bbswitch into modules-load.d and add the parameters as kernel parameters in grub but I'm not happy with that solution…
even if it's the "cleaner" version, imho.

Cheers!
Help is appreciated, thanks. :-)

Edit: If I load bbswitch manually, I have to restart bumblebee to turn the graphics off. I cannot disable the card via bbswitch suggested in bbswitch git repo with command: tee /proc/acpi/bbswitch <<<OFF.

Tried via modules-load.d now and grub boot parameters. The module is loaded but the card is turned on…

$domac.vex dmesg |tail -10
[   35.421363] atl1c 0000:05:00.0: >irq 55 for MSI/MSI-X
[   35.433604] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   36.766411] EXT4-fs (sda3): re-mounted. Opts: data=ordered,commit=0
[   36.773765] EXT4-fs (sda1): re-mounted. Opts: data=ordered,commit=0
[  107.303982] Bluetooth: Core ver 2.16
[  107.304005] NET: Registered protocol family 31
[  107.304007] Bluetooth: HCI device and connection manager initialized
[  107.304009] Bluetooth: HCI socket layer initialized
[  107.304011] Bluetooth: L2CAP socket layer initialized
[  107.304016] Bluetooth: SCO socket layer initialized

Added my bumblebee.conf _here_.

Last edited by domac (2012-10-10 15:28:04)


domac [ git ]

Offline

#2 2012-10-09 08:12:21

domac
Member
Registered: 2012-08-06
Posts: 102

Re: [solved] Module bbswitch does not load, cannot disable nvidia

Maybe you can tell me how you guys load your bbswitch module?


domac [ git ]

Offline

#3 2012-10-09 09:59:29

Lekensteyn
Member
From: Netherlands
Registered: 2012-06-19
Posts: 192
Website

Re: [solved] Module bbswitch does not load, cannot disable nvidia

[  121.351656] bbswitch: device 0000:01:00.0 is in use by driver 'nvidia', refusing OFF

What do you think that this message means? You need to blacklist the nvidia and nouveau modules to prevent them from loading on boot. When doing this, you can still manually modprobe them if you want though.

I see you are using both load_state=0 and unload_state=0. unload_state=0 is not really useful for most installations, it disables the nvidia card when the module is being unloaded.
This never happens automatically, but even then unload_state=1 is a safer alternative because some machines have issues with a disabled nvidia card on shutdown. (providing that there is actually a service or something that unloads bbswitch on shutdown)

You can also let the Bumblebee Daemon handle this, see https://wiki.archlinux.org/index.php/Bumblebee

Offline

#4 2012-10-09 17:36:16

domac
Member
Registered: 2012-08-06
Posts: 102

Re: [solved] Module bbswitch does not load, cannot disable nvidia

Hey Lekensteyn! First of all, thanks for your answer. :-)

I disabled the nvidia module now. My /etc/modprobe.d now looks like

/etc/modprobe.d
total 20K
drwxr-xr-x  2 root root 4.0K Oct  9 19:32 .
drwxr-xr-x 76 root root 4.0K Oct  9 12:49 ..
-rw-r--r--  1 root root   45 Oct  9 19:32 bbswitch.conf
-rw-r--r--  1 root root   18 Aug  8 20:08 nouveau_blacklist.conf
-rw-r--r--  1 root root   17 Oct  9 12:23 nvidia_blacklist.conf
nvidia_blacklist.conf:
blacklist nvidia
nouveau_blacklist.conf:
blacklist nouveau
bbswitch.conf:
options bbswitch load_state=0 unload_state=0

There is only one more problem left… the bbswitch module does not load on startup. If I # modprobe bbswitch manually the nvidia card is turned off and it also seems the bumblebeed daemon is not started… I have no idea why. It worked with that setup all the time… not much has changed… imho nothing.

Are there any logs I could post or what can I do to eventually fix this problem.
Thanks for the help in advance!

EDIT: I can start the bumblebeed.service manually. + Why are the modules from modprobe.d not loaded? My mkinitcpio.conf.

EDIT2: Found it why bbswitch module wasn't loaded… http://comments.gmane.org/gmane.linux.a … eral/44986… testing this one right now.

Last edited by domac (2012-10-09 17:54:04)


domac [ git ]

Offline

#5 2012-10-09 17:48:46

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,494

Re: [solved] Module bbswitch does not load, cannot disable nvidia

domac wrote:

Maybe you can tell me how you guys load your bbswitch module?

Hi, yes I use dkms-bbswitch 0.4.2-1 && bumblebee-systemd 3.0.1-3
My bbswitch.conf is the same, but my bumblebee.conf has a slight difference;
nouveau card PMMethod=auto, mine is bbswitch!

Offline

#6 2012-10-09 18:00:58

domac
Member
Registered: 2012-08-06
Posts: 102

Re: [solved] Module bbswitch does not load, cannot disable nvidia

Hey qinohe! Thanks for that answer, I use bumblebee-systemd too, reinstalling right now. Hope this helps. Just having the problem now, that the bumblebee service is not loaded… dunno why.


domac [ git ]

Offline

#7 2012-10-09 18:10:12

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,494

Re: [solved] Module bbswitch does not load, cannot disable nvidia

Hi domac, you're welcome.
After the latest (2) kernel upgrades my second card kept running. (can't tell what exactly did it)
I noticed the fan speeding and warm air from the fan.
After reinstalling bbswitch and bumblebee, everething was fine again.

Offline

#8 2012-10-10 10:29:48

domac
Member
Registered: 2012-08-06
Posts: 102

Re: [solved] Module bbswitch does not load, cannot disable nvidia

Thanks, reinstalled all bumblebee packages now and bbswitch. Added bbswitch to modules-load.d and parameters to modprobe.d… as expected bbswitch module is now loaded.
The command systool -v -m bbswitch does not display it's parameters…

$domac.vex systool -v -m bbswitch
Module = "bbswitch"

  Attributes:
    coresize            = "5042"
    initsize            = "0"
    initstate           = "live"
    refcnt              = "0"
    srcversion          = "85F8AB5D1008895154DB033"
    taint               = "O"
    uevent              = <store method only>
    version             = "0.4.2"

  Parameters:

  Sections:
    .bss                = "0xffffffffa01f0180"
    .data               = "0xffffffffa01efe40"
    .exit.text          = "0xffffffffa01ef766"
    .gnu.linkonce.this_module= "0xffffffffa01eff20"
    .init.text          = "0xffffffffa01f2000"
    .note.gnu.build-id  = "0xffffffffa01ef7f4"
    .rodata             = "0xffffffffa01efdb0"
    .rodata.str1.1      = "0xffffffffa01ef818"
    .rodata.str1.8      = "0xffffffffa01ef868"
    .strtab             = "0xffffffffa01f2b18"
    .symtab             = "0xffffffffa01f22a8"
    .text               = "0xffffffffa01ef000"
    .text.unlikely      = "0xffffffffa01ef47c"
    __mcount_loc        = "0xffffffffa01efde8"
    __param             = "0xffffffffa01efd68"

domac [ git ]

Offline

#9 2012-10-10 12:55:21

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,494

Re: [solved] Module bbswitch does not load, cannot disable nvidia

Have read man systool and Linux Diagnostic Tools(sourceforge),
don't know how to interpret these values yet, have to read in first!
My values are exactly the same.
If everything is working as it should please mark 'solved'

Offline

#10 2012-10-10 13:10:06

domac
Member
Registered: 2012-08-06
Posts: 102

Re: [solved] Module bbswitch does not load, cannot disable nvidia

Still having problems to get my bumblebeed running… when I boot up it says:

Active: inactive (dead)

Any ideas?

ADD:

Tried this, but didn't helped. May I post my `LESS=R journalctl -ba` here?
Found one thing in the everything.log:

Oct 10 15:16:53 vex dbus-daemon[266]: dbus[266]: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.9" (uid=1000 pid=541 comm="systemctl start bumblebeed.service ") interface="org.freedesktop.systemd1.Manager" member="StartUnit" error name="(unset)" requested_reply="0" destination="org.freedesktop.systemd1" (uid=0 pid=1 comm="/sbin/init ")

What does this mean? Any ideas how to fix or even if this is the cause of it?

EDIT: I add my bumblebeed.service:

$domac.vex cat /etc/systemd/system/graphical.target.wants/bumblebeed.service 
[Unit]
Description=Bumblebee C Daemon

[Service]
Type=simple
CPUSchedulingPolicy=idle
ExecStart=/usr/sbin/bumblebeed
Restart=always
RestartSec=60
StandardOutput=kmsg$domac.vex cat /etc/systemd/system/graphical.target.wants/bumblebeed.service 
[Unit]
Description=Bumblebee C Daemon

[Service]
Type=simple
CPUSchedulingPolicy=idle
ExecStart=/usr/sbin/bumblebeed
Restart=always
RestartSec=60
StandardOutput=kmsg

[Install]
WantedBy=graphical.target

[Install]
WantedBy=graphical.target

Last edited by domac (2012-10-10 13:41:34)


domac [ git ]

Offline

#11 2012-10-10 15:14:31

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,494

Re: [solved] Module bbswitch does not load, cannot disable nvidia

Are you running graphical.target or multi-user.target
Maybe you need to change the runlevel for which bumblebee starts!
I had to do it for mine it started as graphical- but I use multi-user.target.
wiki:systemd change default runlevel

Offline

#12 2012-10-10 15:27:44

domac
Member
Registered: 2012-08-06
Posts: 102

Re: [solved] Module bbswitch does not load, cannot disable nvidia

Wow nice, thanks! That fixed it. :-)
Thread marked as solved, but any good reference that describes the difference between multi-user.target and graphical.target?
Solution:

# rm /etc/systemd/system/default.target

domac [ git ]

Offline

#13 2012-10-10 15:44:08

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,494

Re: [solved] Module bbswitch does not load, cannot disable nvidia

Ah, glad it helped you ;-)

fedoraraproject:change runlevel

Offline

Board footer

Powered by FluxBB