SDB:NVIDIA Bumblebee
tagline: From openSUSE
| Tested on openSUSE | Recommended articles | Related articles | |||
|
|
|
| |||
This Support Data Base (SDB) entry points to a possible procedure for installing the NVIDIA proprietary driver together with Bumblebee/bbswitch on recent versions of openSUSE.
Situation
You have an Optimus laptop with an NVIDIA discrete graphics adapter. You may need to run programs using the discrete graphics adapter, but you don't want the discrete graphics active all the time, because that would cause the laptop to consume too much energy. Or you simply want to disable the discrete graphics adapter completely on an Optimus laptop such as the Dell Latitude E6430, whose BIOS does not offer a way to do that.
Procedure
If you need the old instruction with X11:Bumblebee repository, it's here: https://en.opensuse.org/index.php?title=SDB:NVIDIA_Bumblebee&oldid=118653
Preparation
Though generally reliable, unexpected problems can occur after finishing this installation and configuration procedure. As of openSUSE 13.2 btrfs is the default filesystem for root partition. If you have brtfs as your filesystem you should take a snapshot of your filesystem so you have a simple recovery point in case of something going wrong.
Install bumblebee
Installing bumblebee is pretty straightforward:
Add yourself to the bumblebee group (here "username" should be replaced with your real username):
Then enable and start bumblebee:
sudo systemctl start bumblebeed
Blacklist nouveau (even if you plan to use nouveau driver):
sudo mkinitrd
If you plan to use 32bit apps (like steam), install required libraries:
OPTIONAL: Install NVIDIA driver
If you want to use the advanced features of the secondary Nvidia graphics card, you can install the proprietary Nvidia driver as follows:
Leap releases
Install the driver as described here: SDB:NVIDIA_drivers#Easy_way_to_get_NVIDIA_drivers
Make sure all lines in /etc/ld.so.conf.d/nvidia-gfxG*.conf are commented out. The nvidia installer should detect optimus hardware and do it automatically, but it's better to be safe.
#/usr/X11R6/lib64 #/usr/X11R6/lib
If they are not, then edit the file to make it as above, and run
Add the nvidia module to blacklist:
sudo mkinitrd
Setup xorg module directory:
sudo ln -s /usr/lib64/xorg/modules/extensions/nvidia/nvidia-libglx.so /usr/lib64/nvidia/xorg/modules/extensions/libglx.so
Configure bumblebee: Edit /etc/bumblebee/bumblebee.conf as root and set the following (lines that are not mentioned here, should be left unchanged, not deleted):
[bumblebeed] TurnCardOffAtExit=true Driver=nvidia [driver-nvidia] LibraryPath=/usr/X11R6/lib64:/usr/X11R6/lib XorgModulePath=/usr/lib64/nvidia/xorg/modules,/usr/lib64/xorg/modules
Tumbleweed
Add bumblebee repository:
Install the driver:
sudo systemctl enable dkms
Update the kernel image:
TODO: verify if any additional steps are needed.
Verify installation
After installation of the software above, reboot your machine.
Check bumblebee is working by opening a terminal and typing:
If you see the message: "Bumblebee status: Ready (3.2.1). X inactive. Discrete video card is off." Then bumblebee should be working properly. To use the discrete video card, you must launch the program from the terminal:
You can test this by running:
(Note: glxgears is in Mesa-demo-x package)
If you see the gears, then your discrete card is working with bumblebee.
You may also verify your installation by running nvidia-settings program, which is installed along with the proprietary nvidia drivers:
If you can not get your graphical system back, you should perform a rollback using snapper. If your system does not have btrfs, this does not apply to you. First find out what the number for your snapshot was that you should have made earlier:
Then perform the rollback, here "xx" should be replaced by the number of your preparatory snapshot:
Reboot the machine.
Problems with GT600M/GT700M series cards (Kepler)
If you cannot load GPU drivers - while bbswitch being loaded - and get an error like this on a Kepler card:
[ERROR]Cannot access secondary GPU - error: Could not load GPU driver
Try changing value of 'load_state' in "/etc/modprobe.d/50-bbswitch.conf" from 0 to -1 {{Shell|echo "options bbswitch load_state=-1 unload_state=1" | sudo tee /etc/modprobe.d/50-bbswitch.conf
More info on github: bbswitch - scroll to Module options.
switch state of card manually with bbswitch
check the state of your card:
to turn your card off, type:
Tips & tricks
Running Steam
You can run Steam like so:
This will keep your discrete card turned on all the time steam is running.
You can also launch steam as usual and for each game: Right click on the selected game -> Properties -> Set Launch Options. It the window type:
This will keep your discrete card turned on only for running the game.
optirun vs primusrun
Don't use primusrun anymore. Optirun is everything you need.
In the old times optirun was a wrapper script for setting up VirtualGL bridge. Then primus library appeared with it's own primusrun wrapper script. Now optirun is a program integrated with bumblebee daemon and supports both VirtualGL and primus bridges.
Switching between nouveau and nvidia driver
Change the line in /etc/bumblebee/bumblebee.conf:
[bumblebeed] Driver=<driver you want to use>
Restart bumblebeed:
References
Further information and problem solving: ultimate tutorial installing Bumblebee driver for SUSE
The blog entries below reference a no longer used repository, but they may be useful for information purposes.
For openSUSE 13.1, refer to this blog entry: openSUSE 13.1: install 'bumblebee' and disable discrete graphics adapter on NVIDIA Optimus laptop
For openSUSE 12.3, refer to this blog entry: openSUSE 12.3: How to install 'bumblebee' for NVIDIA Optimus VGA.
For openSUSE 12.2, refer to this blog entry: openSUSE 12.2: How to install 'bumblebee' for NVIDIA Optimus VGA
