How to get a displaylink video adapter working with Ubuntu 12.04

· Linux
Author
Kensington Universal Multi-Display Adapter

Kensington Universal Multi-Display Adapter

Displaylink video adapters like the Kensington Universal Multi-Display Adapter are a great way to add an extra screen to a PC, in particular when it has only one VGA out and you want to add a DVI or HDMI monitor. They work via USB, so you do need a free USB 2.0 port.

These video adapters come bundled with drivers for Windows, but to get them working with Linux requires a bit more work.  I tested this on an aging HP D530 computer with Intel integrated graphics, Ubuntu 12.04 LTS and the Xubuntu XFCE desktop environment.

The first step is to install the displaylink driver:

apt-get install xserver-xorg-video-displaylink

Reboot, and the additional screen that was attached to the Displaylink video driver should turn green. This means that it is recognized on Linux level (by a framebuffer driver), but not yet usable with X Windows. By default recent X Windows configurations use auto-detection to connect all the screens and input devices together. For some reason this doesn’t work with Displaylink devices, so we have to create an explicit configuration file specifying the server layout. To do that, check which framebuffer your displaylink device is using and which video devices your system has:

cat /proc/fb
grep -i drivers /var/log/Xorg.0.log

Then add the following to your X configuration (in Ubuntu 12.04 you can create a new file in /usr/share/X11/xorg.conf.d named 52-displaylink.conf):

Section "Device"
Identifier      "intel"
driver          "intel"
EndSection

Section "Device"
Identifier      "dl1"
driver          "displaylink"
Option  "fbdev" "/dev/fb1"
EndSection

Section "Monitor"
Identifier "monitor0"
EndSection

Section "Monitor"
Identifier "monitor1"
EndSection

Section "Screen"
Identifier "screen0"
Device "dl1"
Monitor "monitor0"
DefaultDepth 16
EndSection

Section "Screen"
Identifier "screen1"
Device "intel"
Monitor "monitor1"
DefaultDepth 16
EndSection

Section "ServerLayout"
Identifier     "multihead"
Screen      0  "screen0" 1280 0
Screen      1  "screen1" LeftOf "screen0"
Option    "Xinerama" "on"
EndSection

The configuration shown above will set up a Xinerama configuration where you can use multiple screens (two in this example but there can also be more) as one big screen. You may have to adapt the driver of the first device and the framebuffer device option of the second device to your own configuration. Depending on the size and orientation of your monitors you’ll probably also want to update the offset of screen 0 in the server layout section. Some additional notes, which were determined through trial and error:

  • The default depth of both screens is set to 16 bits, because Displaylink adapters cannot handle more than that and it has to be the same for all screens.
  • Xinerama is specified as on, which will disable the RandR / XRandR extension. This is needed to be able to drag windows from screen to screen. (RandR by itself supports multiple screens and moving your mouse pointer from one to the other, but not screen dragging. Also having RandR on in this configuration may make your display manager crash).
  • The Displaylink screen has to be screen 0, otherwise the displaylink driver will be unloaded for some reason during X startup.

After updating the X server configuration in this way log out. The X server will restart and everything should work.

If it doesn’t work right away and you cannot use your screen anymore to log in (at some point I ran into a continuously segfaulting lightdm display manager which caused the X servers to be restarted every few seconds) you can try to login from another computer using ssh. You can then use the following commands to stop and start the X server:

/etc/init.d/lightdm stop
/etc/init.d/lightdm restart

It may be a bit fiddly to find a working configuration, but once you’ve found it it should be stable. A great way to add some extra screen real estate to your system.

12 Comments

Comments RSS
  1. Jay

    I followed the steps but I got a twinview. Do you know how to fix this?
    Thanks a lot!

  2. admin

    Hi Jay,
    Some part of your new X configuration file probably failed to load, for example because you already had a ServerLayout section elsewhere. You can check the log file (/var/log/Xorg.0.log) for error messages.

  3. Zsolt

    Hey,

    I’d like to use 3 monitors with my notebook. My situation is.

    I have a Dell Lattitude E6420 Notebook with a docking station. The docking station has got a VGA out and a DVI out. If I want to use 2 monitors it works fine I can extend my Ubuntu 12.04 desktop.

    When I first saw your blog I copy pasted the source to the named file and it worked with my usb kensington displaylink. Unfortunatelly my 2 monitors connected to the docking station was cloned not extended.

    What I’d like to see is 3 monitors working 2 with docking station connectors and 1 working with kensington display link.

    Could you help me to figure out what else parameters should I insert to this file?

    Regards

    Zsolt

  4. Steven

    I tried this and was able to move the mouse pointer from screen to screen but nothing legible and the screen. either nothing at all or just weird color patterns

  5. jonas

    Is it possible to use more than one adapter simultanesly? And do you need to add a *displaylink.conf file for each extra adapter?
    I want six monitors in total :)
    Any news on how Ubuntu 13.04 handles these adapters?

  6. ET

    I follow the steps and it worked. But my gnome3 animations are gone! I can’t open the workspace switcher anymore and I am forced to log into the unity2d interface :( Any ideas?

  7. Prasad

    I followed above procedure when i enter below
    /etc/init.d/lightdm stop

    In terminal I got error as
    saned disabled edit /etc/default/saned

    Pl suggest to me

    Thanx in advance

  8. ThePhi

    Hi
    Thanks for your very detailed explanation.
    The package xserver-xorg-video-displaylink is however not present with Ubuntu 13.04 anymore. What can we do know ?

  9. TeeKay

    I’m trying to add 2 montiors (1 vga & 1 usb) with my notebook, I get an EDID error and gdm crashes

  10. Manu

    Nice, but could you precise the hardware used ? I readed that USB3 display link are currently not supported under Linux…

  11. Janiporo

    How do I compeletely remove this? I did not get it to work, and I am using VGA-out now, but this process seems to still take some processing power and my playback is not fluent.
    When trying:
    “sudo apt-get install xserver-xorg-video-displaylink”
    it says:
    dpkg: virhe: syntaksivirhe liipaisinten viivästetyssä tiedostossa `/var/lib/dpkg/triggers/Unincorp’ merkissä `/’ midline
    E: Sub-process /usr/bin/dpkg returned an error code (2)

    In English something “like Syntax error in trigger delayed file”

    I do not have file: /usr/share/X11/xorg.conf.d/52-displaylink.conf (that might be the reason it did not work in the first place, but enough about that, I am not trying to use hdmi-box anymore)

Leave a Comment