Fedora on Dell XPS 15 9570 and 7590

Overview

I’ve been thoroughly enjoying my XPS 9560 – outlined in my original guide – for two years now.  However, with the bulk of my work as a Java software engineer, I do large compiles dozens of times per day. I’ve recently found myself wanting for a bit more CPU and I/O horsepower than my I7-7700HQ and Toshiba XG5 could give me. As long as my wife doesn’t read this, I’ll also admit I wanted a little more oomph than my GTX 1050 was delivering.

I’ve been waiting for 10th generation CPUs to become available the XPS 15, but after becoming impatient, I realized there’s a 9th generation I9-9980HK version available that so far outpaces 10th generation CPUs. Ever frugal, I snagged a refurbished laptop from the Dell outlet with a coupon.

This time, I did opt for the 1080P screen: I learned my 4K touchscreen was a total waste of money and power. I almost never worked from the laptop screen; when I did I’d sometimes run into problems reading tiny fonts (e.g. grub), and I’d more frequently accidentally hit the touchscreen and cause chaos than I did intentionally use it.

I have to say, out of the box, this was a big improvement over my 9560 experience – it booted!  There are still hoops to jump through, but overall it appears to be a simpler process than on the old 9560.  In my reading, it appears that the same changes are required for the older 9570. I assume these apply to the 9370 and 7390.

Preparation

Before you wipe the default Windows install, you might want to update system firmware. Specifically, Fedora will update the BIOS just fine, but I found the Thunderbolt controller firmware was outdated, and it was trivial to update this in Windows.

If you have a TB16 dock, be prepared for pain. You will have flaky peripherals – my USB keyboard and mouse constantly disconnected in both Windows and Linux.  This appears to be a known issue.

The WD19TB dock works very well, but does require setting Thunderbolt to BIOS assist enumeration instead of “auto” or else USB devices will randomly drop dead after reconnecting.

Configuring BIOS

Before booting, use F2 to boot into BIOS setup and change two things:

1. Change the SATA mode from RAID to AHCI

Fedora will not find the nvme without this. I’m still baffled as to why RAID is the default, since I also re-installed Windows 10 using the AHCI driver.

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, so I suspect you’ll want this.

Contrary to previous versions, I did not have to make any other BIOS changes.

Installation

In sharp contrast to earlier models, Fedora 31 boots and installs fine. Encrypt those partitions and boot into Fedora.

Once booted, open a terminal, fully update, and reboot.  In particular, you don’t want to end up with a mismatch between your running kernel and the kernel-devel package you install later.

dnf -y update
reboot

Nvidia Optimus

I’ve still stuck with Negativo17’s fedora-nvidia repository. I tried rpmfusion again, and hit unnecessary complications I wasn’t willing to fight through.

1. Install rpmfusion and the nvidia driver:

sudo dnf config-manager --add-repo=https://negativo17.org/repos/fedora-nvidia.repo
sudo dnf install nvidia-driver kernel-devel akmod-nvidia nvidia-settings

2. Strangely, I’ve found that Negativo17 and rpmfusion both update /etc/default/grub to blacklist the nouveau driver, but both skip actually updating grub.cfg.

sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg

3. Install the copr bumblebee repository and the bumblebee packages:

sudo dnf copr enable chenxiaolong/bumblebee
sudo dnf install bumblebee

4. Configure bumblebee:

Note: We have to explicitly tell Bumblebee not to use bbswitch. On the 7590, once bbswitch powers down the card, Linux can’t power it back up. So far, it doesn’t seem necessary: if the driver remains loaded, Linux seems to power the card down when not in use.

I tested the AlwaysUnloadKernelDriver option and found that power consumption remained high if the driver was unloaded. In fact, I found I needed to stop bumblebee from blacklisting the nvidia driver to make sure it was loaded at boot, which allowed power management to kick in under battery power.

sudo gpasswd -a $USER bumblebee
sed -i "s/blacklist nvidia/#blacklist nvidia/" /usr/lib/modprobe.d/bumblebee.conf
sudo systemctl enable bumblebeed
sudo sed -i /etc/bumblebee/bumblebee.conf "s/PMMethod=auto/PMMethod=none"

Unlike the install on the earlier models, I have not had to customize any kernel parameters yet.

5. Testing

Reboot. Then try running glxgears:

optirun glxgears

If it’s working, you’ll see a frame rate in the thousands. If it’s not working, you’ll see an error. 🙂

Power Consumption

Install TLP to automatically tune power consumption, and powertop to observe and verify the results.

sudo dnf install powertop tlp
sudo systemctl start tlp
sudo powertop

Undervolting

I am still using the linux-intel-undervolt-tool, but at the recommended -100mv undervolting I still can’t tell a difference in power consumption or heat in normal usage. I suspect I will see a difference gaming, but I haven’t had time to play yet.

I’ve been running -100mv CPU, GPU, and Cache as well as -50mv system agent with no issues.

# intel-undervolt read
CPU (0): -99.61 mV
GPU (1): -99.61 mV
CPU Cache (2): -99.61 mV
System Agent (3): -49.80 mV
Analog I/O (4): -0.00 mV

Final Results

This is a 1080P non-touchscreen, 32GB RAM, I9-9980HK, screen brightness at 50%, with the nvidia driver still loaded from an optirun test:

The battery reports a discharge rate of 5.52 W
The power consumed was 130 J
The estimated remaining time is 17 hours, 21 minutes

Pretty impressive if it holds!

Parting Thoughts

So far, this is a very nice laptop. I have two complaints:

1. The TB16 dock not working is very frustrating – I already own two of them. They worked well enough with the 9560, but appear to have been abandoned.

2. The Micron 2200S 1TB NVME is pretty lackluster for a high end laptop. An older Samsung 960 Pro 512GB in my workstation smokes it. I’ve ordered a 970 Evo Plus to alleviate this.