Bumblebee, etc. is still officially unsupported in openSUSE, but it is possible to get it working in openSUSE 12.3. However, openSUSE 12.3 itself is also history. Nowadays, I am running openSUSE 13.1 with Bumblebee on my Optimus laptop, and there is a new blog entry: http://smithfarm-thebrain.blogspot.cz/2013/10/opensuse-131-nvidia-optimus-bumblebee.html
Table of Contents
- This procedure will install the proprietary NVIDIA driver and Bumblebee. To begin with, make sure I have the right version of openSUSE installed:
# cat /etc/SuSE-release openSUSE 12.3 (x86_64) VERSION = 12.3 CODENAME = Dartmouth
- Also make sure I haven't done any weird, non-standard things to the installation. Check. (This is very important because non-standard repositories can contain conflicting versions of the packages I am going to install.)
- To reiterate: I need to remove all packages and repositories relating to any previous installation, or attempted installation, of the proprietary NVidia driver, Bumblebee, dkms, etc.
- In BIOS settings, make sure "Optimus" is ON (at least on my Dell Latitude E6430 laptop, it gets turned off just by running "zypper up")
- Make sure I have the Kernel Development Pattern installed (Yast -> Software Management)
- Install the 'kernel_devel' pattern
# zypper in -t pattern kernel_devel(or, alternatively, use Yast -> Software Management) (See also the blog entry on manipulating patterns without Yast)
- Make sure my user account is a member of the bumblebee and video groups:
# groupadd bumblebee groupadd: group 'bumblebee' already exists # groupadd video groupadd: group 'video' already exists # usermod -a -G bumblebee,video smithfarm #For more information on adding users to groups, see the "openSUSE: Add user to group" blog entry on this site.
- Reboot just to be sure. Check.
- As my user account, check to make sure I am a member of the video and bumblebee groups:
smithfarm@machine:~> groups users wheel video vboxusers bumblebee
- Add Overman79's repository
# zypper ar http://download.opensuse.org/repositories/home:/Overman79:/Laptop/openSUSE_12.3/ Overman79
- Install dkms, dkms-nvidia (proprietary NVIDIA driver), and dkms-bbswitch packages (downloading the proprietary NVIDIA driver in particular may take an excruciatingly long time, and there's no progress bar, so I have to be patient here):
# zypper in dkms # zypper in dkms-nvidia # zypper in dkms-bbswitch
- Install the remaining packages from Overman79's repository:
# zypper in bumblebee primus x11-video-nvidia
- Enable the dkms and bumblebee services:
# systemctl enable dkms # systemctl enable bumblebeed
- Reboot and pray
- Try glxspheres:
smithfarm@wilbur:~> primusrun glxspheres Polygons in scene: 62464 Visual ID of window: 0xcd Context is Direct OpenGL Renderer: NVS 5200M/PCIe/SSE2 61.096760 frames/sec - 66.138465 Mpixels/sec 59.909029 frames/sec - 64.852722 Mpixels/sec 59.904287 frames/sec - 64.847589 Mpixels/sec 59.902248 frames/sec - 64.845382 Mpixels/sec smithfarm@wilbur:~> optirun glxspheres Polygons in scene: 62464 Visual ID of window: 0x21 Context is Direct OpenGL Renderer: NVS 5200M/PCIe/SSE2 149.925632 frames/sec - 162.297496 Mpixels/sec 162.674810 frames/sec - 176.098735 Mpixels/sec 161.700929 frames/sec - 175.044490 Mpixels/sec 161.484454 frames/sec - 174.810151 Mpixels/secIf you were wondering why primusrun gets poorer performance (I was), here's an answer kindly provided by etam1024 -- reproduced here with thanks!
Because app running with primusrun is synced with vblank. If your monitor has refresh rate 60 Hz, then application will generate no more than 60 fps. There's no need to have more fps, because monitor will not display them anyway.
Optirun does not sync with vblank, so app generates as much fps as possible. (again: doing more than monitors refresh rate, is just a waste of power).
- The remaining instructions are for disabling Optimus completely (to save power, run cooler, etc.)
Install the 'powertop' package:
# zypper in powertopand run it while on battery power to see how much power your laptop is dissipating.
- Remove nvidia module:
# rmmod nvidia # lsmod | grep nvidia #
- Turn off discrete graphics:
# tee /proc/acpi/bbswitch <<<OFF OFF
- Configure modules:
# cd /etc/modprobe.d # ls *nvidia* 50-nvidia.conf # cat 50-nvidia.conf blacklist nvidia # ls *bbswitch* 50-bbswitch.conf # cat 50-bbswitch.conf options bbswitch load_state=0 unload_state=0
- Configure initrd by editing /etc/sysconfig/kernel and removing all mentions of 'nvidia':
# vim /etc/sysconfig/kernel ... # grep nvidia /etc/sysconfig/kernel #
- Make a new initrd:
- Reboot and pray
- Verify that discrete graphics is OFF:
smithfarm@machine:~> optirun --status Bumblebee status: Ready (3.1). X inactive. Discrete video card is off.
- Run powertop again and compare results with the "before" reading.
So far, it seems to be working worse than under 12.2 :-( I couldn't get bbswitch to automatically turn the discrete graphics off on boot-up. It tries to, but fails:
[ 41.226491] bbswitch: disabling discrete graphics [ 41.236942] pci 0000:01:00.0: Refused to change power state, currently in D0 [ 41.537534] pci 0000:01:00.0: power state changed by ACPI to D3cold
So I put this in my
sudo /sbin/rmmod nvidia sudo tee /proc/acpi/bbswitch <<<OFF optirun --status
I'd like to try getting rid of the nvidia driver and using Bumblebee and bbswitch with nouveau - seems like that's now an option, at least as of Bumblebee 3.1. (This is now possible -- I don't have nvidia installed at all nowadays.)
Keep in mind that my only motivation for running Bumblebee is to turn the discrete graphics card OFF and leave it OFF. I don't need it, and I sure as heck don't need the additional noise and heat. I'm not very impressed that Dell "forgot" to include a "Disable discrete graphics adapter" selection in the BIOS setup!
Another problem that has been getting rarer: occasionally when I sleep/resume the laptop too frequently, it gets into a state where it runs hot. Bumblebee is usually alive and bbswitch always reports that discrete graphics is OFF, yet somehow, somewhere something is wrong. The CPU load is very low, idling. But the laptop is warmer to the touch than normal and the temperature meter reads 10, 15, or even 20 degrees Celsius higher than normal. So far, the only solution I've found when this happens is restart/power cycle.
- README of Overman79's repository: https://build.opensuse.org/project/show?project=home%3AOverman79%3ALaptop
- README of bbswitch project: https://github.com/Bumblebee-Project/bbswitch/
- Issues section of bbswitch project: https://github.com/Bumblebee-Project/bbswitch/issues
- Bumblebee package page: http://software.opensuse.org/package/bumblebee