bumblebee doesn't work on Ubuntu 18.04
There was one major change in nvidia driver that prevents bumblebee from working - glvnd (https://github.com/NVIDIA/libglvnd). In short, bumblebee is running a separate instance of xorg on a separate display, which glvnd cannot handle. This behaviour should be disabled for bumblebee. Put the following line to /etc/environment
__GLVND_DISALLOW_PATCHING=1
In order to make glvnd work, nvidia also changed directories where related files/drivers are located. Bumblebee should be reconfigured accordingly (/etc/bumblebee/bumblebee.conf
):
LibraryPath=/usr/lib/x86_64-linux-gnu:/usr/lib/i386-linux-gnu
XorgModulePath=/usr/lib/x86_64-linux-gnu/nvidia/xorg,/usr/lib/xorg/modules,/usr/lib/xorg/modules/input
Last issue that prevents bumblebee from unloading nvidia drivers is caused by nvidia-drm
which is not supposed to be loaded in the bumblebee enviroment. This is easy to disable by aliasing it to off
(/etc/modprobe.d/blacklist-nvidia.conf
):
blacklist nvidia
blacklist nvidia-drm
blacklist nvidia-modeset
#alias nvidia off
alias nvidia-drm off
#alias nvidia-modeset off
nvidia-modeset
is not needed as well, but loading it doesn't hurt and you may want to disable it as well.
I would also disable gpu manager (What does gpu-manager do?), as it's not needed in this case (/etc/default/grub
): add nogpumanager
to the GRUB_CMDLINE_LINUX_DEFAULT
section.
I also had some issues with nvidia-persistenced
service in the past (https://docs.nvidia.com/deploy/driver-persistence/index.html#persistence-daemon), you may want to disable it as well by issuing sudo systemctl disable nvidia-persistenced
.
NOTE: I'm using nVidia 390 from https://launchpad.net/~graphics-drivers/+archive/ubuntu/ppa
Related videos on Youtube
Paralyz3d
Updated on September 18, 2022Comments
-
Paralyz3d over 1 year
I installed a fresh version of Ubuntu 18.04 on my optimus laptop then I followed the instructions from this site to install the bumblebee package. It succeeded but I saw a line during the installation which stated that it couldn't remove the nouveau module. I did a reboot and I ran
optirun --status
to see if it's working and it outputted that discrete nvidia card is disable, then I tried runningoptirun glxgears
and this error message came up.[ERROR]Cannot access secondary GPU - error: [XORG] (EE) Failed to load module "mouse" (module does not exist, 0)
I have tried reinstalling Ubuntu and bumblebee.
I have an NVidia Geforce 940MX card.
-
Mateusz Szczepańczyk almost 6 yearsAccording to launchpad.net/ubuntu/+source/systemd/237-3ubuntu10.2 aliasing nvidia-drm to off may not be longer necessary (assuming one is using up-to-date proposed package).
-
clover almost 6 yearsIn my case systemd wasn't causing any problems with "locking"
nvidia-drm
. But this module prevents bumblebee from unloadingnvidia
properly. -
Baggers almost 6 yearsThis answer fixed it for me. I looked into timrichardsons' excellent work around prime-select however I think my gpu is too old for those driver features (nvidia's drivier didnt have prime-select either)
-
Chris1804505 almost 6 yearsI'm flabbergasted by all the problems Linux suffer from regarding optirun/Optimus/Nvidia/Bumblebee, this is way too much issues for an average user.
-
Pedro Rodrigues over 4 yearsThanks nivdia?! No. Hell nvidia. I learned my lesson with this graphics card. To hell with nvidia.