Laptop Dell XPS 15

From YobiWiki
Jump to navigation Jump to search

Notes about installing a Debian Stretch on a Dell XPS 15

Hardware

Dell XPS 15 model 9550 (variant with touchscreen & PCIe m.2 ssd)

From the configuration list:

  • 6th Generation Intel(R) Core (TM) i7-6700HQ Quad Core (6M Cache, up to 3.5 GHz)
  • 16Go (2x8Go) DDR4 2133MHz
  • 15.6" 4K Ultra HD (3840 x 2160) InfinityEdge touch, Sliver
  • 1To PCIe Solid State
  • DW1830 3x3 802.11ac 2.4/5GHz + Bluetooth 4.1
  • Dell 84 WHr 6-Cell Lithium-Ion Battery
  • Internal US/International Qwerty Backlit Keyboard

From the drivers list:

  • Realtek High Definition Audio ALC3266
  • Realtek RTS5242 PCIe Gen2 CardReader
  • Realtek USB GBE Ethernet Controller
  • ST Microlectronics LNG3DMTR Motion Sensor
  • Intel HD Graphics 530/P530
  • nVIDIA Geforce GTX 960M Graphics

From dmesg (incomplete):

  • BCM920703 Bluetooth 4.1 (firmware brcm/BCM-0a5c-6410.hcd)

From lspci:

00:00.0 Host bridge: Intel Corporation Sky Lake Host Bridge/DRAM Registers (rev 07)
00:01.0 PCI bridge: Intel Corporation Sky Lake PCIe Controller (x16) (rev 07)
00:02.0 VGA compatible controller: Intel Corporation Device 191b (rev 06)
00:04.0 Signal processing controller: Intel Corporation Device 1903 (rev 07)
00:14.0 USB controller: Intel Corporation Sunrise Point-H USB 3.0 xHCI Controller (rev 31)
00:14.2 Signal processing controller: Intel Corporation Sunrise Point-H Thermal subsystem (rev 31)
00:15.0 Signal processing controller: Intel Corporation Sunrise Point-H LPSS I2C Controller #0 (rev 31)
00:15.1 Signal processing controller: Intel Corporation Sunrise Point-H LPSS I2C Controller #1 (rev 31)
00:16.0 Communication controller: Intel Corporation Sunrise Point-H CSME HECI #1 (rev 31)
00:17.0 SATA controller: Intel Corporation Sunrise Point-H SATA Controller [AHCI mode] (rev 31)
00:1c.0 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #1 (rev f1)
00:1c.1 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #2 (rev f1)
00:1d.0 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #9 (rev f1)
00:1d.4 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #13 (rev f1)
00:1d.6 PCI bridge: Intel Corporation Sunrise Point-H PCI Express Root Port #15 (rev f1)
00:1f.0 ISA bridge: Intel Corporation Sunrise Point-H LPC Controller (rev 31)
00:1f.2 Memory controller: Intel Corporation Sunrise Point-H PMC (rev 31)
00:1f.3 Audio device: Intel Corporation Sunrise Point-H HD Audio (rev 31)
00:1f.4 SMBus: Intel Corporation Sunrise Point-H SMBus (rev 31)
01:00.0 3D controller: NVIDIA Corporation GM107M [GeForce GTX 960M] (rev a2)
02:00.0 Network controller: Broadcom Corporation BCM43602 802.11ac Wireless LAN SoC (rev 01)
03:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. Device 525a (rev 01)
04:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd Device a802 (rev 01)

From lsusb:

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 04f3:21d5 Elan Microelectronics Corp.            <= touchscreen
Bus 001 Device 002: ID 0a5c:6410 Broadcom Corp.                         <= bluetooth
Bus 001 Device 004: ID 0c45:6713 Microdia                               <= webcam
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

From lscpu:

Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                8
On-line CPU(s) list:   0-7
Thread(s) per core:    2
Core(s) per socket:    4
Socket(s):             1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 94
Model name:            Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
Stepping:              3
CPU MHz:               2847.812
CPU max MHz:           3500.0000
CPU min MHz:           800.0000
BogoMIPS:              5183.88
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              6144K
NUMA node0 CPU(s):     0-7
Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush 
dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts 
rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 
ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx 
f16c rdrand lahf_lm abm 3dnowprefetch ida arat epb pln pts dtherm hwp hwp_notify hwp_act_window hwp_epp 
intel_pt tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid 
rtm mpx rdseed adx smap clflushopt xsaveopt xsavec xgetbv1

Resources

General

I first tried to keep a dual-boot just in case, but once we disable Raid and put SATA in AHCI mode, Windows can't boot anymore. (later I read it could be possible to fix it by rebooting several times Windows till safe mode is kicked in, but it was too late for me.)

Just in case again, one can boot Windows and create a USB recovery.

Bios

  • Secure Boot: disable
  • SATA: switch from Raid to AHCI
  • Boot: not sure it's needed but I disabled Windows boot manager entry and kept the hdd UEFI entry: UEFI: PM951 NVMe SAMSUNG 1024GB, Partition 1
  • POST/Fastboot/Thorough
  • auto os recovery threshold off

I upgraded the BIOS afterwards, no idea if it would have helped if done before the installation...
Grab it here, put it on a USB stick, reboot and select BIOS update on the boot screen (F12).
No need to put it on a bootable DOS, just give the exe to the BIOS update built-in util.
Apparently you can even drop the update on /boot/efi as it's also a FAT partition.

Debian

I kept UEFI so we need a Debian netinstall because liveCD doesn't have UEFI support yet.
But Wi-Fi requires a proprietary firmware:

https://github.com/OpenELEC/wlan-firmware/blob/master/firmware/brcm/brcmfmac43602-pcie.bin

so the easiest is to take a Debian netinstall with proprietary firmwares included.
At time of writing Stretch is testing and last release is alpha5:

http://cdimage.debian.org/cdimage/unofficial/non-free/cd-including-firmware/stretch_di_alpha5/amd64/iso-cd/

dd the image on a USB stick and boot it.
It will also complain for a missing brcmfmac43602-pcie.txt but we can safely ignore it. (well I think so, but Wi-Fi has troubles now and then under heavy load, see below)

I chose a guided partitionning of the entire disk, with encrypted LVM containing /, /home and swap. But proposed / was a bit too small IMHO (10G) so I deleted and recreated / (50G) and /home.
Initially I tried to add the "discard" option for the partitions which should help on SSD but the kernel reported that "discard" wasn't supported by the disk.

If you want to backup partition table and partitions before destroying everything, it's the right time!

parted /dev/nvme0n1
print
sgdisk --backup=/some/safe/location/nvme0n1.gpt /dev/nvme0n1

I installed Cinnamon. I don't know for the others but Cinnamon has a nice auto setting to double features on HiDPI screens.

First boot

Once installed, the Debian didn't boot up.
I tried many things but at the end the only thing that worked was to copy Debian EFI to the default one:

Starting the netinstall again, in rescue mode, get a chroot shell, then

mount /dev/nvme0n1p1 /boot/efi
cd /boot/efi/EFI
mkdir boot
cp debian/grubx64.efi boot/bootx64.efi

I also deleted the Windows files in EFI.

Resource:

FTR things that failed included:

  • Refind couldn't boot at all. Strange as the netinstall could boot...
  • tweaks with efibootmgr, update-grub etc

Status

Working

  • Screen
  • Touchscreen
  • Touchpad
  • Keyboard backlight and media buttons (volume, luminosity, backlight)
  • Wi-Fi (with the proprietary driver, cf installation above)
  • HDMI
  • SD-Card reader
  • Speakers
  • Webcam

Working after manual steps

i915

Screen was working but dmesg was complaining:

i915 0000:00:02.0: firmware: failed to load i915/skl_dmc_ver1.bin

So I installed that firmware, not sure what it's changed

sudo apt-get install firmware-misc-nonfree

Optimus

Resources:

apt-get install bumblebee-nvidia
reboot

Example:

apt-get install nvidia-settings
optirun -b none nvidia-settings -c :8

This also works for CUDA:

optirun -b none ./cudaHashcat64.bin -m 500 example500.hash example.dict

Touchpad

Nothing wrong with the touchpad but its default config is a bit painful especially because it's large and my right palm touches it often, even with the option to diable it when typing and because it's "soft" buttons.
I disabled the button area to limit somehow the problem but still you've to get used to first touch and hold before pressing a button to do a drag and drop and not the opposite.

synclient AreaBottomEdge=4026

To add a middle button:

synclient RightButtonAreaLeft=3914
synclient RightButtonAreaRight=0
synclient RightButtonAreaTop=4026
synclient RightButtonAreaBottom=0
synclient MiddleButtonAreaLeft=3100
synclient MiddleButtonAreaRight=3873
synclient MiddleButtonAreaTop=4026
synclient MiddleButtonAreaBottom=0

And because I love it:

synclient CircularScrolling=1

Some doc here and the official one here

Bluetooth

Kernel complains about a missing file.
Apparently we can get it from Windows drivers but I don't know where to find them, so I took this one and copied it into /lib/firmware/brcm

Then Bluetooth was recognized but I couldn't pair my WM615 mouse.
After restarting the Bt adaptor, I could finally pair:

bluetoothctl
 power off
 power on

References:

There is also a possibility to pair directly from bluetoothctl, see https://wiki.archlinux.org/index.php/bluetooth#Bluetoothctl

Small console font

I don't care but if that's an issue for you, from here:

sudo dpkg-reconfigure console-setup
  • Choose UTF-8
  • Choose the default Combined - Latin, ... option ("Latin" includes the English alphabet)
  • Select the terminus font
  • Select 16x32
  • OK

To apply immediately, open a TTY and run setupcon, else just reboot

Sensors

apt-get install lm-sensors
sensors-detect

Sensors-detect found coretemp which is now loaded via /etc/modules:

coretemp

Issues

i915

At some points, repetitive failures spamming syslog:

-----------[ cut here ]------------
ARNING: CPU: 1 PID: 1349 at /build/linux-wxhyRy/linux-4.3.3/drivers/gpu/drm/i915/intel_pm.c:3668 skl_update_other_pipe_wm+0x1b5/0x1c0 [i915]()
ARN_ON(!wm_changed)
odules linked in: sd_mod sg uas usb_storage arc4 ecb md4 cifs cmac algif_hash rpcsec_gss_krb5 auth_rpcgss oid_registry nfsv4 dns_resolver nfs lockd grace sunrpc fs
PU: 1 PID: 1349 Comm: Xorg Tainted: G        W  O    4.3.0-1-amd64 #1 Debian 4.3.3-7
ardware name: Dell Inc. XPS 15 9550/0N7TVV, BIOS 01.01.15 12/18/2015
0000000000000000 0000000074139692 ffffffff812ddcf9 ffff8804ab5276b8
ffffffff81072b1d ffff8804ab5277f4 ffff8804ab527710 ffff8804aba00000
0000000000000000 ffff8800369a4b80 ffffffff81072bac ffffffffa08b31fc
all Trace:
[<ffffffff812ddcf9>] ? dump_stack+0x40/0x57
[<ffffffff81072b1d>] ? warn_slowpath_common+0x7d/0xb0
[<ffffffff81072bac>] ? warn_slowpath_fmt+0x5c/0x80
[<ffffffffa07ea225>] ? skl_update_other_pipe_wm+0x1b5/0x1c0 [i915]
[<ffffffffa07ea3e4>] ? skl_update_wm+0x1b4/0x620 [i915]
[<ffffffffa082c704>] ? gen9_read32+0xf4/0x2c0 [i915]
[<ffffffffa0847bd6>] ? intel_atomic_commit+0x3f6/0x12f0 [i915]
[<ffffffffa060d384>] ? drm_atomic_check_only+0x214/0x540 [drm]
[<ffffffffa060c7f5>] ? drm_atomic_get_crtc_state+0x65/0xc0 [drm]
[<ffffffffa060c7bc>] ? drm_atomic_get_crtc_state+0x2c/0xc0 [drm]
[<ffffffffa058b4a7>] ? drm_atomic_helper_disable_plane+0xe7/0x130 [drm_kms_helper]
[<ffffffffa05fdbed>] ? __setplane_internal+0x25d/0x320 [drm]
[<ffffffff8152c96c>] ? unix_stream_read_generic+0x25c/0x940
[<ffffffff810b599b>] ? mutex_optimistic_spin+0x10b/0x1c0
[<ffffffffa05fddca>] ? drm_mode_cursor_universal+0x11a/0x200 [drm]
[<ffffffffa05fdf2b>] ? drm_mode_cursor_common+0x7b/0x180 [drm]
[<ffffffff81474ab4>] ? ___sys_recvmsg+0x164/0x1f0
[<ffffffffa06019b4>] ? drm_mode_cursor_ioctl+0x54/0x70 [drm]
[<ffffffffa05f3260>] ? drm_ioctl+0x110/0x440 [drm]
[<ffffffffa0601960>] ? drm_mode_setcrtc+0x4e0/0x4e0 [drm]
[<ffffffff810d77cc>] ? enqueue_hrtimer+0x3c/0x70
[<ffffffff810d8227>] ? hrtimer_start_range_ns+0x1d7/0x3d0
[<ffffffff811dfec5>] ? do_vfs_ioctl+0x2a5/0x490
[<ffffffff8107dce7>] ? recalc_sigpending+0x17/0x50
[<ffffffff8107eb4d>] ? __set_task_blocked+0x3d/0x90
[<ffffffff81081361>] ? __set_current_blocked+0x31/0x50
[<ffffffff811e0124>] ? SyS_ioctl+0x74/0x80
[<ffffffff8108157b>] ? SyS_rt_sigprocmask+0x8b/0xc0
[<ffffffff81585df2>] ? system_call_fast_compare_end+0xc/0x67
--[ end trace d9370809ce0073c9 ]---

Bluetooth

WM615 mouse is now paired but is not smooth, the cursor stops now and then.
I paired it with an Android phone and there it runs very smoothly so the issue is somewhere on the Dell...

Wi-Fi

Wi-Fi tends to disassociate under heavy load, switching to other SSIDs or frequencies (5Ghz<>2.4GHz) and coming back seems to help.
Maybe a proper firmware settings .txt would help?

Examples flooding syslog:

brcmfmac: brcmf_msgbuf_get_pktid: Invalid packet id 835 (not in use)
brcmfmac: brcmf_msgbuf_get_pktid: Invalid packet id 639 (not in use)
brcmfmac: brcmf_msgbuf_get_pktid: Invalid packet id 775 (not in use)
brcmfmac: brcmf_msgbuf_get_pktid: Invalid packet id 0 (not in use)
brcmfmac: brcmf_msgbuf_get_pktid: Invalid packet id 210 (not in use)
brcmfmac: brcmf_msgbuf_get_pktid: Invalid packet id 251 (not in use)
brcmfmac: brcmf_msgbuf_get_pktid: Invalid packet id 318 (not in use)
brcmfmac: brcmf_msgbuf_get_pktid: Invalid packet id 790 (not in use)
brcmfmac: brcmf_msgbuf_get_pktid: Invalid packet id 509 (not in use)
brcmfmac: brcmf_msgbuf_get_pktid: Invalid packet id 869 (not in use)
brcmfmac: brcmf_msgbuf_get_pktid: Invalid packet id 711 (not in use)
brcmfmac: brcmf_msgbuf_get_pktid: Invalid packet id 282 (not in use)
brcmfmac: brcmf_msgbuf_get_pktid: Invalid packet id 247 (not in use)

brcmfmac: brcmf_msgbuf_rxbuf_data_post: No PKTID available !!
brcmfmac: brcmf_msgbuf_rxbuf_data_post: No PKTID available !!
brcmfmac: brcmf_msgbuf_rxbuf_data_post: No PKTID available !!
brcmfmac: brcmf_msgbuf_rxbuf_data_post: No PKTID available !!
brcmfmac: brcmf_msgbuf_rxbuf_data_post: No PKTID available !!
brcmfmac: brcmf_msgbuf_rxbuf_data_post: No PKTID available !!
brcmfmac: brcmf_msgbuf_rxbuf_data_post: No PKTID available !!
brcmfmac: brcmf_msgbuf_rxbuf_data_post: No PKTID available !!
brcmfmac: brcmf_msgbuf_rxbuf_data_post: No PKTID available !!
brcmfmac: brcmf_msgbuf_rxbuf_data_post: No PKTID available !!
net_ratelimit: 1292 callbacks suppressed

brcmfmac 0000:02:00.0: swiotlb buffer is full (sz: 2048 bytes)
DMA: Out of SW-IOMMU space for 2048 bytes at device 0000:02:00.0
brcmfmac 0000:02:00.0: swiotlb buffer is full (sz: 2048 bytes)
DMA: Out of SW-IOMMU space for 2048 bytes at device 0000:02:00.0
brcmfmac 0000:02:00.0: swiotlb buffer is full (sz: 2048 bytes)
DMA: Out of SW-IOMMU space for 2048 bytes at device 0000:02:00.0
brcmfmac 0000:02:00.0: swiotlb buffer is full (sz: 2048 bytes)
DMA: Out of SW-IOMMU space for 2048 bytes at device 0000:02:00.0
brcmfmac 0000:02:00.0: swiotlb buffer is full (sz: 2048 bytes)
DMA: Out of SW-IOMMU space for 2048 bytes at device 0000:02:00.0
brcmfmac 0000:02:00.0: swiotlb buffer is full (sz: 2048 bytes)
DMA: Out of SW-IOMMU space for 2048 bytes at device 0000:02:00.0
brcmfmac 0000:02:00.0: swiotlb buffer is full (sz: 2048 bytes)
DMA: Out of SW-IOMMU space for 2048 bytes at device 0000:02:00.0
brcmfmac 0000:02:00.0: swiotlb buffer is full (sz: 2048 bytes)
DMA: Out of SW-IOMMU space for 2048 bytes at device 0000:02:00.0
brcmfmac 0000:02:00.0: swiotlb buffer is full (sz: 2048 bytes)
DMA: Out of SW-IOMMU space for 2048 bytes at device 0000:02:00.0
DMA: Out of SW-IOMMU space for 2048 bytes at device 0000:02:00.0
DMA: Out of SW-IOMMU space for 52 bytes at device 0000:02:00.0
DMA: Out of SW-IOMMU space for 2048 bytes at device 0000:02:00.0
DMA: Out of SW-IOMMU space for 2048 bytes at device 0000:02:00.0
DMA: Out of SW-IOMMU space for 52 bytes at device 0000:02:00.0
DMA: Out of SW-IOMMU space for 2048 bytes at device 0000:02:00.0
DMA: Out of SW-IOMMU space for 52 bytes at device 0000:02:00.0
DMA: Out of SW-IOMMU space for 2048 bytes at device 0000:02:00.0

Screen blank

When waking from screen off, the screen very often turns on but is entrely black.
And dmesg reports sth like this:

[drm:intel_dp_start_link_train [i915]] *ERROR* failed to enable link training
[drm:intel_dp_complete_link_train [i915]] *ERROR* failed to start channel equalization

See issue here
It might be solved in kernel 4.4, I 'll wait for it to be in Sid.

Workaround1:

  • if there is a remote connection possible, this solves the issue:
DISPLAY=:0.0 xset dpms force off
sleep 1
DISPLAY=:0.0 xset dpms force on

or

DISPLAY=:0.0 xrandr --output eDP1 --off
sleep 1
DISPLAY=:0.0 xrandr --output eDP1 --auto

Some associated those commands to a shortcut, but this still requires to login properly with a blank screen...

Workaround2:

  • Close LID (and the machine goes to sleep) and open it again

rfkill button

Rfkill button of the keyboard (Fn+PrtScr) doesn't seem to work, no big deal.

Mic

Mic works but sound is terrible, need to look at it...

HiDPI

Cinnamon handles it nicely but some applications don't such as Gimp and you end up with a microscopic tools ribbon.

DA200

DA200 is recognized only if it was plugged at boot.

HDMI output doesn't work, it's recognized by xrandr as 'DP1' as for the VGA.
VGA output works.

When plugged the following hardware gets detected:

lsusb:

Bus 004 Device 003: ID 0bda:8153 Realtek Semiconductor Corp..     <= Ethernet
Bus 004 Device 002: ID 05e3:0617 Genesys Logic, Inc..
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 003: ID 0835:2a01 Action Star Enterprise Co., Ltd. <= Billboard
Bus 003 Device 002: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

The USB Billboard Device Class definition describes the methods used to communicate the Alternate Modes supported by a device container to a host system. More details on Billboard Devices are available in the USB Billboard Device Class specification at the following link: http://www.usb.org/developers/docs/devclass_docs/.

lspci:

06:00.0 PCI bridge: Intel Corporation Device 1576 (prog-if 00 [Normal decode])
07:00.0 PCI bridge: Intel Corporation Device 1576 (prog-if 00 [Normal decode])
07:01.0 PCI bridge: Intel Corporation Device 1576 (prog-if 00 [Normal decode])
07:02.0 PCI bridge: Intel Corporation Device 1576 (prog-if 00 [Normal decode])
0a:00.0 USB controller: Intel Corporation Device 15b5 (prog-if 30 [XHCI])

lsmod:

r8152                  49152  0
cdc_ether              16384  0
usbnet                 40960  1 cdc_ether
mii                    16384  2 r8152,usbnet