Howto: DisplayLink USB Single Monitor on Linux

Unfortunately, Linux doesn’t support multiple graphics adapters the way Windows does, which means you can’t just plug in USB graphics adapters and expect them to extend your desktop (the good news is there is progress on this support).

What is possible, however, is running a single DisplayLink adapter, or several with a Xinerama or multiseat configuration — just as long as you don’t expect to use your main GPU at the same time.

The single-display case is relatively easy to set up, and we’ll cover that here.

First, make sure you’re running kernel version 2.6.35 or later (Ubuntu 10.10 or later). For older kernel versions, you’ll need to update udlfb and run a modified fbdev X server (not covered in this post). On these kernel versions, when you plug in your DisplayLink-based USB graphics device, you should get a green screen. This means that at the driver built into the Linux kernel is happy, healthy, and talking to the device.

Second, if you are running Unity Desktop in Ubuntu 11.04 or later, you’ll need to switch back to Classic Mode so you’re running straight X. Here’s how on Ubuntu:

Click on the power button in the upper right corner (mine looks like a light switch) and choose the last option, System Settings. Search for Login Screen, Double-click to display, Choose Unlock and enter your password, Select Ubuntu Classic as default session.

Third, if you’re running kernel versions between 2.6.35 to 3.1, enable the fb_defio option of udlfb. To do this, create or edit a file like
/etc/modprobe.d/50-displaylink.conf

and add the single line

options udlfb fb_defio=1

And reboot (or run “sudo depmod -a” and unplug/replug your adapter). This will turn on defio (page fault change detection) support. This option is already enabled by default in kernels 3.2+.

Lastly, create an X config file called 60-plugable.conf (or similar) with the following contents and place it in /usr/share/X11/xorg.conf.d (on recent distros; on older distros, make this your xorg.conf):


Section "Device" 
  Identifier "uga" 
  driver "fbdev" 
  Option "fbdev" "/dev/fb0" 
  Option "ShadowFB" "off"
EndSection 

Section "Monitor" 
  Identifier "monitor" 
EndSection 

Section "Screen" 
  Identifier "screen" 
  Device "uga" 
  Monitor "monitor" 
EndSection 

Section "ServerLayout" 
  Identifier "default" 
  Screen 0 "screen" 0 0 
EndSection

Note: if your main GPU creates a /dev/fb0 even when the USB display is not attached, then your USB display is probably getting assigned to /dev/fb1. In that case, change /dev/fb0 in the “Device” section above to /dev/fb1

Now, on reboot, you should (hopefully!) see your login come up on your DisplayLink USB attached display!

This kind of simple setup is useful for:

  • Testing or playing with your USB graphics adatper on Linux.
  • Embedded systems with USB but no GPU.
  • As a backup method when the main GPU or its driver isn’t available or working.
  • Systems where a USB graphics adapter enables higher modes (up to 2048×1152) than the main GPU screen.

Please comment if you have any trouble with this single display case. See our past posts for additional information about the DisplayLink Linux kernel driver and some more involved setups.

The instructed here work on all Plugable USB 2.0 graphics adapters and Plugable USB 2.0 docking stations and thin clients (and should also generally work on all DisplayLink based products).

29 comments on “Howto: DisplayLink USB Single Monitor on Linux”

  1. Richard

    i note in the example xorg conf above,

    driver “fbdev”

    having read elsewhere on the plugable site, and in discussions with support, i’m using instead

    driver “displaylink”

    sourced, built & installed from http://git.plugable.com/webdav/xf-video-udlfb/

    what are the differences, and what’s actually recommended?

  2. Sam Liddicott

    I’m using Mint 12 with kernel 3.0.0-15-generic-pae and a HP DisplayPort.

    It’s been working fine on Ubuntu 11.04, where I had to echo 1 > bConfiguration on bootup to get a green screen.

    But now that doesn’t seem to work because I can’t find the USB node to echo this into; however /dev/fb1 is created (but only on bootup, not if I re-insert afterwards).

    When I try to start X using fb1, it hangs with this listed in dmesg:

    udlfb: usb_submit_urb error fffffffe

    I’ve just compiled the driver from git, and I’ll see how that goes

    • Sam Liddicott

      Like the mint provided kernel module, the git build hangs when I
      echo 1 > /sys/bus/usb/devices/1-1.2/bConfigurationValue
      and even all my USB keyboard and mouse (plugged into a different port) can hang.

      Also, the git provided modules does not create /dev/fb1 although the mint provided module does.

  3. Sam Liddicott

    I got the green screen by echoing into
    /sys/bus/usb/devices/1-1.2/1-1.2.3/bConfigurationValue
    so the node seems to have moved.

    I was tipped off by this commit note:
    25 Jun 04:37 – udlfb was binding its framebuffer to its parent device, rather than its interface. Found and fix suggested by Kay Sievers
    although I didn’t think the previous copy I was running was that old!

  4. Sam Liddicott

    On my HP laptop I was running the radeon driver in 16bpp mode as Xinerama with my udlfb and having a nice 3-monitor deskop I cannot get udlfb to work simultanesouly with my Thinkpad T420s.

    If the udlfb initalizes then the built-in device driver unloads (without reason given).

    I’ve tried using the intel sandybridge driver, the fb driver and the nvidia driver for the internal device but none will work at the same time as udlfb.

    I did briefly have them work as seperate screens, but now that won’t work; I did briefly have them work as a 2 monitor desktop, but the built-in driver seems fixed at fbbpp of 32 even thought it can be configured as 16bpp to match udlfb – the image just is squashed and takes half the monitor.

    The udlfb will not initialize if DefaultDepth is set to 24 (although I swear it did yesterday).

    All very annoying.

  5. Sam Liddicott

    Compiling and using the Xorg displaylink_drv.so means that the nvidia driver is not unloaded; however it still segfaults when trying to set the nvidia mode.

    I think that is a know problem, I hope google will help there

  6. Sam Liddicott

    Moving my T420s laptop back to intel chipset instead of nvidia I can now have two separate screens (no xinerama) and that works!

    However if I ctrl-alt-F1 to switch to the text console, it crashes the X server:-(

  7. Sam Liddicott

    By setting DefaultFbBpp 16 and DefaultDepth 16 on my intel driver I now have xinerama across two screens!

    However right-clicking on the right (intel) screen pops up the menu on the left screen. Also gnome panels will not show in the right screen, nor will the wallpaper.

    Not sure why

    • Gustavo Jasso

      Could you post your xorg.conf file? Which driver are you using xf86-video-fbdev from Plugable’s git? also udlfb from said git?

      I have succeeded to make the displaylink device to work in a single monitor setup, but I would really like to have my other screen working.

      Thanks in advance

  8. Sergio Samayoa

    Good news but still unable to use computer’s gpu at the same time is holding me in Windows.

    Well, lets back in a few months…

  9. No Name San

    I installed Ubuntu 12.04 and reinstall Classic mode using “sudo apt-get install gnome-session-fallback”. I pluged my AOC USB LCD display to USB port and it displayed Ubuntu Logo. I just added your 60-plugable.conf file and the USB Monitor now worked flawlessly. Many Many thanks ^.^

  10. Greg

    Thank you Jerome!

    This worked well for my Doublesight DS-70 USB monitor running on 12.04 with the same experience as No Name above. Only problem I am having with this is it is attached to a laptop and when I close the lid, the USB display turns off. I have set the power settings to do nothing for both on AC and battery.

    The laptop will be tucked into cabinet and the mini display is all I want the users to see so its fine that the laptop display doesn’t run. If the lid can’t be closed it won’t fit in the small space. Any thoughts?

  11. Greg

    Thanks again. I have a few of these systems to depoly in the same fashion so I will try the suggestion in your link on the next one. For the first one, I removed the actual lid switch from the laptop before seeing your reply. I can get away with this since these are older systems that will be used for just the one application.

  12. Austin

    Am I right to assume that hardware acceleration will not work with this monitor? I though GPU rendering has nothing to do with the monitor.

    I’m trying to enable hardware acceleration with my AMD A6-3500 APU on my DisplayLink monitor and I’m having trouble with both radeon and fglrx. When I run radeon, OpenGL uses software rendering. When I use fglrx, I get errors trying to launch anything opengl related.

    • Bernie Thompson

      Hi Austin, thanks for posting. There are two drivers in Linux kernels after 3.4.0: The udlfb framebuffer driver, and the udl drm driver. Only the udl driver offers the potential to use the main GPU for rendering — but support there is still maturing. The post above just describes udlfb (which doesn’t use GPU at all). So I’m not sure what you’re seeing (you’d have to say much more about kernel version, X config, etc.), but it’s likely just that no hardware OpenGL is available. The best workaround to get OpenGL on framebuffer is with something like llvmpipe ( http://www.mesa3d.org/llvmpipe.html ). Fedora 17 uses this strategy, and it uses a lot of CPU but otherwise works well. Hope that helps!

  13. Gary Malolepsy

    I tried the 60-plugable.conf on an Ubuntu 11.10 desktop. On re-boot it made my normal LCD screen smaller with a blank screen on the USB LCD. I then changed fb0 to fb1 and on a re-boot my normal LCD screen had the bad error messages on a black background and still the USB LCD was blank. Did ctrl-alt-F1 and deleted 60-plugable.conf and on re-boot my normal LCD was ok. Don’t know how to make the USB LCD work with Ubuntu. It works fine with Windows 7. Any ideas?

  14. Pingback: AOC E2251FWU 22″ DisplayLink USB Monitor | Note To Self

  15. Pingback: DisplayLink | Backfill for 'Note to Self'

  16. Zoltan Fedor

    Currently I’m running 4 monitors off of a Windows 7 laptop (2 from GPU and 2 from USB Displaylink UV Plus). I would love to migrate to linux, but until I cannot use both the GPU and the USB Displaylinks to have 4 monitors, linux is just not usable for heavy development work. This might sound harsh, but 4 monitors is just so much more effective for work than 2.

  17. Oliver

    I finally got a displaylink as a single monitor on Ubuntu 14.04 kernel 3.16.0-37. I had to blacklist the udl driver (and un-blacklist udlfb in /etc/modprobe.d/blacklist-framebuffer.conf) because it was either black screen (fb_defio=0) or crashing the system (fb_defio=1). The udlfb driver works but fb_defio doesn’t need to be set anymore as it is set automatically (along with console=1 and shadow=1).

    To get the console going, I modified the line in /etc/default/grub: GRUB_CMDLINE_LINUX_DEFAULT=”fbcon=map:1 vt.default_utf8=0″. I can switch to terminal and back with Ctrl-Alt-F1…Ctrl-Alt-F7.

    Hope this helps

  18. Matthaeus

    Hi, I have Mint 17, how can I use my 3.0 Docking Station DisplayLink using two monitors?

    • Bernie Thompson

      Hi Matthaeus – only USB 2.0 generation DisplayLink devices are supported in the Linux kernel. And with those, Linux support for multiple monitors spanning PCIe and USB has not worked reliably between distros and distro versions. Thus the much more limited, fixed single display configuration covered in this post. Thanks for asking.

  19. ian

    Hey Jerome,

    Thanks! This worked great. However now that my usb connected screen is up and running it seems my original vga connected screen is drawing a blank. It just has a black background and I can see the underline cursor sitting in the upper left? Any advice on getting both going? I had to use the modification you mentioned above; changing /dev/fb0 => /dev/fb1.

    Thanks!

Comments are closed.