How to Install DisplayLink on Fedora 41 with the Surface Kernel

13 Nov, 2024·
AlexIn Tech
AlexIn Tech
· 3 min read

How to Install DisplayLink on Fedora 41 with the Surface Kernel

This guide explains how to install and configure DisplayLink on Fedora 41 with a Surface Laptop. Fedora 41 users with the Surface kernel often face unique challenges with DisplayLink, especially when Secure Boot is enabled. Here is a comprehensive guide to setting up DisplayLink drivers.

1. Initial Setup: Preparing Fedora 41

Before starting the installation, remove any existing DisplayLink or EVDI packages to avoid conflicts. Then, install the necessary development tools to compile from source.

# Remove previous installations
sudo dnf remove displaylink 'evdi-*'

# Install development tools for building packages
sudo dnf install @development-tools

# Install kernel headers for Surface
sudo dnf install kernel-surface-devel

2. Creating an Extensible Virtual Display Interface (EVDI)

EVDI is a necessary dependency for DisplayLink on Linux. Compiling the latest version from source is recommended to ensure compatibility with Fedora 41.

# Clone the EVDI repository
git clone https://github.com/DisplayLink/evdi
cd evdi

# Set up the Python include path (modify for your Python version if needed)
export CPLUS_INCLUDE_PATH="/usr/include/python3.13:$CPLUS_INCLUDE_PATH"

# Build and install EVDI
make
sudo make install

Troubleshooting tip: if “make” fails, ensure that “pybind11” and “python3-devel” are installed. Fedora users can install them with:

sudo dnf install pybind11 python3-devel

Next, download the latest DisplayLink RPM package compatible with Fedora 41. At the time of writing, the latest version is fedora-41-displaylink-1.14.7-1.github_evdi.x86_64.rpm.

# Install the DisplayLink package
sudo dnf install '/path/to/rpm/fedora-41-displaylink-1.14.7-1.github_evdi.x86_64.rpm'

After installation, Fedora attempts to start the displaylink-driver.service. However, this often fails due to Secure Boot requirements, which we will address next.

If Secure Boot is enabled, the displaylink-driver.service may fail to start because the evdi kernel module is not signed. To resolve this, we will use mokutil and dkms to enroll the signing key.

# Install mokutil and dkms
sudo dnf install mokutil dkms

# Enroll the automatically generated DKMS key with Secure Boot
sudo mokutil --import /var/lib/dkms/mok.pub

# Reboot your system to complete the key enrollment
reboot

During the reboot, you will be prompted to enter a passphrase to enroll the DKMS key. This step is crucial to allow unsigned modules under Secure Boot.

5. Verify Key Enrollment

After rebooting, confirm that the DKMS key is enrolled:

mokutil --list-enrolled | grep DKMS

This should produce something similar to:

Subject: CN=DKMS module signing key

6. Restart and Test

After all configurations, restart your system one last time. You should now have a fully functional DisplayLink setup on your Surface Laptop running Fedora 41.

Summary

Configuring DisplayLink on Fedora 41 with the Surface kernel requires setting up several components, including Secure Boot and DKMS. With the above steps, Fedora 41 should now support DisplayLink for external displays, enhancing the capabilities of your Surface Laptop.

Enjoy!

AlexIn Tech

AlexIn Tech
Authors
SysOps Engineer | IT Teacher
Versatile IT Engineer with a dual specialization in System Engineering and Management, AlexIn Tech teaches IT to CFC apprentice IT specialists at ETML, the Technical School of Lausanne 🇨🇭. Passionate about IT, innovation, and knowledge sharing, he shares his discoveries and learnings here to inspire new generations.