The Dell XPS13 9370 is a laptop released by Dell in 2018. It is quite popular among developers and Linux users. This is because it is sold in a “Developer Edition” trim which comes pre-loaded with Ubuntu 14.04 at the time of release.

I personally became interested in the device because I was looking for a laptop that had a long battery life, was portable, and something that would not have a lot of hardware compatibility and driver iss`ues running Debian. It is unfortunate that driver issues still crop up particularly with wireless drivers in the Linux laptop space. My previous laptop, which was an HP Omen, had such issues–all of which were eventually solved in some way, though not to complete satisfaction. What I never solved was the awful battery life on Linux compared to Windows on similar workloads. To avoid such issues entirely I decided on getting an XPS 13 9370.

There are a few different variants of the laptop available:

I didn’t opt for the XPS 15 because some benchmarks gave a very slight battery life advantage to the XPS 13. The obvious portability was another reason. I also avoided the touch screen options because of the price and different options available to them. Mainly I avoided the touchscreen because the laptop was for development work and I rarely use touchscreens at all to justify any increase in price. Finally I didn’t previously realize that there are non Developer Editions of the XPS 13 so make sure to double check that you are getting the correct edition before buying.

After getting the correct version of the laptop I was ready to get started. On the first boot the device runs Ubuntu 14.04 LTS. Naturally first order of business on a new laptop was to remove the default OS and install what you prefer, for me this was Debian. I thought this would be very straight forward but it turns out there are customizations that Dell introduced to the Ubuntu install since this did not just work off a vanilla install.

Wireless

Sadly the wireless failed to connect during OS install because it needed a wireless driver that was in the non-free tree. According to the Debian Laptop Wiki entry:

The wifi card is supported but requires non-free firmware. You’ll get a message about missing firmware files

You can download the “Unofficial non-free images including firmware packages” Debian installer : http://cdimage.debian.org/cdimage/unofficial/non-free/cd-including-firmware/

You can get the firmware-atheros .deb file and extract it to a USB stick.

You need at least the version 20170823 of firmware-atheros, it’s available from stretch-backports.

This advice did not end up working for me and I ended up using a USB network adapter during install time. I plugged in an ethernet cable to complete the installation which proceeded without any issue. I didn’t think it was worth the hassle in troubleshooting in a limited environment (install) when I could have more options available after install. Fixing the issue on install time may be possible I just did not explore that.

Upon booting into the installed system I added the non-free repo to /etc/apt/sources.list by adding non-free to the line:

deb http://ftp.us.debian.org/debian/ stretch main non-free

then I installed the firmware-atheros package as the wiki mentions.

sudo apt-update
sudo apt install firmware-atheros

Still the wireless did not work. After poking around in different sites and trying different recommended fixes I ended up getting the full linux-firmware tree from the Ubuntu kernel repo:

and then specifically check out the bionic branch of the above.

git checkout origin/bionic

and then explicitly copying the QCA6174 files over from the repository to the /lib/firmware directory

cp ath10k/QCA6174/hw3.0/* /lib/firmware/ath10k/QCA6174/hw3.0/

After restarting the wireless worked!

Unfortunately updates may overwrite these changes so if it ever stops working it is likely that a new firmware was installed and copied over the directory. To switch to the bionic branch again again you have to do:

sudo su
cp -R ~/ath10k-firmware/QCA6174/hw3.0/* /lib/firmware/ath10k/QCA6174/hw3.0/

and restart again the wireless should work again.

Trackpad

The trackpad was another minor issue off the vanilla install. By default, it does not support reverse scrolling and tapping the touchpad did not register as a click.

The trackpad is handled by libinput and not synaptic drivers so enabling these features requires some minor changes to the xorg.conf

I ended up editing /usr/share/X11/xorg.conf.d/40-libinput.conf (of create the file if it doesn’t exist) and adding the following declaration to the configuration file:

Section "InputClass"
	Identifier "libinput touchpad catchall"
	MatchIsTouchpad "on"
	MatchDevicePath "/dev/input/event*"
	Driver "libinput"
	Option "Tapping" "on"
	Option "Natural Scrolling" "true"
EndSection

This will enable tap to click (Tapping option) and reverse scrolling (Natural Scrolling option) You may need to change options in your preferred window manager as well.

Suspend

Suspend was another minor issue I found. The suspend didn’t go into a proper deep sleep unless you set the following kernel options. You can test if this is or is not the case by setting the parameter temporarily on boot (press e for edit on kernel boot screen)

mem_sleep_default=deep

and press f10 to boot.

If it works you can change the default:

sudo vim /etc/default/grub

and add the command to the “GRUB_CMDLINE_LINUX_DEFAULT” variable. You can make the fix permanent by updating your grub config:

sudo update-grub
sudo grub-mkconfig -o /boot/grub/grub.cfg

After this proper deep sleep should work.

Accessories

Since the device is USB-C only including to power the laptop you have to deal with the magical world of USB-C compatibility. Since I wanted a few spare power cables I opted for using the Google Pixelbook power supply. I read and can confirm that the 45W cable works

I was also hoping that I could get a large external battery to charge the laptop. Though I found that many Anker batteries such as the Powercore+ 20100 USB-C did not work so I am still looking for external batteries that may be compatible.

Conclusion

I have been using the XPS 13 on Debian for a year and it has been a good laptop. Issues on install with compatibility were surprising to me but it was nothing that was not easily overcome. I feel like many of these issues can be avoided by simply running the default Ubuntu installation. If at any point you wish to you can install a recovery image from the official page and go back. However with some minor configuration this runs Debian equally well and is worth the effort. Most importantly the battery life is near the advertised 12 hour lifespan. If I had to find a fault in the XPS 13 it would be that it is not the most serviceable device on the market.