Dell XPS 13 and Debian Sid

I purchased a Dell XPS 13 Ultrabook, to replace my ageing Apple Macbook 2,1. After six years of daily use, it’s (over)due to retire.

The reasons for not going for another Apple product:

  • I don’t agree with their behaviour in the various markets where they’re competing. It’s competing, Apple, not sueing for the smallest tidbit. Want to survive, innovate.
  • I no longer use OSX. Linux all the way, baby.
  • Seriously overpriced hardware for the same specifications. The only thing going for them is the screen resolution on the Retina models.

Extra reasons to go for the XPS 13:

  • Nice extra discount through work.
  • Very nice screen resolution on a 13″. Not quite up to retina specs yet, but this is good enough ;)
  • Ultrabook. Light. Long battery.
  • SSD, and loads of RAM

Spec comparison:

Apple Macbook 2,1Dell XPS 13 (2013)
Screen resolution:1200×8001920×1200
Storage:80GiB HDD256GiB SSD
CPU:Core2Duo 2GHzCore i5-3337U
Battery life:3-4 hours7-8 hours

The laptop arrived in a sortof-stylish black Dell box, unfortunately taped over with all kinds of deliver stickers. Oh well.

The box it was shipped in

The box it was shipped in

Inside you can see the box for the power cord, and the box with the actual laptop. Nicely packaged, pluspoints here, Dell ;)

Nicely packaged

Nicely packaged

Fancy Dell box containing the actual laptop

Fancy Dell box containing the actual laptop

The actual laptop. Wrapped in plastic, protected with foam

The actual laptop. Wrapped in plastic, protected with foam

All unpacked and ready to rock!

All unpacked and ready to rock!

It’s also a bit smaller than my old Macbook, although they’re both rated as being 13″ laptops.

Dell XPS13 on top of my Macbook 2.1. Bit smaller. A lot lighter.

Dell XPS13 on top of my Macbook 2.1. Bit smaller. A lot lighter.

Unfortunately, the laptop I got shipped originally had some issues: plenty of backlight bleeding, and a wifi module that was broken – it would detect a wireless network for 1-2 minutes after powerup, and then nothing.
I called Dell, they sent round a technician… but after this repair, it was completely dead. So they shipped me a replacement, on which I’m typing this blog-post.

Back to the actual laptop – it’s a nice piece of hardware, but the Core i5 version comes shipped with Windows 8, unfortunately. Luckely for us, it’s easy to put something else on (or next) to it ;)
(note: the Core i7 version is the ‘developer’ version, which is shipped with Ubuntu! :D It’s called Project Sputnik)

Steps to shrink the Windows 8 partition (if you want to keep it around, otherwise you can just wipe the entire SDD. Don’t forget to first create some recovery images, though!):

  • Disable hibernate: open a command prompt (in admin mode) and type: powercfg /H off
  • Disable the windows pagefile (you can do this in Control Panel – System – Advanced Settings)
  • Disable system restore (ditto)

A reboot later, you should be able to shrink the partition to the minimum required (I left it around 50GiB). If you don’t disable all that crap, Windows will only allow you to shrink down to around 110GiB, which is frankly ridiculous.
You can enable everything again after shrinking the partition.

This will leave us with a nice amount of storage to put Linux on.

Now, download the Debian Testing latest weekly dvd 1 for amd64. You’ll also need a USB stick of 8GiB (4.5 is needed). Format that stick as FAT32, and copy the content of the DVD image on the stick (not the actual ISO).

After this is done, you can reboot the laptop. When you see the Dell logo flash on the screen, quickly hit F12 (repeatedly). This will present you with the boot menu, where you can choose what to boot. I recommend to pick ‘Legacy mode’, and from there ‘USB storage’. Normally this will boot the Debian installer from the memory stick.

To install Debian, I refer you to the Debian Installation Manual, an excellent document that details all the steps. Just be careful not to wipe out the existing Windows partition, should you want to keep it ;)

Some time later, you’ll get to reboot the system, and Debian should be the default choice to boot with the UEFI boot manager ;)

At this point it’s also highly recommended to add unstable and experimental sources to your /etc/apt/sources.list file – the testing distribution just installed it – ahem – slightly outdated in software terms, and we’ll definitely need a new kernel.

Add this to /etc/apt/sources.list (replacing XX with your two-letter country code):

deb sid main contrib non-free
deb experimental main contrib non-free
deb-src experimental main contrib non-free

Do an apt-get update && apt-get dist-upgrade and you’re good to go on the packages. For a newer kernel, do apt-cache search linux-image and check for the latest kernel release, right now that is linux-image-3.8-trunk-amd64, which you can install with apt-get install -t experimental linux-image-3.8-trunk-amd64.

Now, to fix some of the issues I’ve encountered:

Non-functional wifi
On another laptop (or in Windows), download the firmware-iwlwifi package. Install it – a reboot later you should be able to configure the wireless interface. You might also need wpasupplicant if you use encryption on your network. (I’m lazy, so I downloaded all the packages needed for wicd and configured stuff that way.)

Laptop wakes from suspend out of the blue
I’ve encountered a few times that the machine came out of suspend without any trigger from me – highly annoying (and dangerous, should this happen while the machine is in a backpack and start to heat up). I’ve found this Bug report on Launchpad about it. The fix seems to be to disable “Smart Connect” in the BIOS. I’ve tried it here, seems to work.

Touchpad isn’t recognized as a touchpad
The patches to support the touchpad are on route to be included in kernel 3.9, but (at the time of writing) that one hasn’t been released yet. So we need to take the latest kernel available in Debian Experimental (3.8.5) and patch this with the driver. Luckely Debian has The Linux Kernel Handbook which explains how to do all this the proper Debian way ;)

First, install the necessary build packages: apt-get install build-essential fakeroot devscripts && apt-get build-dep linux-3.8
Next, get the kernel sourcecode: apt-get source linux-image-3.8-trunk-amd64 -t experimental
Download the patches too: wget '' -O /usr/src/cypress-touchpad-v7.patch and wget '' -O /usr/src/cypress-touchpad-v7.patch
Now, go to the source directory cd /usr/src/linux-3.8.5 and execute the script to rebuild the kernel with the two patches:  bash debian/bin/test-patches ../cypress-touchpad-v7.patch ../increase-struct-ps2dev-cmdbuf-to-8-bytes.patch
Now go eat a pizza, make some coffee, solve a theorem or so. It’ll take a bit. When it finishes, you’ll have another shiny kernel in /usr/src, which you can install with dpkg -i linux-image-3.8-trunk-amd64_3.8.5-1~experimental.1a~test_amd64.deb And Bob’s your uncle.

Brightness level doesn’t stick after a suspend/resume
For this I made a custom suspend-resume hook for pm-utils. Add the following script as /etc/pm.d/sleep.d/00backlight



case $1 in
echo “Saving backlight brightness level…”
cat $SYSFS/actual_brightness > $TMP
if [ -e $TMP ]; then
echo “Restoring backlight brightness level…”
cat $TMP > $SYSFS/brightness
rm $TMP
echo “No brightness level save file found.”
echo “Dunno what you’re trying…”
exit 1

This script will read the backlight brightness level upon suspend, and store it in a file in /var/tmp. Upon resume, the value is read from the file and the brightness level set to it.

The permanent fix is also scheduled for kernel 3.9.

Unreadable (way too tiny) fonts in applications
This is actually a drawback from having a high-resolution screen: a lot fits on it, but the fonts are tiny.
I had the issue mostly in Opera, IceDove (a rebranded Thunderbird) and XTerm, my X Terminal of choice.

In Opera you can just set the default zoom level. I put this at 120%, everything is readable now.
For Thunderbird, I can advise installing the ViewAbout extension, and then looking in View -> ViewAbout -> about:config for the setting layout.css.devPixelsPerPx, and setting this to “1.2”.
For XTerm, I added this to .Xresources (in my home directory):

XTerm*faceName: Dejavu Sans Mono
XTerm*faceSize: 11

so that XTerm uses the Dejavu Sans Mono truetype font, size 11, instead of the default.

Running Linux on an Apple Macbook 2,1

This page documents my attempts (and successes!) to get Linux fully working on an Intel-based Apple MacBook, 2007 model.

Note: I no longer have this device.

DISCLAIMER: This information is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. If you fry your system by using this information that’s _your_ problem. Not mine. I accept no responsability for what happens with this information whatsoever.

PCI Specs

00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub (rev 03)
00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller (rev 03)
00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller (rev 03)
00:07.0 Performance counters: Intel Corporation Device 27a3 (rev 03)
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02)
00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 02)
00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 02)
00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 (rev 02)
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 (rev 02)
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2)
00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 02)
00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 02)
00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) SATA IDE Controller (rev 02)
00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 02)
01:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8053 PCI-E Gigabit Ethernet Controller (rev 22)
02:00.0 Network controller: Atheros Communications Inc. AR5418 802.11abgn Wireless PCI Express Adapter (rev 01)
03:03.0 FireWire (IEEE 1394): Agere Systems FW323 (rev 61)

Here’s a detailed pci listing.

Linux 2.6.x kernel

The latest 2.6 kernel is:
Here’s my 2.6.26 kernel configuration. This is actually the stock debian kernel.


Hardware: this is the Intel Corporation 82801G (ICH7 Family) USB chip.

USB worked out of the box by loading the following modules:

  • usb-uhci (USB 1.x support)
  • ehci-hcd (USB 2 support)

It is required to install the udev package.

10/100/1000 MBit ethernet LAN

Hardware: this is a Marvell Technology Group Ltd. 88E8053 PCI-E Gigabit Ethernet Controller chip.

Works out of the box, using the sky2 module.


Hardware: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller

Works out of the box with the ALSA module called snd_hda_intel module.

VGA Framebuffer console

Hardware: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller

Since the inception of kernel-mode-setting (KMS), no additional work is needed to get
a decent framebuffer console. Load the i915 module, and you’re set.


Hardware: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller

To make it working just set your video driver to intel:

		Section "Device"
			Identifier	"Generic Video Card"
			Driver		"intel"

With modern Xorg versions, you don’t even need to specify this anymore.


Hardware: HL-DT-ST DVDRW GWA4080MA.

Works out of the box, using libata.


Hardeware: Apple, Inc. Bluetooth HCI MacBookPro.

Works perfectly with the bluetooth and btusb modules.

Debian users might want to install the bluetooth package.


SATA drive. Works out of the box, if you enable the ata_piix module.

DMA is automagically enabled. I use hdparm to set an extra parameter: hdparm -F /dev/sda


  • -F: set security-freeze (so that nothing can accidentily lock your disk with a password)

For Debian; check the hdparm package.


You need this if you don’t want your CPU to eat your batteries empty. It’s included in the kernel config.

It works perfectly after loading the acpi_cpufreq and any of the cpufreq- modules.

You can either install the cpufreqd daemon, or use the cpufreq_ondemand module (which modulates the speed by requirement).

For Debian, check the cpufreqd or powernowd packages.

Wireless Lan

Hardware: Atheros Communications Inc. AR5418 802.11abgn Wireless PCI Express Adapter

Works out of the box with the ath9k kernel module.


Hardware: Atheros Communications Inc. AR5418 802.11abgn Wireless PCI Express Adapter

This also works pretty much out of the box. The kernel module to use is ochi_1394.


Currently not supported by the linux kernel. Possible patch: is here. Untested

Multimedia Keys

This laptop has several function keys which allow for the changing of the volume, brightness, …

After installation of pommed, these keys work perfectly.

Debian users can install the pommed and gpomme packages.

(Userspace) Software Suspend

Works: suspend to ram (s2ram). I’m using the following parameters: -f (force) -p (do VBE post) -m (save/restore VBE mode)

Doesn’t work: suspend to disk (s2disk,s2both): causes a full system freeze, need to dig into this further.

iSight webcam

Works with kernel supplied driver.

You need to extract the firmware first from the Mac OS X driver, use isight-firmware-tools. Debian users can use the isight-firmware-tools package.

Touchpad in console

You can use the touchpad with gpm, using the exps2 driver.

Touchpad in X.Org

This is an AppleTouch touchpad. You can use it with this driver.

Add the following to the /etc/X11/xorg.conf file:

Section "InputDevice"
        Identifier      "AppleTouch"
        Driver          "synaptics"
        Option          "AccelFactor"           "0.015"
        Option          "BottomEdge"            "310"
        Option          "Device"                "/dev/psaux"
        Option          "FingerHigh"            "30"
        Option          "FingerLow"             "20"
        Option          "HorizScrollDelta"      "0"
        Option          "LeftEdge"              "100"
        Option          "MaxDoubleTapTime"      "180"
        Option          "MaxSpeed"              "0.88"
        Option          "MaxTapMove"            "220"
        Option          "MaxTapTime"            "150"
        Option          "MinSpeed"              "0.79"
        Option          "Protocol"              "auto-dev"
        Option          "RightEdge"             "1120"
        Option          "SendCoreEvents"        "true"
        Option          "SHMConfig"             "on"
        Option          "TapButton2"            "3"
        Option          "TapButton3"            "2"
        Option          "TopEdge"               "50"
        Option          "VertScrollDelta"       "25"
        Option          "VertTwoFingerScroll"   "true"

Here’s my complete xorg.conf file

It’s advisable to run syndaemon after starting X, to prevent accidental taps while you’re typing.
example: syndaemon -i 2 -t -d

Debian users can install the xserver-xorg-input-synaptics package.


Status update!

Short summary of what I’ve been busy with:

  • We’ve moved to a new place, near the city of Ghent. Lots of painting needed be done, decoration, stuff like that… kept me busy for the better part of two months. The results are viewable here.
  • We’ve also moved internet providers, since the all-in-one bundles (TV+Telephony+Internet) came out cheaper in the end. So I’m back at Telenet.
  • Friend from Spain came over during the Gentse Feesten. It’s a treat being able to go by bus to the centre of Ghent in 10ish minutes ;)
  • On a sadder note, one of our smoothcoat cavies, Macchiatto, passed away on july 20th.
  • I’ve managed to trash the linux installation on my macbook, and since I too lazy I put Mac OS X on it again. Said macbook also had to go in for repairs anyway (crack in the topcase). All fixed now, free of charge.

I think that’s about it. Mostly getting settled now in the new place… so far so good ;)

Updating Boot Camp to 2.1

For a reason not to be mentioned here, I needed to install Windows XP (legal license) on my Macbook. Easily done, Boot Camp Assistant, install windows, install drivers, the works.

Then I wanted to update to Boot Camp 2.1, to be able to update windows to SP3.

Big nono. Didn’t want to install. Update constantly failed, no matter what.

After some googling, I ran across this post on the MacRumors Forums, which basically says that to install it, you need to open up your registry editor (start -> run -> regedit.exe), do a search for “Boot Camp Services” and locate the key which reads “Language”. Modify it, and change the Decimal value to 1033 (hex 409).

Restart the installer after this, and it’ll install. Go figure.

Linux on the Apple Macbook

I was bored recently, and decided to install Linux on my Macbook. I opted for the distribution I like best – Debian (unstable/Sid).

After some twiddling it all works rather well, I’m amazed how well ;) Even suspend to ram works flawlessly! (that was a different case a year ago, when I last had linux on a laptop). The only things I still have to get working is the framebuffer console (so I get something better than 80×25), and the infrared. Nothing very high on the agenda, though :)

I’ve detailed the installation instructions in this post.

Linux on my MacBook

I’m currently trying to get Linux (Debian Sid) working on my MacBook… it’s installed, but still needs lots of tweaking.

Most of the things work out of the box, except the things listed below:

Specific things that work (after tweaking):

  • Xorg with resolution at 1280×800
  • WiFi (atheros)
  • special buttons (volume/brightness/…)

Things that need to work still:

  • Touchpad (well, it works, but it needs to work better)
  • iSight

Sources I’m using at the moment:

I’ll write a detailed post on this later… when I’m not uberly lazy ;)

… and back to Apple…


Yesterday I picked up my macbook, which recently returned from repair, and a screw fell out. wtf?

I checked, you can’t tighten it, seems the internal socket where the screw is supposed to be set in is broken/missing. Way to go Apple. You’re definitely scoring points on this one… negative points.

I took it back to the dealer, they’re going to send it back to Apple.