Dell XPS 13

Fri 15 June 2018

I've bought Dell XPS 13 (9360) around May 2017, it was my primary machine for a year, so I have some things to share from direct experience.

First, here is my initial configuration:

  • 1080p anti-glare screen (with CABC enabled),
  • i5-7200U dual-core with HT,
  • 8GB of RAM,
  • 256G Toshiba NVMe (THNSN5256GPUK),
  • Killer WiFi (Atheros QCA6174 802.11ac),
  • Ubuntu preinstalled.

Currently I've replaced WiFi with an Intel 8260 and run Debian unstable.

Known issues and solutions

Content adaptive brightness (CABC)

Laptop comes with CABC enabled. It means that when displayed content is dark, panel automatically reduces brightness, and when content is light, it increases brightness significantly. In practice this means that when you switch to a terminal with dark background, you have to manually increase brightness to see anything, and when you switch back to browser, CABC helpfully burns your eyes out. That's the opposite of how this should work, and I can't fanthom who and for what reason thought it would be useful. Oh, and cherry on top is panel adjusting brightness back and forth while I do some text editing in Emacs, extremely annoying.

Hacks to disable CABC were available since about Nov 2017, and Dell finally came up with an official fix in Jan 2018 [1]. The panel firmware update tool is Windows only.

I think it's not technically difficult to write a Linux tool if only there was some way to recover badly flashed panels. Panel's EEPROM chip is available on I2C bus that's visible from Linux, and it should have a typical set of commands. But currently no one was able to reflash or access EEPROM after a botched reflash. People've bricked a lot of panels flashing wrong firmware images with no known way to recover. It's reported that Windows vendor tool can't flash, and I2C bus in Linux is in perpetually busy state.

WiFi stability

Killer Wireless is known to be unstable under both under Windows and Linus. There are countless posts around from people trying to find solution or to make Dell to exchange their card to an Intel one.

I've too experienced those problems early on. The card hanged from time to time, or spontaniously rebooted. Kernel reported those events in the kernel log with tracebacks and register printouts from WiFi's built-in CPU. All those problems were completely gone after firmware and kernel updates. So, fix is:

  • check out [2] repo,
  • replace /lib/firmware/lib/firmware/ath10k/QCA6174/hw3.0/firmware-6.bin with latest version from QCA6174/hw3.0/4.4.1/. I currently use version 110 and it works. There is also 4.4.1.c1 branch, but as far as I can tell from commit logs, 4.4.1 is preferrable. Replace board-2.bin too for a good measure.
  • the new firmware provides API v6 instead of older v4, and a recent kernel is required to use it. I think minimal version is 4.9. You can check kernel logs with dmesg to check what firmware was actually loaded.
  • you need to reboot in case of kernel upgrade. If only the firmware was changed, than it's enough to rmmod / modprobe ath10k modules.

I think in some time distros would update firmwares to recent versions and the problem would be completely gone.

BTW, I've swapped Atheros card with Intel 8260 since I needed ath10k for a WiFi AP, not because I had problems with it. Intel 8260 turned out to be quite useless for 5GHz AP.

Coil Whine

It's another well-known problem of XPS line of Dell laptops. Under load people report loud coil whine from keyboard area. Some say that it's much better with latest BIOS update, that it's especially noticable under Windows, that Linux's power saving reduces whine to almost nothing.

Maybe I'm lucky, but my laptop is fine in this regard. And that's not because I've lost my hearing, it's still quite sharp. Well, I do hear some clicks when e.g. scrolling a page in Firefox in a quiet room. Each page shift produces a very soft and short, almost unperceptable click. Between scrolls there is nothing. And don't hear it if I don't specifically concentrate on it.

That said, I use very minimalist Awesome WM with no 3D-something and no effects. And here are module options persumed to reduce noise and power consumption /etc/modprobe.d/i915.conf:

` options i915 modeset=1 enable_fbc=1 disable_power_well=0 enable_psr=0 enable_ips=0 `

SW configuration

Day-to-day use

There is a great article in Arch Linux Wiki [3] on what works, what doesn't, useful tips, etc. Other than that, here are bits of my experience with the laptop.

Brightness adjustments

With CABC disabled, black terminal is still too dark, and browser window / PDFs are too bright, and I had to adjust brightness manually after each switch.

In my usecase it's easy to adjust brightness automatically. I use Awesome WM with 14 virtual desktops. 1..6, 12..14 are typically used for terminals, while 7..11 are reserved for browsers, PDF datasheets, etc. So in this config it makes sense to use common backlight brightness level that is manually adjusted depending on environment, and then have a static but yet configurable offset for each desktop. It's easy to do with some program that is called on global and local brightness up / down events and desktop switch events.

First I've considered doing it with a python script, but it has to run with root privileges to modify backlight brightness, and setting suid on scripts is problematic. So here is a rust solution [4] that compiles to a binary. The binary should be tied to keyboard controls, so below are excerpts from related configs. It's assumed that the binary is copied into /usr/local/bin/ and has suid bit set.

/etc/acpi/events/backlight_up:

event=video/brightnessup
action=/usr/local/bin/backlight adjust_global 1

/etc/acpi/events/backlight_down:

event=video/brightnessdown
action=/usr/local/bin/backlight adjust_global -1

Patch ~/.config/awesome/rc.lua to use keys q, w, e to reset, decrease and increase virtual desktop's local brightness adjustment, and do correction on desktop switch.

-- {{{ Key bindings
globalkeys = awful.util.table.join(
    awful.key({ modkey,           }, "q", function () awful.spawn("/usr/local/bin/backlight set_local 0") end),
    awful.key({ modkey,           }, "w", function () awful.spawn("/usr/local/bin/backlight adjust_local -1") end),
    awful.key({ modkey,           }, "e", function () awful.spawn("/usr/local/bin/backlight adjust_local 1") end),
    ...
)


--- in the end of file:
tag.connect_signal("property::selected", function (tag)
    local active = ""
    for i, tag in pairs(awful.screen.focused().tags) do
        if tag.selected then
            active = active .. " " .. i
        end
    end
    awful.spawn("/usr/local/bin/backlight switch_desktop "..active)
end)

[1] http://www.dell.com/support/home/us/en/04/drivers/driversdetails?driverId=312K3 (Firmware Update for enabling or disabling Dynamic Brightness Control)

[2] https://github.com/kvalo/ath10k-firmware

[3] https://wiki.archlinux.org/index.php/Dell_XPS_13_(9360)

[4] https://gitlab.com/amorozov/awesome-xps-backlight

blogroll

social