Fedora on Dell XPS 9360 and 9560
Note: This is an older guide for the XPS 9560 and 9360. For the 9570 and 7590 use our new XPS 7590 guide.
I don’t travel for work much, but I travel enough that I need a semi-portable computer. For the last three years, I’ve lugged around a Dell Precision M6800. I’ve always found Precisions to be great laptops with exceptional Linux support. These are one of the few laptops that can still disable Optimus and run entirely on the dedicated Nvidia card for simplicity. I could even sneak in Team Fortress 2 games after hours with the Quadro! Unfortunately, a 17″ Precision can also stand in for a boat anchor, the heat could cook your thighs, and the battery is gone with a quick *poof*.
I decided it’s time to join the legions of Linux on XPS fans, so I found a great deal on a scratch-and-dent 4K XPS 13 9360. I was thoroughly impressed with the fit and finish as well as having Fedora booting in minutes with no issues. Unfortunately, after a few days I found myself wanting a bit more screen real estate.
I was soon ogling XPS 15s and found another scratch-and-dent special on my doorstep, despite my trepidation about tangling with Optimus.
First boot from a Fedora 28 flash drive confirmed my fears – booting hangs. I got past that only to find power consumption levels that cut estimated battery life to 2-4 hours. Resolving that left me with random hangs of the entire system. I struggled through various permutations of fixes of each issue I encountered and thought I should post an updated guide for installing on these otherwise lovely laptops. From my reading, these fixes also apply to the new 9570 as well as the older 9550 but YMMV.
Configuring BIOS
Before booting, use F12 to boot into BIOS setup and make the following changes:
1. Change the SATA mode from RAID to AHCI
Fedora will not find the nvme without this.
2. Disable secure boot
This is optional, but I use both proprietary Nvidia drivers and Virtualbox which require this. This guide uses the commercial Nvidia drivers. Contrary to some information, I had no issues booting with secure boot until I wanted to use unsigned modules.
3. Change POST Behavior from “fast boot” to “thorough”
I’ve read repeatedly that this prevents random hangs. I haven’t duplicated but see little harm in enabling. It’s Linux: who reboots often?
Installation
On older versions of Fedora, picking the ‘Troubleshooting -> Basic Graphics mode’ worked. I couldn’t get this to work at all.
Instead, I needed to use a different mode setting option, which worked fine on the normal boot entry.
1. At the boot prompt, type ‘e’ on ‘Start Fedora-workstation-Live 28’
2. Change the ‘linuxefi’ line by adding nouveau.modeset=0:
linuxefi /images/pxeboot/vmlinuz root=live:CDLABEL=Fedora-WS-Live-28-1-1 rd.live.image quite nouveau.modeset=0
3. Hit F10 to boot.
I had no issues performing a normal Fedora installation: the Toshiba XG5 makes quick work of it: Encrypt everything and go!
Booting
Repeat the same step as for the installer: add nouveau.modeset=0 to the parameter list.
The Nvidia driver installation will make this unnecessary.
Nvidia and Bumblebee
The best combination I found for managing the Nvidia card’s use and power state was Negativo17’s fedora-nvidia repository. I typically find rpmfusion to be more trouble-free, but I had issues with power state management. It’s entirely possible this was a fluke or just a minor difference in driver versions – let me know if rpmfusion works for you.
Note: if you enable third-party repositories in the Software app, it will strangely enable rpmfusion instead of the Fedora-recommended Negativo repository.
With this combination, the Nvidia card is not merely disabled, but powered off. A quick launch properties modification on Team Fortress 2 powers on and enables the card, then powers it off when done.
1. Go ahead and ‘sudo dnf update’ and reboot to avoid possible issues with running kernel versions and packages. Don’t forget nouveau.modeset=0!
2. Install the fedora-nvidia repository and the packages required for Nvidia:
sudo dnf config-manager --add-repo=https://negativo17.org/repos/fedora-nvidia.repo sudo dnf install nvidia-driver kernel-devel akmod-nvidia dkms acpi
3. Install the copr bumblebee repository and the Bumblebee packages:
sudo dnf copr enable chenxiaolong/bumblebee sudo dnf install akmod-bbswitch bumblebee primus
4. Configure Bumblebee:
sudo gpasswd -a $USER bumblebee sudo systemctl enable bumblebeed sudo systemctl disable nvidia-fallback
5. Modify kernel params
There are problems with Bumblebee and Kernel 4.8+ on the XPS 15 that may be mitigated by a future kernel.
The first problem are lockups when X or Wayland start. These are resolved with a kernel parameter:
acpi_rev_override
Once this is resolved, you’ll find primusrun / optirun don’t work: they’ll report the card is offline. Resolve this problem by disabling pcie port power management:
pcie_port_pm=off
This did seem to impact power consumption for me, so hopefully a better fix is forthcoming.
To make these changes permanent, first add these two parameters to GRUB_CMDLINE_LINUX in /etc/default/grub:
GRUB_CMDLINE_LINUX="rd.driver.blacklist=nouveau rd.luks.uuid= rhgb quiet acpi_rev_override pcie_port_pm=off
Note: This is an example. Do not copy this line!
Next, regenerate grub.cfg:
sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
6. Testing Nvidia
Reboot. It should come up without any kernel parameter intervention.
Log in, and verify the power state of the Nvidia card is “OFF”:
cat /proc/acpi/bbswitch 0000:01:00.0 OFF
Now test Bumblebee by running glxgears in a second terminal:
primusrun glxgears
You should now see the Nvidia card powered on:
cat /proc/acpi/bbswitch 0000:01:00.0 ON
Power Consumption
Install TLP to automatically tune power consumption, and powertop to observe the result.
sudo dnf install powertop tlp sudo systemctl start tlp
Final Results
On a 4K touch screen, 16GB RAM, 512GB nvme, I7-7700, no USB peripherals, keyboard backlight off, and screen brightness at ~50%, powertop shows:
The battery reports a discharge rate of 8.15 W The power consumed was 240 J The estimated remaining time is 11 hours, 56 minutes
While that is a low among several samples, this 9560 hovers in the 8-10 W range at nearly idle. That’s respectable for a thin and light laptop that will also drive Team Fortress 2 at 3840×1600 on a Dell U3818DW!
Undervolting
I experimented with the linux-intel-undervolt-tool, but at the recommended -100mv undervolting I couldn’t consistently tell a difference in power consumption or heat. I’ve been running -100mv CPU and -50mv GPU with no issues.
# intel-undervolt read CPU (0): -99.61 mV GPU (1): -49.80 mV CPU Cache (2): -99.61 mV System Agent (3): -0.00 mV Analog I/O (4): -0.00 mV
Touchscreen
There are references to the Elan touchscreen being a significant contributor to power draw. I was also unable to replicate this savings.
I’ll update this if I experiment further.
Update: These modifications still apply on Fedora 29.
Gideon Appoh
June 19, 2018 @ 9:46 am
Hello My system gets stuck after this. It cannot boot to login screen. When I use fedora rescue I can see that the bumblebee service couldn’t load bbswitch
Internet Staff
June 20, 2018 @ 2:46 pm
Verify akmods built the bbswitch module ?
Murk
August 11, 2018 @ 9:18 am
I had the same problem.
sudo grub2-mkconfig /boot/efi/EFI/fedora/grub.cfg
shoud be
sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
Internet Staff
August 11, 2018 @ 9:32 am
Thanks – fixed!
Phil
July 19, 2018 @ 4:02 am
Hi, thank you for this tutorial. As an additional hint: for multi-monitor-support i had to remove the “nomodeset” kernel parameter
fanfan54
September 26, 2018 @ 10:02 am
Thank you so much! Everything worked on a Dell XPS 15 9560 and Fedora 28 like a charm
Hans
October 11, 2018 @ 8:05 pm
hello all,
I bought a new Dell XPS 9570 and want to use Fedora 28. Like everyone out there, I am running into video issues to the Nvidia dGPU. I am getting the following error …
$ primusrun glxgears
primus: fatal: Bumblebee daemon reported: error: Could not enable discrete graphics card
Any ideas? Thanks!
Dinika Saxena
November 20, 2018 @ 9:58 am
I get the same error. Were you able to resolve it?
Tim
October 21, 2018 @ 2:08 pm
I also just bought a Dell XPS 9570 and am trying to install Fedora 28. The nouveau driver that comes with Fedora is definitely not working right. Trying anything else like this tutorial is not working either.
Dinika
November 20, 2018 @ 1:15 am
Hey
I have a similar problem. Were you able to solve yours?
Pux
December 12, 2018 @ 12:28 am
I get the same problem, and am still looking for a solution.
Kyle
November 29, 2018 @ 5:10 pm
I had issues trying to enable the GTX 1050 on my XPS 15 9560 when everything seems to installed and work properly. Just that the driver sometimes couldn’t find and enable the GPU using bumblebee.
Was quite frustrating to see sometimes it works and other times it doesn’t.
Finally, I found out recently, whenever I plug in the power source to the laptop and boots up, it doesn’t work.
But when I boot it up using the battery, it works.
Internet Staff
December 12, 2018 @ 7:23 am
For those still having issues, I strongly suggest walking through the setup again very carefully. If you can, wipe and start fresh. This setup is still working on Fedora 29 today, including the original ACPI work-arounds.
Dinika Saxena
January 16, 2019 @ 11:59 am
I did follow these steps again and so far most things are alright except that the integrated webcam is not getting detected by cheese, google hangouts (or any another app, for that matter). I tried looking around and it seems that the problem is solved for Ubuntu users. Is anybody else running into similar issues or did anyone solve it?
Alex
May 13, 2019 @ 10:56 am
Any attempts with F30
Internet Staff
May 13, 2019 @ 1:35 pm
I haven’t reinstalled on F30, but this same config is running for me post-upgrade just fine. Did you run into specific problems?
Lee
June 10, 2019 @ 9:37 am
I pulled down the current F30 workstation iso yesterday (numbered 1.2) and did a fresh install, flattening the Windows install on my 9560. I had a nicely running system within a couple of hours using the above guide to configure, so yes it definitely works. Thanks @OP for documenting all of this; easiest laptop config I’ve ever had 🙂
AG
August 4, 2019 @ 6:58 pm
Dual booted fedora 30 on my XPS 15, followed all the steps exactly. Unfortunately didn’t work as expected, couldn’t get pass this error on trying to run glxgears.
‘primus: fatal: Bumblebee daemon reported: error: Could not enable discrete graphics card’
Kernal version: 5.1.20-300.fc30.x86_64
nvidia driver version: 430.40
Nino
November 1, 2019 @ 5:08 am
Hi all i’ve created this repository where try to resolve all fedora (30/31) issues on dell xps 7590. Feel free to contribute
https://gitlab.com/reinchek/fedora-30-31-on-dell-xps-7590
kdog
May 7, 2020 @ 5:10 am
Hey All. Just a quick message to confirm that these instructions are still valid for Fedora32_x86_64 on a Dell 9560. Thanks for the write up! ;]