Installing nVidia Prime and Bumblebee on XPS 15 9560 and Getting Things to Work
This post mainly records my steps to install nVidia 387 driver, nVidia Prime and Bumblebee on my XPS 15 9560. I also had to make some minor changes to have things work properly. These changes took me some time to reach, though.
Installing the Driver
The first step is to install the nVidia driver. This can be done easily in the Additional Drivers app provided by Ubuntu. I was experiencing very slow download speed through that GUI, so I did it through command line with proxy enabled. Just install:
nvidia-387
with apt
and then check the package is installed and enabled in Additional Drivers.
At this point, for anyone happy with always using their discrete GPU, they are good to go. But I am on a laptop, so I must take care of the battery consumption.
Installing Prime
Install nVidia Prime by:
Note that it might have been installed automatically by the Additional Drivers app.
Now NVIDIA X Server Settings should show the menu for Prime Settings. Which graphic card is used can be configured there.
BUT unfortunately, my system did not boot again after switching to Intel graphics with Prime.
I did tons of search and found the workaround: adding
acpi_rev_override=1
to the kernel boot parameter list. This can be done by editing /etc/default/grub
and then running sudo update-grub
. This seems to be the only solution on an XPS 15 9560 - it works well, and does not disable your touchpad.
Installing Bumblebee
Note: on my laptop, bumblebee is not providing very satisfying performance. It is providing some more fan noise when making use of my discrete card, though.
Note 2: to make bumblebee compatible with tlp, it would be the best to use tlp version 1.0: https://github.com/linrunner/TLP/issues/244#issuecomment-272689534
To install bumblebee, just run
Then, follow the steps in this post to configure /etc/modprobe.d/bumblebee.conf
and /etc/bumblebee/bumblebee.conf
.
After that, for me, I ran into the problem of
Cannot access secondary GPU - error: [XORG] (EE) Failed to load module "mouse" (module does not exist, 0)
when running optirun. I followed this to solve the problem.
Optirun or Primusrun?
Both commands are provided by bumblebee. The only difference to end users should be the names of two commands are different. It is said that the latter provides better performance.
P.S. I reboot my laptop whenever I see some weird problems.
References
- BinaryDriverHowto/Nvidia - Community Help Wiki
- Fix lock up when switching off discrete graphics card in Dell XPS 9560 https://bugzilla.kernel.org/show_bug.cgi?id=156341 - Patchwork
- Fixed Nvidia 1050 freezing in Ubuntu Linux! : Dell
- TLP conflicts with Bumblebee, disabling GPU until reboot · Issue #244 · linrunner/TLP
- Debian sid [ERROR]Cannot access secondary GPU - error: [XORG] (EE) Failed to load module “mouse” (module does not exist, 0) [13433.797270] [ERROR]Aborting because fallback start is disabled. · Issue #867 · Bumblebee-Project/Bumblebee