Well, it’s time to see if I can get my DisplayLink device working on an old dying laptop using Ubuntu 9.10 (32 bit) – so here goes.

Install Ubuntu 9.10 (32 bit).  Once finally installed and booted lets drop to a console (via Applications > Accessories > Terminal) and do some stuff.

Start by updating the package list:

sudo apt-get update

Then download and install any package & system updates:

sudo apt-get upgrade
sudo apt-get dist-upgrade

Then download some packages we’ll need later:

sudo apt-get install build-essential xorg-dev libusb-dev git-core

Reboot (via console or other means):

sudo shutdown -r now

Once the system is back up drop to a console and get the following package (I’m saving it to the Desktop):

cd Desktop
wget http://projects.unbit.it/downloads/udlfb-0.2.3_and_xf86-video-displaylink-0.3.tar.gz

NOTE: this package takes FOREVER to download.

Extract the package and delete the udlfb directory it contains (we’ll get a newer udlfb library in a bit):

tar xzvf udlfb-0.2.3_and_xf86-video-displaylink-0.3.tar.gz
rm -rf udlfb

Get the latest udlfb and build it:

git clone http://git.plugable.com/webdav/udlfb
cd udlfb
make
sudo make install

Compile the DisplayLink X driver:

cd ../xf86-video-displaylink
./configure && make
sudo make install
sudo shutdown -r now

You should now be able to plug in your DisplayLink device and see the green screen.

Now, here’s where things may get a bit difficult – setting up an xorg.conf file.  Modern distros don’t ship with xorg.conf’s anymore so it’s up to the end user to create one when one is needed.  Also, since this laptop doesn’t have an ATI or NVIDIA card there’s no proprietary driver to install (that would then automatically set up an xorg.conf file for me).  I’m creating a xorg.conf file based on this previous DisplayLink blog entry.

Some things to note:

  • Which /dev/fb* entry maps to the DisplayLink device.  You can see this by unplugging the device, doing an ‘ls‘ in the /dev directory, then plugging back in the device and doing another ‘ls‘ and seeing which entry was just added.
  • The ‘BusId‘ of the non-DisplayLink video card.  This can be obtained through lspci and is needed in the xorg.conf file.
  • Be sure to modify /etc/gdm/Init/Default to contain the following blurb right after the definition of the gdmwhich() function (this is taken from Patrick Gilmore’s blog):
  • XRANDR=`gdmwhich xrandr`
    if [ "x$XRANDR" != "x" ] ; then
      $XRANDR -o 0
    fi

Once you do/know these things you can start tailoring your xorg.conf.  Creating the xorg.conf file is above the scope of this blog and highly dependent on your own computers’ specific hardware.  However, here is how mine turned out:

# xorg.conf (X.Org X Window System server configuration file)

############ Original Video Settings ###########

Section "Device"
        Identifier      "Configured Video Device"
	Driver		"intel"
        BusID           "PCI:0:2:0"
EndSection

Section "Monitor"
        Identifier      "Configured Monitor"
EndSection

Section "Screen"
        Identifier      "Default Screen"
        Monitor         "Configured Monitor"
        Device          "Configured Video Device"
        SubSection "Display"
                Depth   24
                Modes   "1280x800"
        EndSubSection
EndSection

#################################################

Section "ServerLayout"
        Identifier      "Server Layout"
        Screen  0       "DisplayLinkScreen" 0 0
        Screen  1       "Default Screen" LeftOf "DisplayLinkScreen"
        Option          "Xinerama" "off"
EndSection

#################################################

Section "Files"
        ModulePath      "/usr/lib/xorg/modules"
        ModulePath      "/usr/local/lib/xorg/modules"
	ModulePath	"/usr/local/lib/xorg/modules/drivers"
EndSection

############### DisplayLink Stuff ###############

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

Section "Monitor"
        Identifier      "DisplayLinkMonitor"
EndSection

Section "Screen"
        Identifier      "DisplayLinkScreen"
	Device          "DisplayLinkDevice"
        Monitor         "DisplayLinkMonitor"
        SubSection "Display"
                Depth   16
		Modes   "1280x1024"
        EndSubSection
EndSection

Some pictures:

  1. Green screen
  2. Both monitors working

14 Comments

  1. Von Riptuer says:

    I’ve followed your 9.10 guide to get a usb->dvi displaylink adapter working under Ubuntu 9.10. Both screens work in X. However, I cannot get the gdm login window to render on either screen (it is drawn off the top left of the displaylink screen). Once logged in, all my panels are only visible on the non-displaylink screen. Also, I cannot get any right-click menus to render on the displaylink screen. (The desktop shows correctly, and the icons on the desktop are appropriately positioned on the displaylink screen). The other oddity is that when I select shutdown, logout, restart, etc from the shutdown menu, the 60second confirmation prompt renders in the top-left corner of the displaylink screen.

    Would you by chance be experiencing any of these issues in your setup? If not, would you have any insight as to how to correct the above mentioned issues?

    Thanks,
    Von Riptuer

  2. Mulchman says:

    Hi Von,

    Have you made the proper changes to /etc/gdm/Init/Default (adding the snippet bit after the gdmwhich function)? W/o the snippet added you get the behavior you describe. There are some users who still, after applying the snippet, have what you describe and I don’t know how to fix that.

    I did submit a small patch to xf86-video-displaylink that addresses this issue but I’m not sure if it’s made it yet.

  3. Von Riptuer says:

    Yes, I have applied the `gdmwhich xrandr` changes to /etc/gdm/Init/Default. Although, I have read in the forums for freedesktop.org, that the newer versions of udlfb (like v0.4 which I have installed) this is no longer necessary. And to that extent, I get the exact same results with the `gdmwhich xrandr` as I do when I have it commented out.

    Of curiosity, what were the changes that you have suggested for xf86-video-displaylink?

    Thanks,
    Von Riptuer

  4. Mulchman says:

    http://lists.freedesktop.org/archives/libdlo/2010-March/000631.html

    Details the patch I submitted. With the patch applied you don’t need to edit /etc/gdm/Init/Default at all (or at least I didn’t in my testing, that is).

  5. Von Riptuer says:

    Apparently, the issues that I were experiencing have now been completely resolved thanks to updates to Xorg that have been released for Ubuntu 9.10.

  6. Renato S. Yamane says:

    Hi,
    I’m trying download udlfb-0.2.3_and_xf86-video-displaylink-0.3.tar.gz but is impossible get more than 17%

    $ wget http://projects.unbit.it/downloads/udlfb-0.2.3_and_xf86-video-displaylink-0.3.tar.gz
    –2010-05-03 22:22:56– http://projects.unbit.it/downloads/udlfb-0.2.3_and_xf86-video-displaylink-0.3.tar.gz
    Resolved projects.unbit.it… 81.174.68.52
    Conected at projects.unbit.it|81.174.68.52|:80… conected.
    A requisição HTTP foi enviada, aguardando resposta… 200 OK
    Size: 520478 (508K) [application/x-gzip]
    Saving on: “udlfb-0.2.3_and_xf86-video-displaylink-0.3.tar.gz

    17% [=============== ] 89734 –,-K/s

  7. Mulchman says:

    Renato, I have the same problem when downloading that file; it literally takes 20 minutes or so to finish. There’s also a git repo that contains the same source on plugable if you can find it.

    I think this is it: git clone http://git.plugable.com/webdav/xf-video-udlfb

  8. Ryan Becker says:

    I am having a problem with this guide. I am doing it on Ubuntu 10.04. When I attempt to do a make in xf86-video-displaylink, I get this:
    displaylink.c:49:27: error: xf86Resources.h: No such file or directory
    displaylink.c:50:21: error: xf86RAC.h: No such file or directory
    displaylink.c: In function ‘DisplayLinkPreInit’:
    displaylink.c:285: error: ‘struct _ScrnInfoRec’ has no member named ‘racMemFlags’
    displaylink.c:285: error: ‘RAC_FB’ undeclared (first use in this function)
    displaylink.c:285: error: (Each undeclared identifier is reported only once
    displaylink.c:285: error: for each function it appears in.)
    displaylink.c:285: error: ‘RAC_COLORMAP’ undeclared (first use in this function)
    displaylink.c:285: error: ‘RAC_CURSOR’ undeclared (first use in this function)
    displaylink.c:285: error: ‘RAC_VIEWPORT’ undeclared (first use in this function)
    displaylink.c:287: error: ‘struct _ScrnInfoRec’ has no member named ‘racIoFlags’
    make[2]: *** [displaylink.lo] Error 1
    make[2]: Leaving directory `/home/ryan/xf86-video-displaylink/src’
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/home/ryan/xf86-video-displaylink’
    make: *** [all] Error 2
    Any help would be appreciated.

  9. A Pater says:

    Same problem as Ryan Becker here.
    Please help.

  10. Michael Quiniola says:

    Thank you, I found that this worked, but if I boot my computer with the screen on it freezes on Loading Hardware Drivers and Loading Bluetooth (LinuxICE ubuntu 9.04).
    I got the screen to work if i turn it on after the bluetooth part passes.

  11. Mike Evans says:

    OK I feel better. I thought I was doing something wrong. Yes I’m getting the same error regarding the 2 missing files. Any ideas?

    I’m also running ubuntu 10.04

  12. Mike Evans says:

    Well I found this on another blog. He suggests commenting out about 4 lines of code. This will let you compile the driver. I don’t know if it works yet or not, the monitor is at work.

    Here is the link… http://permalink.gmane.org/gmane.comp.freedesktop.libdlo/334

  13. Bernie Thompson says:

    For the gdm rotate problem and xf86Resources.h compile problems with xf86-video-displaylink, the codeline at http://git.plugable.com/gitphp/index.php?p=xf-video-udlfb&a=summary has the patches for both included (including the one from Mulchman — thank you!).

    Separately, I’m focusing more now on small modifications to the standard fbdev X server to make it work with udlfb, in the hopes of submitting those patches back and getting rid of the need for a separate X server for DisplayLink devices. More on that at http://plugable.com/2010/05/21/linux-support-for-higher-res-monitors-on-lower-res-displaylink-devices

  14. Black God says:

    Thanks for wonderful posts on DisplayLink stuff.

    I have DisplayLink based Lilliput UM-70 external 7″ USB monitor. Your post helped me to get it working in Ubuntu 10.04. But it did not involve any source compilation of kernel or modules. But I had to download and use a mouse-wrapscreen utility to get mouse move over both the screens. And also I had removed BusID line from my xorg.conf to get my primary laptop screen to work. Here is more details:
    http://karuppuswamy.com/wordpress/2010/07/19/how-to-get-lilliput-displaylink-based-usb-monitor-um-70-17e902a9-working-in-ubuntu-linux/

Leave a Reply