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:
- Start Windows and remove the RST software (devicemanager under 'Storage controllers')
- Select safe mode for next start and reboot (
msconfig.exe
or
bcdedit /set {current} safeboot minimal
)
- Enter BIOS setup through rapid pressing of F2 during startup
- "System Configuration" => "SATA Operation": choose AHCI mode
- Start Windows
- In the device manager the driver should now have found the AHCI mode
- Restart Windows in normal mode (
bcdedit /deletevalue {current} safeboot
). All should be fine now.
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:
- amixer set Master 5%+
- amixer set Master 5%-
- amixer set Master toggle
Sometimes after a kernel upgrade the file at /var/lib/alsa/asound.state
needs to be removed. 'alsactl init
' could also fix this.
Testing:
- lsusb -d 0bda:402e -v
- aplay -l
This gives a list with outputs like "card 1, device 1" - cat /dev/urandom | aplay -Dhw:<card>,<device> -f S24_3LE -c 2
- pacmd list-sinks
- speaker-test
- pactl list
Possible fix:
- killall pulseaudio (this will auto respawn the daemon)
- start-pulseaudio-x11
- pulseaudio
- Add "load-module module-alsa-sink device=hw:1,1" to /etc/pulse/default.pa
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
- XPS 9300
Info
Remove BitLocker
- In the seach bar of windows type: "bitlocker"
- Open the "Device encryption"
- Disa…
- /etc/portage/make.conf
CFLAGS="-O2 -pipe"
CXXFLAGS="${CFLAGS}"
CHOST="x86_64-pc-linux-gnu"
MAKEOPTS="-j8"
PORTDIR="/usr/portage"
DISTDIR="${PORTDIR}/distfiles"
PKGDIR="${PORTDIR}/packages"
FEATURES="parallel-fetch"
PORTAGE_NICENESS="19"
USE="-* acl ads alsa apache2 apng berkdb bzip2 cairo classic client consolekit
 … - /etc/default/grub
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
#
# To populate all changes in this file you need to regenerate your
# grub configuration file afterwards:
# 'grub2-mkconfig -o /boot/grub/grub.cfg'
#
# See the grub info page for documentation on possible variables and… - /var/lib/portage/world
app-admin/syslog-ng
app-editors/mousepad
app-editors/vim
app-misc/mc
dev-db/phpmyadmin
dev-java/jdbc-mysql
dev-java/maven-bin
dev-java/tomcat-native
dev-vcs/git
games-misc/fortune-mod-bofh-excuses
mail-client/thunderbird-bin
media-fonts/terminus-font
media-gfx/dispcalgui
media-sound/spotify
net-misc/dhcpcd
net-misc/ntp