[ SOLVED ] DisplayLinux evdi with USB monitors on Rocky Linux 9.1

To document how to get displaylink working on RHEL9.1

Rocky Linux 9.1

STATE = working

Known fail with release 5.6.1

Root cause = important change: dma-buf-map.h is changed to iosys-map.h
source: View paste CPLA

Solution is View paste BUCQ a modified version of evdi_gem.c

Multiple USB screens

When using multiple usb screens it may be required to modify /usr/lib/systemd/system/displaylink-driver.service to read as per below, appending initial_device_count:1 to modprobe evdi

[Unit]  
Description=DisplayLink Driver Service  
After=display-manager.service  
Conflicts=getty@tty7.service  

[Service]  
ExecStartPre=/sbin/modprobe evdi initial_device_count:1  
ExecStart=/usr/libexec/displaylink/DisplayLinkManager  
Restart=always  
WorkingDirectory=/usr/libexec/displaylink  
RestartSec=5  

when using SELINUX with secure_mode_insmod

[Unit]  
Description=DisplayLink Driver Service  
After=display-manager.service  
Conflicts=getty@tty7.service  

[Service]  
ExecStartPre=/usr/sbin/setsebool secure_mode_insmod 0  
ExecStartPre=/sbin/modprobe evdi initial_device_count:1  
ExecStartPre=/usr/sbin/setsebool secure_mode_insmod 1  
ExecStart=/usr/libexec/displaylink/DisplayLinkManager  
Restart=always  
WorkingDirectory=/usr/libexec/displaylink  
RestartSec=5  

with SECUREBOOT

from /var/lib/dkms/evdi//source/
enter any password when it is requested during the process, repeat it once, enter it again at reboot to enroll the key

MUST BE RUN AFTER EVERY KERNEL UPGRADE

openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -days 36500 -subj "/CN=Displaylink/"  
mokutil --import MOK.der  
modinfo -n evdi /lib/modules/$(uname -r)/extra/evdi.ko.xz  
unxz $(modinfo -n evdi)  
/usr/src/kernels/$(uname -r)/scripts/sign-file sha256 ./MOK.priv ./MOK.der /lib/modules/$(uname -r)/extra/evdi.ko  
xz -f /lib/modules/$(uname -r)/extra/evdi.ko  

reboot

I don’t think you need to re-generate the MOK key on every kernel upgrade. Just re-sign the module and use the key that’s already in the BIOS.

1 Like

That is correct. You don’t need to re-generate the MOK key. When installing from the RPM, DKMS will sign the module.

I had already created patches for the Displaylink RPMs a couple of weeks ago. Just needed some time to test.

I just tested upgrading from Rocky Linux 9.0 to 9.1 today and it worked well. We will work on updating the release in the project.

1 Like

Thanks for the comment. Thus far dkms is not re-signing the module, I believe there’s something i miss here or i used a different MOK key when installing these modules;