Enable hardware-accelerated desktop effects with NVIDIA Optimus/Bumblebee
If you use nvidia-current-updates
, you have to edit /etc/bumblebee/bumblebee.conf
and set KernelDriver=nvidia-current-updates
under [driver-nvidia]
.
It sounds that you've just installed Bumblebee, but that you've selected the universe repository during installation. That pulled in the nvidia driver which broke your 3D acceleration and other OpenGL capabilities. Try restarting the X server, e.g. by rebooting the machine.
In case the issue still persists, it is possible that some libraries have been installed in a wrong location. After installation of Bumblebee, /usr/lib/xorg/modules/extensions/
should not contain libglx.so
, libglx.so.VERSION
or nvidia_drv.so
. If that is the case, remove those files (it requires root privileges):
sudo rm -f /usr/lib/xorg/modules/extensions/libglx.so* /usr/lib/xorg/modules/extensions/nvidia_drv.so
You may also have to reinstall the nvidia-current
package if Bumblebee does not work afterwards:
sudo apt-get install --reinstall nvidia-current
Re-login and your problem should be solved.
Jacob Ensor
Updated on September 18, 2022Comments
-
Jacob Ensor over 1 year
I'm pretty new to Linux and I'm trying to install Ubuntu 12.04 on my personal laptop, a Dell XPS 15. It has an NVIDIA GT540M with Optimus. Conveniently, there's no way to disable Optimus in the BIOS. lspci output:
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
01:00.0 VGA compatible controller: NVIDIA Corporation GF108 [GeForce GT 540M] (rev a1)
I have bumblebee installed and it seems to work fine. I've been using glxgears from mesa-utils to test it. I'm not sure if this is normal, but running "glxgears" by itself gives:
Error: couldn't get an RGB, Double-buffered visual
But "optirun glxgears" works fine, getting framerates around 5800-6000 in 5 seconds.
My only issue is that the hardware-accelerated desktop effects aren't working. I can't enable wobbly windows or any animations. Worst of all, the Aero-like window-maximizing effect doesn't work. I haven't been able to get that effect enabled at all, even though it worked when I ran off the USB drive. I'm only assuming it's linked to my video card issues, but if there's a way to enable it please let me know!
Is it that optirun uses the NVIDIA drivers, but the intel drivers aren't setup properly? Did I miss a step?
Here's one more screenshot. It's also worth noting this is a 64 bit install of Ubuntu!
-
Web-E almost 12 yearsOk which bublebee have you installed? is it from MrMee repository (
ironhide
andbumblebee
project) OR the bumble project (bumblebee-project.org)? -
Jacob Ensor almost 12 yearsThe bumblebee project. I updated the post with a screenshot if that helps.
-
-
Jacob Ensor almost 12 yearsI tried this to no avail. I'm more interested in the [driver-nouveau] section, actually. I know bumblebee works by creating a display :8 ran by the nvidia driver, and it seems to be working fine. It's the driver on the other display that I'm having problems with. Is that controlled by [driver-nouveau]? It seems like optimus runs my nvidia drivers fine, but my integrated intel card must not be letting hardware accelerated effects happen.
-
Lekensteyn almost 12 years@JacobEnsor
[driver-nouveau]
is used ifDriver=nouveau
is set in[bumblebeed]
. It has nothing to do with the primary X server that is run on the Intel graphics card. If you do not install nvidia drivers, 3D acceleration and such won't be broken. If possible, please paste your/var/log/Xorg.0.log
file. -
Jacob Ensor almost 12 years
-
Lekensteyn almost 12 yearsI see
/usr/lib/x86_64-linux-gnu/xorg/extra-modules/libglx.so: libnvidia-tls.so.295.40: cannot open shared object file: No such file or directory
. This indicated that an error occurred setting the so-called alternatives link of "...gl_conf". Try reinstallingbumblebee
. If after rebooting/restarting X the issue still persists, please add the output ofupdate-alternatives --display x86_64-linux-gnu_gl_conf
to your question. -
Jacob Ensor almost 12 yearspaste.ubuntu.com/955156 I'm taking a look myself... I'm wondering if a solution similar to user corp769's at this link is in order... linuxquestions.org/questions/slackware-14/…
-
Jacob Ensor almost 12 yearsI thought this output could also be helpful... ldd /usr/lib/x86_64-linux-gnu/xorg/extra-modules/libglx.so gives: linux-vdso.so.1 => (0x00007fff0d1ff000) libnvidia-tls.so.295.40 => not found libnvidia-glcore.so.295.40 => not found libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f157e927000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f157e723000) /lib64/ld-linux-x86-64.so.2 (0x00007f157f701000)
-
Lekensteyn almost 12 years
ls -l /usr/lib/x86_64-linux-gnu/xorg/extra-modules
(note: no slash!) should output/etc/alternatives/x86_64-linux-gnu_xorg_extra_modules
. The last file should point to/usr/lib/x86_64-linux-gnu/xorg/x11-extra-modules
which should be an empty directory. Somewhere in that path, there is something wrong. Have you performed an upgrade or a fresh installation? If it was an upgrade, did you use MrMEEE/bumblebee, mj-casalogic/bumblebee or Ironhide before? -
Jacob Ensor almost 12 yearsI performed a fresh installation. I have uninstalled and reinstalled Bumblebee a couple of times though. I have never installed Ironhide.
ls /etc/alternatives/x86_64-linux-gnu_xorg_extra_modules
gives melibglx.so libglx.so.295.40 nvidia_drv.so
. ldd output on the libglx.so file is similar to the above. -
Lekensteyn almost 12 yearsWhat if you add
-l
tols
? Does it show/etc/alternatives/x86_64-linux-gnu_xorg_extra_modules -> /usr/lib/x86_64-linux-gnu/xorg/x11-extra-modules
? -
Jacob Ensor almost 12 yearsSorry to cut you off, but I wanted to share my progress with you. I noticed that libglx.so was the only thing being loaded from the
/usr/lib/x86_64-linux-gnu/xorg/extra-modules
ModulePath. I also noticed that/usr/lib/xorg/modules/extensions/
provided a libglx.so and it didn't reference any nvidia software. To make the xserver use that one instead, I removed the x86_64 path from the ModulePath by creating a new xorg.conf like paste.ubuntu.com/955698 . After hesitantly restarting, I logged in and my background came up but no unity. From the first console I ranunity
. -
Jacob Ensor almost 12 yearsIt loaded in the display console perfectly! The hardware-accelerated effects all work, including maximizing the window by dragging top/left/right. I can run
glxgears
and get around 59.7 FPS, andoptirun glxgears
gets me around 500 FPS. That's about half what optirun gave me before, but I'm guessing it's because of the juice the new hardware effects take up? Now I just need to figure out why unity didn't start with the machine. First step, reboot. I'll be right back. --side note, adding -l to the ls did give me that. Is this the proper directory to use? Is there a problem with my method? -
Jacob Ensor almost 12 yearsThis time rebooting brought up unity fine, so I guess I have no issues! As soon as you confirm there isn't a more efficient method to load glx I'll update the question and mark it solved. This is my first question so I'm not sure if marking it solved beforehand will lock you out from commenting... :?
-
Lekensteyn almost 12 yearsEven if this question is marked as accepted, I'll still receive notifications. As for the performance drop, try running
VGL_READBACK=pbo optirun glxgears
. Please report back if it helps, I'll then fix it in the next version of Bumblebee. -
Jacob Ensor almost 12 yearsIt ran with about the same frame rate, and output
[VGL] ERROR: in readback--
. Thanks for all your help!! -
Lekensteyn almost 12 yearsCan you join #bumblebee on Freenode IRC for further discussion about this issue?
-
Jacob Ensor almost 12 yearsI was just now able to get on and didn't see you. This week is going to be fairly busy for me, but if you can let me know when you're typically on in EST time I'll try to get on.
-
Lekensteyn almost 12 years@JacobEnsor My question was whether the program immediately outputted that error or if it only happens after closing
glxgears
. -
Jacob Ensor almost 12 yearsIt only happens after closing glxgears. Sorry for the confusion. Another issue I'm having is occasionally when using optirun Ubuntu gives me a "System error has been detected" box, and asks me to send and error report. Should I send the report to them? Is there some way to get it for you? I haven't experienced any issues after seeing it, but it pops up occasionally.
-
Lekensteyn almost 12 yearsSome programs may not be fully compatible with Bumblebee (actually, the virtualgl component) and crash. Sending it to Ubuntu does not really help.
-
EboMike over 11 yearsGuys, would it be possible to edit the answer to include the most important information of what was discussed in the comments here? Thanks!
-
Eliah Kagan over 11 yearsCan you expand this answer to provide more information about exactly how to do that?