HOWTO: Use a DisplayLink USB graphics adapter on Crunchbang Linux v11 Waldorf with partial upgrade to Debian Jessie
I recently was able to get my Diamond-branded DisplayLink USB graphics adapter to work with a system onto which I had freshly installed Crunchbang 11 by:
- switching to Debian Jessie repository
- blacklisting
udlfb
kernel mod - messing with
xrandr
a bit
Make your /etc/apt/sources.list
look like this. Note that I've commented out the wheezy
repos and added jessie
.
## CRUNCHBANG
## Compatible with Debian Wheezy, but use at your own risk.
deb http://packages.crunchbang.org/waldorf waldorf main
#deb-src http://packages.crunchbang.org/waldorf waldorf main
## DEBIAN
#deb http://http.debian.net/debian wheezy main contrib non-free
deb http://http.debian.net/debian jessie main contrib non-free
#deb-src http://http.debian.net/debian wheezy main contrib non-free
## DEBIAN SECURITY
#deb http://security.debian.org/ wheezy/updates main
deb http://security.debian.org/ jessie/updates main
#deb-src http://security.debian.org/ wheezy/updates main
Next, do the needful upgrade. It took about 30 minutes on my aging i3-powered nettop.
sudo apt-get update
sudo apt-get dist-upgrade --no-install-recommends
That last part is there to keep bloat at bay. I'm very new to Crunchbang and Debian, so I'm not sure what all this prevents from being installed.
Reboot.
udlfb
is the venerable driver for USB DisplayLink adapters (hence the name) that was renamed to simply udl
when it was pulled into the kernel for Linux 3.13. Phoronix has details.
echo "blacklist udlfb" | sudo tee /etc/modprobe.d/blacklist-framebuffer.conf
Plugin the adapter, with monitor attached.
You'll see something like this if you run dmesg
:
[ 1556.873271] usb 1-1.2: new high-speed USB device number 7 using ehci-pci
[ 1556.945159] usb 1-1.2: device descriptor read/64, error -32
[ 1557.145557] usb 1-1.2: New USB device found, idVendor=17e9, idProduct=019a
[ 1557.145566] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1557.145571] usb 1-1.2: Product: USB TO DVI
[ 1557.145575] usb 1-1.2: Manufacturer: DisplayLink
[ 1557.145579] usb 1-1.2: SerialNumber: 142700
[ 1557.147288] [drm] vendor descriptor length:22 data:22 5f 01 00 20 05 00 01 03 00 04
[ 1557.325202] udl 1-1.2:1.0: fb1: udldrmfb frame buffer device
[ 1557.325214] [drm] Initialized udl 0.0.1 20120220 on minor 1
If you see udl
instead of a bunch of crap about udlfb
, then you done good and you're in business.
Next, you'll have to use xrandr
to actually set stuff. I'd previously used arandr
to do this, but arandr
apparently hasn't yet been updated to work with xrandr 1.4
. Apparently #! 11 and Debian Jessie still have an older version that needs xrandr
1.3.
If you execute xrandr --listproviders
, you'll see something like this:
Providers: number : 2
Provider 0: id: 0x44 cap: 0xb, Source Output, Sink Output, Sink Offload crtcs: 2 outputs: 3 associated providers: 1 name:Intel
Provider 1: id: 0x187 cap: 0x2, Sink Output crtcs: 1 outputs: 1 associated providers: 1 name:modesetting
That modesetting
one is our DisplayLink adapter.
Set the provider output source with
xrandr --setprovideroutputsource 1 0
Now, just run xrandr
by itself and you should see something like DVI-1-0
in the list, with a bunch of display modes.
Then we can actually set the layout and resolution and crap in a script. You can try grandr
but it didn't work as well as arandr
, when it did work. I just wrote a script to handle it and stuck it into ~/.screenlayout/threepanel.sh
:
#!/bin/sh
xrandr \
--output DVI-1-0 --mode 1680x1050 --pos 0x0 --rotate normal \
--output HDMI1 --mode 1920x1080 --pos 1680x0 --rotate normal \
--output VGA1 --mode 1680x1050 --pos 3600x0 --rotate normal \
--output DP1 --off
DVI-1-0
is the DisplayLink adapter. HDMI1 and VGA1 are my nettop's onboard adapters. There's also a DisplayPort port, for which I don't have an adapter, but I think I can only do HDMI or DP.
Good luck. This took me about 5 hours of searching the Internet for various things, and the solution ended up being pretty easy. I'm sure it would have been a lot easier had I skipped straight to Debian Jessie instead of starting with Crunchbang 11.
I make no guarantees about the repeatability of these instructions. I wrote them from memory and bash history so as to add to the cesspool of content about it. Please leave a comment if try this and it fails. I used Gist so you can edit a copy of your own and refer people to it instead of this (broken/outdated/misguided) version.
If you're interested, I made a DisplayLink driver installer for Debian (Jessie/Stretch/Sid)