Gentoo linux on Dell XPS 13

This manual is for the 9350 (2016 model) and 9380 (2019 model). Differences are indicated.

Use the newest of the newest kernel version. I'm using 4.5.0-rc3 and that is one of the first versions that boots consistently without a lot of patching.

Update 2021-01-23: I've upgraded to kernel 5.10.7 and on my 9300 the video still does not work optimal. Displays don't seem to be reliably enabled. It takes a couple of xrand runs to get all displays to show graphics. Sometimes I even have to unplug a disply to let it be enabled. Under Windows this is not an issue and all works fine.

Gentoo setup on encrypted root disk

As soon as the luks partition is created follow the steps:

cryptsetup luksOpen /dev/nvme0n1p9 root
mount /dev/mapper/root /mnt/gentoo
cp --dereference /etc/resolv.conf /mnt/gentoo/etc/
mount --types proc /proc /mnt/gentoo/proc
mount --rbind /sys /mnt/gentoo/sys
mount --rbind /dev /mnt/gentoo/dev
chroot /mnt/gentoo /bin/bash
source /etc/profile
export PS1="(chroot) ${PS1}"
mount /dev/nvme0n1p7 /boot

blkid
genkernel --install --disklabel --luks --lvm initramfs

SSD

Kernel: "CONFIG_BLK_DEV_NVME: NVM Express block device"

Disable the Intel Rapid Storage Technology and Secure boot setting in the Dell bios:

Touchpad

Kernel: "CONFIG_MOUSE_PS2_ELANTECH: Elantech PS/2 protocol extension"

For xorg also "x11-drivers/xf86-input-synaptics" by setting INPUT_DEVICES="evdev synaptics" in make.conf.

Touchscreen

Kernel: "CONFIG_HID_MULTITOUCH: HID Multitouch panels", "CONFIG_USB_HID: USB HID transport layer"

The 9380 uses an i2c touchscreen panel connected to a Designware chipset. This must be included in the kernel (CONFIG_I2C_DESIGNWARE_CORE & PLATFORM)

Intel video

Kernel: "CONFIG_DRM_I915: Intel 8xx/9xx/G3x/G4x/HD Graphics" as module or add the firmware files as blobs to the kernel.

Emerge "sys-kernel/linux-firmware".

To get "real" compositing in xfce4 the use flag "xcomposite" needs to be set.

Powersaving

Add "pcie_aspm=force i915.enable_fbc=1 i915.enable_rc6=7" to the kernel boot parameters in the /etc/default/grub file.

Wireless

9350: Kernel: "CONFIG_WLAN_VENDOR_BROADCOM: Broadcom devices", "CONFIG_BRCMFMAC: Broadcom IEEE802.11n embedded FullMAC WLAN driver" and "CONFIG_BRCMFMAC_PCIE: PCIE bus interface support for FullMAC driver".

9380: Qualcomm Atheros QCA6174 802.11ac

The driver as module or add the firmware as blob to the kernel.

Emerge "sys-kernel/linux-firmware". Also emerge "net-wireless/wpa_supplicant" with use-flags "qt4" to get wpa_gui.

Audio

To enable the function keys, go to Settings > Keyboard > Shortcuts. Add the three commands:

Sometimes after a kernel upgrade the file at /var/lib/alsa/asound.state needs to be removed. 'alsactl init' could also fix this.

Testing:

Possible fix:

 DA200 HDMI output

For this to work the Thunderbolt firmware must be up-to-date (see Dell driver site). Even then the maximum resolution I could get was 1280x800. Setting a higher resolution just results in a black screen and the monitor saying 'no signal found'.

Settings