XPS13 - 9333

Here a simple pages with some useful configuration for this laptop, useful especially for those of you who don't want to use the official Ubuntu images.
Nearly everything works out of the box, but few things required a manual configuration.

I'm using Debian, so some of what written below might not be applicable directly to your distro.

If you have suggestions or something to ask, mail me at You must enable JavaScript to see the address.

Last update: 7 Jan 17


Note: commands starting with # has to be ran with root privildges (sudo or su), commands starting with $ as user.

Init script

This a simple init script to performs some actions on boot. By default, it does nothing, see Light sensor, Battery life, SSD Performance, Headset/headphones background noise.

Create /etc/init.d/xps, make it executable and create System V style init script links: Run the last command when you change the header of the script.

Ambient Light sensor

The driver to read the ambient light sensor readings is available starting from linux 4.2 (link to the commit). Sensor readings will be available at /sys/bus/iio/devices/iio:device*/in_illuminance_raw (most likely it will be iio:device0).

With older kernels, use alternative drivers such as this one.

Video tearing

The intel driver has an option (TearFree) to prevent video tearing, but it's disabled by default.

To know whether the option is enabled or not, run the following command: If it's not enabled, create /etc/X11/xorg.conf.d/10-intel.conf: and restart X or reboot.

Brightness keys

With some kernel versions they work out of the box, with some others you need to add an argument to the kernel command line.

To make them work with v3.13, edit and add to GRUB_CMDLINE_LINUX video.use_native_backlight=1. For example Then update GRUB running as root: and reboot.


If you are used to regular touchpads with physical buttons, you'll maybe find using a trackpad a bit troubling. Resting your fingers on the bottom is not possible. The latest versions of the driver have a better support of trackpads, so I suggest you to try them (v1.7.99.1 or newer). I still can't rest my fingers on the bottom and normally use the touchpad, but at least I don't have unexpected jumps when I try to click while moving the pointer.
Take a look at this patch to prevent cursor jumps while using two fingers. (17 September 14) A much better fix is now upstream.

Finger width and palm detection

If you are not using kernel v3.16 or newer, the information about finger widths necessary for the palm detection are not sent, so you need to patch the xorg driver not to rely on them for the palm detection.
The new driver send information about finger widths, but you need an updated version of the xorg driver.

For kernel older than 3.16, I wrote this patch that makes the driver rely only on the pressure for the palm detection. I didn't fix the code in a proper way handling our case as a special one, I simply got rid of the code which breaks the functionality on this laptop.

Follow one of the following guides to patch the xorg driver.

Build and patch upstream driver

Building the upstream driver is quite simple (see below to build the driver provided by your distro).

Uninstall the current driver (reinstall it in case of problems). In this way your patched driver won't be removed during updates. Note: the following command remove also xserver-xorg-input-all: Install the needed dependecies (add the needed deb-src if not available): If you want to install the upstream driver, download the sources with the following command (see below otherwise): Apply the following patch: Build and install the driver: Create /etc/X11/xorg.conf.d/20-synaptics.conf (adjust the values) and restart X: Find the optimal value for PalmMinZ using synclient and update 20-synaptics.conf accordingly: In case of problems with this self-built driver, reinstall the original driver with:

Build and patch Debian driver

These are instructions to patch and build the driver used by your distro. The final result will be a deb that you can install.

Download the source code with: Apply the patch: Build the deb: and install it.
You can also build this driver with the same commands used to build the upstream driver, but you won't obtain a deb.

Disable touchpad while typing

If you don't want to build anything, you can try to use to use syndaemon which allows to disable the touchpad while typing.

Run as user the following command (it can't be added to /etc/init.d/xps to execute it on boot):

Touchpad gestures

(13 June 14) Here you can instead find a patch to add the support to three finger swipes to the synaptics driver (here an updated version).
You could also try to use xf86-input-mtrack instead of xf86-input-synaptics.

Battery life

Note: you might want to use some updated tool (e.g. TLP) or update this script manually (use powertop to know if something has to be fixed).

powertop is a powerful tool. Use it to find what could be changed to improve the battery life. Running it everytime could be tiresome though, so you could use a couple of scripts to do everything automatically.

(9 August 14): pm-utils no longer executes the scripts in /etc/pm/ with upower 0.99+. Create a udev rule to bring this functionality back:

(9 August 14): added command for bluetooth power saving mode in 10-power_script

Create /etc/pm/power.d/10-power_script and /etc/pm/sleep.d/10-run_power_script (25 June 14: white_noise_fix.py is run on resume, see Headset/headphones background noise) and make them executable: The second script is used to re-run the first script when the laptop is resumed from suspend.

Note: The touchscreen becomes less reactive if not used for a while and sometimes it stops working completely.
Use powertop to re-enable it immediately. Consider to comment out the related line from the script to prevent this issue.

Note: Enable SATA link power Managmenet for host2 could cause weird keyboard lags and repeating. If it happens to you, comment it out in the script. Be aware that this option saves a lot of power.
(update 7 Jan 17) Refer to this for a better solution.

SSD Performance

Trim / periodically to maintain the performance of the SSD or add the discard flag to your fstab. Read this page on Wikipedia for more info.

You can trim / daily using anacron and this simple script: You might want to check if your distro is doing this already.

Intel Rapid Start Technology

WARNING: It appears that the firmware sets a timer on suspend that it's not removed in case the laptop is manually resumed before it is expired. So, let's say you set the timeout to 15 minutes. If you suspend your laptop and within 15 minutes you resume and suspend it again, it will wake automatically after those 15 minutes have passed since the first suspension.
(Update 19 June 15): if you want to use Intel Rapid Start, apply this patch until the problem is fixed upstream. A fix has been included in linux v4.9.

The driver for this feature has been around for a while now, but it's not always enabled.
A special partition is required for this to work, read the post linked. The regular version of the XPS 13 comes with the partition, I'm not sure the dev edition has it.

To know if the driver is available, run the following command: If you don't get any output or the result is: then you have to manually build the driver.
Note that the driver is needed to change the timeout. If you have the needed partition, the BIOS will automatically enable Intel Rapid Start (unless differently specified in the BIOS) with a timeout of 120 minutes.

(28 November 2014) Use this utility to speed up Intel Rapid Start. See the README for instructions and other info.

Intel Smart Connect

Here the help of INTEL_SMARTCONNECT which quickly what it is and what the kernel can do:

Intel Smart Connect is a technology intended to permit devices to
update state by resuming for a short period of time at regular
intervals. If a user enables this functionality under Windows and
then reboots into Linux, the system may remain configured to resume
on suspend. In the absence of any userspace to support it, the system
will then remain awake until something triggers another suspend.

This driver checks to determine whether the device has Intel Smart
Connect enabled, and if so disables it.

You can disable this feature from the BIOS or if you want to use it from Windows, follow the instructions here below.

To know if you have the driver is available, run: If you don't get any output or the result is: then you have to manually build the driver.

Keyboard backlight

There are three different illumination modes available: on, off and auto.
auto is the default mode and set the illumination in base of the ambient light. This mode is disabled once the backlight is manually changed with Fn+F6, which switches to either on or off.
libsmbios allows you to switch mode from the command line, however setting auto has no effect and a reboot is required.

(16 November 14) libsmbios was updated and you can now control the keyboard backlight. There's still no option to set auto though. Here the git repo with the updated code.
(23 December 14) Starting from kernel 3.19 4.1 it's possible to change the keyboard illumination timeout and level from /sys/class/leds/dell::kbd_backlight/. Auto mode is still missing (and probably won't be implemented anytime soon).

Headset/headphones background noise

Kernel v3.16+

No changes required. Revert all the previous changes you may have done:

If you want to backport the kernel patches, pick the followings: 5e6db669 033b0a7c. These patches will allow you to keep the power saving mode enabled.

Older kernels

When headphones are used, a constant white noise can be heard. A simple script can fix the problem.

Create /usr/local/bin/white_noise_fix.py After that, disable the power saving mode of the audio card to prevent pop noises, electrical noises and, more importantly, the white noise, which otherwise will come back: and to make the changes effective without a reboot: If you created /etc/init.d/xps (see here), then the script is automatically run on boot (update the script if you downloaded it before 15 May 14).

In /etc/init.d/xps there's also a line which unloads snd_hda_intel right before the machine is turned off. This will avoid a pop noise which can be heard as soon as the computer turns off (there's still a pop noise though).

Unreliable suspend/resume (and shutdown)

There has been a regression in 3.16 that causes issues while suspending the laptop after it has been used for a few hours (in some cases even during shutdown). The laptop simply freezes on suspend. The cause appears to be the kernel driver mei.

Blacklist both mei and mei_me to prevent issues.

More info at: https://bugzilla.kernel.org/show_bug.cgi?id=86241

Can't add/edit boot entries (UEFI)

Because of some buggy firmwares, by default the kernel won't allow any change to the EFI variable storage if it has less than 50% of free space. There's a kernel parameter to disable this protection, efi_no_storage_paranoia. If you notice things like GRUB fail while creating boot entries, most likely you've reached the 50% threshold.

Before you disable the protection with the mentioned command line parameter, look at /sys/fs/pstore/ and see if you have anything in there. If you do, delete all the files. Those are just old kernel logs that are stored in the permanent EFI variable storage. These logs are automatically generated whenever a kernel oops happens, as long as you have efi-pstore loaded. You can easily reach the 50% threshold with just a bunch of crashes.

More info at https://www.kernel.org/doc/Documentation/ABI/testing/pstore

Unsolved issues

Electrical noises

This laptop is known for the elec noises it makes. Unfortunately, there are no known solutions.

Update: the problems seems related to the audio card and apparentely unplugging one of the speakers solves the problem.

I've found that the electrical noise can be heard when:

Usually the audio card is deactivated when the laptop unplugged and no audio is being played.

Slow brightness keys

Fn brightness keys works, but they are slow. If you keep Fn+F5 (brightness up) pressed for a while the brightness will keep increasing even after you've released the key. This is a kernel issue that still needs to be fixed: https://bugzilla.kernel.org/show_bug.cgi?id=94411. The problem has been fixed in linux v4.2

Turbo disabled upon resume

The BIOS automatically disables the Turbo when the AC is disconnected. If by chance you suspend your laptop while unplugged, plug it in and then resume it, the turbo will stay disabled. You must unplug/replug re-enable it. When the turbo is disabled, the CPU can't go beyond 1.8GHz. (it's actually possible to override the BIOS preference with msr-tools)