Ultimate Guide: Managing Multiple Monitors on Ubuntu with DisplayLink & NVIDIA GPUs

Ultimate Guide: Managing Multiple Monitors on Ubuntu with DisplayLink & NVIDIA GPUs

 

🔍 Why this guide?

Running a mixed‑GPU desktop (USB‑based DisplayLink adapters plus an NVIDIA® GeForce card) on Ubuntu is incredibly powerful—but it can be tricky.
Common headaches include:

  • Monitors that randomly reorder after every reboot.
  • DisplayLink screens not waking from sleep.
  • “Unknown display” errors in Settings â†’ Displays.

This post walks you through a bullet‑proof, script‑driven workflow that:

  1. Installs the correct drivers.
  2. Restores your preferred layout automatically at login.
  3. Fixes the most common pitfalls.

Table of Contents 

  1. Prerequisites & Hardware
  2. Step 1 â€” Install / Clean DisplayLink Drivers
  3. Step 2 â€” Map Your Monitors with xrandr
  4. Step 3 â€” Create an Auto‑Layout Script
  5. Step 4 â€” Run the Script at Startup
  6. Troubleshooting & FAQs
  7. Power‑User Tips
  8. SEO Resources & Further Reading

1. Prerequisites & Hardware Checklist 

Item Recommended Version Notes
Ubuntu 22.04 LTS or 24.04 LTS Xorg or Wayland (guide uses Xorg for simplicity)
NVIDIA Driver Proprietary 550+ Install via Additional Drivers or apt
DisplayLink Driver 5.11 for Ubuntu Download from Synaptics → unzip → ./displaylink-installer.sh install
Kernel Headers Must match running kernel sudo apt install linux-headers-$(uname -r)
xrandr 1.5+ Already included in xorg-xrandr
Tip: Always remove older EVDI DKMS packages before installing a new DisplayLink build:
sudo dkms remove evdi/<version> --all

Reboot & verify

systemctl status displaylink-driver
lsusb | grep -i displaylink

Install DisplayLink official package

unzip DisplayLink*Ubuntu*.zip
cd DisplayLink*
sudo ./displaylink-installer.sh install

Purge conflicting EVDI builds

sudo apt purge evdi-dkms
sudo dkms status  # ensure nothing is left

If the service is active and your USB device appears, you’re good to go.


3. Step 2 â€” Map Your Monitors with xrandr 

Run:

xrandr --listmonitors

Sample output:

Monitors: 4
 0: +*HDMI-1 1920/526x1080/296+1920+1080  HDMI-1
 1: +HDMI-0 1920/526x1080/296+0+1080     HDMI-0
 2: +DVI-I-3-1 1920/526x1080/296+0+0     DVI-I-3-1
 3: +DVI-I-4-2 1920/526x1080/296+1920+0  DVI-I-4-2

Interpretation:

  • Top row: DVI-I-3-1 (left), DVI-I-4-2 (right)
  • Bottom row: HDMI-0 (left), HDMI-1 (right & primary)
Got different names? Copy yours exactly—they can change from PC to PC.

4. Step 3 â€” Create an Auto‑Layout Script 📝 

Create the script:

mkdir -p ~/.config
nano ~/.config/set-monitor-layout.sh

Paste & edit as needed:

#!/bin/bash
# —— Fix monitor order for DisplayLink + NVIDIA ——

xrandr \
  --output DVI-I-3-1 --mode 1920x1080 --pos 0x0     --rotate normal \
  --output DVI-I-4-2 --mode 1920x1080 --pos 1920x0  --rotate normal \
  --output HDMI-1    --mode 1920x1080 --pos 0x1080  --rotate normal \
  --output HDMI-0    --primary --mode 1920x1080 --pos 1920x1080 --rotate normal

Make it executable:

chmod +x ~/.config/set-monitor-layout.sh

Test:

~/.config/set-monitor-layout.sh

Your screens should snap into the saved layout.


5. Step 4 â€” Run the Script at Startup 🚀 

GNOME & most DEs use ~/.config/autostart/.

mkdir -p ~/.config/autostart
nano ~/.config/autostart/set-monitor-layout.desktop

Insert:

[Desktop Entry]
Type=Application
Exec=bash -c "sleep 7 && /home/$USER/.config/set-monitor-layout.sh"
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name=Set Monitor Layout

Why the sleep 7? DisplayLink needs a few seconds to initialize after login.

Reboot and watch the magic happen. ✅


6. Troubleshooting & FAQs 🔧 

Symptom Fix
DisplayLink monitors stay black Ensure displaylink-driver.service is active. Re‑plug USB cable.
xrandr names change after kernel update Re‑run xrandr --listmonitors and update the script.
Layout script runs too early Increase sleep to 10–12 seconds.
Wayland session ignores script Switch to Xorg on login screen or use wlr-randr for Wayland.
NVIDIA driver update breaks screens Re‑run nvidia-settings ➜ Save to X Configuration File, then reboot.

7. Power‑User Tips ⚡️ 

  • Toggle scripts: create a second script to flip bottom monitors (A 💱 B) on demand.
  • Hotkeys: bind layout scripts in Settings â†’ Keyboard â†’ Custom Shortcuts.
  • LightDM global hook: add display-setup-script=/path/to/script under [Seat:*] in /etc/lightdm/lightdm.conf for system‑wide layout—great for shared PCs.
  • Persist across docking/undocking: use udev rules to run the script whenever the USB DisplayLink device connects.

8. SEO Resources & Further Reading 🌐 


🎉 Wrap‑Up

You now have a stable, hands‑free, multi‑monitor workstation on Ubuntu—even with the notoriously finicky combo of DisplayLink and NVIDIA.
Set it once, forget it, and focus on getting real work done. 

Happy hacking—and may your pixels always line up! 🙌

Subscribe for daily recipes. No spam, just food.