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 running optirun 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.
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
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
):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 tooff
(/etc/modprobe.d/blacklist-nvidia.conf
):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
): addnogpumanager
to theGRUB_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 issuingsudo systemctl disable nvidia-persistenced
.NOTE: I'm using nVidia 390 from https://launchpad.net/~graphics-drivers/+archive/ubuntu/ppa
Bumblebee has sadly not been updated since 14.04. You can still get it to work however, but I do not know of any existing 18.04 Tutorial.
You could however give this a shot;
https://www.reddit.com/r/linuxquestions/comments/7ulymw/for_anyone_struggling_to_set_up_bumblebee/
I got the exact same problem as you, buggy drivers, having to reboot after switching between gpu's (and this making my nvidia card unloadable, thanks nvidia).
Linux is great, but nvidia's driver support is poor, and because of it, a lot of optimus people pull their hair out trying to make it work, including me.
I got the exact same gpu as you do.