[This article is obsolete, see the update here.]
Earlier, I wrote that the current DisplayLink release for Ubuntu was finally compatible with Ubuntu 21.04 (“Hirsute Hippo”). I’ve since learned that I wasn’t entirely correct.
It turns out that if you have a DisplayLink hub plugged into your Ubuntu 21.04 box when you boot it up, it works fine, but if you unplug the hub and plug it back in, it doesn’t recover, and as far as I can tell there’s no way to get it working again short of rebooting.
To fix this you have to revert to the 5.10 kernel that was released while Ubuntu 21.04 was in its beta-testing phase, before 21.04 switched to the 5.11 kernel.
Here’s a script to do that. Download this script, make it executable, run it as root, reboot, and then uninstall and reinstall the DisplayLink (to uninstall, run the installer with the argument “uninstall”).
#!/bin/bash -e | |
# You will probably need to adjust this script if you aren't using | |
# the generic kernel. | |
to_install= | |
to_hold= | |
pd=/tmp/packages.$$ | |
mkdir $pd | |
# Get good Kernel packages | |
while read package arch; do | |
to_hold="$to_hold $package:$arch" | |
if dpkg-query –show –showformat '${Package} ${Version} ${Status}\n' \ | |
$package:$arch 2>/dev/null | grep -v deinstall | | |
grep -q -s '5\.10\.0-14\.15 ' | |
then | |
continue | |
fi | |
deb_name="${package}_5.10.0-14.15_${arch}.deb" | |
echo Downloading $deb_name | |
curl –location –silent –output $pd/$deb_name \ | |
"https://launchpad.net/ubuntu/+archive/primary/+files/$deb_name" | |
to_install="$to_install $pd/$deb_name" | |
done < <(dpkg-query –show –showformat \ | |
'${Package} ${Architecture} ${Version} ${Source}\n' '*linux*' | | |
awk '$4 == "linux" || $4 == "linux-signed" {print $1, $2}' | | |
sed 's/-5\.[0-9.]*-[0-9]*/-5.10.0-14/' | sort -u) | |
# Get good Kernel meta-packages | |
while read package arch version; do | |
to_hold="$to_hold $package:$arch" | |
if [ "$version" == "5.10.0.14.16" ]; then | |
continue | |
fi | |
deb_name="${package}_5.10.0.14.16_${arch}.deb" | |
echo Downloading $deb_name | |
curl –location –silent –output $pd/$deb_name \ | |
"https://launchpad.net/ubuntu/+archive/primary/+files/$deb_name" | |
to_install="$to_install $pd/$deb_name" | |
done < <(dpkg-query –show –showformat \ | |
'${Package} ${Architecture} ${Version} ${Source}\n' '*linux*' | | |
awk '$4 == "linux-meta" {print $1, $2, $3}') | |
if [ -n "$to_install" ]; then | |
apt-get install $to_install | |
fi | |
if [[ $(uname -r) =~ 5\.11 ]]; then | |
echo | |
echo "*** NOTE NOTE NOTE ***" | |
echo | |
echo "You need to reboot, select the 5.10 kernel during boot, and" | |
echo "rerun this script." | |
echo | |
echo "Before rebooting, make sure GRUB_TIMEOUT is set to a non-zero value" | |
echo "and GRUB_TIMEOUT_STYLE is set to 'menu' in /etc/default/grub, and if" | |
echo "you have to change either of them, run 'sudo update-grub' before" | |
echo "rebooting. Otherwise, you won't be able to easily select the 5.10" | |
echo "kernel when you reboot." | |
echo | |
echo "*** NOTE NOTE NOTE ***" | |
echo | |
exit 1 | |
fi | |
if [ -n "$to_hold" ]; then | |
apt-mark hold $to_hold | |
fi | |
# Uninstalling the 5.11 kernel | |
to_remove="$(dpkg-query –show –showformat \ | |
'${Package} ${Architecture} ${Version} ${Source} ${Status}\n' \ | |
'*linux*' | grep -v deinstall | | |
awk '$4 == "linux" && $3 ~ /^5\.11/ {print $1 ":" $2}')" | |
if [ -n "$to_remove" ]; then | |
apt-get remove $to_remove | |
fi | |
rm -rf $pd |
Pingback: DisplayLink now working for some hardware for Ubuntu 21.04, 21.10 (NVIDIA is a problem) – Something better to do
I can conform that this works, but is noticeably more laggy than on 20.04, especially near the mouse pointer.
Pingback: DisplayLink is now working with Ubuntu 21.04 – Something better to do
Pingback: Update on using DisplayLink with Ubuntu 21.04 (Hirsute Hippo) – Something better to do
Pingback: Using DisplayLink with Ubuntu 21.04 (“Hirsute Hippo”) – Something better to do