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
Installation Procedure
- 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/sec
If 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 powertop
and 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:
# mkinitrd
- 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.
Usage notes:
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
.bash_profile
: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.
Bibliography
- 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
dkms-nvidia-313.26-3.1 failed:
ReplyDelete(with - nodeps - force) Error: Subprocess failed. Error: RPM failed: Error in checksums 922991034 2470291870
error:% pre (dkms-nvidia-313.26-3.1.x86_64) scriptlet failed, exit status 254
error: dkms-nvidia-313.26-3.1.x86_64: install failed
It means your "/usr/src/NVIDIA-Linux-x86_64-313.26.run" is not downloaded completely
DeleteJust try remove it and reinstall dkms-nvidia :)
Or,
If you want to make sure that the download progress of nvidia driver running correctly
just download "dkms-nvidia-313.26-3.1.x86_64.rpm" file
then install it through 'rpm -i'
:)
~regardz abz
Thanks a lot - I have managed to install the bumblewee. Since I have two monitors attached with my notebook through a docking station. It somehow fails to detect the DVI monitor, however gets the power and comes out from the standby. Whereas the analog monitor works without any problems. Do you have any idea how to resolve this???
ReplyDeleteNo idea, though I admit a three-monitor setup does sound interesting.
DeleteEven DVI alone (without being connected analog) doesn't work at all.
Deletein your tutorial, you use nouveau driver not nvidia proprietary driver?
ReplyDeleteHi Marc. Good question. The answer is I'm using the NVIDIA proprietary driver for now, and I've edited the blog entry to make that clear. That said, however, since I personally am not using the driver for anything except to disable the discrete graphics adapter, I'm planning to test if Bumblebee/bbswitch now works with the nouveau driver (it didn't before IIRC).
Deletedkms-nvidia size, it's only a few kb... so it will download something?
Deletebecause when i check in this repository
ftp://download.nvidia.com/opensuse/12.3/x86_64/
nvidia driver it's a few meg...
Awesome post! I am new to OpenSuSE and was using Linux Mint for the past 2 years. Still learning opensuse, but its a lot smoother on my laptop.
ReplyDeleteThanks for helping me install bumblebee. (though this was easier on my previous distro).
Can you suggest anything from where I can learn a little more about the commands of opensuse.
Hi Abhishek! Glad you liked it. Here are some links for further reading:
Deletehttp://opensuse-guide.org/
http://doc.opensuse.org/
Also, I've found simple Google searches, like "opensuse foo" or "bar site:opensuse.org", can produce useful information.
hello:
ReplyDeleteI've finished well for the intial 12 steps. Now when I try to test it with command in step 13:
primusrun glxspheres
my screen become something messy.....and I got the following messgaes:
Polygons in scene: 62464
Visual ID of window: 0x130
Segmentation fault
when I run step 15:
tee /proc/acpi/bbswitch <<<OFF
it said:
tee: /proc/acpi/bbswitch: No such file or directory
OFF
I also found:
sudo modprobe bbswitch
FATAL: Error inserting bbswitch (/lib/modules/3.7.10-1.1-desktop/kernel/drivers/acpi/bbswitch.ko): No such device
I haven't the slightest idea what you might be doing wrong, sorry. When/if you find out what the problem is, feel free to post here your proposed update to the steps.
DeleteAfter upgrade to bumblebee 3.2.1 I have a big unresolved problem: i cant use optirun or primusrun because it reports that the nvidia driver (dkms-nvidia) does not support my card (680M), but it should support since it is specified in app A of nvidia driver readme file. The problem did not appear for bumblebee 3.1, I want to revert back to previous version but I cannot find it anywhere ...
ReplyDeleteThanks for your comment. You might stand a better chance of getting an answer if you ask your question at http://forums.opensuse.org
DeleteSOLVED. I had to remove dkms-bbswitch and set in bumblebee.conf PM Method to none for nvidia driver. Now the nvidia card is always on and works perfectly. Problem existed both for Opensuse 12.2 and 12.3
DeleteHi!
ReplyDeletethis is my results:
linux-X53SV:~ # primusrun glxspheres
Polygons in scene: 62464
Visual ID of window: 0x9f
Context is Direct
OpenGL Renderer: GeForce GT 540M/PCIe/SSE2
46.658883 frames/sec - 41.078481 Mpixels/sec
47.365559 frames/sec - 41.700638 Mpixels/sec
47.188409 frames/sec - 41.544675 Mpixels/sec
46.801465 frames/sec - 41.204010 Mpixels/sec
46.706712 frames/sec - 41.120589 Mpixels/sec
linux-X53SV:~ # optirun glxspheres
Polygons in scene: 62464
Visual ID of window: 0x21
Context is Direct
OpenGL Renderer: GeForce GT 540M/PCIe/SSE2
47.213554 frames/sec - 41.566813 Mpixels/sec
47.664938 frames/sec - 41.964211 Mpixels/sec
42.381706 frames/sec - 37.312854 Mpixels/sec
46.339894 frames/sec - 40.797642 Mpixels/sec
48.530799 frames/sec - 42.726515 Mpixels/sec
47.652612 frames/sec - 41.953360 Mpixels/sec
it's normally
Thanks for your comment. You might stand a better chance of getting an answer if you ask your question at http://forums.opensuse.org
Delete> "No idea why primusrun gets slower performance"
ReplyDeleteBecause 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).
Wow -- thanks, etam1024! Your explanation makes perfect sense. I have taken the liberty of including it in the description.
DeleteThe performance of my Nvidia is way better with primus than with optimus. I wrote a ste-by-step tutorial of the installation process. You can check it here: http://zeronteproject.tk/contents/content.php?topic=Linux&postid=26
ReplyDeleteHmm. . . 404 Not found
DeleteHello Smithfarm!
ReplyDeleteThanks for your article, it helped me to get my bumblebee working in openSUSE Tumbleweed x64.
One thing though: I managed to get bbswitch turn off the descrete card on startup, maybe that works for you (and others) too:
1) blacklist nvdidia in 50-nvidia.conf as you already did (Im not sure if thats neccessary but it doesnt hurt ;)
2) edit /etc/modprobe.d/bbswitch.conf --> options bbswitch load_state=0 unload_state=0
ATTENTION to all Lenovo users (like me): At least the models T410s and T410 also require the option skip_optimus_dsm=1. (The bbswitch README only mentions T410s so it took me a while to figure that out for me T410. So maybe other Lenovos require that too....)
3) Here is what finally did it for me. Edit /etc/sysconfig/kernel: Not only remove the nvidia entry but also add the bbswitch module --> INITRD_MODULES="bbswitch".
After a mkinitrd and a reboot, discrete card was off ;)
Martin
what kernel have you used?
Deleteon my lenovo i can select intel or optimus system
I just did an update to kernel
Delete3.9.5-12.g08531e3-desktop
After that, discrete graphics were ON again after restart.
"nvidia" was back in /etc/sysconfig/kernel--> INITRD_MODULES="bbswitch nvidia"
I deleted "nvidia" and did a
# mkinitrd
That did the job.
Martin
On my Dell Latitude E6430, typically after an update not only will the discrete card be "on" again, but Optimus will be turned off in the BIOS settings (!). This never fails to astound me.
DeleteHi, have you fixed your problem with "sleeping over night"? I just noticed that my laptop does the same. It wakes up in the morning, something flashes on the screen and than the laptop goes immediately down. Sleeping for shorter periods of time works flawlessly. It had started even before I installed bumblebee but since we both have the same problem, it might be optimus related.
ReplyDeleteOk, it turned out that my problem was completely different. For anyone having the same problem: https://forums.opensuse.org/english/get-technical-help-here/laptop/488391-laptop-shuts-down-after-wakeing-up-suspend-ram.html
DeleteThis fails at step 11.
ReplyDelete# systemctl enable dkms
fails with:
Failed to issue method call: No such file or directory
Sounds like you don't have the dkms package installed, or something's amiss on your system. Have you tried asking on http://forums.opensuse.org?
Deletedkms was from the packman repository and not from Overman79. Packman has higher priority. Let's see what happens after the reboot.
DeleteGood point. I just edited steps 2 and 3 to reflect this.
DeleteMuchas gracias, excelente procedimiento.
ReplyDeleteDell N5110 15R i7-2670 QM
tkto@linux-h91g:~> optirun glxspheres
Polygons in scene: 62464
Visual ID of window: 0x21
Context is Direct
OpenGL Renderer: GeForce GT 525M/PCIe/SSE2
152.635543 frames/sec - 170.341266 Mpixels/sec
152.941420 frames/sec - 170.682625 Mpixels/sec
154.165411 frames/sec - 172.048599 Mpixels/sec
151.737481 frames/sec - 169.339029 Mpixels/sec
152.451240 frames/sec - 170.135584 Mpixels/sec
154.310694 frames/sec - 172.210735 Mpixels/sec
Regards
Thanks for the great post.
ReplyDeleteI'm using openSUSE 12.3 on a Dell XPS 15 (L521X) trying to get an external monitor to work.
This laptop has an nVidia 640M chip in it and the external display port and hdmi port are wired into the discrete graphics.
I'd like to just use the Intel HD 4000 graphics build into the CPU, not sure if that's possible though? Assuming it's not possible, I imagine I need either nouveau or nVidia drivers, but I can't seem to get the display port to be detected.
Here's the output of xrandr when I have a monitor connected:
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192
LVDS1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 344mm x 193mm
1920x1080 60.0*+ 40.0
1400x1050 60.0
1280x1024 60.0
1280x960 60.0
1024x768 60.0
800x600 60.3 56.2
640x480 59.9
VGA1 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
DP1 disconnected (normal left inverted right x axis y axis)
Any tips?
Regards
Suggest you post your questions to forums.opensuse.org
DeleteHello,
ReplyDeleteI get this error when I want to use primusrun or optirun:
[ 980.445614] [ERROR]Cannot access secondary GPU - error: [XORG] (EE) Failed to load module "nvidia" (module does not exist, 0)
[ 980.445683] [ERROR]Aborting because fallback start is disabled.
I carefully followed the instructions, but didn't nvidia driver install at zypper in dkms-nvidia?
I don't doubt you tried to follow, but please note that what I posted here is not "instructions", but merely a description of what I did. Nothing more.
DeletePossible hint: take another look at step 2. That means I started from a clean, vanilla, fully updated installation of openSUSE 12.3.
Hi,
ReplyDeletethanks for the instructions.
I am fairly new to Linux (Open Suse 12.3) so this question might seem silly...
Where can I find the .bash_profile to add the commands to disable the discreet graphics? Or do I have to create it?
Please let me know
Regards
Ivan
Hi Ivan: Yes, you probably have to create it, and it has to be in the home directory of the user you log in as. This is very easy if you know how to use an editor. Alternatively, you can use this trick:
Delete$ cd # change directory to your home
$ ls .bash_profile # make sure it doesn't already exist
$ cat >.bash_profile # start capturing typed characters
...cut-and-paste the lines...
...then press CTRL-d (signals "End Of File")...
$ # get back to the bash prompt
Hope this helps.
hi
ReplyDeletethanks for help,
at point 13 i have :
glxspheres: libglfork.cpp:244: PrimusInfo::PrimusInfo(): Assertion `ncfg' failed.
Aborted
any suggestions?
when i try to run paraview i have:
ERROR: In /home/sergio/rpmbuild/BUILD/ParaView-3.12.0/VTK/Rendering/vtkXOpenGLRenderWindow.cxx, line 609
vtkXOpenGLRenderWindow (0x24447e0): GLX not found. Aborting.
Suggest you post your questions to forums.opensuse.org
DeleteHi, Thanks for your post. I already have bumblebee (optimus/primus) running in my laptop (Thinkpad W520). But, how can I have turned on a second screen attached to my discrete nvdida card?
ReplyDeletei still have at point 13
ReplyDeleteglxspheres: libglfork.cpp:244: PrimusInfo::PrimusInfo(): Assertion `ncfg' failed.
Aborted
and at point 16
linux-dgf5:/etc/modprobe.d # cat 50-nvidia.conf
options nvidia NVreg_DeviceFileUID=0 NVreg_DeviceFileGID=33 NVreg_DeviceFileMode=0660
linux-dgf5:/etc/modprobe.d # ls *bbswitch*
bbswitch.conf
linux-dgf5:/etc/modprobe.d # cat bbswitch.conf
options bbswitch load_state=0 unload_state=1
what can i do to make glx running... paraview need it???
thanks for help
i reboot, didn't pray and now paraview is working!!! so good, thanks to all
ReplyDeleteHi, I have an HP envy 15 notebook PC
ReplyDeleteUsing fresh fully updated Opensuse 12.3 Linux kernel 3.7.10-1.16-desktop x86_64 GNU/Linux
Under step 11 I got this error message:
linux-1phe:~ # zypper in dkms-nvidia
Loading repository data...
Reading installed packages...
Resolving package dependencies...
The following NEW package is going to be installed:
dkms-nvidia
1 new package to install.
Overall download size: 6.5 KiB. After the operation, additional 513.0 B will be
used.
Continue? [y/n/?] (y): y
(1/1) Installing: dkms-nvidia-331.20-7.1 ................................[error]
Installation of dkms-nvidia-331.20-7.1 failed:
(with --nodeps --force) Error: Subprocess failed. Error: RPM failed: Error in checksums 3171180529 3635253084
error: %pre(dkms-nvidia-331.20-7.1.x86_64) scriptlet failed, exit status 254
error: dkms-nvidia-331.20-7.1.x86_64: install failed
Abort, retry, ignore? [a/r/i] (a):
Any thougts? Have I missed something?
Hello. I know this article wasn't meant to be used as a tutorial about how to get this stuff working and nobody has got to provide any help but I'd be extremely grateful if you helped me.
ReplyDeleteI'm stuck at point #15. "primusrun glxspheres" results in:
"primus: fatal: Bumblebee daemon reported: error: [XORG] (EE) NVIDIA(GPU-0): Failed to initialize the NVIDIA GPU at PCI:1:0:0. Please" - it looks exactly that way; probably after "please" should be given a possible solution to that issue... but it's not. I looked through the internet and didn't find anything suitable.
Thanks in advance!
No idea what the problem might be. To get the entire log message, try this: "grep -i please /var/log/Xorg.0.log". If you have nothing to lose, you might also try my procedure for returning to a clean slate.
DeleteThanks. Great tutorial.
ReplyDeleteopenSUSE 13.1 (x86_64)
OpenGL Renderer: GeForce GT 640M/PCIe/SSE2
Performance:
primusrun glxspheres64: 61.941718 frames/sec - 69.126957 Mpixels/sec
optirun glxspheres64: 233.487280 frames/sec - 260.571804 Mpixels/sec
Hi, I bought a dell inspiron 7537 laptop. and I can't get the nvidia gt 750M driver working. I installed the same driver like at the beginning of this post, with the same result. Can you help me with this ? In the bios is no option to me to turn up the optimus technology. I installed opensuse in legacy boot mode, and I formated my harddrive, and deleted windows 8, it's urgent, thanks..
ReplyDeleteHi there. Suggest you ask your question at http://forums.opensuse.org
ReplyDeleteThanks, I have dona that to.. I'am waiting for reply now..
DeleteHi there,
ReplyDeletei've followed your notes n it works great. i can use optirun and primusrun.
the only thing i would like to know is, will it start the WM in nvidia? if not, how? i am using gnome 3.
the nvidia-setting told me that i am not running nvidia
glxinfo | grep OpenGL
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Ivybridge Mobile
OpenGL core profile version string: 3.1 (Core Profile) Mesa 9.2.3
OpenGL core profile shading language version string: 1.40
OpenGL core profile context flags: (none)
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 9.2.3
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
i have tried the forums.opensuse.org, but no info i can use yet...
-all the best-
Right. When the discrete adapter is turned off by Bumblebee/bbswitch, the nvidia driver is not loaded. This can be confirmed with the command 'lsmod | grep nvidia' -- it will not give any output. However, when you do, e.g., 'primusrun glxgears' and in another window run the same command, it will give output. See 'man lsmod' for details. This proves that Bumblebee is working properly by loading/unloading the nvidia driver on demand. As for 'nvidia-settings', I don't know anything about it. Thanks for the feedback.
DeleteThis comment has been removed by the author.
ReplyDeleteHello, I purchased a Dell Inspiron 757 laptop. The Nvidia GT 750M driver is not working for me. I tried the same driver that was at the beginning of the post and got the same results. Could you please help me? I cannot turn up the best technology in the bios. I installed Opens use in legacy mode and formatted my hard disk and deleted Windows 8. It's urgent.pcseekers
ReplyDelete