I recently started using a Dell XPS 13” Developer Edition (9370) running Ubuntu 16.04 as my work laptop. As I go through setup I thought it would be a good idea to keep track of all the little tweaks I’m doing. I hope someone finds this useful.
My laptop has 16GB of memory, a 512GB SSD, and the Ultra HD (3840 x 2160) touchscreen. I dock at work with the TB16 dock to my old 27” Apple Thunderbolt Display. My laptop was manufactured in June 2018. Depending on manufacture date, some of the problems below may not exist, or have different solutions.
I’m running Ubuntu 16.04 and Unity. I will eventually upgrade to 18.04 and Gnome when Dell officially supports it. I really need my work laptop to work, so I’m in no hurry to upgrade.
Hardware Issues
Here are notes on how I handled various hardware issues.
Out of the box
The laptop was basicaly usable out of the box, which was a pleasant surprise.
The fan rattles badly at low RPM. I suspect this will eventually require warranty replacement. The fan is not usually on, unless I’m doing a ton of disk I/O (e.g. installing a lot of packages). Once it gets to higher RPM it sounds fine.
The 1 key is not backlit. Actually it’s just the 1 that’s dark; the ! is backlit. This doesn’t really bother me but I assume it’s supposed to be lit. Maybe if/when they come to fix the fan I’ll report this too.
BIOS
I haven’t had to change any BIOS settings. It seems like earlier owners did for some issues (e.g. getting a TB16 dock to work).
You may optionally want to disable Content Adaptive Brightness Control (adjusts screen brightness based on screen content) if it bothers you. You can test if it is enabled on this page: https://tylerwatt12.com/dc/ I don’t find it bothersome.
As of June 2018, the BIOS has default settings to “trust” the Dell Thunderbolt docks, which solved a lot of docking problems.
Super (Windows) Key
This one was surprisingly complicated. It ships disabled by default. I read somewhere this is because of some licensing thing between Dell and Microsoft (unconfirmed).
You really want that key to bring up Dash search. To do so, follow the 10-step process on Dell’s support site.
Fn Keys
Fn-Esc toggles the default Fn key behavior between the media controls and the function keys themselves. What I mean is, if you want to just be able to hit F2 and have it lower sound, for instance, you may need to hit Fn-Esc to toggle that behavior on.
Sleep/Resume
There were a lot of issues reported by earlier users that the laptop would not go into deep sleep, and therefore would drain battery quickly when suspended. I have not experienced that and a look at cat /sys/power/mem_sleep
shows s2idle [deep]
, which is what you want (deep to be selected).
Touchpad
I find my big, clumsy hands are constantly hitting the trackpad and messing up my typing. There are a couple of different solutions out there for this problem, but I tried touchpad-indicator, and it’s done a really nice job for me. It will disable the touchpad when it detects typing. It will also disable the touchpad when it detects an external mouse (including my bluetooth mouse). This is all configurable.
Bluetooth
I managed to pair my bluetooth mouse with the laptop with some fiddling. I think I was picking up other bluetooth mice in the office perhaps. In the process, three ‘BlueTooth3600’ mice devices were showing in the bluetooth icon menu in the taskbar, despite only one showing in the bluetooth settings. To clear that up, I used the bluetoothctl
command-line program, which allowed me to delete all the entries and start over. All is working now.
Many users report bluetooth issues particularly after resume from suspend, and I definitely experienced it too. Bluetooth would appear active after suspend, and it would even report my mouse as connected, but it would not work.
I found this long thread on the Dell forums. Here was the key post for me. That user made a small script which attempts to restart bluetooth after suspend using the rfkill
command. It works for me about 75% of the time automatically as it is designed to do. The other 25% of the time, it doesn’t seem to wake back up after suspend (I can see the bluetooth icon in the taskbar is still disabled). In those cases, I just need to run the sudo rfkill unblock bluetooth
command manually and it works again. It can take quite a while for my bluetooth mouse to reconnect after a resume - up to 30 seconds sometimes, other times instant.
Webcam
The webcam was not working out of the box. Users have reported this is because newer XPS 13”s like mine have a webcam firmware version 1.5 instead of the older 1.0, which worked out of the box. The fix for this is in this thread with the Dell Official Solution posted. That post says that the fix will start shipping in the factory image soon, so if your laptop is much newer than June 2018 it likely won’t come with this issue.
Docking with the TB16
Note: As of June 2018, the BIOS had default settings to “trust” the Dell Thunderbolt docks, which seems to have solved a lot of docking problems earlier users had. If you have an earlier version, you might need to set your Thunderbolt security to None in the BIOS.
My Thunderbolt monitor, wired keyboard, wired mouse, USB3/Thunderbolt charging, wired ethernet, and audio all just worked out of the box with the laptop.
I originally thought the headphone jack on the TB16 was not working, but what was really happening was two-part confusion: first, the headphone device was listed as “USB Audio Headphone” in the sound settings (which makes sense in retrospect since it’s getting to the laptop via USB3, but I was expecting it to say something like “Headphone Jack”), and second, when you plug in headphones the sound output doesn’t automatically switch, you have to manually do it in the sound settings.
There are various hacks to try to get this to happen automatically, but I haven’t tried any of them yet.
Special Note on Apple Cinema and Thunderbolt Displays
I read that the Apple Thunderbolt 3 to Thunderbolt adapter will not work with Dell’s TB16 dock. Luckily, I read this before purchase, so I ordered a Startech Thunderbolt 3 to Thunderbolt adapter (which is also a Thunderbolt 3 to Thunderbolt 2) adapter. This worked perfectly. This was the relevant thread on the Dell forums.
Keyboard Backlight
The keyboard backlight has a short 10-second timeout by default. This was annoying for me. It can be changed with these commands:
# sudo chmod a+w /sys/class/leds/dell::kbd_backlight/stop_timeout
# sudo echo "60s" > /sys/class/leds/dell::kbd_backlight/stop_timeout
I’ve read this will only work on battery power under Ubuntu 16.04. I haven’t tested it under AC power. I also don’t yet know if this is sticky between reboots.
Software / Application Issues
Ubuntu
I updated Ubuntu packages immediately via sudo apt update
and sudo apt upgrade
. There were many upgrades available, right out of the box, including a newer kernel.
Interestingly, the Ubuntu Software GUI app seems to crash a few seconds after launch. Not sure what this is about but probably won’t debug it as I prefer doing updates from the command line anyhow.
Recovery Media
During setup there’s a note about how recovery media can be created using the Dell tool in the system settings. Spoiler: there is no Dell tool in the system settings.
However, I was able to go to http://www.dell.com/support/home/us/en/19/drivers/osiso/linux and enter my service code, which allowed me to download an ISO. I haven’t tried to use it.
Dealing with HiDPI Screen
In General
In the Display system settings, there should be a “scale factor for menu and title bars” slider. Mine was set at 1 and I changed it to 2. Many apps will honor that setting. However, not all of them will, hence the sections below for specific apps.
Spotify
Spotify needs to be started with the --force-device-scale-factor=2
command-line parameter (choose the scale factor that works best for you. I used 2 because that’s what I set my system-wide scaling to).
Implementing this was was a bit tricky. Spotify is installed as a Snap and I could not figure out how to change the command-line parameters for it. Instead, I had to create a custom desktop launcher for Spotify, which you do by creating a .desktop file. I installed a Gnome GUI tool to do this:
# sudo apt install gnome-panel
# gnome-desktop-item-edit --create-new ~/.local/share/applications/spotify-hidpi.desktop
Answer the prompts and voila. Now that I see what the tool made, I can do this by hand next time. The resulting file looks like:
#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Icon[en_US]=gnome-panel-launcher
Name[en_US]=spotify_hidpi
Exec=spotify --force-device-scale-factor=2
Name=spotify_hidpi
Icon=gnome-panel-launcher
I need a better icon but I didn’t know where to go look for the real Spotify icon, so it’s a generic gnome panel launcher icon for now.
Steam
In Steam’s Settings -> Interface, you’ll find “Enlarge text and icons based on monitor size”. Check the box and restart, and it should be decent.
Atom Editor
The atom-hidpi package is useful. It automatically scales the interface based on the width of the program window.
Enabling Touch Screen
Firefox
Enabling touch for Firefox was a two step process.
- Go into about:config, search for
dom.w3c_touch_events.enabled
, and change the value to1
. - Start firefox with the environment variable
MOZ_USE_XINPUT2=1
. I did this by editing the .desktop file like so: sudo vi /usr/share/applications/firefox.desktop
- Changing the
Exec
line to readExec=env MOZ_USE_XINPUT2=1 firefox %u
. Now when I start Firefox from Dash search or from the icon I pinned to the launcher, touch events are enabled and I can scroll and zoom.
Atom Editor
Atom needed the atom-touch-events
package to be installed to enable touch scrolling and zooming.
Multiple Monitors with Different DPI
At least in 16.04 and with X, this whole area is a headache. If you can get over the disappointment of using your shiny new HiDPI device at a lower resolution, this is in my experience actually the best way to deal with this for now. Setting my laptop to 1920x1080 has been the best solution for playing nicely with my Apple Thunderbolt Display and the various TVs and projectors in the conference rooms around here. Otherwise, you’re in for a headache…
The Headache
This is the biggest current headache for me. I think things will get better with Ubuntu 18.04/Gnome 3/Wayland (EDIT: No, it still sucks with Wayland. Almost no apps support Wayland natively, so they rely on Xwayland, which doesn’t support per-monitor scaling), but with 16.04/Unity/X11, this gets pretty hairy. The issue is if you’re trying to use your HiDPi laptop screen at native resolution and an external lower-DPI monitor at the same time. Thankfully, I don’t do this often - at the desk at work it’s just external monitor with the laptop lid closed.
However, in meetings I use both the laptop and the external TV/projector at the same time. X11 doesn’t support per-monitor scaling natively. There are some other ways to get at this, primarily using the xrandr
command to set the scaling per-device. So when I connect in a meeting, I can run xrandr --output DP-1 --auto --scale 2x2
which will shrink everything on the external monitor to a reasonable size while keeping the laptop screen usable. This creates issues when I disconnect and go back to my desk and hook the external monitor back up. There’s probably some magic order of disconnect HDMI, close laptop, hook up dock at desk, open laptop that I need to follow to avoid that, but I haven’t sorted it out yet.
Unfortunately, Gnome on 16.04 doesn’t help, it actually makes things worse because it doesn’t have per-desktop scaling settings in the GUI. The real hope seems to be Gnome 3 on Wayland, which we get with Ubuntu 18.04.