Finally working Nvidia Optimus on Fedora 16
26 January 2012 121 Comments
Note: This applies to Fedora 16 64bit with latest updates and was tested on Asus K93SV laptop with GT540M GPU (wrongly reported as GT555M by lspci).
1. Get latest bumblebee sources (3.0) from
https://github.com/Bumblebee-Project/Bumblebee/downloads
2. Get latest bbswitch sources (0.4.1)
https://github.com/Bumblebee-Project/bbswitch/downloads
3. Install libbsd-devel if is not already installed and Nvidia drivers
yum install libbsd-devel yum install akmod-nvidia
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.
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.4.1.tar.gz sudo cp -Rv bbswitch-0.4.1 /usr/src sudo dkms add -m bbswitch -v 0.4.1 sudo dkms build -m bbswitch -v 0.4.1 sudo dkms install -m bbswitch -v 0.4.1
5. Download and install latest VirtualGL RPM from here:
http://www.virtualgl.org/DeveloperInfo/PreReleases
6. Compile & install bumblebee
tar xvzf bumblebee-3.0.tar.gz cd bumblebee-3.0 ./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/modules/extensions/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
Here is the output of dmesg succesfull message:
[ 188.463666] bumblebeed[3258]: [INFO]/usr/sbin/bumblebeed 3.0 started [ 188.463783] bbswitch: disabling discrete graphics [ 188.463947] bbswitch: Result of Optimus _DSM call: 11000059 [ 188.474687] pci 0000:01:00.0: power state changed by ACPI to D3 [ 272.960916] SELinux: initialized (dev fuse, type fuse), uses genfs_contexts [ 289.008321] bbswitch: enabling discrete graphics [ 289.532094] pci 0000:01:00.0: power state changed by ACPI to D0 [ 289.532103] pci 0000:01:00.0: power state changed by ACPI to D0 [ 289.532131] pci 0000:01:00.0: restoring config space at offset 0xc (was 0x0, writing 0xf7000000) [ 289.532138] pci 0000:01:00.0: restoring config space at offset 0x9 (was 0x10430b01, writing 0xe001) [ 289.532143] pci 0000:01:00.0: restoring config space at offset 0x7 (was 0x4200000c, writing 0xf000000c) [ 289.532149] pci 0000:01:00.0: restoring config space at offset 0x5 (was 0xc, writing 0xe000000c) [ 289.532153] pci 0000:01:00.0: restoring config space at offset 0x4 (was 0x1000000, writing 0xf6000000) [ 289.532157] pci 0000:01:00.0: restoring config space at offset 0x3 (was 0x0, writing 0x10) [ 289.532162] pci 0000:01:00.0: restoring config space at offset 0x1 (was 0x100003, writing 0x100007) [ 289.532181] pci 0000:01:00.0: power state changed by ACPI to D0 [ 289.532184] pci 0000:01:00.0: power state changed by ACPI to D0 [ 289.532193] pci 0000:01:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16 [ 289.532197] pci 0000:01:00.0: setting latency timer to 64 [ 298.700976] nvidia 0000:01:00.0: power state changed by ACPI to D0 [ 298.700981] nvidia 0000:01:00.0: power state changed by ACPI to D0 [ 298.700989] nvidia 0000:01:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16 [ 298.700997] nvidia 0000:01:00.0: setting latency timer to 64 [ 298.701024] vgaarb: device changed decodes: PCI:0000:01:00.0,olddecodes=none,decodes=none:owns=none [ 298.701130] NVRM: loading NVIDIA UNIX x86_64 Kernel Module 290.10 Wed Nov 16 17:39:29 PST 2011 [ 321.064203] nvidia 0000:01:00.0: PCI INT A disabled [ 321.066495] bbswitch: disabling discrete graphics [ 321.066743] bbswitch: Result of Optimus _DSM call: 11000059 [ 321.077049] pci 0000:01:00.0: Refused to change power state, currently in D0 [ 321.077308] pci 0000:01:00.0: power state changed by ACPI to D3
7. Run applications on Nvidia GPU with optirun
optirun glxgears
Thanks to the developers of Bumblebee Project.
Nvidia modules path fix (Thanks to 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. 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
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…
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.
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
Pingback: Soporte de Nvidia Optimus en Linux (con Bumblebee Project)
“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: 0×200002
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.
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: 0×200002
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
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