Displaylink on Linux
If you bought yourself a nice laptop with USB-C + Displaylink support and a USB-C Dock like e.g. the HP USB-C Universal Dock with 2 Displayport connectors, well like I did, you might want to give it a shot under Linux.
Spoiler! Think again!
My Laptop came with Windows 10 Home preinstalled. As I'm using the HP USB-C Universal Dock I basically power my laptop with the USB-C cable from my Dock which delivers 60 Watts maximum. Enough power for my laptop, which comes with a 45W A/C adapter. All my devices are connected to my Dock, also my big monitor, so that the laptop lid usually can stay shut. My desk was never before that orderly!
Windows 10 Home detected my HP Dock and auto-installed all drivers. After the hardware was detected and set up, really everything worked out-of-the-box. Well, I'm a Linuxer by heart, so seeing all this on Windows is nice but not satisfying.
Getting Displaylink to work well under Linux is a lot of fiddling around, which might be related to the hardware specs of my quite recent Dell laptop running on an i5 with UHD 620 iGPU, and this combined with a HP USB-C Universal Dock. Here is the long story short:
a) Ubuntu 19.04
A piece of cake. Install the distribution from installation media, install the dkms package, and then download and install the Displaylink binary driver from their homepage: https://www.displaylink.com/downloads/ubuntu
apt-get install dkms chmod +x displaylink-driver-5.2.14.run sudo ./displaylink-driver-5.2.14.run
After that you're done - video quality and performance are very good. You can feel the cooperation between Canonical for Ubuntu and Displaylink - so smooth.
b) Ubuntu 19.10
Doesn't work either way, updated from Ubuntu 19.04 or by "fresh" install from installation media. After installing dkms and the binary driver, the Displaylink monitor comes to life and then freezes after very short time. After reboot you can't even login to Gnome anymore, it's frozen.
c) Fedora 30
Again a piece of cake. Install the distribution from installation media, install the dkms package and the @development-tools group:
sudo dnf install dkms @development-tools
After that the easiest way to install the Displaylink binary driver is to install the RPM available on Github: https://github.com/displaylink-rpm/displaylink-rpm/releases and install it using dnf, which will resolve all further dependencies.
You could for instance use this command to install on 64-bit Fedora 30:
sudo dnf install https://github.com/displaylink-rpm/displaylink-rpm/releases/download/v5.2.14/fedora-30-displaylink-1.6.2-2.x86_64.rpm
After that you're done - video quality and performance are excellent.
d) Fedora 31
Doesn't work either way, updated from Fedora 30 or by "fresh" install from installation media. After installing dkms and the binary driver, the Displaylink monitor comes to life and then freezes after very short time. After reboot you can't even login to Gnome anymore, it's frozen.
e) Debian 10 "Buster"
Needs some manual fiddling, but then works like a champ. Here are the steps:
Install the distribution from installation media, install the dkms and build-essential packages, and then get the excellent install script from Github: https://github.com/AdnanHodzic/displaylink-debian
apt-get install dkms build-essentials wget https://github.com/AdnanHodzic/displaylink-debian/blob/master/displaylink-debian.sh chmod +x displaylink-debian.sh sudo ./displaylink-debian.sh
After the installation, the external monitor will still not come to life. Instead more manual steps are needed.
- Disable wayland in /etc/gdm3/daemon.conf
- Create an autostart entry in your user profile
$ cat ~/.config/autostart/displaylink.desktop [Desktop Entry] Type=Application Exec=sh -c "xrandr --setprovideroutputsource 1 0 && xrandr --output DVI-I-1-1 --auto --primary && xrandr --output eDP-1 --off" Hidden=false X-GNOME-Autostart-enabled=true Name=DisplayLink Comment=Enable 2nd monitor on StartUp
Explanation: On the Exec line first the Dock's display connector is enabled. Then it is made the primary monitor, and finally the laptop's internal display is disabled. These commands are run in the moment after you logged into Gnome.
All of this leads to the login screen being shown on the laptop's internal screen. Basically all it would take to be able to login on the Displaylink monitor would be the 3 commands on the Exec line to be run by GDM3 before login, but for some reason I couldn't get that to work. Hence I log in on my laptop screen, and then close the lid when my external monitor comes to life. Absolutely workable for me.
f) Debian 11 "Bullseye" (testing)
Doesn't work either way, updated from Debian 10 or by "fresh" install from installation media. After installing dkms and the binary driver, the Displaylink monitor comes to life and then freezes after very short time. After reboot you can't even login to Gnome anymore, it's frozen.
Since Debian 10 just became "stable" a few weeks ago, and I don't need the very latest versions of software, I decided to stay on Debian 10 for the short and mid-term. It should take around 2 years before Debian 11 becomes "stable", so I can wait for Displaylink to fix their drivers.
I believe that the freezes with Debian 11, Fedora 31 and Ubuntu 19.10 do come from a combination of a 5.x Kernel and Gnome version >= 3.32 together with the Displaylink binary driver and the evdi open source driver. Debian 10 is still on Kernel 4.19 and Gnome 3.30.2 and seems to be not affected.
As Ubuntu and Fedora have a release every 6 months staying on their old versions is not an option - these versions will become unsupported too soon.