How to: Dell XPS 13 closed lid and WD15 Dock with 2 external monitors

Hi,

i’m running a Dell XPS 13 (9350) laptop with USB-C -Dock WD15.
Seems like standard Ubuntu distro can handle this WD15-dock out of the box when running with closed lid and only external monitors attached.
Ubuntu disabled the laptop screen by default.
Unfortunately Ubuntu 18.04 was running a bit unstable with Dell XPS 13, so i switched to Ubuntu MATE and it’s running fine.
But

  1. The laptop display is always on with dock attached, even if the lid is closed.
  2. The laptop freezes at shutdown or won’t boot when lid is closed, showing DELL-logo on the external monitors forever.

How i managed to fix this with Dell XPS 13 9350:
Disclaimer: Don’t do this when it’s already working fine.

  • Set BIOS to AHCI instead Raid On (will make previous installs (Windows,…) not funcional anymore!)
  • Install Ubuntu Mate with Secure Boot enabled (it works) and attached to the WD15 dock.
  • After install go to Energy Settings and set “Do Nothing” when lid is closed
  • In Display Settings set one external monitor as primary (WD15 attached)
  • In Display Settings set Laptop display (eDP-1) "off "(WD15 attached!) (don’t worry, it will enable when WD15 is unplugged)

UPDATE: It’s fixed in Ubuntu Mate 18.10, not necessary anymore.

  • Open Terminal: Type and press Enter after each command.

dconf write /org/mate/power-manager/button-lid-ac "'nothing'"

gsettings set org.mate.power-manager button-lid-ac 'nothing'

gsettings set org.mate.power-manager button-lid-battery 'nothing'

Try this only additionally if it does not work:
If you are using default Pluma as texteditor:

sudo pluma /etc/systemd/logind.conf
Now replace #HandleLidSwitch=suspend
with HandleLidSwitch=ignore
sudo systemctl start systemd-logind

Do not change grub settings (acpi=forced) or other settings like recommended in other communities for other laptops, this will make things worse with Dell WD15 dock (i tried). :dizzy_face:

Some terminal settings may be unneccessary, but now it works perfectly fine.

pappl