Skip to content

Instantly share code, notes, and snippets.

@trapd00r
Created February 17, 2024 11:06
Show Gist options
  • Save trapd00r/3c656e25cccb3c3eee8c2a75c0bd11a7 to your computer and use it in GitHub Desktop.
Save trapd00r/3c656e25cccb3c3eee8c2a75c0bd11a7 to your computer and use it in GitHub Desktop.

using external displays over usb2displayport while having a nvidia card

pacman -S linux-headers
pamac build evdi displaylink
modprobe evdi
systemctl start displaylink

/etc/xorg.conf.d/20-evdi.conf:

Section "OutputClass"
  Identifier "DisplayLink"
  MatchDriver "evdi"
  Driver "modesetting"
  Option "AccelMethod" "none"
EndSection

/etc/xorg.conf: Add Screen 1 "Screen1" to the ServerLayout section.

Check the name of the new card:

ls -al /dev/dri/by-path
 lrwxrwxrwx ▏6  min │    8B│ pci-0000:01:00.0-card » ../card0
 lrwxrwxrwx ▏6  min │   13B│ pci-0000:01:00.0-render » ../renderD128
 lrwxrwxrwx ▏6  min │    8B│ platform-evdi.0-card » ../card1

Add to /etc/X11/xorg.conf at the bottom:

Section "Device"
    Identifier    "usbdev"
    Driver        "modesetting"
    Option        "kmsdev" "/dev/dri/card1"
EndSection

Section "Screen"
    Identifier    "Screen1"
    Device        "usbdev"
EndSection
xrandr --listproviders

Providers: number : 2
Provider 0: id: 0x1b7 cap: 0x1, Source Output crtcs: 4 outputs: 7 associated providers: 1 name:NVIDIA-0
Provider 1: id: 0x20f cap: 0x2, Sink Output crtcs: 1 outputs: 1 associated providers: 1 name:modesetting

Add proper modelines

xrandr --newmode "1920x1080_59.90" 172.51  1920 2040 2248 2576  1080 1081 1084 1118  -HSync +Vsync
xrandr --addmode DVI-I-1-1 1920x1080_59.90

Activate it

xrandr --output DP-2   --primary \
  --output DP-0   --rotate right  --left-of DP-2 \
  --output DP-5   --above DP-2 \
  --output HDMI-0 --below DP-2 \
  --output DVI-I-1-1 --rotate left --left-of DP-0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment