Ubuntu – Enable hardware-accelerated desktop effects with NVIDIA Optimus/Bumblebee


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!

Another one I thought would be useful.

Best Answer

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.

Related Question