Dell XPS 13

Hardware specifications

Also known as Dell's model number 9350.

  • IntelĀ® Core i5-6200U with integrated IntelĀ® HD Graphics 520
  • 8 GB DDR3L RAM 1866 MHz
  • Intel 600p 512 GB NVMe SSD
  • 13,3" 1920x1080 "InfinityEdge" IPS display
  • Broadcom BCM4350 2x2 802.11ac wireless
  • Bluetooth 4.0
  • 2x USB 3.0, 1x Thunderbolt 3, 3-in-1 card reader
  • backlit keyboard
  • 56Wh 4 cell battery

Configuration and build quality

I purchased this laptop in December 2015. Just like virtually all my previous laptops (except for the Vaio TZ), this comes with Broadcom wireless. However, in the meantime hell froze over Broadcom's stance towards the FOSS community has visibly changed. Broadcom developers are now actively collaborating with e.g. the OpenWrt community, to the point OpenWrt now fully supports a 100% Broadcom 802.11ac class router. So, for the first time in years, I have not ordered an Intel wireless card before even getting my new laptop. More on that further.
By now almost everyone has heard about Dell cramming a 13,3" display into a 11" frame, pretty much. Despite the silly marketing name, it is downright impressive. Coming from a meager (but not unusual) 1366x768 on 13,3", Full HD is quite a jump. Despite the thin bezels, build quality did not suffer. The chassis is sturdy, the outer covers are aluminum, the wrist support is some matte plastic. None of it bends under pressure (unlike with my pretty Vaio TZ). I'd rather had Dell add an Ethernet port to the laptop, I don't know how this whole Thunderbolt/USB 3.1 thing will play out with their adapter (which is not available yet in Europe), and with Linux. I would also have liked to see an i3 model like in the US, and choice in SSD sizes would have been cool as well - 512 GB is affordable nowadays. But hey, I'm nitpicking.

Setting up Debian

Anyone getting cutting edge hardware (Skylake, NVMe SSD) knows he's in for a treat if he wants to install Linux; the XPS 13 does not disappoint. Support for the Broadcom wireless has landed in the 4.4 kernel (see the Linux Wireless wiki). 4.4 has not been released yet, but luckily Debian had RC6 in Experimental. Either way, since this is all new hardware, I decided it would be Debian Testing and not stable (Jessie) to go on this baby. Prepare to sacrifice some kittens.
Before you boot up any Linux installer, go into the EFI, disable secure boot, and set the S-ATA controller to 'off'. AHCI only applies to S-ATA disks, and your SSD is NVMe; Linux however won't see the SSD if you leave the controller set to RAID.

Debian installer quirk #1: network detection
The Debian Testing installation images (at this time using kernel 4.2) will hang on detecting network devices because there don't seem to be any devices. Plenty of those reports on the internet, but I haven't found any other 'solution' than just hard rebooting the device when you get to that point. There are two workarounds:

  • Boot the installer in (Graphical) Expert Mode. Do everything, just skip the networking bit.
  • Use your smartphone as a USB tethered network device. This way you can install normally.
  • Get a USB to Ethernet adapter. No experience there.

Debian installer quirk #2: GRUB2 installation
The installer didn't seem to like my NVMe SSD much either. Debian has a bug report for GRUB2 and NVMe drives, but it still hasn't been fixed 100%. Comment #44 has a fix (again, for this to work you need to use the Expert Mode), but I found that too late. By then, I had already installed GRUB2 manually by booting from a Super GRUB disk. From within your Debian installation, issue the following commands:

$ sudo apt-get install --reinstall grub-efi-amd64

After that, you should have an EFI/boot folder (mandatory) on your ESP partition and a bootx64.efi executable inside it. If that command does not work, you can try it manually:

$ sudo grub-install --target=x86_64-efi --bootloader-id=boot --root-directory=/ --efi-directory=/boot/efi/ --recheck

Again, you need to check you have an EFI/boot/ folder and a bootx64.efi executable. GRUB2 by default puts a grubx64.efi binary in your ESP partition, if there's no bootx64.efi present then just copy the GRUB2 executable and rename it. The generic EFI boot procedure needs an EFI/boot/bootx64.efi executable, otherwise EFI won't see any bootloaders. If you're feeling real fancy, you can also do away with GRUB2 and just go with EFIstub.

Kernels past 4.2 had the nvme driver shuffled around which means it's not included anymore in the initrd. Fix this by adding it to /etc/initramfs-tools/modules. Don't use the discard option in the mount options; instead set a cronjob to run fstrim on every partition (you can do this daily).

Like I said, grab the 4.4 kernel from Debian's experimental repo, together with the BCM4350 firmware blob, and dump the latter in /lib/firmware/brcm/. Once you're up and running install the firmware-brcm80211 package through apt to keep in sync. If you can scan but not bring up the interface, click the wireless switch (PrtScr key). Try it without the Fn key first.
The wireless device shows up as wlp58s0 and not the canonical wlan0. Debian will probably provide a rule for that in the future, but for now you can drop something in /etc/udev/rules.d/ to have it show like a normal interface:

$ cat /etc/udev/rules.d/75-wlan.rules 
SUBSYSTEM=="net", ENV{ID_NET_NAME_PATH}=="wlp58s0", ACTION=="add", NAME="wlan0"

If your device shows up differently, adapt the rule, if that does not work, use udevadm test to query the device parameters. As for hell freezing over, unfortunately we're not there yet. This Broadcom driver is apparently not much more than a wrapper around the binary firmware blob where most of the action happens, much like nVidia's and ATi/AMD's binary Linux drivers have been. Nonetheless, it's already a lot better than years ago when people had to extract windows firmware to get their wireless running. When I found out Broadcom's blob doesn't use the native Linux mac80211 stack either, I decided to purchase an Intel Wireless-AC 8260 M.2 card. So yes... History does repeat itself.

Bluetooth needs firmware as well, in the same location as the wireless firmware. I'll refer you to the excellent Arch Linux wiki entry for instructions on obtaining the necessary files.

If you're on the 4.4 kernel you don't need to pass any special arguments anymore. Some power saving settings for the i915 driver might cause instability, but I haven't found anything about that past hearsay (ie no bug reports). I have added the i915.

This one is bit jumpy at times. Palm detection might help, but you'll need to tweak it to your liking. The default settings are in /usr/share/X11/xorg.conf.d/; don't modify these, those files will be overwritten upon upgrade. Instead, add your own into /etc/X11/xorg.conf.d/:

$ cat /etc/X11/xorg.conf.d/50-synaptics.conf
Section "InputClass"
    Identifier      "XPS 13 settings"
    MatchIsTouchpad "yes"
    MatchDriver     "synaptics"
    Option          "PalmDetect"    "1"
    Option          "PalmMinWidth"  "9"
    Option          "PalmMinZ"      "100"

Since the touchpad act kept being quirky (and locking up occassionally), I have switched to libinput. Install the xserver-xorg-input-libinput package and add the following settings:

$ cat /etc/X11/xorg.conf.d/touchpad.conf 
Section "InputClass"
    Identifier      "XPS 13 touchpad"
    MatchDevicePath "/dev/input/event*"
    MatchIsTouchpad     "True"
    MatchDriver     "libinput"
    Option      "MiddleEmulation" "1"
    Option      "PalmDetect" "1"
    Option      "PalmMinWidth" "8"
    Option      "PalmMinZ" "100"
    Option      "VertTwoFingerScroll" "1"
    Option      "HorizTwoFingerScroll" "1"

Make sure to remove the synaptics driver and configuration file.

Fn keys
They all work. Somehow, the wireless switch doesn't seem to do anything anymore. Dmesg shows this when I push it:

dell_wmi: Unknown key 151 pressed

EFI updates
This is as easy as putting the executables you get from Dell's site in the root of your ESP partition. Reboot, press F12, select Update BIOS. That's it. Warning: Dell's 1.1.7 update does not allow rolling back to older EFI versions. It's supposed to fix some powersaving issues for the SSD, but it also seems to make booting unreliable. You have been warned.

I have applied the usual tweaks, checking with Powertop etc. See my post about powersaving. The laptop consumes ~7W on battery. I've seen lower figures reported on Linux, but apparently often for older XPS 13 models. The NVMe SSD isn't fully tuned either (and that's Dell's fault but they still don't seem to have fixed it).


Bluetooth hanging after resume from S3
Although this problem has plagued me for a while, I only recently remembered the suspend/hibernation processes provided hooks allowing for additional scripts to be run before and after. Until Debian Wheezy (7), pm-utils was used, but from Debian Jessie (8) systemd-suspend is used, and it allows for scripts to be placed in /lib/systemd/system-sleep/.

Bluetooth almost always hangs when I resume from suspend, and unloading/reloading the module seldom works at that point (lots of errors in dmesg about the device not being found anymore, Bluetooth service hanging, ...). I am now unloading (before) and reloading (after) the Bluetooth modules, and that allows me to work around this. You'll find the script below.

$ cat /lib/systemd/system-sleep/bluetooth

case $1 in
  /bin/systemctl stop bluetooth.service
  modprobe -r bnep rfcomm btintel btusb bluetooth
  modprobe bnep rfcomm btintel btusb bluetooth
  /bin/systemctl start bluetooth.service


After almost 5 years, the battery started to degrade severely and the Dell UEFI battery utility unceremoniously told me it had reached 'End of Life'. Calling Dell didn't help, as they apparently did not carry any XPS 13 9350 batteries anymore - I was instead advised to look 'online' for a replacement battery (ie 'Google it'). Since it's very difficult to make sure you're getting a decent product - more often than not even a good replacement battery won't offer the same battery life as an OEM one - I was a bit wary. You can't really rely on reviews often either, as Amazon showed in the past years. My previous experience with replacing a battery - with my HP 6510b - wasn't exactly a real succes either. So, after looking around a bit, and finding a replacement battery on Amazon that not only had good reviews but also enough reviews to look trustworthy, I bit the bullet. Replacing the battery was rather easy; the lower right eye needed a bit of nudging to hook into the chassis but other than that it fitted snugly. Battery life hovers around 10 hours, but I need to see how it behaves after charging and fully discharging a few times.

Updated: 2021-04-01