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.
Last update: 7 Jan 17
Note: commands starting with # has to be ran with root privildges (sudo or su), commands starting with $ as user.
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.
The intel driver has an option (TearFree) to prevent video tearing, but it's disabled by default.
With some kernel versions they work out of the box, with some others you need to add an argument to the kernel command line.
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 (v22.214.171.124 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.
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.
Building the upstream driver is quite simple (see below to build the driver provided by your distro).
These are instructions to patch and build the driver used by your distro. The final result will be a deb that you can install.
If you don't want to build anything, you can try to use to use syndaemon which allows to disable the touchpad while typing.
(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.
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_scriptCreate /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:
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.
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.
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.
(28 November 2014) Use this utility to speed up Intel Rapid Start. See the README for instructions and other info.
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.
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.
No changes required. Revert all the previous changes you may have done:
When headphones are used, a constant white noise can be heard. A simple script can fix the problem.
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).
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
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.
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.
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
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)