Notes: This applies to Fedora 17 & 18 with latest updates and was tested on Asus K93SV laptop with GT540M GPU (wrongly reported as GT555M by lspci in F17).
Now there is also an official page on Fedora wiki on this topic here: https://fedoraproject.org/wiki/Bumblebee.
1. Get latest bumblebee sources (3.0.1) from
https://github.com/Bumblebee-Project/Bumblebee/downloads
2. Get latest bbswitch sources (0.5)
https://github.com/Bumblebee-Project/bbswitch/downloads
3. Install libbsd-devel, kmod-nvidia and dkms as root or with sudo if they are not already installed:
sudo yum install libbsd-devel kmod-nvidia dkms
After installing kmod-nvidia, remove /etc/X11/xorg.conf, /etc/X11/xorg.conf.d/00-nvidia.conf and /etc/modprobe.d/blacklist-nouveau to continue using nouveau driver by default.
sudo rm -f xorg.conf sudo rm -f /etc/X11/xorg.conf.d/00-nvidia.conf sudo rm -f /etc/modprobe.d/blacklist-nouveau.conf
I also removed “nouveau.modeset=0 rd.driver.blacklist=nouveau” kernel parameters from /etc/grub2.cfg for current kernel.
4. Compile bbswitch and install it with DKMS
From directory where you downloaded bbswitch:
tar xvzf bbswitch-0.5.tar.gz sudo cp -Rv bbswitch-0.5 /usr/src sudo ln -s /usr/src/bbswitch-0.5/dkms/dkms.conf /usr/src/bbswitch-0.5/dkms.conf sudo dkms add -m bbswitch -v 0.5 sudo dkms build -m bbswitch -v 0.5 sudo dkms install -m bbswitch -v 0.5
5. Download and install latest VirtualGL RPM from here:
http://www.virtualgl.org/Downloads/VirtualGL
sudo yum localinstall VirtualGL-2.3.1.x86_64.rpm
or install directly with yum from ‘updates-testing’ repo in Fedora 18:
sudo yum --enablerepo=updates-testing install VirtualGL
6. Compile & install bumblebee
tar xvzf bumblebee-3.0.1.tar.gz cd bumblebee-3.0.1 ./configure --prefix=/usr --sysconfdir=/etc make sudo make install sudo cp scripts/systemd/bumblebeed.service /lib/systemd/system
Edit /lib/systemd/system/bumblebeed.service line 7 to read:
ExecStart=/usr/sbin/bumblebeed --config /etc/bumblebee/bumblebee.conf
Edit /etc/bumblebee/bumblebee.conf and change:
Driver=nvidia
and in section [driver-nvidia]:
KernelDriver=nvidia
Edit /etc/bumblebee/xorg.conf.nvidia and add the following at the begining:
Section "Files" ModulePath "/usr/lib64/xorg/nvidia" ModulePath "/usr/lib64/xorg/modules" EndSection
and the following at the end:
Section "Screen" Identifier "Screen1" Device "Device1" EndSection
Create bumblebee group and add you to the group:
sudo groupadd bumblebee sudo usermod -a -G bumblebee $USER
Enable and start bumblebeed service:
sudo systemctl enable bumblebeed.service sudo systemctl start bumblebeed.service
7. Nvidia modules path fix (Thanks Tomash Brechko)
This completely separates intel and nvidia stuff for main and bumblebee screens respectively. Note that it moves files originating from RPMs around, so repeating the fix will likely be required after next yum update.
sudo rm /etc/ld.so.conf.d/nvidia-lib64.conf sudo ldconfig sudo cp -R /usr/lib64/xorg/modules/extensions/nvidia /usr/lib64/xorg sudo rm -rf /usr/lib64/xorg/modules/extensions/nvidia
Re-run above commands after each kernel & kmod-nvidia upgrade.
Here is the output of dmesg
succesfull message:
[ 2177.186042] NVRM: loading NVIDIA UNIX x86_64 Kernel Module 304.32 Thu Aug 2 18:41:39 PDT 2012 [ 2179.880140] bbswitch: disabling discrete graphics [ 2179.880331] bbswitch: Result of Optimus _DSM call: 11000059 [ 2179.891039] pci 0000:01:00.0: Refused to change power state, currently in D0 [ 2179.892219] pci 0000:01:00.0: power state changed by ACPI to D3 [ 2268.536424] bbswitch: enabling discrete graphics [ 2269.060244] pci 0000:01:00.0: power state changed by ACPI to D0 [ 2269.060266] pci 0000:01:00.0: power state changed by ACPI to D0 [ 2269.101247] vgaarb: device changed decodes: PCI:0000:01:00.0,olddecodes=none,decodes=none:owns=none
8. Run applications on Nvidia GPU with optirun
optirun glxgears
1111 frames in 5.0 seconds = 222.122 FPS 1030 frames in 5.0 seconds = 205.921 FPS 1009 frames in 5.0 seconds = 201.757 FPS
Frame rates are on dual monitor 1920×1080 in Fedora17 with Gnome session.
Thanks to the developers of Bumblebee Project.
9. Primus
For speed imrovements you can use primus from https://github.com/amonakov/primus. Download, extract and compile, then run:
vblank_mode=0 ./primusrun glxgears
23359 frames in 5.0 seconds = 4671.624 FPS 23650 frames in 5.0 seconds = 4729.844 FPS 23659 frames in 5.0 seconds = 4731.731 FPS
Seems to be a big step forward. This is a replacement for VirtualGL.
10. Notes
Step 7 should be repeated on every kernel (and kmod-nvidia) upgrade.
Keep an eye on /etc/X11 and remove xorg.conf installed by kmod-nvidia. Also /etc/X11/xorg.conf.d/00-nvidia.conf (installed also by kmod-nvidia) should be removed.
Updated to bbswitch 0.5 and use kmod-nvidia. Step 5 is optional when using Primus. Tested on Fedora 18 and works OK.
Hi.
How it is possible that bumblebee is working with akmod-nvidia driver? How many fps you have on optirun glxgears test?
On my machine, after akmod-nvidia installation X server is not able to start.
See more about akmods here: http://fedorasolved.org/Members/zcat/akmods.
Forgot to tell (I will modify article) to remove /etc/X11/xorg.conf after installing akmod-nvidia to use nouveau driver.
What is your GPU model and how many FPS you have in optirun glxgears test?
GPU is GT540M
optirun glxgears
5660 frames in 5.0 seconds = 1131.799 FPS
5777 frames in 5.0 seconds = 1155.262 FPS
5736 frames in 5.0 seconds = 1147.179 FPS
This is on dual monitor full HD setup.
Update:
After kernel-3.2.2-1 & xorg-x11-drv-intel-2.17.0-8 updates FPS dropped to ~350.
I do not get it. I have asus K73SV notebook with GPU gforce GT540M. So it’s basically same like yours. I’ve made everything like you and my acceleration is not working. This is what I’m getting from console:
optirun glxinfo
name of display: :0
Xlib: extension “GLX” missing on display “:8”.
Xlib: extension “GLX” missing on display “:8”.
Xlib: extension “GLX” missing on display “:8”.
Xlib: extension “GLX” missing on display “:8”.
Xlib: extension “GLX” missing on display “:8”.
Error: couldn’t find RGB GLX visual or fbconfig
Xlib: extension “GLX” missing on display “:8”.
Xlib: extension “GLX” missing on display “:8”.
[VGL] ERROR: in glXGetConfig–
[VGL] 341: Could not obtain Pbuffer-capable RGB visual on the server
Make sure you have proper path to libglx.so in /etc/bumblebee/xorg.conf.nvidia.
For 64bit system is lib64, for 32bit is just lib. If this is the case you have to replace lib64 with lib whenever it appears. You can get more info by calling optirun with –debug switch.
Hi,
Just for the record, while trying to solve the same problem you describe here, I came across this post: http://ubuntuforums.org/showthread.php?t=1722306 which gave me the pointer about the runtime linking of the wrong libGL.so. I removed the libGL.so* files from /usr/lib and /usr/lib64 and rebuilt the dynamic library index (sudo ldconfig). Now glxgears and glxinfo link the correct libGL.so from (in my case) /usr/lib64/nvidia, and so far everything works ok.
Best,
Oscar
@Oscar Yanez
Could You explain for me how to do that? I mean rebuilding the dynamic library index. And will glxinfo/glxgears (and other apps that use libGL.so) work without optirun?
To rebuild the dynamic library index just type at the command prompt:
>> sudo ldconfig
It will find the available libGL.so. You can verify that the system is linking to the correct library with:
>> ldd /usr/bin/glxgears
and you should see the listing of files that will be dynamically linked to glxgears. In my system (Fedora 16 64 bits) these are the available libGL files:
/usr/lib64/libGL.so.1.2
/usr/lib64/nvidia/libGL.so.1
/usr/lib64/nvidia/libGL.so.290.10
/usr/lib64/libGL.so.1
/usr/lib64/libGL.so
/usr/lib/libGL.so.1.2
/usr/lib/libGL.so.1
ldd above should link to the ones in the nvidia branch after removing the others. Beware that an update (yum update) that includes GL will reinstall de non-nvidia files and change the links (I haven’t worked on a permanent solution for this).
And yes, at least in my system, both “glxgears” alone and “optrun glxgears” work, with huuuge performance gains on the second case.
Best,
oscar
On GT540M ~1100 FPS is very poor performance. On second notebook with GT120M, closed drivers and intel core II duo there is ~2500FPS. On GT220M there is ~5500FPS. Hope nouveau driver will increase performance in short interval of time.
FPS also depends on resolution. I have 350FPS on 3840×1080 resolution and around 700FPS in full HD 1920×1080.
All listed notebooks has 17.3″ screens and resolution 1600×900. I tested counter strike condition zero on GT220M and GT540M with Nvidia optimus, both on resolution 1600×900. On GT220M there is ~99 FPS all the time, on GT540M (NV optimus) there is around 45 FPS. After this I decide to not run counter strike source on notebook with optimus technology, it’s pointless. That’s it about nouveau driver.
Hello, I’m having problem with the step 3. I remove the xorg.conf and some other file like nvidia-xorg.conf and blacklist-nouveau.conf in /etc/modprobe.d but when I reboot, I start on the Gnome Failsafe session. I think I’ m having a problem in order to restore the nouveau driver… What can I do or check ?
Thanks for you help
I have same problem. After installing nvidia drivers, but before restarting pc, everything works fine. But after pc restart, gnome runs into filesafe with “(empty)” drivers. There I can run optirun with nvidia drivers, but I want normal gnome session. I tried to figure out how to make working gnome3 + nvidia + bumblebee about 5 hours unsuccessfully. So now I’m using bumblebee with nouveau drivers (~20% better than intel). I hope, I can use nvidia drivers soon.
After installing akmod-nvidia, I removed /etc/X11/xorg.conf and /etc/X11/xorg.conf.d/00-nvidia.conf installed by RPM, to continue to use nouveau driver by default.
Seems to work with or without removing blacklist-nouveau.conf from /etc/modprobe.d for me.
You should check /var/log/Xorg.0.log for errors.
I cleaned my system and started once again. Now I have other issue:
optirun –debug glxgears
[DEBUG]Active configuration:
[DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf
[DEBUG] X display: :8
[DEBUG] LD_LIBRARY_PATH:
[DEBUG] Socket path: /var/run/bumblebee.socket
[DEBUG] VGL Compression: yuv
[DEBUG]optirun version 3.0 starting…
[ERROR]The Bumblebee daemon has not been started yet or the socket path /var/run/bumblebee.socket was incorrect.
[DEBUG]Socket closed.
[ERROR]Could not connect to bumblebee daemon – is it running?
Why Bumblebee deamon has not been started? Howto start it?
Try to see what’s wrong with dmesg. Also look in /var/log/Xorg.8.log.
Do not forget to create bumblebee group
You are right. Updated article.
Hello, and thank you very much for making this post. I have some issue to install Bumblebee at step #6, could you have a peek at it ?
All the previous steps were done completely, without any error, but when I do
./configure –prefix=/usr –sysconfdir=/etc
It can’t find glib-2.0 :
checking for a BSD-compatible install… /usr/bin/install -c
checking whether build environment is sane… yes
checking for a thread-safe mkdir -p… /bin/mkdir -p
checking for gawk… gawk
checking whether make sets $(MAKE)… yes
checking how to create a pax tar archive… gnutar
checking for gcc… gcc
checking whether the C compiler works… yes
checking for C compiler default output file name… a.out
checking for suffix of executables…
checking whether we are cross compiling… no
checking for suffix of object files… o
checking whether we are using the GNU C compiler… yes
checking whether gcc accepts -g… yes
checking for gcc option to accept ISO C89… none needed
checking for style of include used by make… GNU
checking dependency style of gcc… gcc3
checking whether gcc and cc understand -c and -o together… yes
checking for help2man… no
configure: WARNING: cannot find help2man, you will not be able to generate
manpages
checking for pkg-config… /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0… yes
checking for x11… yes
checking for glib… no
configure: error: Package requirements (glib-2.0) were not met:
No package ‘glib-2.0’ found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables glib_CFLAGS
and glib_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
On the other hand, the packages glib.x86_64 1:1.2.10-35.fc16 and glib2-2.30.2-1.fc16.x86_64 are already installed. What did I do wrong ?
Thanks in advance
sudo yum install glib2-devel
Works ! Thank you very very much ! One last little problem : I have to run optirun with superuser right (sudo optirun blahblah) to make it work, otherwise I get :
$ optirun glxgears
[ERROR]You’ve no permission to communicate with the Bumblebee daemon. Try adding yourself to the ‘bumblebee’ group
[ERROR]Could not connect to bumblebee daemon – is it running?
What’s my problem ? of course I am myself in the bumblebee group and the daemon is working in view of the fact that it works with sudo… must be some noob issue as my first one -_-‘
have you tried to restart? because i have same experienced with you, but everything work fine after i restarted my box…
Most likely the problem is/was simply that, even though you’ve created the group and added yourself to it, your current session wasn’t aware of that and didn’t see you as part of the bumblebee group.
As Reza suggested, rebooting should have solved it, or even logging out and back in again. If you want to have your current session pick up on a newly-configured group without doing either of those, though, that can be achieved with the ‘newgrp’ command. (Which will still only apply for the shell you execute it in, not the entire login session.)
hello,
i have problem at step #6, when i run: ./configure –prefix=/usr –sysconfdir=/etc
checking for a BSD-compatible install… /usr/bin/install -c
checking whether build environment is sane… yes
checking for a thread-safe mkdir -p… /bin/mkdir -p
checking for gawk… gawk
checking whether make sets $(MAKE)… yes
checking how to create a pax tar archive… gnutar
checking for gcc… gcc
checking whether the C compiler works… yes
checking for C compiler default output file name… a.out
checking for suffix of executables…
checking whether we are cross compiling… no
checking for suffix of object files… o
checking whether we are using the GNU C compiler… yes
checking whether gcc accepts -g… yes
checking for gcc option to accept ISO C89… none needed
checking for style of include used by make… GNU
checking dependency style of gcc… gcc3
checking whether gcc and cc understand -c and -o together… yes
checking for help2man… /usr/bin/help2man
checking for pkg-config… /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0… yes
checking for x11… no
configure: error: Package requirements (x11) were not met:
No package ‘x11’ found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables x11_CFLAGS
and x11_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
which package i should install, since there are many x11 packages. thanks.
i am also stuck there, did you ever find an answer?
install libX11-devel:
sudo yum -y install libX11-devel
here I still have to install glib2-devel and if want help2man, so would be better to run:
sudo yum -y install libX11-devel glib2-devel help2man
by the way i’m using kororra 16 64bit
check for libX11-devel.
hi, thanks for the advice,
i ran “sudo yum install libX11-devel”, after that ran “sudo yum install gelib2-devel”.
now it works like a charm, thanks a lot… 🙂
@delahnis, have you tried to restart? because i have same experienced with you, but everything work fine after i restarted my box…
Can’t reply to the post, so I continue here…
Indeed it works fine without sudo after rebooting, but as things always happen in a row, gnome launches itself in poor mode (I don’t know the exact term in english, it french it’s “Mode restreint” and looks like Gnome 2). How can I avoid that ?
the english name of this mode is “fallback mode”
Some additional information : it can’t run glxgears without optirun anymore
$ glxgears
Xlib: extension “GLX” missing on display “:0”.
Error: couldn’t get an RGB, Double-buffered visual
$ glxinfo
name of 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”.
Error: couldn’t find RGB GLX visual or fbconfig
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”.
Xlib: extension “GLX” missing on display “:0”.
Looks like a configuration problem, but as I’m a beginner I don’t have any idea of what I have to change :s could you help me one more time please ?
Really enjoyed reading some of the posts on this site. Have linked it to E-WOT so I can come back!
after your tutorial is gnome-shell very strange.it is flickering in menus and cant run any app from activities bar. what is wrong? i am using fedora 16 with latest(testing too) updates.
i want to use bumblebee so please help :(((
I’m using normal Fedora updates (not testing). My system is an Asus K93SV with i7 Sandy Bridge & Nvidia GF 540M and is working fine. For anything else you should try yourself because there is no official support for Optimus on Linux. I wrote here what worked for me.
i am trying it with 64bit system now.i hope it will works…btw i must use testing updates because of latest kernel.i have no problems with testing updates for now…
the same problem was on fc15.
is xneural switcher installed and runing?
after installing it on 64bit Fedora 16 gnome 3 starts in safe mode(without gnome-shell)
on boot i get error while loading akmods service.
“systemctl status akmods.service” shows me this:
Loaded: loaded (/etc/rc.d/init.d/akmods)
Active: failed since Fri, 10 Feb 2012 12:26:57 +0100; 1min 0s ago
Process: 1012 ExecStart=/etc/rc.d/init.d/akmods start (code=exited, status=0/SUCCESS)
CGroup: name=systemd:/system/akmods.service
what to do? :(((
“optirun glxgears” works for me with cca 1000fps but “glxgears” shows me this:
Xlib: extension “GLX” missing on display “:0.0”.
Error: couldn’t get an RGB, Double-buffered visual
my mistake.i think i forget to install gcc package so it was unable to compile bbswitch dkms 🙂 now is it working, 5h on battery B-)
final words for me: with akmod-nvidia driver i got DKMS error on boot but with nouveau driver is it working for me ok
Hello Dusan,
I’ve got the same problem as you, gnome 3 starts in fallback mode and “optirun glxgears” works fine, but “glxgears” fails :
Xlib: extension “GLX” missing on display “:0”.
Error: couldn’t get an RGB, Double-buffered visual
and on boot, it fails to launch LSB :
Failed to start LSB : Builds and install new kmods from akmod packages
See ‘systemctl status akmods.service’ for details
which leads me to :
akmods.service – LSB: Builds and install new kmods from akmod packages
Loaded: loaded (/etc/rc.d/init.d/akmods)
Active: failed since Sun, 12 Feb 2012 13:46:36 +0100; 15min ago
Process: 947 ExecStart=/etc/rc.d/init.d/akmods start (code=exited, status=0/SUCCESS)
CGroup: name=systemd:/system/akmods.service
gcc was installed since the beginning of the installation I’m using fedora 16/64bits on an Asus x53sv with nVidia GF 540M (reported as GT555M by lspci).
What to do ? 😦
Hi Dusan !
It looks like you found the solution to my problem but I don’t understand what you did and what you mean by “with nouveau driver” ? Did you change a configuration file to allow bumblebee to use it ? gcc and nouveau are installed but gnome still launches in fallback mode (akmod service loading fails) and glxgears still doesn’t work without optirun.
I beg you ! the solution is so close 😥
Gnome starts in failsafe for me too even after removing the files….any ideas??
Check for AIGLX or any other error (EE) in your /var/log/Xorg.0.log. You should have something like this when OK:
the only error is this:
[ 680.573] (EE) Failed to initialize GLX extension (Compatible NVIDIA X driver not found)
everything works fine its just that gnome loads into failsafe for some reason. I think it has something to do with the nouveau driver not being set to default or something
Check for paths in your config and be carefull because bumblebee search for config by default in /usr/local/etc/bumblebee, that’s why I added –config switch there.
Nvidia drivers should be seen only in /var/log/Xorg.8.log.
In Xorg.0.log you should have only nouveau driver:
[ 31.969] (II) LoadModule: “glx”
[ 31.969] (II) Loading /usr/lib64/xorg/modules/extensions/libglx.so
[ 32.119] (II) GLX: Initialized DRI2 GL provider for screen 0
Uh oh I seem to have nvidia stuff trying to load in /var/log/Xorg.0.log. I too am stuck in fallback mode. What can I do to fix this?
# glxgears
Xlib: extension “GLX” missing on display “:0.0”.
Error: couldn’t get an RGB, Double-buffered visual
# optirun glxgears
5038 frames in 5.0 seconds = 1007.517 FPS
5074 frames in 5.0 seconds = 1014.746 FPS
5138 frames in 5.0 seconds = 1027.537 FPS
5135 frames in 5.0 seconds = 1026.936 FPS
5062 frames in 5.0 seconds = 1012.233 FPS
# cat /var/log/Xorg.0.log |grep GLX
[ 12.081] (II) NVIDIA GLX Module 290.10 Wed Nov 16 18:01:24 PST 2011
[ 12.081] (II) Loading extension GLX
[ 12.238] (EE) Failed to initialize GLX extension (Compatible NVIDIA X driver not found)
# cat /var/log/Xorg.0.log |grep glx
[ 12.066] (II) LoadModule: “glx”
[ 12.066] (II) Loading /usr/lib64/xorg/modules/extensions/nvidia/libglx.so
[ 12.081] (II) Module glx: vendor=”NVIDIA Corporation”
# cat /var/log/Xorg.0.log |grep nv
[ 12.066] (II) Loading /usr/lib64/xorg/modules/extensions/nvidia/libglx.so
# cat /var/log/Xorg.0.log |grep EE
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 12.066] (II) Loading extension MIT-SCREEN-SAVER
[ 12.086] (EE) open /dev/fb0: No such device
[ 12.238] (EE) Failed to initialize GLX extension (Compatible NVIDIA X driver not found)
# glxinfo
name of display: :0.0
Xlib: extension “GLX” missing on display “:0.0”.
Xlib: extension “GLX” missing on display “:0.0”.
Xlib: extension “GLX” missing on display “:0.0”.
Xlib: extension “GLX” missing on display “:0.0”.
Xlib: extension “GLX” missing on display “:0.0”.
Error: couldn’t find RGB GLX visual or fbconfig
Xlib: extension “GLX” missing on display “:0.0”.
Xlib: extension “GLX” missing on display “:0.0”.
Xlib: extension “GLX” missing on display “:0.0”.
Xlib: extension “GLX” missing on display “:0.0”.
Xlib: extension “GLX” missing on display “:0.0”.
Xlib: extension “GLX” missing on display “:0.0”.
Xlib: extension “GLX” missing on display “:0.0”.
# optirun glxinfo |grep OpenGL
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce GT 550M/PCI/SSE2
OpenGL version string: 4.2.0 NVIDIA 290.10
OpenGL shading language version string: 4.20 NVIDIA via Cg compiler
OpenGL extensions:
# uname -a
Linux localhost 3.2.3-2.fc16.x86_64 #1 SMP Fri Feb 3 20:08:08 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
UPDATE: seems if I missplace the /usr/lib64/xorg/modules/extensions/nvidia directory during boot, I can get glxgears to run without optirun – though to get optirun glxgears to run I have to put it back. I only have to misplace it during boot, then when I put it back everything works – though non optirun stuff seems somewhat unhappy. Is there a better way to do this so nvidia stuff stays out of the primary Xserver?
(the output of the following seems really choppy on # glxgears – doesnt look at all like 65fps)
# glxgears
Xlib: extension “NV-GLX” missing on display “:0.0”.
Xlib: extension “NV-GLX” missing on display “:0.0”.
Running synchronized to the vertical refresh. The framerate should be
approximately the same as the monitor refresh rate.
348 frames in 5.3 seconds = 65.606 FPS
300 frames in 5.0 seconds = 59.800 FPS
300 frames in 5.0 seconds = 59.801 FPS
300 frames in 5.0 seconds = 59.800 FPS
300 frames in 5.0 seconds = 59.800 FPS
# optirun glxgears
4687 frames in 5.0 seconds = 937.244 FPS
4750 frames in 5.0 seconds = 949.859 FPS
4746 frames in 5.0 seconds = 949.008 FPS
# glxinfo |grep OpenGL
Xlib: extension “NV-GLX” missing on display “:0.0”.
Xlib: extension “NV-GLX” missing on display “:0.0”.
OpenGL vendor string: Tungsten Graphics, Inc
OpenGL renderer string: Mesa DRI Intel(R) Sandybridge Mobile
OpenGL version string: 1.4 (2.1 Mesa 7.11.2)
OpenGL extensions:
# optirun glxinfo |grep OpenGL
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce GT 550M/PCI/SSE2
OpenGL version string: 4.2.0 NVIDIA 290.10
OpenGL shading language version string: 4.20 NVIDIA via Cg compiler
OpenGL extensions:
# cat /var/log/Xorg.0.log |grep glx
[ 15.370] (II) LoadModule: “glx”
[ 15.370] (II) Loading /usr/lib64/xorg/modules/extensions/libglx.so
[ 15.372] (II) Module glx: vendor=”X.Org Foundation”
# cat /var/log/Xorg.0.log |grep GLX
[ 15.372] (==) AIGLX enabled
[ 15.372] (II) Loading extension GLX
[ 15.545] (II) AIGLX: enabled GLX_MESA_copy_sub_buffer
[ 15.545] (II) AIGLX: enabled GLX_INTEL_swap_event
[ 15.545] (II) AIGLX: enabled GLX_SGI_swap_control and GLX_MESA_swap_control
[ 15.545] (II) AIGLX: enabled GLX_SGI_make_current_read
[ 15.545] (II) AIGLX: GLX_EXT_texture_from_pixmap backed by buffer objects
[ 15.545] (II) AIGLX: Loaded and initialized i965
[ 15.545] (II) GLX: Initialized DRI2 GL provider for screen 0
[ 1126.528] (II) AIGLX: Suspending AIGLX clients for VT switch
[ 1128.826] (II) AIGLX: Resuming AIGLX clients after VT switch
[ 16163.188] (II) AIGLX: Suspending AIGLX clients for VT switch
[ 16165.479] (II) AIGLX: Resuming AIGLX clients after VT switch
(secondary Xserver – gets started when optirun is used)
# cat /var/log/Xorg.8.log |grep glx
[ 18228.278] (II) LoadModule: “glx”
[ 18228.278] (II) Loading /usr/lib64/xorg/modules/extensions/nvidia/libglx.so
[ 18228.280] (II) Module glx: vendor=”NVIDIA Corporation”
# cat /var/log/Xorg.8.log |grep GLX
[ 18228.280] (II) NVIDIA GLX Module 290.10 Wed Nov 16 18:01:24 PST 2011
[ 18228.281] (II) Loading extension GLX
[ 18230.685] (II) Loading extension NV-GLX
[ 18230.741] (II) Initializing extension GLX
I have just purchased Asus U36SD with nVidia GT520M 1 GB Card. Running Fedora 16 x86_64.
The system is updated recently..and now has new kernel module…
I am having trouble compiling bbswitch it is giving following error after issuing following command
dkms build -m bbswitch -v 0.4.1
Error! echo
Your kernel headers for kernel 3.2.3-2.fc16.x86_64 cannot be found at
/lib/modules/3.2.3-2.fc16.x86_64/build or /lib/modules/3.2.3-2.fc16.x86_64/source.
The output of ‘uname -a’ is
Linux asus-laptop 3.2.3-2.fc16.x86_64 #1 SMP Fri Feb 3 20:08:08 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
sudo yum install kernel-headers
maybe also kernel-devel needed.
I have successfully installed bumblebee, but now i want to update kernel? what should i do? is bumblebee will still work after i did an update for kernel? thanks
If you’ve done what I wrote in article, yes you can update your system (including kernel) and bumblebee will work.
yes, i’ve done all the steps on your articles.
btw, thanks for the article, very helpful.
i’ll try to update my system.
btw, i forgot to wrote my name :p
Hi!!
I follow your tuto and then “optirun glxgears” answers :
[ERROR]Cannot access secondary GPU – error: [XORG] (EE) Failed to load module “extmod” (module does not exist, 0)
[ERROR]Aborting because fallback start is disabled.
Any idea?
Huummm I forgot : I’m on an Asus 1215N with Fedora 16 32 bits
[…] Fedora: Wiki: https://fedoraproject.org/wiki/Bumblebee Tutorial "no oficial": Finally working Nvidia Optimus on Fedora 16 CoreTech Arch Linux: Paquete AUR: https://aur.archlinux.org/packages.php?ID=52210 Wiki: […]
“After installing akmod-nvidia, remove /etc/X11/xorg.conf, /etc/X11/xorg.conf.d/00-nvidia.conf and /etc/modprobe.d/blacklist-nouveau to continue using nouveau driver by default” . when u say remove, r u saying to delete those files, xorg.conf,00-nvidia.conf and blacklist-nouveau ?
Regards,
Andrés
They are added by akmod-nvidia and are not needed for default X server (0) which uses nouveau with auto configuration.
Written some thing about Asus U36SD and Fedora 16
http://amolh.weebly.com/2/post/2012/02/asusu36sd.html
I followed your howto and was able to install bumblebee and bbswitch on centos 6.2, after i rebuilded libbsd. The only problem is that after a reboot, i get an error that is can’t load the module nvidia.ko, because device is not present.
Looks like bumblebee deactivates the nvidia card by default.
Do you know a way to resolve that issue?
Thanks in advance.
Got it working. The packages that are needed have been build. They will be available through the elrepo repo.
Hello and thanks for the detailed guide!
I have an Asus U36SD laptop and was able to install he several pieces to my F16 x86_64
I would like to use nvidia and not nouveau so I setup this way:
– remove /etc/X11/xorg.conf and /etc/X11/xorg.conf.d/00-nvidia.conf created by nvidia install from rpfusion
– mantain nouveau blacklist entry in /etc/modprobe.d/blacklist-nouveau.conf
– mantain entry in /etc/grub2.cfg:
nouveau.modeset=0 rd.driver.blacklist=nouveau
I can verify that nvidia card is switched off when not using optirun with the command
lspci -vnn | grep -i vga
output fr nvidia card line passes
from
(rev a1) (prog-if 00 [VGA controller])
to
(rev ff) (prog-if ff)
With an 19″ lcd monitor connected to vga
(screen #0:
dimensions: 1366×1792 pixels
)
I get this error when using intel
Xlib: extension “NV-GLX” missing on display “:0”.
Xlib: extension “NV-GLX” missing on display “:0”.
and these numbers:
349 frames in 5.3 seconds = 65.675 FPS
320 frames in 5.3 seconds = 60.031 FPS
320 frames in 5.3 seconds = 60.008 FPS
When using optirun:
1545 frames in 5.0 seconds = 308.707 FPS
1498 frames in 5.0 seconds = 299.481 FPS
How to solve Intel NV-GLX error part?
BTW: is it vdpau supported with optirun?
$ optirun vainfo
libva: VA-API version 0.32.0
libva: va_getDriverName() returns 0
libva: Trying to open /usr/lib64/dri/i965_drv_video.so
libva: va_openDriver() returns 0
vainfo: VA-API version: 0.32 (libva 1.0.15)
vainfo: Driver version: i965 Driver 0.1
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileH264Baseline : VAEntrypointVLD
VAProfileH264Baseline : VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
But:
$ optirun vdpauinfo
display: :0 screen: 0
Xlib: extension “NV-GLX” missing on display “:0”.
Xlib: extension “NV-GLX” missing on display “:0”.
Error creating VDPAU device: 1
Or do I have to specify screen:1 in some way?
Gianluca
Is my approach below the right one?
Situation was
$ ldd /usr/bin/glxinfo
linux-vdso.so.1 => (0x00007fff7cfff000)
libGLEW.so.1.6 => /usr/lib64/libGLEW.so.1.6 (0x0000003a71800000)
libGLU.so.1 => /usr/lib64/libGLU.so.1 (0x0000003a75c00000)
libGL.so.1 => /usr/lib64/nvidia/libGL.so.1 (0x00007f609c07d000) <—- wrong if using intel driver on screen 0
……
this because of the file /etc/ld.so.conf.d/nvidia-lib64.conf (provided by xorg-x11-drv-nvidia-libs rpm) contents:
/usr/lib64/nvidia
so I commented out the line; also I did te same for the 32 bit one
/etc/ld.so.conf.d/nvidia-lib.conf
and ran
ldconfig -v
Now:
$ sudo ldconfig -v|grep -i nvidia
returns nothing
Now glxgears gives no warning n Xlib
$ glxgears
Running synchronized to the vertical refresh. The framerate should be
approximately the same as the monitor refresh rate.
302 frames in 5.0 seconds = 60.256 FPS
301 frames in 5.0 seconds = 60.021 FPS
…
but
$ optirun glxgears
Error: couldn't get an RGB, Double-buffered visual
what to manage libraries search paths depending on intel or nvidia card used…?
Gianluca
Hi,
This is the output from ldd in my case (after removing system libGl.so* files and running ldconfig):
[oscar@oys ~]$ ldd /usr/bin/glxgears | grep -i nvidia
libGL.so.1 => /usr/lib64/nvidia/libGL.so.1 (0x0000003a0da00000)
libnvidia-tls.so.290.10 => /usr/lib64/nvidia/tls/libnvidia-tls.so.290.10 (0x0000003a0de00000)
libnvidia-glcore.so.290.10 => /usr/lib64/nvidia/libnvidia-glcore.so.290.10 (0x0000003a0b600000)
And glxgears runs without trouble both with and without optirun:
[oscar@oys ~]$ glxgears
Xlib: extension “NV-GLX” missing on display “:0”.
Xlib: extension “NV-GLX” missing on display “:0”.
Running synchronized to the vertical refresh. The framerate should be
approximately the same as the monitor refresh rate.
334 frames in 5.0 seconds = 66.191 FPS
[oscar@oys ~]$ optirun glxgears
4496 frames in 5.0 seconds = 899.037 FPS
Still have to look at the NV-GLX warning above ….
Best,
Oscar
The NV-GLX warning depends on glxgears not finding system libGL.so files, required when using intel video card and mesa-libGL
The message appears in
optirun glxgears
or
glxgears
depending on using nvidia libGL or mesa libGL
The problem is how to use both…
With nouveau the problem doesn’t exist because both use the system libGL..
The problem arises when using nvidia proprietary drivers and libGL
I think you will get problems in gnome-shell if deleteing system libGL.. or not?
@Gianluca
Oh yes, gnome-shell fails all over the place =( didn’t realize that until I rebooted and tried to access a terminal window.
So I am back at the start and reading the new posts ….
Thanks
Oscar
So it seems tis one is the best compromise in term of performance, at least in my case with an Asus U36SD laptop, using intel+nvidia blob and wanting to use intel by default and nvidia through optirun:
– remove /etc/X11/xorg.conf and /etc/X11/xorg.conf.d/00-nvidia.conf created by nvidia install from rpmfusion
– mantain nouveau blacklist entry in /etc/modprobe.d/blacklist-nouveau.conf
– mantain entry in /etc/grub2.cfg:
nouveau.modeset=0 rd.driver.blacklist=nouveau
– under /etc/ld.so.conf.d/ comment out the lines (or remove the files)
nvidia-lib.conf <— from xorg-x11-drv-nvidia-libs-290.10-1.fc16.i686
nvidia-lib64.conf <— from xorg-x11-drv-nvidia-libs-290.10-1.fc16.x86_64
– rebuild the cache (/etc/ld.so.cache) with the command (from root or via sudo)
ldconfig
– reboot
This way gnome-shell continues to be fluent when using intel video adapter, otherwise it is chopping and sometimes not responding to mouse events.
With a desktop with applications working
– evolution
– calc with 2 documents open
– gnome-temrinal with two sessoins open
– keepassx
– firefox opened with optirun and about 20 open tabs
$ sensors
acpitz-virtual-0
Adapter: Virtual device
temp1: +45.0°C (crit = +108.0°C)
asus-isa-0000
Adapter: ISA adapter
temp1: +45.0°C
coretemp-isa-0000
Adapter: ISA adapter
Physical id 0: +45.0°C (high = +86.0°C, crit = +100.0°C)
Core 0: +43.0°C (high = +86.0°C, crit = +100.0°C)
Core 1: +43.0°C (high = +86.0°C, crit = +100.0°C)
power statistics gives: a rate of 17-18W
(
$ sudo cat /sys/devices/LNXSYSTM\:00/device\:00/PNP0A08\:00/PNP0C0A\:00/power_supply/BAT0/power_now
17528000
)
Cheers,
Gianluca
THIS RIGHT HERE!!! Is what finally made the whole thing run nicelly! THX…
firstly i had issues with GNOME 3 falback after installing nvidia drivers which was fixed using a revised guide http://forums.nvidia.com/index.php?showtopic=225401 which ‘moves nvidia extensions away from xorg standard path’ (dont forget to fixup /etc/bumblebee/xorg.conf.nvidia after moving them)..
Once i had GNOME 3 running nicely and optirun doing its thing, i started to run into mouse problems where GNOME 3 would totaly ignore it most of the time.. Gianluca’s method fixed this up!
Enjoying power savings and high fps when needed on ASUS N53S
Glad to see it works for you too.
Two things to take care of when updating nvidia related packages are these ones:
– better to keep under /etc/ld.so.conf.d/ the files
nvidia-lib.conf <— from xorg-x11-drv-nvidia-libs-290.10-1.fc16.i686
nvidia-lib64.conf <— from xorg-x11-drv-nvidia-libs-290.10-1.fc16.x86_64
with a comment at th ebeginning, so that updates of the packages doesn't modify them
and don't create problems
– when updating xorg-x11-drv-nvidia (eg the recently update to -295.33-3.fc16.x86_64)
the files /etc/X11/xorg.conf and /etc/X11/xorg.conf.d/00-nvidia.conf are placed back.
It worths trying to keep them too but wthout nothing inside… not tried yet but removed again after update
For the rest, updates where without any pain in functionality.
The only thing I find misbehaving sometimes is when gnome is locked: it happens that you come back and move the mouse but you don't see the window prompting for the password to unlock…
Actually if you begin to type your password and press enter the screen does indeed get unlocked and you can start working again.
Without knowing this, one could think to be in front of a not responding session and tempted to switch to console and restart Gnome shell…
You are not supposed to set ModulePath directly in xorg.conf.nvidia (although it’s certainly possible). Inside bumblebee.conf, modify the ModulePath setting, concatenating multiple paths with a comma.
XorgModulePath=/usr/lib64/xorg/modules/extensions/nvidia
I tried that before modifying xorg.conf.nvidia. It loads /usr/lib64/xorg/modules/extensions/libglx.so instead.
XorgModulePath (comma-separated) is used for finding nvidia_drv.so, LibraryPath (colon-separated) is used for libGL.so
It seems the path is also ignored for LibraryPath in bumblebee.conf in driver-nvidia section. Described method above is the only way that works for me.
The best (but still not working) I’m able to get is with this conf and nvidia proprietary drivers:
– /etc/bumblebee/xorg.conf.nvidia with ModulePath related Section wiped out as suggested
– /etc/bumblebee/bumblebee.conf with [driver-nvidia] sections this way:
LibraryPath=/usr/lib64/nvidia
XorgModulePath=/usr/lib64/xorg/modules/drivers,/usr/lib64/xorg/modules
XorgConfFile=/etc/bumblebee/xorg.conf.nvidia
glxgears is ok (60fps as expected)
optirun firefox (so I presume without glx) is ok and using nvidia (I suppose due to its responsiveness… how to verify? for example searching in /proc/pid tree?)
optirun glxgears opens a window but sudenly exits with this message
X Error of failed request: BadWindow (invalid Window parameter)
Major opcode of failed request: 137 (NV-GLX)
Minor opcode of failed request: 4 ()
Resource id in failed request: 0x200002
Serial number of failed request: 36
Current serial number in output stream: 36
What to debug now…?
Thanks for suggestions.
You should look in /var/log/Xorg.8.log.
Indeed it seems not ok for glx:
[ 53.838]
X.Org X Server 1.11.4
Release Date: 2012-01-27
…
[ 53.838] (++) Using config file: “/etc/bumblebee/xorg.conf.nvidia”
[ 53.838] (==) Using config directory: “/etc/X11/xorg.conf.d”
[ 53.838] (==) Using system config directory “/usr/share/X11/xorg.conf.d”
[ 53.838] (==) ServerLayout “Layout0”
…
[ 53.838] (++) ModulePath set to “/usr/lib64/xorg/modules/drivers,/usr/lib64/xorg/modules”
…
[ 53.840] (II) LoadModule: “glx”
[ 53.840] (II) Loading /usr/lib64/xorg/modules/extensions/libglx.so
[ 53.840] (II) Module glx: vendor=”X.Org Foundation”
[ 53.840] compiled for 1.11.4, module version = 1.0.0
[ 53.840] ABI class: X.Org Server Extension, version 6.0
[ 53.840] (==) AIGLX enabled
[ 53.840] (II) Loading extension GLX
…
[ 53.842] (EE) NVIDIA(0): Failed to initialize the GLX module; please check in your X
[ 53.842] (EE) NVIDIA(0): log file that the GLX module has been loaded in your X
[ 53.842] (EE) NVIDIA(0): server, and that the module is the NVIDIA GLX module. If
[ 53.842] (EE) NVIDIA(0): you continue to encounter problems, Please try
[ 53.842] (EE) NVIDIA(0): reinstalling the NVIDIA driver.
Currently I have this in my system
/usr/lib64/xorg/modules/extensions/libglx.so
/usr/lib64/xorg/modules/extensions/nvidia/libglx.so
How to change /etc/bumblebee/xorg.conf.nvidia or /etc/bumblebee/bumblebee.conf to get nvidia one before xorg one?
BTW: when changing /etc/bumblebee/xorg.conf.nvidia or /etc/bumblebee/bumblebee.conf what is the reccomended way to apply their changes and test without rebooting?
Ok, with ModulePath section in /etc/bumblebee/xorg.conf.nvidia wiped out and in
bumblebee.conf these lines (perhaps redundant in some way..)
LibraryPath=/usr/lib64/nvidia:/usr/lib64/xorg/modules/extensions/nvidia
XorgModulePath=/usr/lib64/xorg/modules/extensions/nvidia,/usr/lib64/xorg/modules/drivers,/usr/lib64/xorg/modules
It seems now ok for both Nvidia libGL.so and libglx.so.
I get now:
[ 102.661] (++) ModulePath set to “/usr/lib64/xorg/modules/extensions/nvidia,/usr/lib64/xorg/modules/drivers,/usr/lib64/xorg/modules”
…
[ 102.662] (II) LoadModule: “glx”
[ 102.662] (II) Loading /usr/lib64/xorg/modules/extensions/nvidia/libglx.so
[ 102.664] (II) Module glx: vendor=”NVIDIA Corporation”
[ 102.664] compiled for 4.0.2, module version = 1.0.0
[ 102.664] Module class: X.Org Server Extension
[ 102.664] (II) NVIDIA GLX Module 290.10 Wed Nov 16 18:01:24 PST 2011
[ 102.664] (II) Loading extension GLX
and
optirun glxgears
gives about 1050-1100 FPS
finally!
Hi
I’m using Fedora 16 x86_64 on a Dell XPS 15z, with Intel i915 + Nvidia Nouveau. My objective is to get dual monitor to work – I’m not really concerned about performance.
I installed bumblebee using this RPM : http://elrepo.org/linux/testing/el6
I haven’t installed bbswitch, as I don’t want to switch off the nvidia card (is this correct?)
Bumblebeed is running as a systemd service.
# systemctl status bumblebeed.service
bumblebeed.service – Bumblebee C Daemon
Loaded: loaded (/lib/systemd/system/bumblebeed.service; enabled)
Active: active (running) since Mon, 19 Mar 2012 10:17:10 +0000; 5h 58min ago
Main PID: 1158 (bumblebeed)
CGroup: name=systemd:/system/bumblebeed.service
└ 1158 /usr/sbin/bumblebeed –config /etc/bumblebee/bumblebee.conf
But in X.org.8.log I get :
snip
[ 163.215] (II) NOUVEAU driver
[ 163.215] (II) NOUVEAU driver for NVIDIA chipset families :
[ 163.215] RIVA TNT (NV04)
[ 163.215] RIVA TNT2 (NV05)
[ 163.215] GeForce 256 (NV10)
[ 163.215] GeForce 2 (NV11, NV15)
[ 163.215] GeForce 4MX (NV17, NV18)
[ 163.215] GeForce 3 (NV20)
[ 163.215] GeForce 4Ti (NV25, NV28)
[ 163.215] GeForce FX (NV3x)
[ 163.215] GeForce 6 (NV4x)
[ 163.215] GeForce 7 (G7x)
[ 163.215] GeForce 8 (G8x)
[ 163.215] GeForce GTX 200 (NVA0)
[ 163.215] GeForce GTX 400 (NVC0)
[ 163.215] (–) using VT number 1
snip
[ 163.324] (EE) [drm] failed to open device
[ 163.324] (EE) No devices detected.
[ 163.324]
Fatal server error:
[ 163.324] no screens found
[ 163.324]
Please consult the Fedora Project support
at http://wiki.x.org
# xrandr
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192
LVDS1 connected 1920×1080+0+0 (normal left inverted right x axis y axis) 344mm x 193mm
1920×1080 60.0*+ 40.0
1400×1050 60.0
1280×1024 60.0
1280×960 60.0
1024×768 60.0
800×600 60.3 56.2
640×480 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)
# optirun glxgears
[ERROR]Cannot access secondary GPU – error: [XORG] (EE) [drm] failed to open device
[ERROR]Aborting because fallback start is disabled.
Any help to identify what I’m doing wrong will be much appreciated.
Regards
Rifter
what is the ouput of the command
lspci -vnnn | grep -i vga
# lspci -vnnn | grep -i vga
00:02.0 VGA compatible controller [0300]: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller [8086:0126] (rev 09) (prog-if 00 [VGA controller])
01:00.0 VGA compatible controller [0300]: nVidia Corporation Device [10de:0df5] (rev a1) (prog-if 00 [VGA controller])
The intel card is driving the laptop display, but I get no output on the attached monitor on the HDMI port. Both the i915 and nouveau kernel modules are loaded by default :
# lsmod | grep i915
i915 452930 5
drm_kms_helper 40141 2 i915,nouveau
drm 226004 8 i915,nouveau,ttm,drm_kms_helper
i2c_algo_bit 13156 2 i915,nouveau
i2c_core 37955 7 videodev,i2c_i801,i915,nouveau,drm_kms_helper,drm,i2c_algo_bit
video 18932 2 i915,nouveau
# lsmod | grep nouveau
nouveau 763111 0
ttm 68749 1 nouveau
drm_kms_helper 40141 2 i915,nouveau
drm 226004 8 i915,nouveau,ttm,drm_kms_helper
i2c_algo_bit 13156 2 i915,nouveau
i2c_core 37955 7 videodev,i2c_i801,i915,nouveau,drm_kms_helper,drm,i2c_algo_bit
mxm_wmi 12823 1 nouveau
video 18932 2 i915,nouveau
Any ideas? TIA
I have not tried wI would point to nouveau wiki and in particular here:
http://nouveau.freedesktop.org/wiki/TroubleShooting#Xorg_fails_to_start_with_.22.28EE.29_.5Bdrm.5D_failed_to_open_device.22
Possibly you have
nouveau.modeset=0
in /etc/grub2.cfg and/or /etc/default/grub
or set inside modprobe.d directory?
What is the ouput of
cat /proc/cmdline
If this is the case, change parameters accordingly.
Also, to see how a module has been loaded, you can install sysfsutils and run systool command.
(note to run as root or via sudo otherwise the command works but gives incomplete output…)
For example, for my i915 kernel module:
$ sudo systool -v -m i915
Module = “i915”
Attributes:
initstate = “live”
refcnt = “4”
uevent =
Parameters:
enable_hangcheck = “Y”
fbpercrtc = “0”
i915_enable_fbc = “1”
i915_enable_rc6 = “1”
lvds_downclock = “0”
lvds_use_ssc = “-1”
modeset = “-1”
panel_ignore_lid = “0”
powersave = “1”
reset = “Y”
semaphores = “-1”
vbt_sdvo_panel_type = “-1”
Sections:
….
You can do the same for nouveau
I still can’t get dual monitor on my intel/nvidia optimus laptop (Dell XPS 15z) using i915 and nouveau.
If the Intel card is driving the laptop display, and I want the nvidia card to drive an external monitor on the HDMI port, then do I need to change the settings in :
# cat /etc/bumblebee/xorg.conf.nouveau
Section “ServerLayout”
Identifier “Layout0”
Screen “Screen0”
Option “AutoAddDevices” “false”
EndSection
Section “Device”
Identifier “Device0”
Driver “nouveau”
EndSection
Section “Screen”
Identifier “Screen0”
Device “Device0”
EndSection
Should those say Screen1, Device1 etc?
Thanks in advance, I’m not much clued up about X.
hello
when i try to run optirun glxgears i have this error
# optirun glxgears
[ERROR]Error running “vglrun”: No such file or directory
any ideas
1. Do not run optirun as root if it’s not necessary for the program to be executed. 2. install virtualgl
when i run with my user throw this
$ optirun glxgears
[ERROR]The Bumblebee daemon has not been started yet or the socket path /var/run/bumblebee.socket was incorrect.
[ERROR]Could not connect to bumblebee daemon – is it running?
dmesg
[ 198.794100] bumblebeed[2432]: [ERROR]Invalid configuration: no driver configured.
[ 258.806676] bumblebeed[2441]: [ERROR]Invalid configuration: no driver configured.
[ 318.815842] bumblebeed[2502]: [ERROR]Invalid configuration: no driver configured.
[ 378.838332] bumblebeed[2508]: [ERROR]Invalid configuration: no driver configured.
[ 438.854272] bumblebeed[2517]: [ERROR]Invalid configuration: no driver configured.
[ 498.868460] bumblebeed[2615]: [ERROR]Invalid configuration: no driver configured.
[ 559.103316] bumblebeed[2625]: [INFO]/usr/sbin/bumblebeed 3.0 started
so i think is the nvidia driver
Ok everything works, but the intel driver dont work property, my system is in Fallback,
how can I install the driver for the intel and dont unconfigure the nvidia driver
thanks
Both intel and nvidia drivers worked for me with bumblebee on Fedora 16 (with occasional gnome-shell crashes and gnome menus not always responding to clicks) until I upgraded to kernel 3.3 today, after that gnome loaded only in fallback mode. Here’s the forced dirty fix that completely separates intel and nvidia stuff for main and bumblebee screens respectively. Note that it moves files originating from RPMs around, so repeating the fix will likely be required after next yum update. Here’s how it goes (under sudo):
1 “rm /etc/ld.so.conf.d/nvidia-lib64.conf; ldconfig” so that programs stop linking with nvidia libGL
2 “mv /usr/lib64/xorg/modules/extensions/nvidia /usr/lib64/xorg” so that Xorg on intel stops finding nvidia modules
3 in /etc/bumblebee/bumblebee.conf set “LibraryPath=/usr/lib64/nvidia” so that programs under optirun will link with nvidia libGL
4 in /etc/bumblebee/xorg.conf.nvidia change ModulePath from “/usr/lib64/xorg/modules/extensions/nvidia” (set per instructions above) to “/usr/lib64/xorg/nvidia” so that X on nvidia will find nvidia modules
5 reboot
Thanks
Work Perfectly
THANK YOU!
I’m pretty new at this (Linux + nVidia) and I was afraid to break my whole PC ’cause a bad install, but you helped me to solve it =D
Everything was installed fine and “optirun glxgears” worked too but I couldn’t start the Gnome Shell in no-fallback mode.
Again, thank you!
@The author: Thank you for this guide, it’s awesome =)
PS: Maybe it’d be a good idea update the guide with the info provided by Tomash Brechko, and also put a note about the glib2-devel and libX11-devel are required =)
You’re welcome. I have no problems with gnome just a menu flickering but is not annoying. Required development libs depends on Fedora installation.
Please can you tell me if I need to remove this file ‘ldconfig’. You included it on the first line after semicolon. Not sure, if u made a mistake or I have to remove it. Thanks
no. ; is a command separator in linux shell.
After following the instructions I am unable to get optirun to function correctly. Also, the Gnome menu becomes unresponsive.
What are the backout procedures, to restore my system to the state immediately before following this ?
Everything works fine for me for hardware and software specified in article and with latest FC16 updates installed. Gnome menus highlight flickers a little bit, but is not annoying. In order to restore original state, rename instead of remove and restore original configuration in the reverse order.
I’m sorry, I’m not sure what you mean by “rename instead of remove and restore original configuration in the reverse order.”
Could you be a bit more explicit, please.
Asus K53S here with geforce 610M and updated fedora 16; after following your guide everything is working as expected: thank you. Some minor notes: 1. you miss the file name in step 6 second paragraph; 2. when telling to add the Section Screen to xorg.conf.nvidia, please note that, in bumblebee 3.0 source, it is already there; 3. i had to copy the dkms.conf of the bbswitch package from dkms directory to the root, or dkms will not find it
so you don’t add section screen like is mentioned in tutorial?
Yep, but just because I found it already there; after updating to kernel 3.3, I also had to follow Tomash Brechko suggestions in his comment above, to separate linking to libGL* from nvidia for non-nvidia X server.
It seams that there is a mistake:
$optirun glxgears
X Error of failed request: BadWindow (invalid Window parameter)
Major opcode of failed request: 137 (NV-GLX)
Minor opcode of failed request: 4 ()
Resource id in failed request: 0x200002
Serial number of failed request: 38
Current serial number in output stream: 38
check your X logs to see where is your problem.
wich log?
Xorg.8.log
>Edit /lib/systemd/system line 7 to read:
>
>ExecStart=/usr/sbin/bumblebeed –config /etc/bumblebee/bumblebee.conf
This doesn’t make sense since that’s a directory. Seems there’s a filename missing, no?
Thx. Updated post. Of course the file is the one just copied before bumblebeed.service.
Hey, I converged to what Tomash Brechko said.
In French here : http://forums.fedora-fr.org/viewtopic.php?pid=497509#p497509
I did “mv /usr/lib64/xorg/modules/extensions/nvidia /usr/lib64/nvidia/nvidia” and modified bumblebee.conf accordingly. Works fine. Suspend, hibernate, lid close/open work well.
Indeed, for some reason, while it should only look into /usr/lib64/xorg/modules/extensions, xorg recurses down into the nvidia subdirectory while loading modules and finds nvidias libdri.so. The issue is that on startup my XPS 15z laptop starts on Intel. Loading nvidia’s dri module for the intel chip fails and gnome-shell starts up in fallback-mode. Moving that directory out of xorg’s way makes it load intel’s libdri.so and friends.
I guess that on some systems it is the opposite, the computer boots on nvidia but loading intel dri on nvidia chip == bad.
It looks like the Optimus thingy is something that Xorg didn’t expect. I hope that this gets smoothed out soon.
Updated article with the fix proposed by Tomash Brechko. Thanks for the feedback.
Thank you very much for the comprehensive article and useful thread. I’ve tried out the solution on my Lenovo W520 that comes with NVidia Optimus chip and successfully got optirun to function on the same laptop LCD. Would I need to do something more to have the capability to set up Twin View in Fedora 16 so that I can have both the LCD and an external monitor (connected via the VGA connector) to work?
I have a monitor on vga port and is working just fine. Nothing special to do except usual configuration in fedora system settings > displays. The trick will be to enable hdmi port which is connected to nvidia card.
Thank you, duxyng, it sounds like I may have missed out something here. With the external monitor plugged into the VGA port, I would expect to see it in the System Settings->Displays but I don’t, i.e. I only see the LCD! You mention about enabling the HDMI port (which is connected to nvidia card). May be that is the missing link, but my google on the item return empty. Would you be so kind as to describe how would I go about enabling the HDMI port, please?
I wish I can tell you. I’m using VGA for now.
Do you happen to see both i915 & nouveau drivers loaded? On my W520, lsmod would only returns i915!!! I did try to force nouveau via means of ‘modprobe nouveau’ once the system is up and running and I then can see both entries but my external display is still being ignored! What should I look for further, thanks?
All I need for now is to be able to extend my system to the external display!
Several things that I consistently notice on my system (reinstalled several times!): Although I could get optirun glxgears to run AFTER following the instructions here, I no longer see the module nouveau any more! I.e.
lsmod | grep nouveau returns nothing whereas I still see the i915 entry:
$ lsmod | grep i915
i915 466809 3
drm_kms_helper 40231 1 i915
drm 242003 5 ttm,i915,drm_kms_helper
i2c_algo_bit 13156 1 i915
i2c_core 37991 6 videodev,i2c_i801,i915,drm_kms_helper,drm,i2c_algo_bit
video 18932 1 i915
Furthermore,
$ xrandr
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192
LVDS1 connected 1920×1080+0+0 (normal left inverted right x axis y axis) 344mm x 193mm
1920×1080 60.0*+ 50.0
1400×1050 60.0
1280×1024 60.0
1280×960 60.0
1024×768 60.0
800×600 60.3 56.2
640×480 59.9
VGA1 disconnected (normal left inverted right x axis y axis)
From the above output, I would assume that the VGA1 is my external monitor…. hence I tried
$ xrandr –output VGA1 –auto –right-of LVDS1
no cigars!
I also notice in the /var/log/messages that the discrete graphics adapter would only be enabled if I run ‘optirun glxgears’ and it would be terminated as soon as I exit from optirun by bbswitch
My problem determination (in my limited experience) is now narrowed down to:
1. Should the system (Fedora 16) need to run in nouveau mode as to be able to drive the external monitor (connected via the VGA connector)? My intepretation currently compel me that’s the case, i.e. the external monitor cannot be driven by the Intel integrated graphics. In other words, it seems to me that the NVIDIA driver should be involved, right? Well, I do not see that in my configuration… yes, I did follow the addendum related to Tomash Brechko’s comments.
2. Interestingly, prior to setting up bumblebee, bbswitch etc. I do see the nouveau entry in lsmod and I do see the second monitor displaying Fedora’s ‘f’ logo, albeit I cannot extend my display to it.
Please do try to give me some hints, I am more than happy to provide any other information that I may have missed. Thanks.
Answer to 1.
Actually it is the contrary: IGP (aka intel gpu) is always active, while the discrete graphic card could or could not be actvated.
See for example optimus described at page 14 in this white paper:
http://www.nvidia.com/object/LO_optimus_whitepapers.html
”
As soon as applications that can benefit from the power of the GPU are invoked, like watching Flash video, gaming, or converting video from one format to another using CUDA, Optimus instantly enables the GPU. As shown in the figure above, the GPU handles all processing duties and the IGP is only used as a display controller to render the GPU‟s output to the display.
”
So from a linux kernel modules point of view, intel has to be always active, bbswitch takes care of eanbling/disabling nouveau (or proprietary nvidia) kernel modules.
Hi,
I have been follow all the process but at the end when I try to start the service I am gotting the error below and I have no idea what I can do to fix:
# systemctl enable bumblebeed.service
# systemctl start bumblebeed.service
Failed to get D-Bus connection: Failed to connect to socket /org/freedesktop/systemd1/private: Connection refused
Could someone please help me?
HI GUYS!
I have created an automated script for you, to install bumblebee service.
it just make what this tutorial is saying.
you can DOWNLOAD it here: http://www.prescott.ic.cz/bumblebee-script/bumblebee-script.sh
NOTE: it uses only nouvea driver, because i (and many of you) get no working with proprietary nvidia driver.
i hope it will helps many of you and it will works ok, of course =)
ENJOY!
Thank you Dusan. When you mention that you would only use the nouveau driver, does that means you don’t use akmod-nvidia? Or do you mean, you use akmod-nvidia but you would set “nouveau.modeset=0 rd.driver.blacklist=nouveau”?
my script DONT USE akmod-nvidia…they simply compile and install and start bumblebee service and all needed dependecies needed-like bbswitch….
Thank you Dusan for your response… what you have mentioned makes sense in regard to your script. Just to make sure I understand you, the configuration generated by your script would be able to drive both the internal and external displays? Since the displays are driven by nouveau without nvidia driver, would that effect performance, e.g. Gianluca seems to indicate a noticeable latency and sluggishness?
If it could help, my first experience with F17 is quite better in respect of nouveau usability.
Probably I forgot to mention that the sluggish was more a show stopper when connecting an external monitor. Using only the laptop was not so bad experience.
Now with F17 the hw environment is the same used with F16: Asus U36SD laptop and vga connected philips monitor 190B.
First time I connect the external monitor it appears only as wallpaper without being able to use it (mouse not able to move inside it).
Then with system settings –> displays I configure the external monitor above the laptop lcd (you can also drag the top bar inside the lcd image to the upper side of the external monitor: it is not so intuitive…).
It works ok for now, especially in firefox and evolution that were the two applications where I noticed the worse sluggish with F16 and external monitor.
During the week end I’m going to try hdmi too, connected to a Panasonic 37″ lcd tv.
for me is all working ok, external hdmi display too…anyway, i just want to disable nvidia graphics for more battery life 🙂 intel HD is just enough for me, for daily usage….have somebody tested my script? it is working for you?
Dusan
Thanks Dusan for the Script…I confirm it worked for me like a charm…Asus U36SD….
So far the easiest way to install by your script….
Looking forward to have a script using proprietary nvidia driver.
Right-o, Basically, if you follow this to the absolute letter (all of it, and the bit on seperating the intel and nvidia drivers), and update your bios to the latest version, I can confirm this works on the ASUS K52JC with 310M… Which is rather miraculous given the K52JC does not come with anything telling you Optimus is built into the hardware. It just is.
Update for F17: I’m succesfully testing for now with nouveau+intel on it.
Software updates changes in repsect of F16, apart from OS:
bbswitch-0.4.2.tar.gz (it was 0.4.1)
VirtualGL-2.3.1.x86_64.rpm (it was 2.3)
nouveau kernel module successfully activates/deactivates on my Asus U36SD laptop
$ glxgears
Running synchronized to the vertical refresh. The framerate should be
approximately the same as the monitor refresh rate.
300 frames in 5.0 seconds = 59.863 FPS
300 frames in 5.0 seconds = 59.826 FPS
300 frames in 5.0 seconds = 59.818 FPS
$ optirun glxgears
580 frames in 5.0 seconds = 115.990 FPS
599 frames in 5.0 seconds = 119.797 FPS
585 frames in 5.0 seconds = 116.996 FPS
I’m going to test nouveau for some days before eventually switch to nvidia.
In F16 I had to switch because using an external VGA connected monitor was not very usable in terms of latencies and scattering isnide browser windows.
Let’s see if there were any improvements.
Gianluca
Hello,
optirun glxgears runs with 2000 frames in 5 seconds,
but when I install Cg (the nvidia Cg Toolkit), it freezes my computer,
when I run optirun glxgears.
Plueschinger
Hello,
I forgot, my computer is called “Medion Akoya P6624,
the grafic card is a “NVIDIA® GeForce® GT 425M”
and I have Fedora 17, but the problem existed already with Fedora 16,
the computer works with 32 bits and has an intel core i3 processor (4 processors),
but it should work also with 64 bit. I have 2 windows recovery CD’s, one for 32 bit and one for 64 bit.
Regards
Plueschinger
Hello,
the kernel made this problem. With kernel-3.3.7-1.fc17 it freezes my laptop immediately with installed Cg. With kernel-3.4.0-1.fc17 optirun glxgears freezes my computer after 1 minute.
But with kernel-3.4.2-4.fc17 everything is o.k. I testet optirun glxgears one hour, and I still
can use my touchpad.
Regards
Plueschinger
Thanks, it works 🙂
I managet it on Fedor 17 using native driver.
My computer is Dell Inspiron i5 with Nvidia GT525M
The framerate is:
$ glxgears
Running synchronized to the vertical refresh. The framerate should be
approximately the same as the monitor refresh rate.
303 frames in 5.0 seconds = 60.490 FPS
302 frames in 5.0 seconds = 60.266 FPS
302 frames in 5.0 seconds = 60.273 FPS
$ optirun -c jpeg glxgears
4957 frames in 5.0 seconds = 991.164 FPS
5166 frames in 5.0 seconds = 1033.101 FPS
5392 frames in 5.0 seconds = 1078.213 FPS
Hello,
it seems that with latest update to kernel 3.4.0-1.fc17.x86_64 I’m unable to use secondary GPU.
This is true for my Asus U36SD laptop with GT 520M, so pay attention
$ sudo optirun glxgears
[ERROR]Cannot access secondary GPU – error: [XORG] (EE) [drm] failed to open device
[ERROR]Aborting because fallback start is disabled.
Also, the secondary GPU is not offloaded and so power consumption is suboptimal:
$ lspci -v | grep -i vga
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09) (prog-if 00 [VGA controller])
01:00.0 VGA compatible controller: nVidia Corporation Device 1050 (rev a1) (prog-if 00 [VGA controller])
I’m using nouveau and current kernel modules loaded are:
$ lsmod|egrep “nouve|i915”
i915 472032 3
nouveau 799637 0
mxm_wmi 12823 1 nouveau
wmi 18697 3 mxm_wmi,nouveau,asus_wmi
video 18935 2 i915,nouveau
i2c_algo_bit 13257 2 i915,nouveau
drm_kms_helper 40411 2 i915,nouveau
ttm 79760 1 nouveau
drm 244591 6 ttm,i915,drm_kms_helper,nouveau
i2c_core 38028 7 drm,i915,i2c_i801,drm_kms_helper,i2c_algo_bit,nouveau,videodev
Previous updates from kernel-3.3.4-5.fc17.x86_64 to kernel-3.3.7-1.fc17.x86_64 were ok, so probably it is something related with 3.4?
Anyone using proprietary nvidia drivers or nouveau successfully updated to latest F17 kernel?
Gianluca
It seems that there is a bug in kernel 3.4 related to passing PCI devices in D3 state and this impacts switching on/off the discrete gpu. I opened this bugzilla in the mean time:
https://bugzilla.redhat.com/show_bug.cgi?id=831136
Thanks a lot is working for me on Fedora 17 🙂
Does Bumblebee runs with kmod instead of akmod?
of course.
I have problem, after all of this steps, screen is inverted on KDE in normal sesion.
Could You tell me how to fix it, please??
I have the same problem, but i started KDE in safe mode and the desktop looks normal now
I solved the problem by just reinstalling akmod
I didn’t want to use safe mode, so I checked all of again, and i realized that I missed part what start from words “Nvidia modules path fix (Thanks to Tomash Brechko)” and now it is ok.
but it is not last of my problems…
when i use this guide http://ubuntuforums.org/showthread.php?t=1722306
it’s not working for me ;/
On Number 6, Installing bumblebee. I tried to call ./configure but file was not in directory error occured. After googling, I typed ‘autoreconf -fi’ before ./configure and then it worked.
It is in archive.
where is this archive you speak of i cant get past step 6 installing bumblebee becase the ./configure was not in directory
It is where you downloaded bumblebee-3.0.tar.gz on step 1.
Thanks a lot for the tutorial! I have an ASUS K53SV with GT540M (wrongly reported as GT555M by lspci) and Fedora 17 installed. The hdmi works out of the box even without bumblebee. I have the nouveau drivers loaded by default. As mentioned by Gianluca there’s a problem wth the latest kernel: 3.4.3-1.fc17.i686 while offloading the discrete card and running optirun. Anyway, my real issue is using an external monitor: it usually shakes a lot, after a while it hurts my eyes. I noticed this behaviour:
1) when I disconnect the powercable, with discrete OFF => perfect
2) when I disconnect the powercable, with discrete ON => shakes a little
3) when I connect the powercable, with discerete OFF => it shakes a lot
4) when I connect the powercable, with discerete ON => it shakes a lot
Someone suggested to try removing the grounding from my power cable, but that doesn’t make sense since I have problems even without power and discrete ON. I don’t really need the discrete card, I’m just playing around with bumblebee to see if I can solve this big issue. If I only had a simple BIOS switch to turn it off!!! Any idea?
Thanks in advance!
Great job ! at least I may be able to have graphic acceleration on my Packard Bell…
Now I still have questions:
1/ Do I really need be in 64bit ? 32 will not work ?
2/ Is there a way to have always the nvidia on ? I m mostly using my latop at home, with power plug.
3/ In fact, graphic acceleration is nice, but i just wanted to do some CUDA programming…is Bumblebee the way to go ?
Thanks!
1. 32/64 bits depends on your installed OS. Check with ‘uname -a’ to see if you have 32 bit – i386 or 64 bit – x86_64.
2. I don’t found it yet.
3. somebody said something about some libs that needs to be installed.
Im definitly in 32bits. I was just asking because the tutorial states it applies for “Fedora 16 64bit with latest updates”…thank you for the answers – I’ll continue google around 🙂
Worked fine on Fedora 17 64bits ! Thank you very much for this HOW-TO! see ya
thanks bro. its working on fedora 17 32bit. 😀
[…] downloaded the akmod-nvidia driver, and modified the bumblebee configuration files according to this guide. I also experimented a lot with different xorg.conf files (using intel or nvidia drivers, defining […]
There are users that successfully configured Nvidia Optimus using this guide. Follow the steps and see where you missed something.
Well, all works but Gnome 3 is slow and flickering.
Is there a solution to this problem? I’ve got a Geforce GT420M on Intel Core i5 M 480
Framerate :
$ glxgears
1192 frames in 5.0 seconds = 238.358 FPS
1173 frames in 5.0 seconds = 234.507 FPS
1223 frames in 5.0 seconds = 244.560 FPS
1202 frames in 5.0 seconds = 240.326 FPS
$ optirun -c jpeg glxgears
3457 frames in 5.0 seconds = 691.383 FPS
3423 frames in 5.0 seconds = 684.470 FPS
3508 frames in 5.0 seconds = 701.559 FPS
See the last part of the article “Nvidia libs path fix”.
Well,i’ve done that, before doing the nvidia libs path fix i got in Gnome 3 FallBack mode, after the fix i got Gnome 3 fully working but it flickers and it’s really slow:
Doing nvidia-settings the GUI alerts me saying that i’m not using NVIDIA Drivers(strange), i launched nvidia-xconfig and then rebooted the X server.
I get “No screens found”. What can i do? I’m sure that everything went fine.
Nvidia card is used on :8 X server not the current one. Optirun is used to run apps on the nvidia card. Xorg :8 server is started by optirun.
So what should i do exactly?
The flickering problem in Gnome is solved by the path fix. Make sure you’ve done it right.
Hi, when I open the Nvidia X Server Settings says : ” You do not appear to be using the NVIDIA X driver. Please edit your X configuration file (just run `nvidia-xconfig` as root), and restart the X server. ” Is everything ok ? I can run fine glxgears and optirun glxgears.
Yes. See comments to similar questions above.
Hi, thanks for the tute now I’m able to have optimus run on Fedora 17. But I still have some trouble running some games like 0 A.D. (I can run the game, click on the menu, but AI characters don’t appear – the entire screen is just black) and Glest (won’t run at all, sez “Your system currently is not capable of hardware accelerated 3D. Therefore glest cannot run.”) Also, why fps gain ain’t that much compared to Intel GPU’s results? ~300 to ~700 fps. Does that have something to do with my crappy processor? They say, optimus performance depends on processor speed. Is that true?
FYI, as suggested by dmesg, I changed “ConnectedMonitor” to “CRT-0” in /etc/bumblebee/xorg.conf.nvidia (for unknown purpose other than to supress the error message ‘cuz optimus/bumblebee just working without that. lol)
Hi. I have used your guide, and after reboot have a trouble. Switching of gpu works fine, but start of nvidia-settings fails every time i use it. I receive a message:
“You do not appear to be using the NVIDIA X driver. Please edit your X configuration file (just run `nvidia-xconfig` as root), and restart the X server.”
I want to use some info from it, so i need help.
please see previous comments.
Damn, I should read thread before posting a new comment)
No, i did everything right. There is no particular answer above
just to say that finally with Fedora 17 and kernel 3.5.0-2.fc17.x86_64 it is the first time after kernel-3.3.7-1.fc17.x86_64 where optimus and nouveau work again, possibly due to 3.5 upstream changes.
Gianluca
Hey after I update to kernel 3.5 and Nvidia drivers 304 and reboot, I have no screen after fedora logo is loading, I get the message:[Failed] Failed to start Wait for plymouth Boot screen to quit.
Do you have any idea ?
After update to kernel 3.5 and Nvidia drivers 304 I have no screen, and a message says ” [Failed] Failed to start for Plymouth Boot Screen to quit ” How to fix that ?
Hi Guys,
When I try to optirun glxgears, dmesg showed bumblebeed [ 12871 ] : [ERROR]Module ‘nvidia’ is not found. Do you have any ideas?
Regards,
zarl99
Please see updated article with bumblebee 3.0.1 update and nvidia path fix included. Tested on F17 with 3.5.0-2.fc17.x86_64 kernel and works fine.
Hi duxyng,
Today I’m successfully can run the glxgears. But when issue the command
optirun glxgears
Error: couldn’t get an RGB, Double-buffered visual
May I know where should head for this issue?
Regards,
zarl99
Fixed. Thanks Gianluca!!
Added line in /etc/bumblebee/bumblebee.conf
LibraryPath=/usr/lib64/nvidia:/usr/lib64/xorg/nvidia
XorgModulePath=/usr/lib64/xorg/nvidia,/usr/lib64/xorg/modules/drivers,/usr/lib64/xorg/modules
Now I can get it run.
$ optirun glxgears
3682 frames in 5.0 seconds = 736.363 FPS
3976 frames in 5.0 seconds = 795.136 FPS
3672 frames in 5.0 seconds = 734.170 FPS
Anyway, you guys awesome!!
Regards,
zarl99
I added this lines, but still have this error:
Error: couldn’t get an RGB, Double-buffered visual
what can I do more ;/
Hi Przemek,
1.) Did all the pah below can be accessed?
/usr/lib64/nvidia
/usr/lib64/xorg/nvidia
/usr/lib64/xorg/modules/drivers
/usr/lib64/xorg/modules
2.) Did you done backup or rename the /etc/bumblebee/xorg.conf.nvidia ?
zarl99
ad 1.
alll of these path that You said has drwxr-xr-x. rights:
drwxr-xr-x. 3 root root 4096 08-08 16:45 nvidia
drwxr-xr-x. 4 root root 4096 06-22 18:50 xorg
drwxr-xr-x. 6 root root 4096 05-29 01:40 modules
drwxr-xr-x. 2 root root 4096 08-08 16:42 drivers
ad 2.
I’ve reinstalled the bumblebee few days ago, but before reinstall, it hasn’t worked.
Ok, but when I try to move mv /usr/lib64/xorg/modules/extensions/nvidia /usr/lib64/xorg, it says ” Can’t move because it’s not a empty directory “
This could not do any harm. Try to add sudo
rm -rf /usr/lib64/xorg/nvidia before moving.
Will this work for GT555M?
probably yes.
And the result is? Works fine?
It works fine up and until kernel 3.5.4-2, now I’m having significant troubles…
How do you revert all of these changes?
Hi everyone!
Thanks for the comprehensive tutorial and discussion. I have an ASUS-N56V laptop with a GEFORCE GT 650M. After failing loundly to set up properly Bumblebee on Kubuntu 12.04, I gave a shot to my other favorite distribution, Fedora 17. I followed all the steps in the tutorial but I got an error when running glxgears:
$ optirun –debug glxgears
[ 4880.202230] [DEBUG]optirun version 3.0.1 starting…
[ 4880.202287] [DEBUG]Active configuration:
[ 4880.202294] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf
[ 4880.202301] [DEBUG] X display: :8
[ 4880.202307] [DEBUG] LD_LIBRARY_PATH:
[ 4880.202313] [DEBUG] Socket path: /var/run/bumblebee.socket
[ 4880.202319] [DEBUG] VGL Compression: proxy
[ 4882.348153] [INFO]Response: Yes. X is active.
[ 4882.348177] [INFO]Running application through vglrun.
[ 4882.348265] [DEBUG]Process vglrun started, PID 11153.
Error: couldn’t get an RGB, Double-buffered visual
[ 4882.369228] [DEBUG]SIGCHILD received, but wait failed with No child processes
[ 4882.369321] [DEBUG]Socket closed.
[ 4882.369385] [DEBUG]Killing all remaining processes.
and optirun glxinfo:
$ optirun –debug glxinfo
[ 5043.734703] [DEBUG]optirun version 3.0.1 starting…
[ 5043.734763] [DEBUG]Active configuration:
[ 5043.734771] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf
[ 5043.734777] [DEBUG] X display: :8
[ 5043.734783] [DEBUG] LD_LIBRARY_PATH:
[ 5043.734789] [DEBUG] Socket path: /var/run/bumblebee.socket
[ 5043.734795] [DEBUG] VGL Compression: proxy
[ 5045.867160] [INFO]Response: Yes. X is active.
[ 5045.867173] [INFO]Running application through vglrun.
[ 5045.867267] [DEBUG]Process vglrun started, PID 11176.
name of display: :0
Error: couldn’t find RGB GLX visual or fbconfig
[VGL] ERROR: in glXGetConfig–
[VGL] 908: Could not obtain Pbuffer-capable RGB visual on the server
[ 5045.940100] [DEBUG]SIGCHILD received, but wait failed with No child processes
[ 5045.940126] [DEBUG]Socket closed.
[ 5045.940139] [DEBUG]Killing all remaining processes.
and finally vlc player:
$ optirun –debug vlc
[ 5087.927916] [DEBUG]optirun version 3.0.1 starting…
[ 5087.927975] [DEBUG]Active configuration:
[ 5087.927982] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf
[ 5087.927989] [DEBUG] X display: :8
[ 5087.927995] [DEBUG] LD_LIBRARY_PATH:
[ 5087.928017] [DEBUG] Socket path: /var/run/bumblebee.socket
[ 5087.928024] [DEBUG] VGL Compression: proxy
[ 5090.020284] [INFO]Response: Yes. X is active.
[ 5090.020317] [INFO]Running application through vglrun.
[ 5090.020428] [DEBUG]Process vglrun started, PID 11194.
VLC media player 2.0.3 Twoflower (revision 2.0.2-93-g77aa89e)
[0xaf2738] main interface error: no suitable interface module
[0xa21128] main libvlc error: interface “globalhotkeys,none” initialization failed
[0xa21128] main libvlc: Running vlc with the default interface. Use ‘cvlc’ to use vlc without interface.
Despite the error message, vlc window opened.
I also insalled CUDA as described at http://fedoraproject.org/wiki/Cuda and when I tried to test it I got :
$ ~/NVIDIA_GPU_Computing_SDK/C/bin/linux/release/./fluidsGL
[fluidsGL] starting…
[fluidsGL] – [OpenGL/CUDA simulation] starting…
OpenGL device is Available
fluidsGL.cpp(416) : CUDA Runtime API error 35: CUDA driver version is insufficient for CUDA runtime version.
Can anyone suggest any solution please? I ‘ve wasted a lot of time experimenting with the drivers, so much that I am on the verge of installing Windows in order to run my programs with CUDA acceleration.
Thanks in advance,
Tom
I have had the same problem… It is due to a problem finding libraries and/or modules…
zarl99 gave the answer for this problem some messages above
“Added line in /etc/bumblebee/bumblebee.conf
LibraryPath=/usr/lib64/nvidia:/usr/lib64/xorg/nvidia
XorgModulePath=/usr/lib64/xorg/nvidia,/usr/lib64/xorg/modules/drivers,/usr/lib64/xorg/modules”
@Justino
You were right, but I also had to add “/usr/lib64/xorg/modules/extensions/” in /etc/bumblebee/bumblebee.conf:
“XorgModulePath=/usr/lib64/xorg/nvidia,/usr/lib64/xorg/modules/drivers,/usr/lib64/xorg/modules,/usr/lib64/xorg/modules/extensions/”
@duxyng
It will also be useful to add at the begining of the article the following lines, because some modules were not at the default repositories (if I remember correctly):
“sudo yum localinstall –nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm
sudo yum localinstall –nogpgcheck http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm“
Rpmfusion repository is the first thing to install on new fedora installation.
And one more detail for the googlers: my GPU is GeForce GT 650M and I managed to run my programs with CUDA accelleration thanks to this article!
optirun glxgears
[ 8385.401781] [ERROR]The Bumblebee daemon has not been started yet or the socket path /var/run/bumblebee.socket was incorrect.
[ 8385.401868] [ERROR]Could not connect to bumblebee daemon – is it running?
when executing dmesg
7423.274794] bumblebeed[6588]: [ 7425.466850] [ERROR]Module ‘nvidia’ is not found.
[ 7483.301026] bumblebeed[6597]: [ 7485.512203] [ERROR]Module ‘nvidia’ is not found.
[ 7543.330583] bumblebeed[6623]: [ 7545.560930] [ERROR]Module ‘nvidia’ is not found.
[ 7603.351803] bumblebeed[6639]: [ 7605.601240] [ERROR]Module ‘nvidia’ is not found.
[ 7663.362640] bumblebeed[6650]: [ 7665.631254] [ERROR]Module ‘nvidia’ is not found.
Regards,
Andrés
make sure you have nvidia module installed.
Im a newb on this, chan u explain me all the steps.
all the steps are in the article
Hi everyone,
I am trying to run a molecular visualization software (UCSF Chimera), it opens the main window and after 2 seconds it crashes with the following error messages:
$ optirun –debug ./bin/chimera
[18180.513653] [DEBUG]optirun version 3.0.1 starting…
[18180.514638] [DEBUG]Active configuration:
[18180.514642] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf
[18180.514646] [DEBUG] X display: :8
[18180.514650] [DEBUG] LD_LIBRARY_PATH: /usr/lib64/nvidia:/usr/lib64/xorg/nvidia
[18180.514653] [DEBUG] Socket path: /var/run/bumblebee.socket
[18180.514656] [DEBUG] VGL Compression: proxy
[18191.641124] [INFO]Response: Yes. X is active.
[18191.641145] [INFO]Running application through vglrun.
[18191.641242] [DEBUG]Process vglrun started, PID 3339.
Xlib: extension “NV-GLX” missing on display “:0”.
Xlib: extension “NV-GLX” missing on display “:0″.
X Error of failed request: GLXBadCurrentWindow
Major opcode of failed request: 153 (GLX)
Minor opcode of failed request: 5 (X_GLXMakeCurrent)
Serial number of failed request: 1376
Current serial number in output stream: 1376
[18199.687495] [DEBUG]SIGCHILD received, but wait failed with No child processes
[18199.687528] [DEBUG]Socket closed.
[18199.687540] [DEBUG]Killing all remaining processes.
I’ve asked the developers and their answer was:
” This a graphics driver problem. Chimera fails to start because it can’t initialize the OpenGL 3d graphics. Googling nv-glx extension fedora 17 suggests it is a problem with how the nvidia driver is installed. Maybe Chimera is partially getting the software Mesa driver and partially the Nvidia driver. The nv-glx missing warning may not be the actual problem causing Chimera to not start but is probably an indicator of the underlying graphics driver installation problem.”
Does anyone have any idea how I could fix it (e.g. with symbolic links)???
see carefully the last part about nvidia path fix
I did it but still get the same error messages. Btw, there were no /etc/ld.so.conf.d/nvidia-lib64.conf, /usr/lib64/xorg/modules/extensions/nvidia, /usr/lib64/xorg/modules/extensions/nvidia in my system.
Anyone please? Would it be safe to remove the mesa drivers?
$ yum list installed | grep mesa
mesa-dri-drivers.x86_64 8.0.3-3.fc17 @updates
mesa-dri-filesystem.x86_64 8.0.3-3.fc17 @updates
mesa-libGL.x86_64 8.0.3-3.fc17 @updates
mesa-libGL-devel.x86_64 8.0.3-3.fc17 @updates
mesa-libGLU.x86_64 8.0.3-3.fc17 @updates
mesa-libGLU-devel.x86_64 8.0.3-3.fc17 @updates
mesa-libglapi.x86_64 8.0.3-3.fc17 @updates
mesa-libxatracker.x86_64 8.0.3-3.fc17 @updates
On the other hand glxgears and other molecular visualization programs I use work fine with optirun:
$ optirun –debug glxgears
[149198.433819] [DEBUG]optirun version 3.0.1 starting…
[149198.433852] [DEBUG]Active configuration:
[149198.433859] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf
[149198.433864] [DEBUG] X display: :8
[149198.433869] [DEBUG] LD_LIBRARY_PATH: /usr/lib64/nvidia:/usr/lib64/xorg/nvidia
[149198.433873] [DEBUG] Socket path: /var/run/bumblebee.socket
[149198.433878] [DEBUG] VGL Compression: proxy
[149198.534016] [INFO]Response: Yes. X is active.
[149198.534036] [INFO]Running application through vglrun.
[149198.534155] [DEBUG]Process vglrun started, PID 20437.
5918 frames in 5.0 seconds = 1183.466 FPS
6277 frames in 5.0 seconds = 1255.259 FPS
5882 frames in 5.0 seconds = 1176.392 FPS
5815 frames in 5.0 seconds = 1162.963 FPS
6020 frames in 5.0 seconds = 1203.688 FPS
5858 frames in 5.0 seconds = 1171.504 FPS
5616 frames in 5.0 seconds = 1123.154 FPS
thank you very much for your post, but need help in the last step, running “glxgears optirun” I get the following output:
[1176.167986] [ERROR] Can not access secondary GPU – error: [Xorg] (EE) Failed to load module “mouse” (module does not exist, 0)
[1176.168029] [ERROR] Aborting Because fallback start is disabled.
I need help.
So, I did everything and then I was greeted with the fallback desktop… Is there any way to make it go back to the 3D acceleration stuff?
was working fine until i ran an update yesterday.
now im stuck in fallback mode.
rerun commands in step 7 after each kernel & kmod-nvidia update.
what do you think about primus?
Not tested yet. I will let you know…
just tested. seems to be a major improvement. updated article. thanks for sharing.
np.may be it will be better to remove virtualgl than use it and primus together
Would you be able to post a proceedure for downloading, configuring, compiling and running primus? Im on Fedora 16 and cant seem to make it work.
I downloaded this: https://github.com/amonakov/primus/archive/master.zip (doanload as zipfile option)
and when i compiled i got:
$ make
mkdir -p lib
g++ -Wall -g -DBUMBLEBEE_SOCKET=’/var/run/bumblebee.socket’ -DPRIMUS_SYNC=’0′ -DPRIMUS_VERBOSE=’1′ -DPRIMUS_DISPLAY=’:8′ -DPRIMUS_LOAD_GLOBAL=’libglapi.so.0′ -DPRIMUS_libGLa=’/usr/lib64/nvidia/libGL.so.1:/usr/lib64/xorg/nvidia/libglx.so.1′ -DPRIMUS_libGLd=’/usr/$LIB/libGL.so.1′ -fvisibility=hidden -fPIC -shared -Wl,-Bsymbolic -o lib/libGL.so.1 libglfork.cpp -lX11 -lpthread -lrt
libglfork.cpp:848:2: warning: #warning Enabled workarounds for applications demanding more than promised by the OpenGL ABI [-Wcpp]
$ optirun glxgears
3381 frames in 5.0 seconds = 675.906 FPS
3349 frames in 5.0 seconds = 669.750 FPS
3303 frames in 5.0 seconds = 660.539 FPS
$ vblank_mode=0 ./primusrun glxgears
Xlib: extension “NV-GLX” missing on display “:0.0”.
Running synchronized to the vertical refresh. The framerate should be
approximately the same as the monitor refresh rate.
347 frames in 5.3 seconds = 65.100 FPS
300 frames in 5.0 seconds = 59.804 FPS
300 frames in 5.0 seconds = 59.793 FPS
300 frames in 5.0 seconds = 59.809 FPS
Probably you’ve done a kernel upgrade. Please follow step 7, restart bumblebee (sudo systemctl restart bumblebeed.service) and run again form dir where you compiled primus.
After upgrade to Linux Kernel 3.6.7-4.fc17.x86_64 Gnome does not start properly so graphic.
I run step 7, but had no success.
Below security log GDM ( /var/log/gdm/\:0-greeter.log):
———— start ————-
gnome-session-is-accelerated: No hardware 3D support.
gnome-session-check-accelerated: Helper exited with code 256
gnome-session[1181]: WARNING: Session ‘gdm-shell’ runnable check failed: Saiu com o código 1
gdm-simple-greeter[1277]: Gtk-WARNING: Overriding tab label for notebook
gdm-simple-greeter[1277]: Gtk-WARNING: Overriding tab label for notebook
gdm-simple-greeter[1277]: Gtk-WARNING: Overriding tab label for notebook
gdm-simple-greeter[1277]: Gtk-WARNING: Overriding tab label for notebook
gdm-simple-greeter[1277]: Gtk-WARNING: Overriding tab label for notebook
Aviso do gerenciador de janelas: Buggy client sent a _NET_ACTIVE_WINDOW message with a timestamp of 0 for 0xe00007 (Janela de )
Aviso do gerenciador de janelas: meta_window_activate called by a pager with a 0 timestamp; the pager needs to be fixed.
(gnome-settings-daemon:1196): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)’ failed
(gnome-settings-daemon:1196): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)’ failed
———— end ————-
Someone went through this problem and can help me?
After kmod-nvidia upgrade for new kernel remove /etc/X11/xorg.conf and /etc/X11/xorg.conf.d/00-nvidia.conf installed by the rpm. Intel video card usess autoconfiguration.
Hi @duxyng
Every kernel update I do this process. But this last kernel update that process did not work.
I’ve been reviewing other log and found the following:
/var/log/Xorg.0.log
——— start ———-
[[ 33.023] (II) LoadModule: “glx”
[ 33.023] (II) Loading /usr/lib64/xorg/modules/nvidia-304.64/libglx.so
[ 33.024] (EE) Failed to load /usr/lib64/xorg/modules/nvidia-304.64/libglx.so: libnvidia-tls.so.304.64: cannot open shared object file: No such file or directory
[ 33.024] (II) UnloadModule: “glx”
[ 33.024] (II) Unloading glx
[ 33.024] (EE) Failed to load module “glx” (loader failed, 7)
[ 33.025] (II) LoadModule: “vesa”
[ 33.025] (II) Loading /usr/lib64/xorg/modules/drivers/vesa_drv.so
[ 33.025] (II) Module vesa: vendor=”X.Org Foundation”
[ 33.025] compiled for 1.12.0, module version = 2.3.1
[ 33.025] Module class: X.Org Video Driver
[ 33.025] ABI class: X.Org Video Driver, version 12.0
[ 33.025] (II) LoadModule: “modesetting”
[ 33.025] (WW) Warning, couldn’t open module modesetting
[ 33.025] (II) UnloadModule: “modesetting”
[ 33.025] (II) Unloading modesetting
[ 33.025] (EE) Failed to load module “modesetting” (module does not exist, 0)
——— end ———-
I’ve only done exactly what I wrote above and works just fine.
Same problem here. Usually the process works fine but after a recent kernel update (Linux Kernel 3.6.7-4.fc17.x86_64) on fedora 17:
[ 240.157] (II) LoadModule: “glx”
[ 240.173] (II) Loading /usr/lib64/xorg/nvidia/libglx.so
[ 240.201] (EE) Failed to load /usr/lib64/xorg/nvidia/libglx.so: libnvidia-tls.so.304.64: cannot open shared object file: No such file or directory
[ 240.201] (II) UnloadModule: “glx”
[ 240.201] (II) Unloading glx
If I try to do the glxgears :
Error: couldn’t get an RGB, Double-buffered visual
I have the same kernel and works fine.
Actually I don’t think this is a kernel issue, I was checking my yum history and the issue was caused after the update of these packages:
xorg-x11-drv-nvidia-304.64-1.fc17.x86_64
xorg-x11-drv-nvidia-libs-304.64-1.fc17.x86_64
@Edu, @duxyng can you guys check if you have the same version?
I have 304.64-3.fc17.
Hi @djheroez
I have this:
xorg-x11-drv-nvidia-304.64-3.fc17.x86_64
xorg-x11-drv-nvidia-libs-304.64-3.fc17.x86_64
Hi @djheroez
I have this:
xorg-x11-drv-nvidia-304.64-3.fc17.x86_64
xorg-x11-drv-nvidia-libs-304.64-3.fc17.x86_64
Is the version I have. I tried to downgrade the packages without luck. I’m not sure about what the problem is. It seems to be that one library cannot be found. I copied some files from /usr/lib64/nvidia to /usr/lib64/xorg/nvidia but nothing happened, I only have the basic graphics, dont know what is going on.
What version of the package akmod-nvidia do you have?
My version of akmod-nvidia is:
akmod-nvidia-304.64-1.fc17.x86_64
I’ve workearound the error by creating symbolic links in /usr/lib64/xorg/modules/extensions/ for the files:
libnvidia-glcore.so.304.64
libnvidia-tls.so.304.64
Those files are located at:
/usr/lib64/nvidia/tls/libnvidia-tls.so.304.64
/usr/lib64/nvidia/libnvidia-glcore.so.304.64
I have named the symbolic links:
libnvidia-glcore.so
libnvidia-tls.so
So they look like this:
libnvidia-glcore.so -> ../../../nvidia/libnvidia-glcore.so.304.64
libnvidia-tls.so -> ../../../nvidia/tls/libnvidia-tls.so.304.64
Now I have errors with bumblebee when trying to start it:
$ optirun -vv /bin/glxgears
[ 3136.250279] [DEBUG]Reading file: /etc/bumblebee/bumblebee.conf
[ 3136.250516] [INFO]Configured driver: nvidia
[ 3136.374206] [DEBUG]optirun version 3.0.1 starting…
[ 3136.374226] [DEBUG]Active configuration:
[ 3136.374231] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf
[ 3136.374236] [DEBUG] X display: :8
[ 3136.374240] [DEBUG] LD_LIBRARY_PATH:
[ 3136.374244] [DEBUG] Socket path: /var/run/bumblebee.socket
[ 3136.374248] [DEBUG] VGL Compression: proxy
[ 3138.674219] [INFO]Response: No – error: X did not start properly
[ 3138.674235] [ERROR]Cannot access secondary GPU – error: X did not start properly
[ 3138.674240] [DEBUG]Socket closed.
[ 3138.674256] [ERROR]Aborting because fallback start is disabled.
[ 3138.674261] [DEBUG]Killing all remaining processes.
these commands
sudo cp -R /usr/lib64/xorg/modules/extensions/nvidia /usr/lib64/xorg
sudo rm -rf /usr/lib64/xorg/modules/extensions/nvidia
on step #7 are no longer valid since this org-x11-drv-nvidia-304.64-3.fc17.x86_64 version is not provide “/usr/lib64/xorg/modules/extensions/nvidia”, could you change it. thanks
How to completely uninstall:
* bumblebee
* bbswitch
* akmod-nvidia
* VirtualGL
and make a new clean install?
can someone give some tips?
tks
just follow the steps.
After trying eery way i can think of I cant get primus to work even though uptirun works well.
I fullly updated everything:
removed old bbswitch and am now running 0.5, also running bumblebee 3.0.1
installed packages listed below – are there any others that should be installed or looked at?
$ rpm -qa |grep VirtualGL
VirtualGL-2.3.2-20121002.x86_64
VirtualGL-2.3.2-20121002.i386
VirtualGL-debuginfo-2.3.2-20121002.x86_64
$ rpm -qa |grep nvidia
kmod-nvidia-3.6.7-4.fc16.x86_64-304.64-1.fc16.x86_64
nvidia-xconfig-1.0-20.fc16.x86_64
nvidia-settings-1.0-22.fc16.x86_64
xorg-x11-drv-nvidia-304.64-3.fc16.x86_64
akmod-nvidia-304.64-1.fc16.x86_64
xorg-x11-drv-nvidia-libs-304.64-3.fc16.x86_64
$ rpm -qa |grep mesa
mesa-dri-drivers-7.11.2-3.fc16.x86_64
mesa-dri-drivers-dri1-7.11.2-3.fc16.x86_64
mesa-libEGL-devel-7.11.2-3.fc16.x86_64
mesa-libEGL-7.11.2-3.fc16.x86_64
mesa-libGLw-6.5.1-9.fc15.x86_64
mesa-libGL-7.11.2-3.fc16.i686
mesa-libGLES-devel-7.11.2-3.fc16.x86_64
mesa-libGL-devel-7.11.2-3.fc16.x86_64
mesa-libOSMesa-7.11.2-3.fc16.x86_64
mesa-dri-filesystem-7.11.2-3.fc16.i686
mesa-dri-drivers-7.11.2-3.fc16.i686
mesa-libGLES-7.11.2-3.fc16.x86_64
mesa-libGLU-7.11.2-3.fc16.x86_64
mesa-debuginfo-7.11.2-3.fc16.x86_64
mesa-libGL-7.11.2-3.fc16.x86_64
mesa-demos-7.10-5.20101028.fc16.x86_64
mesa-libGLw-debuginfo-6.5.1-9.fc15.x86_64
mesa-dri-filesystem-7.11.2-3.fc16.x86_64
mesa-libOSMesa-devel-7.11.2-3.fc16.x86_64
mesa-demos-debuginfo-7.10-5.20101028.fc16.x86_64
mesa-libGLU-devel-7.11.2-3.fc16.x86_64
mesa-libGLw-devel-6.5.1-9.fc15.x86_64
mesa-libGLU-7.11.2-3.fc16.i686
Any help for my F16 installation would be greatly appreciated: For anyone who has gotten it to work – what were your exact steps to get it working?
##Intel i7 internal video card
$ vblank_mode=0 glxgears
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: default value of option vblank_mode overridden by environment.
24240 frames in 5.0 seconds = 4847.902 FPS
23846 frames in 5.0 seconds = 4769.086 FPS
24608 frames in 5.0 seconds = 4921.437 FPS
### optirun – verified running against optimus GPU (nvidia-settings) (nvidia card clocks up and gets warmer – and dmesg shows card starting up)
$ optirun glxgears
927 frames in 5.0 seconds = 185.291 FPS
984 frames in 5.0 seconds = 196.531 FPS
995 frames in 5.0 seconds = 198.842 FPS
955 frames in 5.0 seconds = 190.843 FPS
oddly when primus cant find the primuslib it gets similar numbers to the intel i7 which indicates to me its falling back to the i7 which is confirmed in the nvidia-settings control panel looking at the gpu temp, clock speed and ram usage – the card is sitting idle. (also dmesg DOESNT show card starting up)
#### primusrun as configured and complied below
$ ./primusrun glxgears
X Error of failed request: BadWindow (invalid Window parameter)
Major opcode of failed request: 137 (NV-GLX)
Minor opcode of failed request: 4 ()
Resource id in failed request: 0x200003
Serial number of failed request: 42
Current serial number in output stream: 42
#####################
#####################
### start ./primus/Makefile
CXX ?= g++
CXXFLAGS ?= -Wall -g
CXXFLAGS += -Werror=missing-declarations
# On multilib systems, this needs to point to distribution-specific library
# subdir like in /usr (lib or lib64 for 64-bit, lib32 or lib for 32-bit)
LIBDIR ?= lib
BUMBLEBEE_SOCKET ?= /var/run/bumblebee.socket
PRIMUS_SYNC ?= 0
PRIMUS_VERBOSE ?= 1
PRIMUS_DISPLAY ?= :8
PRIMUS_LOAD_GLOBAL ?= /usr/lib64/libglapi.so.0
PRIMUS_libGLa ?= /usr/lib64/nvidia/libGL.so.1
PRIMUS_libGLd ?= /usr/lib64/libGL.so.1
CXXFLAGS += -DBUMBLEBEE_SOCKET=’$(BUMBLEBEE_SOCKET)’
CXXFLAGS += -DPRIMUS_SYNC=’$(PRIMUS_SYNC)’
CXXFLAGS += -DPRIMUS_VERBOSE=’$(PRIMUS_VERBOSE)’
CXXFLAGS += -DPRIMUS_DISPLAY=’$(PRIMUS_DISPLAY)’
CXXFLAGS += -DPRIMUS_LOAD_GLOBAL=’$(PRIMUS_LOAD_GLOBAL)’
CXXFLAGS += -DPRIMUS_libGLa=’$(PRIMUS_libGLa)’
CXXFLAGS += -DPRIMUS_libGLd=’$(PRIMUS_libGLd)’
$(LIBDIR)/libGL.so.1: libglfork.cpp
mkdir -p $(LIBDIR)
$(CXX) $(CXXFLAGS) -fvisibility=hidden -fPIC -shared -Wl,-Bsymbolic -o $@ $< -lX11 -lpthread -lrt
#### end ./primus/Makefile
####################
#####################
### start ./primus/primusrun
#!/bin/bash
# Readback-display synchronization method
# 0: no sync, 1: D lags behind one frame, 2: fully synced
# export PRIMUS_SYNC=${PRIMUS_SYNC:-0}
# Verbosity level
# 0: only errors, 1: warnings (default), 2: profiling
# export PRIMUS_VERBOSE=${PRIMUS_VERBOSE:-1}
# Secondary display
# export PRIMUS_DISPLAY=${PRIMUS_DISPLAY:-:8}
# "Accelerating" libGL
# $LIB will be interpreted by the dynamic linker
# export PRIMUS_libGLa=${PRIMUS_libGLa:-'/usr/$LIB/nvidia-bumblebee/libGL.so.1'}
# "Displaying" libGL
# export PRIMUS_libGLd=${PRIMUS_libGLd:-'/usr/$LIB/libGL.so.1'}
# Directory containing primus libGL
PRIMUS_libGL=${PRIMUS_libGL:-$(dirname `readlink -ne $0`)/'lib'}
# On some distributions, e.g. on Gentoo, libnvidia-tls.so is not available
# in default search paths. Add its path manually after the primus library
PRIMUS_libGL=${PRIMUS_libGL}:/usr/lib64/nvidia/
# Mesa drivers need a few symbols to be visible
#export PRIMUS_LOAD_GLOBAL=${PRIMUS_LOAD_GLOBAL:-'libglapi.so.0'}
# Need functions from primus libGL to take precedence
export LD_LIBRARY_PATH=${PRIMUS_libGL}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
# And go!
exec "$@"
I can’t get it to work after kernel upgrade to 3.6.10-2.fc17.x86_64, although I followed every step.
$ optirun glxgears
Xlib: extension “GLX” missing on display “:8”.
Error: couldn’t get an RGB, Double-buffered visual
$ ./primusrun glxgears
Xlib: extension “GLX” missing on display “:0”.
Error: couldn’t get an RGB, Double-buffered visual
Any idea what’s wrong?
same here – 3.6.10 and the latest updates break everything. The guide does not work on a clean install that includes the updates – optirun glxgears works after adding the extended number of paths to /etc/bumblebee/bumblebee.conf but glxgears without optirun does not – “Error: couldn’t get an RGB, Double-buffered visual” – i guess it’s some libGL trouble, since i had it on an old install after i updated it.
it’s the akmod-nvidia that creates problems after the last updates
switch to kmod-nvidia instead of akmod. It is working fine with kmod-nvidia-304.64-1.fc17.5.x86_64 and VirtualGL-2.3.1-20120612.x86_64.
no luck with kmod-nvidia too (clean updated fedora 17 install, followed the guide to the letter, except ‘./configure –prefix=/usr –sysconfdir=/etc ‘ and ‘make’ required sudo).
‘glx gears’ and ‘optirunglxgears’ both give ‘Error: couldn’t get an RGB, Double-buffered visual’
Also, compiz on MATE crashes after the kmod-nvidia install:
Dec 30 11:03:34 samsung7 kernel: [ 67.413150] compiz[1703]: segfault at 38 ip 0000003571a1efbf sp 00007fffa0adcc00 error 4 in libGL.so.1.2[3571a00000+7b000]
Something is terribly wrong after the last updates and i can’t put my finger on it – it’s the fifth day in which i’m reinstalling and trying even random stuff with no luck.
forgot to add details:
samsung series7 chronos intel/nvidia graphics
everything worked fine with kernel 3.6.1-1.fc17.x86_64 and the updates from the beginning of November.
here is what i have in xorg8.log:
[ 227.398] (EE) Failed to load /usr/lib64/xorg/modules/nvidia-304.64/libglx.so: libnvidia-tls.so.304.64: cannot open shared object file: No such file or directory
[ 227.398] (EE) Failed to load module “glx” (loader failed, 7)
[ 227.549] (EE) Failed to load module “mouse” (module does not exist, 0)
[ 227.549] (EE) Failed to load module “kbd” (module does not exist, 0)
[ 227.588] (EE) NVIDIA(0): Failed to initialize the GLX module; please check in your X
[ 227.588] (EE) NVIDIA(0): log file that the GLX module has been loaded in your X
[ 227.588] (EE) NVIDIA(0): server, and that the module is the NVIDIA GLX module. If
[ 227.588] (EE) NVIDIA(0): you continue to encounter problems, Please try
[ 227.588] (EE) NVIDIA(0): reinstalling the NVIDIA driver.
[ 229.371] (EE) Failed to load module “mouse” (module does not exist, 0)
[ 229.371] (EE) No input driver matching `mouse’
[ 229.372] (EE) Failed to load module “kbd” (module does not exist, 0)
[ 229.372] (EE) No input driver matching `kbd’
xorg0.log:
[ 92.873] (EE) Failed to load /usr/lib64/xorg/modules/nvidia-304.64/libglx.so: libnvidia-tls.so.304.64: cannot open shared object file: No such file or directory
[ 92.873] (EE) Failed to load module “glx” (loader failed, 7)
[ 92.876] (EE) Failed to load module “modesetting” (module does not exist, 0)
i guess kmod does play nice with libGL from mesa.
an alternative guide that does not use kmod worked for me: http://brezular.wordpress.com/2012/11/08/bumblebee-nvidia-installation-on-fedora-to-support-nvidia-optimus-technology-under-linux/
I even get 3245 frames with optirun glxgears now, opposed to 1050 before.
*does not
i’ve tried this on step #7:
“sudo cp /usr/lib64/xorg/modules/extensions/* /usr/lib64/xorg/nvidia/”
instead of
“sudo cp -R /usr/lib64/xorg/modules/extensions/nvidia /usr/lib64/xorg”
it seems works if i run “optirun theapp”
CMIIW.
regards,
‘cp /usr/lib64/xorg/modules/extensions/* /usr/lib64/xorg/nvidia/’ is weird (i looked at what is a link to what) but works somehow, thanks – now ‘optirun glxgears’ is ok.
‘glxgeras’ is still not, though – same error. Compiz continues to be borked.
because the xorg-x11-drv-nvidia folder structure has changed on version 3xx.
you can see the difference here,
# version 29x:
http://rpmfind.net//linux/RPM/rpmfusion/nonfree/fedora/updates/testing/15/x86_64/xorg-x11-drv-nvidia-295.59-1.fc15.x86_64.html
# version 3xx:
http://rpmfind.net//linux/RPM/rpmfusion/nonfree/fedora/updates/16/x86_64/xorg-x11-drv-nvidia-304.64-3.fc16.x86_64.html
you can see folder /usr/lib64/xorg/modules/extensions/nvidia is no longer exist on version 3xx. the contents were moved to /usr/lib/nvidia/xorg/.
i’m not sure if there anything else was changed.
CMIIW.
cheers…
*sorry for my bad english… 🙂
I have some problem when i install bumblebee using nvidia driver on fedora 18.
I set Module path to /usr/lib64/nvidia, but optirun not work because /usr/lib64/nvidia/xorg/libglx.so: libnvidia-tls.so.304.64: cannot open shared object file: No such file or directory. So i create a file nvidia-lib64 with path to /usr/lib64/nvidia and well it work, but when i restart, intel driver not work, here my xorg.conf.nvidia http://pastebin.com/AzZ7iTef and my Xorg.8.log
http://pastebin.com/wTiW1L9V, thank any way 😀
Note that on Fedora 18 VirtualGL is in the ‘updates-testing’ repo (version 2.3.2 as of now), and can be installed with
$ sudo yum –enablerepo=updates-testing install VirtualGL
Hi duxyng,
[[more addressed to you than to the page, feel free to remove after reading]]
Since you are maintaining this excellent HOWTO:
1. https://fedoraproject.org/wiki/Bumblebee has a simpler instructions on how to build bbswitch with dkms.
2. instead of editing /etc/bumblebee/xorg.conf.nvidia you may achieve the same by adding
XorgModulePath=/usr/lib64/xorg/modules/drivers/,/usr/lib64/nvidia/xorg/,/usr/lib64/xorg/modules/
to the /etc/bumblebee/bumblebee.conf (replacing empty XorgModulePath=). I think this is how it was supposed to be done.
3. In Fedora 18 NVIDIA modules are no longer in /usr/lib64/xorg/modules/extensions/nvidia but are in /usr/lib64/nvidia/xorg/, so no mv is required.
I hope you’ll find this usefull.
On a side note:
In the last 12 days working like mad I put together https://github.com/kroki/glxoffload . Like Primus, but seems to be faster and avoids Primus’ pitfalls (no thread races and mixing XIDs of different X servers, but perhaps the biggest improvement is transparency to OpenGL calls – requires no explicit function lists, all OpenGL extensions are available to the application). Maybe you’ll find the time to try it.
Kind regards,
Tomash
Thanks, I will add the link.
The link you post is for the nouveau driver, if you want to use nvidia proprietary driver see the link posted by Dusan. I’ve tried it, and it’s work like a charm. 🙂
This HOWTO actually implies that you have already installed NVIDIA driver, and more or less “official” way to do this is with http://rpmfusion.org/Configuration (non-free repo). RPM Fusion releases pre-build packages (called akmod-nvidia) for the driver (almost) as soon as a new kernel package is out, and you’ll also automatically get the new version of the driver itself when it is released.
…to be more exact, akmod will rebuild the driver from sources for the new kernel to be used until new pre-build version is ready.
Can’t believe there’s yet to be a clean, simply and non buggy way to get this damn thing working, the abundance of comments on this page is really telling of how messed Optimus under Linux still is. Linus may have been referring to a whole different issue altogether but his reaction is precisely what nvidia deserve.
Hello I’m actually a recent user of fedora 18 64bit and when I follow the steps, I got a trouble in the fourth (4)…
When I do the command “sudo dkms build -m bbswitch -v 0.5” It’s write :
Error! echo
Your kernel headers for kernel 3.6.10-4.fc18.x86_64 cannot be found at /lib/modules/3.6.10-4.fc18.x86_64/build or /lib/modules/3.6.10-4.fc18.x86_64/source .
I have check if the folders and files exist and I have find it.
I don’t know what do to, pleas help me. 🙂
sorry for my bad english, I hop you have all understand ^^
Install kernel headers with “sudo yum install kernel-devel”.
how do i know it is using the nvidia card and not the intel one?
With optirun/primusrun you can run an app on nvidia card.
yeah i know that, but how can i really know that when i run optirun it is using the nvidia card and not the other one?
Look at the output of `optirun glxinfo | grep string’ vs. plain `glxinfo | grep string’.
Thanks, without optirun:
server glx vendor string: VirtualGL
client glx vendor string: VirtualGL
with optirun:
server glx vendor string: SGI
client glx vendor string: Mesa Project and SGI
I suppose SGI means Im using the NVIDIA card, okok thanks! (:
Why am I receiving this message:
“Error: nConfigOptions (15) does not match the actual number of options in __driConfigOptions (10).”
when running “optirun glxspheres”?
Actually the rendering is slow when I use optirun!
To avoid the need to remove NVIDIA configs that are re-created after RPM updates it is possible to remove the files once and then do
sudo touch /etc/X11/xorg.conf.d/00-nvidia.conf /etc/X11/nvidia-xorg.conf /etc/X11/xorg.conf /etc/ld.so.conf.d/nvidia-lib64.conf
NVIDIA RPMs won’t overwrite existing files and empty configs do not affect the setup.
hi, does anybody knows how to get the hdmi port to work?
thanks!
I`m having an error when I run:
dkms build -m bbswitch -v 0.5
It says:
Error! echo
Your kernel headers for kernel 3.6.10-4.fc18.x86_64 cannot be found at
/lib/modules/3.6.10-4.fc18.x86_64/build or /lib/modules/3.6.10-4.fc18.x86_64/source.
Anyone knows what can I do to fix it?
Thanks!
I tried to install the kernel-headers with: “sudo yum install kernel-devel”. But it says it`s already installed, “nothing to be done”. And it doesn`t solve the problem.
Please see my response to a similar comment.