This is pretty new hardware and sadly, not everything works out of the box. Here’s a brief collection of notes about getting Ubuntu to run. Some of these settings may not be necessary, but they’re the ones that let me get to a working state.
- General -> Advanced Boot Options, set Enable Legacy Option ROMs
- Secure Boot -> Enable, set to Disabled
- System Configuration -> SATA Operation, set to AHCI (this will break Windows. You should reinstall it before installing Linux if you want a dual-boot system.)
- POST Behavior -> Fastboot, set to Thorough
Installation via USB key:
I like to use http://www.linuxliveusb.com/ (Windows) and put a live system on a USB key and install from that. I used plain Ubuntu (http://www.ubuntu.com/download/desktop), but I’m wagering that you can use any of the derivatives or other distros, too. Make sure to get the latest one; at the time of writing it’s 15.10 (64bit).
With the USB key attached, turn on the laptop and wait for it to display the DELL logo, then hammer away at that F12 key (boot option). You’ll see a list of boot device options, including some for UEFI and some for Legacy boot methods. Choose your USB key from the latter list (should be near the top).
At this point, boot into a Ubuntu live system. This should go without a hitch. Once booted, you’ll notice that your wifi doesn’t work, but more about that later. Start the installation and make your choices. If you want a dual boot setup, you’ll need to resize your Windows partition and then create two partitions manually; a larger ext4 for Ubuntu and a smaller swap (rule of thumb says equal the size of your RAM; I used 8192MiB). The device to install the bootloader (GRUB) to is /dev/nvme0n1, not the incorrectly pre-set /dev/nvme. Installation should go mostly fine, but you’ll not be able to get any updates from the internet during because we don’t have wifi yet.
Reboot and boot into Ubuntu. Which should be blazingly fast (and work).
The default wifi chip in the XPS 13 is a Dell DW1820A which is a combined bluetooth/wifi ac 2×2 device attached via PCIe. Bluetooth works out of the box, though for pairing/tethering for network access with my Android smartphone, I’ve had to manually disable the audio redirection on the phone.
The wifi portion is done by a chip from Broadcom, BCM4350, which has the PCI ID 14e4:43a3 and does not have support in any 4.2 (which is Ubuntu 15.10’s kernel) or 4.3 kernels yet. There is however a pretty recent (mid-September) patch that enables support for it, plus another patch that adds the necessary(?) firmware file to it, both of which apply to the experimental version of the kernel built on top of the 4.3 kernel. According to this, general support is planned for the 4.4 kernel. So… see you guys in a year. Just kidding.
UPDATE: Kernel 4.4-rc1 is upon us
and it fixes a dirty USB-related bug that consumed CPU. Instructions/Repo URL updated below. CPU still at 100% if no USB device is attached. That’s some weird shit.
We’ll need to get a hold of those newer commits as well as that firmware patch, and then compile our own kernel.
- Connect your laptop to the Internet.
Since there’s no physical Ethernet jack on the device, you may wanna do this via USB/bluetooth -> wifi tethering via your phone, or get one of those USB wireless/Ethernet adaptors.
This is a tricky spot; if you’re stuck here, get desperate and download all the packages from another computer to copy them onto the laptop and set up a new source entry for apt that points to that local repository.
- Get a hold of the following packages via apt-get:
sudo apt-get install git build-essential kernel-package fakeroot libncurses5-dev libssl-dev ccache
- Grab a copy of the net-next kernel repository:
cd git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
- Copy over your current Ubuntu kernel configuration to save some labour: (more detailed infos here)
cd net-next cp /boot/config-`uname -r` .config make oldconfig
- At this point, you’ll be prompted for several new kernel settings. Just hitting enter (= choosing the default option) is a good choice, just look out for prompts about brcmfmac (the driver that handles the wifi chip).
- Run this and wait an hour or so. Do something with the kids. Play a game. (LOCALVERSION can be set to anything you’d like, it’s just for you to recognize that you built this particular kernel.)
make -j `getconf _NPROCESSORS_ONLN` deb-pkg LOCALVERSION=-custom
- The above command will compile the kernel and generate Debian-style packages to later install from the directory above. they should look somewhat like this:
julian@constellation:~$ ll -h *.deb -rw-r--r-- 1 julian julian 944K Nov 11 01:48 linux-firmware-image-4.3.0-jules_4.3.0-jules-3_amd64.deb -rw-r--r-- 1 julian julian 6,9M Nov 11 01:49 linux-headers-4.3.0-jules_4.3.0-jules-3_amd64.deb -rw-r--r-- 1 julian julian 44M Nov 11 01:51 linux-image-4.3.0-jules_4.3.0-jules-3_amd64.deb -rw-r--r-- 1 julian julian 426M Nov 11 02:23 linux-image-4.3.0-jules-dbg_4.3.0-jules-3_amd64.deb -rw-r--r-- 1 julian julian 798K Nov 11 01:49 linux-libc-dev_4.3.0-jules-3_amd64.deb
- Install those packages:
cd .. sudo dpkg -i linux-image-4.3.0-jules_4.3.0-jules-3_amd64.deb sudo dpkg -i linux-headers-4.3.0-jules_4.3.0-jules-3_amd64.deb
- Grab this patch and apply it as root to your firmware folder:
wget https://gist.githubusercontent.com/bogenpirat/5056084fce79f769c7ea/raw/e79df1f09b4a000bb4a1ee111d62f4794f35fdca/brcm4350.patch sudo -s cd /lib/firmware git apply ~/brcm4350.patch
GRUB should have your new 4.3.0-custom kernel selected as the default. If you want to check, hit “e” in the boot menu and scan through the last few lines, it should mention the kernel’s LOCALVERSION you set above. You can boot from there with F10.
After you boot up, wifi should work out of the (new) box.
The net-next kernel isn’t without its issues. For example, some part of the USB system seems broken as i have kworker/ksoftirqd threads that consume a full CPU core as long as no USB devices are plugged in. That drains the battery real good. Going back to earlier commits may help in tracing down this issue, unfortunately I currently don’t have any spare time to do that.
This issue is fixed with 4.4-rc1. Still there.
Battery consumption isn’t that nice. Where with last year’s model you could apparently get as little as ~3.5W of power consumption, this year’s model gives me between
7 and 8W 6 and 7W in idle at 50% screen brightness and around 6W at the lowest, non-off brightness setting. Maybe future kernel patches will change this, but Skylake is allegedly already well-supported in kernel 4.3.0.
Further reading material
Has way more details than my article, but he kinda pussied out on trying to get the Broadcom chip working.
Ubuntu Mainline Kernel repository. Unfortunately that 4.3 kernel doesn’t have the net-next changes, also there was some screen flickering with this one that’s gone with the net-next master branch.
Looks like this currently doesn’t build correctly, but we may see a set of working binaries in the next few days.
Original firmware patch that had some more attribution in it, I messed with that a bit for the above gist.
The previous model’s Arch wiki page. Might have some useful information for fiddling with some of the internals.