NVIDIA Optimus Support

By admin, 29 April, 2025


Bumblebee is an effort to make NVIDIA Optimus enabled laptops work in GNU/Linux systems. These laptops are built in such a way that the NVIDIA graphics card can be used on demand so that battery life is improved and temperature is kept low.

It disables the discrete graphics card if no client is detected, and starts an X server making use of NVIDIA card if requested then let software GL implementations (such as VirtualGL) copy frames to the visible display that runs on the integrated graphics. The ability to use discrete graphics depends on the driver: open source nouveau and proprietary nvidia.

Primus is a shared library that provides OpenGL and GLX APIs and implements low-overhead local-only client-side OpenGL offloading via GLX forking, similar to VirtualGL. It intercepts GLX calls and redirects GL rendering to a secondary X display, presumably driven by a faster GPU. On swapping buffers, rendered contents are read back using a PBO and copied onto the drawable it was supposed to be rendered on in the first place.

Primus is currently intended to be used alongside Bumblebee and provides a drop-in replacement for optirun (i.e. "primusrun").

Diagnostic tools to manage graphic cards:

  • sudo lspci | grep VGA (Detect Multiple Graphics Cards)
  • sudo nvidia-xconfig (X Configure for NVIDIA Driver)
  • sudo optirun glxgears info (Testing Command for Bumblebee)
  • sudo cat /proc/acpi/bbswitch (Checking Status)
  • sudo tee /proc/acpi/bbswitch