Main menu

howtos, tutorials and tech-porn

Monthly Archives: November 2015

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.

Installation

BIOS:

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.)

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).

Wifi

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.

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:

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.

Caveats

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.

UPDATE: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

http://kernel.ubuntu.com/~kernel-ppa/mainline/
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.