bbswitch fails to turn off discrete graphics

All we need is an easy explanation of the problem, so here it is.

Due to some problems, I had to reinstall fedora. I currently have fedora-19 with kernel version 3.11.4-201.

I haven’t installed NVIDIA drivers and am using the default nouveau drivers for graphics. Bumblebee and bbswitch got installed properly but bbswitch fails to turn off discrete graphics. I did tee /proc/acpi/bbswitch<<<OFF but when I check the status it reports it on.
dmesg|grep bbswitch gives this:

[   25.192983] bbswitch: module verification failed: signature and/or required key missing - tainting kernel
[   25.193158] bbswitch: version 0.7
[   25.193165] bbswitch: Found integrated VGA device 0000:00:02.0: \_SB_.PCI0.GFX0
[   25.193172] bbswitch: Found discrete VGA device 0000:01:00.0: \_SB_.PCI0.PEG0.PEGP
[   25.193316] bbswitch: detected an Optimus _DSM function
[   25.193325] bbswitch: Succesfully loaded. Discrete card 0000:01:00.0 is on
[ 1383.773601] bbswitch: device 0000:01:00.0 is in use by driver 'nouveau', refusing OFF

Bumblebee-daemon is running but optirun glxgears -info gives this:

[ 2441.794492] [ERROR]Cannot access secondary GPU - error: [XORG] (EE) Failed to load module "mouse" (module does not exist, 0)

[ 2441.794545] [ERROR]Aborting because fallback start is disabled.

At present there is no file called bbswitch.conf in /etc/modprobe.d/ or in /etc/modules-load.d/. Is it wise to create a file manually and add bbswitch load_state=0to it ?

How do I switch off the discrete graphics card ? It happened quite smoothly in my previous fedora-17 which I fedupped to fedora-19. Isn’t bumblebeed supposed to turn it off without manual intervention? How do I know if bbswitch is compatible with the kernel?

EDIT

During one boot the graphics was turned off but it turned on again when i tried optirun glxgears -info (which btw gave the same error). I reinstalled bbswitch and bumblebee but it doesnt solve the issue.

How to solve :

I know you bored from this bug, So we are here to help you! Take a deep breath and look at the explanation of your problem. We have many solutions to this problem, But we recommend you to use the first method because it is tested & true method that will 100% work for you.

Method 1

The bbswitch README is quite clear on this:

Users of kmod should create /etc/modprobe.d/bbswitch.conf containing
options bbswitch load_state=0 to set the default options. To load the
module, systemd users should create /etc/modules-load.d/bbswitch.conf
containing bbswitch.

In order to allow bbswitch to turn off the video card, you must also prevent the nvidia modules from loading (nouveau in your case). On my system, I have created /etc/modprobe.d/nvidia.conf containing:

blacklist nvidia
blacklist nouveau
options bbswitch load_state=0

Next, initrd should be updated using dracut --force

When using Bumblebee, the above is strictly not necessary (the daemon will unload modules and use bbswitch on start-up). Due to race conditions however, it is possible that the bumblebee daemon starts simultaneously while the nouveau driver is being loaded. Therefore it is still wise to blacklist the modules.

Note that when optirun foo fails under some conditions, the nvidia card is not disabled. That is why you observe that the nvidia graphics is still enabled.

Method 2

I had similar problems, same output to reports as your first post.
In answer to your question, to achieve switching, I ended up removing Bumblebee altogether. Purged it.
Instead I used the ppa installation of the nvidia-340 driver, the latest among proprietary at the moment.
This smoothly managed to blacklist nouveau and handle X server, performed the needed kernel and conf changes.
It has prime and bbswitch as dependencies and it all worked fine from there.
Then run ‘sudo prime-select intel’ to get intel to work with prime and update latest drivers for it.
When I opened NVIDIA X Server Settings, I was able to switch smoothly
For use of CUDA under Blender I also had to add nvidia-modprobe.
For a more detaileddescription see this thread

Note: Use and implement method 1 because this method fully tested our system.
Thank you 🙂

All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply