Extending onto a USB Monitor with Manjaro

Normally, my ASUS MB169B USB Monitor lives in my briefcase, to be used when I need two screens at a coffee shop or a client. But, given the new work-from-home reality, it’s found a new life as a dedicated spot for tiles showing email, calendar, and Slack…

…at least it does when I’m running Windows. When running Manjaro, the USB monitor has sat idle, unused, and sad.

That’s not to say that Manjaro doesn’t support the use of DisplayLink to attach USB monitors — it’s just that, like all things Arch Linux, you have to work for it; doubly so if you’re running an nVidia card.

So, here’s how I got mine working.

1. Install DisplayLink and EVDI drivers.

Do you need both? Beats me, but this is what I have and it works. Purists will do this via pacman but I’m lazy and used the GUI.

2. Install the nVidia drivers, even though they’re not very good.

This turned out to be the key step. Normally, I use modesetting as my graphics driver, mainly because it doesn’t suck. With the nVidia drivers, I get some annoying mouse flickering that I haven’t yet been able to address.

However, the USB monitor also uses modesetting, and with both on the same driver, xrandr returns the following when you try to link them up:

X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  139 (RANDR)
  Minor opcode of failed request:  21 (RRSetCrtcConfig)
  Value in failed request:  0x0
  Serial number of failed request:  22
  Current serial number in output stream:  22

What does it mean? No idea.

How do we fix it? Bust out those crap-ass proprietary drivers.

Enter Manjaro Settings Manger, choose Hardware Configuration, and attain the following setup (the video-linux drivers may be optional, but they’re doing no harm so whatev):

3. Enable and configure the DisplayLink service

Per the instructions in the Arch Wiki, enable DisplayLink by typing in the terminal
sudo systemctl enable displaylink.service

Then, create a file at
/usr/share/X11/xorg.conf.d/20-evdidevice.conf
with the contents

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

Note: It’s entirely possible that this step is obviated by use of the nVidia drivers, but I’m not taking chances.

4. Reboot

Just to make sure.

5. List the displays in xrandr

In the terminal, enter
xrandr --listproviders

With luck, you should see both displays, with their respective drivers:

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

6. Connect the displays in xrandr

In the terminal, enter
xrandr --setprovideroutputsource 1 0

If you’re lucky, this will mirror your displays. Of course, that’s probably not what you want, so let’s get them extended.

7. Configure Manjaro to extend your displays

Open Display Settings and declare your primary monitor as such (I’ve found that the USB monitor tends to be marked as primary, initially).

Uncheck Mirror Displays for obvious reasons.

Choose a resolution for your USB monitor that makes sense (probably not the same as your big-ass desktop monitor).

8. Have a lovely beverage

Celebrate your success. Or let me know if it failed. I probably can’t help, but hey who knows.

Leave a Reply