Dell XPS 13 9310 with Linux


My veteran Thinkpad started to struggle with technology. After all, we need to use “modern technologies” like Slack1 and it couldn’t really handle multiple crappyelectron apps. So I got a late 2020 Dell XPS 13.

I’ve installed NixOS on it, via USB-tethering my wifi from my phone (wireless card didn’t work on installer USB, classic Linux suffering) and didn’t take long to boot into base system. Struggled a bit afterwards, until I realized that I am using a recent laptop and it’ll only work good with a recent kernel. So I’ve switched to latest available kernel (5.10.24). Then, to my surprise, everything I tried worked without any hiccups2. Only hardware I didn’t try is fingerprint reader (since I don’t want to use it), but I am sure it’ll also work if I enable it.



I must say, I am impressed. I was always a Thinkpad guy and I’m not sure how was Dell before XPS series, but this feels robust. Build quality is nice, keyboard is not bad (I guess I also need some time to get used to), and touchpad is way better than Thinkpads. I am still amazed about battery life. Normally best I could get on a laptop would be 4 hours with my usage, either with a mainline-distro like Ubuntu or fine-grained TLP settings on a custom kernel. Now I’m easily getting 7 hours and that feels awesome.

Also I saw people on the internet trying to change the sleep method from the only-supported “s2idle” (to old “deep” sleep). You can check it via cat /sys/power/mem_sleep command, this laptop only supports s2idle for now. Which, despite most people, I really liked. It drains the battery a bit more, but you get the reward of really fast wake ups.

It’s a bit sad that it only has 2 USB-C ports available, not because they’re few, but because they are USB-C and I am an old guy surrounded with USB-A devices. Anyway, looks like converters are small and cheap.

Enter docking. I have 2 monitors that I normally work with. Office IT sent the dock model WD19DC from Dell. I was expecting that to work well also, but boy was I wrong.. That piece of brick.. I have to give it to Dell, this is the first time that I see a linux-native firmware upgrade tool available for a dock. But even with latest firmware, that dock is nasty.
I’ve set up autorandr tool to automatically switch between profiles I have, but monitors were not getting any signals despite xrandr told me that they are on & used. On the other hand, arandr tool could make it work. Here is the thing: Both autorandr and arandr uses xrandr commands! After some log-checking, coffee, swearing and confusion, I realized (for some reason) it can only work when the switch is done via single xrandr command.



After a bit of hacking on autorandr, it’s also handled3. So at last, when I plug the dock, monitors are switched on automatically! I’ve reported this to Dell forums (apparently hardware vendors really like forums), but not sure if anyone can pick up that information and use to improve firmware or not.

  1. TBH I don’t even want to start about it here. Maybe on another post later. ↩︎

  2. One later addition, there was a hiccup apparently. I needed to remove intel_hid module before sleeping, since accelerometer or gyroscope on the device was waking it up randomly. It was a nice troubleshooting adventure again. ↩︎

  3. Heh I’ve discovered another awesome project from fd0: grobi. It has “atomic” parameter, which worked flawlessly. ↩︎