Install Lenovo ThinkPad USB 3.0 Dock on CentOS 8 (DisplayLink Adapter)

# UPDATE: The DisplayLink driver now also works with Wayland, not just X Windows. Make sure you update mutter to at least 3.32.

For CentOS/RHEL 8.0:

If you need the Thinkpad DisplayLink dock, you can just download the Ubuntu displaylink driver from the displaylink website and install it.
Or install this rpm instead:
dnf install -y https://github.com/sbluhm/os-tools/raw/master/spec-files/displaylink/x86_64/displaylink-1.7.0-2.x86_64.rpm

For CentOS/RHEL 8.1 and higher (CentOS/RHEL 8.2)

The kernel source has changed in CentOS 8.1 to bring it closer to the latest official kernel version. This results in compile errors for evdi. You can patch the evdi sources by using this patch here: https://raw.githubusercontent.com/sbluhm/displaylink-rpm/master/evdi-el81.patch

Quick way:
dnf install -y https://github.com/sbluhm/os-tools/raw/master/spec-files/displaylink/x86_64/displaylink-1.7.0-2.el8.x86_64.rpm

Quick Manual way:
#Clone my displaylink-rpm repository, run make and create your own rpm. This seems to be the easiest way.

git clone https://github.com/sbluhm/displaylink-rpm
cd displaylink-rpm
make
dnf install x86_64/displaylink-1.7.0-2.el8.x86_64.rpm

Full Manual way:
#Clone the evdi repository, apply above patch, compile it. Then install displaylink.

## Compile EVDI
cd
mkdir git
cd ~/git
git clone https://github.com/DisplayLink/evdi.git
cd ~/git/evdi
make
#modprobe sysimgblt
#modprobe sysfillrect
#modprobe syscopyarea
#insmod module/evdi.ko # temporary install, not automated

4. Install the Display Link driver.

Download the Ubuntu driver directly from the DisplayLink homepage: http://www.displaylink.com/downloads/ubuntu

untar and install it with ./displaylink.sh
this should work without any issues.

# Update the xorg configuration to force an intel driver and other tweeks. If you don't force the intel driver, you will get a blank screen on the external display or it freezes otherwise.

cat > /etc/X11/xorg.conf.d/20-displaylink.conf << EOF
Section "Device"
    Identifier "intel"
    Driver "intel"
    Option "kmsdev" "/dev/dri/card0"
    Option "PageFlip" "off"
    Option "SWCursor" "on"
    Option "ShadowFB" "true"
EndSection

Section "Device"
    Identifier "USB3"
    BusID "USB"
    Driver "intel"
    Option "kmsdev" "/dev/dri/card1"
    Option "PageFlip" "off"
    Option "SWCursor" "on"
    Option "ShadowFB" "true"
EndSection

Section "Device"
    Identifier "USB3"
    BusID "USB"
    Driver "intel"
    Option "kmsdev" "/dev/dri/card2"
    Option "PageFlip" "off"
    Option "SWCursor" "on"
    Option "ShadowFB" "true"
EndSection

Section "Device"
    Identifier "USB3"
    BusID "USB"
    Driver "intel"
    Option "kmsdev" "/dev/dri/card3"
    Option "PageFlip" "off"
    Option "SWCursor" "on"
    Option "ShadowFB" "true"
EndSection
EOF

reboot

Now you are done. It should all work now.

 

Uninstallation

To uninstall the displaylink module, you just type

./displaylink-driver.run uninstall

Uninstallation is required, if you want to update the driver.