OpenSUSE 12.1 on a Optimus Laptop

I wrote this howto tonight and when I came here to post it I saw that Pickle236 already made a Bumblebee guide… well, I post this one as well there might be a difference :slight_smile:

Optimus Laptop with nVIDIAS proprietary driver.

Nvidia Optimus - Wiki

So what is Bumblebee? It is experimental Optimus support for Linux.
With the use of Bumblebee, 3D can be enabled on both the Intel and the nVIDIA card.
Currently there is no way to disable the Intel card with the use of Bumblebee.
The Intel card is running the Desktop and the nVIDIA card can be used, for
applications that need more OpenGL power, with the command “optirun <PROGRAM>”.

Other options, if your interest are mainly powermanegment, is using vga-switcheroo or Bumblebee from
the 2.4.1 repository:

Index of /repositories/home:/Bumblebee-Project:/Bumblebee-develop/openSUSE_12.1

With that version I was never able to get both the “Nvidia blob” and Intel 3D working at same time. But it works
like a charm with the Nouveau driver and is perfect if your only goal is powermanegment.

This howto is only made for getting the propitary nvidia driver working while at same time keeping a fancy desktop…
And it is only meant to show what worked for me… might mess up your system totally :slight_smile:

Laptop model I used: Asus U36JC

I started with a absolute fresh, no extra packages - OpenSUSE 12.1, 64bit, kde, kernel desktop - install with all the updates made.
Not one config file or packet manually altered.

First install the nvidia driver.

zypper ar -f ftp://download.nvidia.com/opensuse/12.1/ nvidia

zypper in nvidia-computeG02 nvidia-gfxG02-kmp-desktop x11-video-nvidiaG02

reboot

If you use the kernel-default you should use “zypper in x11-video-nvidiaG02” but that didn’t work for me because it then automaticly added
the kernel-default packages for some reason.

Then we install Bumblebee

zypper ar -f http://download.opensuse.org/repositories/home:/Ximi1970:/bumblebee-unstable/openSUSE_12.1/home:Ximi1970:bumblebee-unstable.repo

zypper in bumblebee acpi_call-kmp-desktop hdjmod-kmp-desktop

reboot

Again if you use kernel-default use “zypper in bumblebee”…

At this point we broken the Intel/Mesa driver and this is how I fixed it, somebody might have sorted out wich of this rpms actually
is needed to fix it… I gave up and went for the overkill.

Fix the Intel/Mesa driver

zypper in --force Mesa xorg-x11 xorg-x11-driver-video xorg-x11-driver-video-intel-legacy xorg-x11-libX11 xorg-x11-server

reboot

Now you need to add yourself to the bumblebee group so you don’t have to give root pswd everytime you use “optirun”

usermod -A bumblebee USERNAME

This step next is for making power management work and to choose the default image transport from nVIDIA to Intel, standard is xv but I chose “proxy”
because it is faster and has proven stable on my system.

bumblebee-configuration

Reboot and cross your fingers :wink:

Verify that things are working.

The Intel part:

glxinfo | grep OpenGL

OpenGL vendor string: Tungsten Graphics, Inc
OpenGL renderer string: Mesa DRI Intel(R) Ironlake Mobile 
OpenGL version string: 2.1 Mesa 7.11

The nVIDIA part:

optirun glxinfo | grep OpenGL

OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce 310M/PCI/SSE2
OpenGL version string: 3.3.0 NVIDIA 290.10

I am not sure that all the reboots are needed but I tried without them and it got fuxed.

Files to inspect if things doesnt work…

/etc/default/bumblebee
/etc/X11/xorg.conf.nvidia
/var/log/Xorg.0.log
/var/log/Xorg.8.log

Pardon if my English isn’t correct, I’m a “Swede” rotfl!

Kind Regards Thermal

Hmm, no edit… wanted to remove the url-tags after the zypper commands…

Intel doesn’t work :frowning:

glxinfo | grep OpenGL
Xlib: extension “GLX” missing on display “:0”.
Xlib: extension “GLX” missing on display “:0”.
Xlib: extension “GLX” missing on display “:0”.
Error: couldn’t find RGB GLX visual
Xlib: extension “GLX” missing on display “:0”.
Xlib: extension “GLX” missing on display “:0”.
Xlib: extension “GLX” missing on display “:0”.
Xlib: extension “GLX” missing on display “:0”.
Xlib: extension “GLX” missing on display “:0”.
Xlib: extension “GLX” missing on display “:0”.

But nvidia’s ok.

optirun glxinfo | grep OpenGL
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce GT 425M/PCI/SSE2
OpenGL version string: 4.2.0 NVIDIA 290.10
OpenGL extensions:

zypper in --force Mesa xorg-x11 xorg-x11-driver-video xorg-x11-driver-video-intel-legacy xorg-x11-libX11 xorg-x11-server
I have made it.

What tha ****?

Try
mkdir -p /usr/lib64/nvidia/xorg/modules/updates/extensions
mv /usr/X11R6/lib64/libGL* /usr/lib64/nvidia/
mv /usr/lib64/xorg/modules/updates/extensions/libglx* /usr/lib64/nvidia/xorg/modules/updates/extensions/
mkdir -p /usr/lib/nvidia
mv /usr/X11R6/lib/libGL* /usr/lib/nvidia

Thankyou for this guide. For completeness, to help tie some ‘related’ threads together - Pickle236’s Optimus Guide written from a slightly different perspective here : http://forums.opensuse.org/forums/english/get-technical-help-here/how-faq-forums/unreviewed-how-faq/469244-bumblebee-optimus-support-howto.html

Now Optimus is for users with nVidia/Intel hybrid graphics. For users with Radeon/Intel hybrid graphics, we don’t have a guide yet, although there is a recent thread with some useful information on Radeon/Intel hybrid graphics here: http://forums.opensuse.org/forums/english/get-technical-help-here/laptop/445072-i-have-problem-switchable-graphics-laptop.html

After the done operation:

glxinfo | grep OpenGL                                                                                                                                                                  
OpenGL vendor string: Tungsten Graphics, Inc
OpenGL renderer string: Mesa DRI Intel(R) Ironlake Mobile 
OpenGL version string: 2.1 Mesa 7.11
OpenGL extensions:
optirun glxinfo | grep OpenGL
failed to create drawable
OpenGL vendor string: Mesa Project
OpenGL renderer string: Software Rasterizer
OpenGL version string: 2.1 Mesa 7.11
OpenGL extensions:

make sure you have set
DRIVER=nvidia
in /etc/bumblebee/bumblebee.conf

make sure your /etc/bumblee/xorg.conf.nvidia has the following
Section “Files”
ModulePath “/usr/lib64/nvidia/xorg/modules/updates,/usr/lib64/xorg/modules/updates,/usr/lib64/xorg/modules”
EndSection

glxinfo | grep OpenGL
OpenGL vendor string: Tungsten Graphics, Inc
OpenGL renderer string: Mesa DRI Intel(R) Sandybridge Mobile 
OpenGL version string: 2.1 Mesa 7.11
OpenGL extensions:
optirun glxinfo | grep OpenGL
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce 610M/PCI/SSE2
OpenGL version string: 4.2.0 NVIDIA 290.10
OpenGL extensions:

Superb information in this thread. Thanks for the contributions everyone.

I agree this thread is useful and I think it has much more detailed info than I provided. So as long it covers anything I might have I believe this should be used going forward.

FYI: Bumblebee 3.0 was released. [Phoronix] Bumblebee Has Tumbleweed For NVIDIA Optimus On Linux](http://www.phoronix.com/scan.php?page=news_item&px=MTA0NTY)

Thank you very much!! Works great for me after I set

DRIVER=nvidia
in /etc/bumblebee/bumblebee.conf

And did

mkdir -p /usr/lib64/nvidia/xorg/modules/updates/extensions
mv /usr/X11R6/lib64/libGL* /usr/lib64/nvidia/
mv /usr/lib64/xorg/modules/updates/extensions/libglx* /usr/lib64/nvidia/xorg/modules/updates/extensions/
mkdir -p /usr/lib/nvidia
mv /usr/X11R6/lib/libGL* /usr/lib/nvidia

Should edit orginal post, or add this to the official wiki graphic cards


glxinfo | grep OpenGL
OpenGL vendor string: Tungsten Graphics, Inc
OpenGL renderer string: Mesa DRI Intel(R) Sandybridge Mobile 
OpenGL version string: 2.1 Mesa 7.11
OpenGL extensions:

optirun glxinfo | grep OpenGL
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce GT 525M/PCI/SSE2
OpenGL version string: 4.2.0 NVIDIA 290.10
OpenGL extensions:

Hi mates,

A small issue reproducing the steps above.

#uname -a 
Linux linux-immz.site 3.1.9-1.4-desktop #1 SMP PREEMPT Fri Jan 27 08:55:10 UTC 2012 (efb5ff4) x86_64 x86_64 x86_64 GNU/Linux
# ls /usr/X11R6/lib/
# ls /usr/lib64/xorg/modules/updates/extensions/
# ls /usr/X11R6/lib/
#

i.e. there is nothing to move. :frowning:
I suspect that some Mesa drivers mentioned above did not install – or are already in different place. Nevertheless, optirun glxinfo reports properly.

Any ideas?..

Ok, I’ll bite and illustrate my ignorance. What are mesa drivers ?? I have never heard of mesa drivers ! I have heard of mesa libraries … Mesa (computer graphics) - Wikipedia, the free encyclopedia and http://www.mesa3d.org/ … Drivers and libraries are not the same thing. I admit my ignorance and am willing to learn here. Can you point me to a reference ?

Pls do not troll the typos. :slight_smile:

The fact is that folders mentioned above are empty and

# glxinfo
name of display: :0.0
Error: couldn't find RGB GLX visual

   visual  x  bf lv rg d st colorbuffer ax dp st accumbuffer  ms  cav
 id dep cl sp sz l  ci b ro  r  g  b  a bf th cl  r  g  b  a ns b eat
----------------------------------------------------------------------
0x21 24 tc  1  0  0 c  .  .  0  0  0  0  0  0  0  0  0  0  0  0 0 None
0x22 24 dc  1  0  0 c  .  .  0  0  0  0  0  0  0  0  0  0  0  0 0 None
0x5b 32 tc  1  0  0 c  .  .  0  0  0  0  0  0  0  0  0  0  0  0 0 None
#

All command sequences mentioned above were executed successfully.
What’s wrong, why Intel OpenGL is off?

Some additional info:

 # find /usr -name "libGL*"
/usr/lib/libGL.so.1.2
/usr/lib/fakelib/libGL.so
/usr/lib/libGLESv2.so.2.0.0
/usr/lib/libGLESv2.so.2
/usr/lib/libGLESv1_CM.so.1
/usr/lib/libGL.so.1
/usr/lib/libGLESv1_CM.so.1.1.0
/usr/lib/libGLU.so.1.3.071100
/usr/lib/libGLU.so.1
/usr/X11R6/lib-nvidia/libGL.la
/usr/X11R6/lib-nvidia/libGL.so
/usr/X11R6/lib-nvidia/libGL.so.1
/usr/X11R6/lib-nvidia/libGL.so.290.10
/usr/X11R6/lib64-nvidia/libGL.so
/usr/X11R6/lib64-nvidia/libGL.so.1
/usr/X11R6/lib64-nvidia/libGL.so.290.10
/usr/lib64/libGL.so.1.2
/usr/lib64/fakelib/libGL.so
/usr/lib64/libGLESv2.so.2.0.0
/usr/lib64/libGLESv2.so.2
/usr/lib64/libGLESv1_CM.so.1
/usr/lib64/libGL.so.1
/usr/lib64/libGLESv1_CM.so.1.1.0
/usr/lib64/libGLU.so.1.3.071100
/usr/lib64/libGLU.so.1
#

I’m not trolling - I am trying to keep the thread accurate. Some users might read that ‘Mesa driver’ statement, and based on other posts of yours that appear technically knowledgeable, think you knew what you were saying, and then walk away thinking there are such things as Mesa drivers. I dare say you know more than I about hybrid graphics. And for all I know there are Mesa drivers, as I don’t know all there is to know about graphics - although I concede I have never heard of Mesa drivers, and I note that drivers are not libraries, nor visa versa.

Reference your Mesa question, I can not answer it. I do note on my openSUSE-12.1 PC with a radeon (and NOT an intel) graphic driver I have these ‘Mesa’ rpms installed:


oldcpu@dellstudio:~> rpm -qa '*Mesa*'
Mesa-32bit-7.11-11.1.2.x86_64
MesaGLw-devel-7.10.2-4.1.2.x86_64
Mesa-devel-7.11-11.1.2.x86_64
Mesa-7.11-11.1.2.x86_64
DirectFB-Mesa-1.4.5-20.1.2.x86_64
MesaGLw-7.10.2-4.1.2.x86_64

I don’t know anything wrt the ‘glxinfo’ command, although I note I get a massive output when I send that command from a pc with the fglrx video driver (with no errors).

It may (or may not) be useful for you to indicate what driver (intel or nvidia) you had active when you sent the ‘glxinfo’ command on your hybrid PC and not force users to speculate from your above posts. I know that does not make any difference to me (as I don’t know enough for it to matter) but it might make a difference to users who do know a bit about this.

On 02/08/2012 09:26 PM, kondrashkin wrote:

> # glxinfo

why do you run it as root?


DD http://tinyurl.com/DD-Caveat
Read what Distro Watch writes: http://tinyurl.com/SUSEonDW

On 02/08/2012 09:36 PM, kondrashkin wrote:
> # find /usr -name “libGL*”

why do you run that as root?


DD http://tinyurl.com/DD-Caveat
Read what Distro Watch writes: http://tinyurl.com/SUSEonDW

There are some user repositories in the Build Service with BumbleBee 3, just search for bbswitch.
Btw. bbswitch makes PowerManagement pretty easy. ArchWiki has also a really good BumbleBee section: https://wiki.archlinux.org/index.php/Bumblebee

https://build.opensuse.org/project/show?project=home%3Afrostmyname%3Abumblebee3 works great with bbswitch:

glxinfo | grep OpenGL
OpenGL vendor string: Tungsten Graphics, Inc
OpenGL renderer string: Mesa DRI Intel(R) Sandybridge Mobile 
OpenGL version string: 2.1 Mesa 7.11

optirun glxinfo | grep OpenGL
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: NVS 4200M/PCI/SSE2
OpenGL version string: 4.2.0 NVIDIA 290.10

Hi,
first i followed this tutorial: http://forums.opensuse.org/english/get-technical-help-here/how-faq-forums/unreviewed-how-faq/469244-bumblebee-optimus-support-howto.html, so I had bumblebee installed from that repo. After that I installed nvidia drivers in “hard” way (I had to disable nouveau, and switch to 3rd runlevel). After that I noticed that kde effects doesn’t work. glxgears throw error (that I don’t remember now), but under optirun glxgears run (and gave about 600 fps - I have dell q15r with nvidia gt525m).
After that I saw link to this thread. I thought that if I already have nvidia drivers, next step will be “Fix the Intel/Mesa driver”, so I did that. After reboot I have kde rotated 180 and mirror effect ;p I googled for that and there are hundred lines of text on bug trackers, forums etc. I don’t want to waste time for reading all this :frowning: So my question is - is there any simple way to get rid of this problem? For now, i’m tired of this and I go to sleep. Any help will be appreciated.


Kind regards, Matthew.