DisplayLink

From Ever changing code
Jump to navigation Jump to search

Ubuntu 16.04 - install

Recommended

Download binaries from official website.

#Verify device is recognised
sudo lsusb -d 17e9:
Bus 002 Device 002: ID 17e9:4301 DisplayLink
# install required packages
sudo apt-get install linux-generic-lts-xenial xserver-xorg-lts-xenial xserver-xorg-video-all-lts-xenial xserver-xorg-input-all-lts-xenial linux-signed-generic-lts-xenial dkms

wget ... && unzip ...
~/Downloads/DisplyLink$ sudo ./displaylink-driver-4.2.29.run 
Verifying archive integrity...  100%   All good.
Uncompressing DisplayLink Linux Driver 4.2.29  100%  
DisplayLink Linux Software 4.2.29 install script called: install
Distribution discovered: Ubuntu 16.04.4 LTS
WARNING: Version 1.5.0 of EVDI kernel module is already running.
Please uninstall all other versions of DisplayLink Linux Software before attempting to install.
Installation terminated.

Legacy method

sudo apt-get install linux-generic-lts-xenial xserver-xorg-lts-xenial xserver-xorg-video-all-lts-xenial xserver-xorg-input-all-lts-xenial
sudo apt-get install dkms
# define the version to get as the latest available version
version=`wget -q -O - http://www.displaylink.com/downloads/ubuntu | grep "download-version" | head -n 1 | perl -pe '($_)=/([0-9]+([.][0-9]+)+)/'`
# define download url to be the correct version
dlurl="http://www.displaylink.com/"`wget -q -O - http://www.displaylink.com/downloads/ubuntu | grep "download-link" | head -n 1 | perl -pe '($_)=/<a href="\/([^"]+)"[^>]+class="download-link"/'`
driver_dir=$version

Verify installed driver version

sudo displaylink-installer

Extracting the driver components

The Ubuntu driver components can be extracted for repackaging using the command:

./displaylink-driver-0.9.68.run --noexec --keep

The following files will be extracted:

  • ./
  • displaylink-installer.sh - The installation shell script.
  • evdi-1.0.68-src.tar.gz - The open source code, from GitHub
  • LICENSE
  • ella-dock-release.spkg - The firmware image for DL-3xxx and DL-5xxx devices. This will be programmed into the DisplayLink IC, if the current firmware version in the device does not match this version.
  • firefly-monitor-release.spkg - The firmeware image for DL-4xxx devices. This will be programmed into the DisplayLink IC, if the current firmware version in the device does not match this version.
  • ./x86 and ./x64
  • DisplayLinkManager - The user mode binary driver for DisplayLink devices
  • libevdi.so - The pre-built library taken from the open source evdi project code
  • libusb-1.0.so.0.1.0 - The standard, unmodified library to access our DisplayLink USB devices. The source code for this is also available.

18.04/20.04/22.04 install and upgrade

New installer ./displaylink-driver-$VERSION.run has been released. It's required to:

  • disconnect docking station
  • uninstall previous version of DisplayLink driver, then run the installer script


Verify running version
# Drivers before drivers 5.5.x
sudo displaylink-installer --test

# Drivers 5.5.x
sudo displaylink-installer version
Distribution discovered: Ubuntu 20.04.3 LTS
DisplayLink Linux Software 5.5.0-59.118

# Drivers 5.6.x support 20.04/22.04
## Download from https://synaptics.com/node/4601?filetype=exe


Install
VERSION=5.6.0-59.176
sudo ./displaylink-driver-${VERSION}.run
<omitted>
Please read the FAQ
http://support.displaylink.com/knowledgebase/topics/103927-troubleshooting-ubuntu

Installation complete!

Please reboot your computer if intending to use Xorg.
Xorg is running. Do you want to reboot now? (Y/n)


Uninstall 20.04/22.04

Before upgrading, old drivers need to be uninstalled. Disconnect the docking station before doing it and reboot after successful uninstall.

sudo displaylink-installer uninstall

Uninstallation steps complete.

Please note that the evdi kernel module is still in the memory.
A reboot is required to fully complete the uninstallation process.

Secure Boot

Modern laptops firmware uses UEFI Secure Boot, that requires to install the drivers key into the Trusted Keystore (BIOS). The process is that drivers get installed from OS, the drivers signed key gets generated and encrypted with a user password. Then after the reboot to install the key into the Keystore/Keychain you must re type in the same password to verify it was the same user who requested to add the key to MOK.


The full message from DisplayLink installer looks like below (installer version 5.4.1-55.174):

Your system has UEFI Secure Boot enabled.

UEFI Secure Boot requires additional configuration to work with third-party drivers.

The system will assist you in configuring UEFI Secure Boot. To permit the use of third-party drivers, a new Machine-Owner Key (MOK)
has been generated. This key now needs to be enrolled in your system's firmware.

To ensure that this change is being made by you as an authorized user, and not by an attacker, you must choose a password now and
then confirm the change after reboot using the same password, in both the "Enroll MOK" and "Change Secure Boot state" menus that
will be presented to you when this system reboots.

If you proceed but do not confirm the password upon reboot, Ubuntu will still be able to boot on your system but any hardware that
requires third-party drivers to work correctly may not be usable.

Issues

Ubuntu 20.04

Kernel 5.11.x (fixed)

Note: The issue has been verified as fixed, tested with kernel 5.11.0-38-generic #42~20.04.1-Ubuntu SMP, evid driver /var/lib/dkms/evdi/1.9.1/ and the installer displaylink-driver-5.4.1-55.174.run


With upgrade of Ubuntu Kernel 5.11.x EVDI module is not compiled or not included even if the drivers were (and are) working with Kernel 5.8.x.

sudo journalctl -u displaylink-driver.service
Aug 19 08:01:30 laptop-1 systemd[1]: Starting DisplayLink Driver Service...
Aug 19 08:01:30 laptop-1 sh[36568]: modprobe: FATAL: Module evdi not found in directory /lib/modules/5.11.0-27-generic
Aug 19 08:01:30 laptop-1 sh[36593]: Kernel preparation unnecessary for this kernel.  Skipping...
Aug 19 08:01:30 laptop-1 sh[36593]: Building module:
Aug 19 08:01:30 laptop-1 sh[36593]: cleaning build area...
Aug 19 08:01:33 laptop-1 sh[36593]: make -j8 KERNELRELEASE=5.11.0-27-generic all INCLUDEDIR=/lib/modules/5.11.0-27-generic/build/include KVERSION=5.11.0-2>
Aug 19 08:01:33 laptop-1 sh[36908]: .
Aug 19 08:01:33 laptop-1 sh[36593]: (bad exit status: 2)
Aug 19 08:01:34 laptop-1 sh[37340]: ERROR (dkms apport): binary package for evdi: 1.7.0 not found
Aug 19 08:01:34 laptop-1 sh[37392]: Error! Bad return status for module build on kernel: 5.11.0-27-generic (x86_64)
Aug 19 08:01:34 laptop-1 sh[37392]: Consult /var/lib/dkms/evdi/1.7.0/build/make.log for more information.
Aug 19 08:01:34 laptop-1 systemd[1]: displaylink-driver.service: Control process exited, code=exited, status=10/n/a
Aug 19 08:01:34 laptop-1 systemd[1]: displaylink-driver.service: Failed with result 'exit-code'.
Aug 19 08:01:34 laptop-1 systemd[1]: Failed to start DisplayLink Driver Service.
Aug 19 08:01:34 laptop-1 systemd[1]: Stopped DisplayLink Driver Service.


Workaround

Reboot > Esc to access GRUB Advanced Options > Select Kernel 5.8.x eg 5.8.0-63-generic #71~20.04.1-Ubuntu

Getting graphics card info

$ ~/Downloads $ inxi -G
Graphics:  Card-1: Intel UHD Graphics 620
           Card-2: NVIDIA GP108GLM [Quadro P500 Mobile]
           Display Server: x11 (X.Org 1.20.4 ) drivers: modesetting,nvidia (unloaded: fbdev,vesa,nouveau)
           Resolution: 1920x1080@59.98hz, 2560x1440@59.95hz, 2560x1440@59.95hz
           OpenGL: renderer: Quadro P500/PCIe/SSE2 version: 4.6.0 NVIDIA 430.40

$ ~/Downloads $ ubuntu-drivers list
nvidia-driver-430
nvidia-driver-390
...
nvidia-driver-396

Hardware

StarTech.com USB 3.0 to DisplayPort External Video Card Multi Monitor Adapter - USB to DP Adapter 2560x1600

Product code: USB32DPPRO

Issues

Power management Ubuntu

Disable hibernation and suspension

sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
[sudo] password for piotr: 
Created symlink /etc/systemd/system/sleep.target → /dev/null.
Created symlink /etc/systemd/system/suspend.target → /dev/null.
Created symlink /etc/systemd/system/hibernate.target → /dev/null.
Created symlink /etc/systemd/system/hybrid-sleep.target → /dev/null.

sudo systemctl status sleep.target suspend.target hibernate.target hybrid-sleep.target
● sleep.target
     Loaded: masked (Reason: Unit sleep.target is masked.)
     Active: inactive (dead)

● suspend.target
     Loaded: masked (Reason: Unit suspend.target is masked.)
     Active: inactive (dead)

● hibernate.target
     Loaded: masked (Reason: Unit hibernate.target is masked.)
     Active: inactive (dead)

● hybrid-sleep.target
     Loaded: masked (Reason: Unit hybrid-sleep.target is masked.)
     Active: inactive (dead)

# Reboot

Re-enable hibernation and suspention

sudo systemctl unmask sleep.target suspend.target hibernate.target hybrid-sleep.target

References