Install bumblebee-nvidia by entering the following commands in the terminal:
sudo apt update sudo apt install bumblebee-nvidia
NVIDIA Optimus support using the proprietary NVIDIA driver
This metapackage ensures that the proprietary NVIDIA driver is installed in a way such that 3D acceleration does not break. It does so by configuring the OpenGL library path to use the Mesa graphics library.