Mutli-monitor on the go, DisplayLink usb monitor

Now that I’m going to be working for Canonical I’ve got to get ready for some week long sprints. Now, I LOVE my 12″ X201 thinkpad. It’s the best laptop I’ve ever owned, and I’ve owned macs, toshibas, dells, and larger thinkpads. When I’m home, I dock and use dual 21″ displays. When I travel, it’s the perfect size, yet still packs an i5 and 8GB of ram.

However, a week of living inside a 12″ display has me a little claustrophobic. So I decided I should do something about it. They make some decent looking USB powered external monitors that seemed like they’d travel pretty nice. Once cable, no external power needs, and another 1024px is a good thing. Mobile mutli-head..sweet!

Getting it working

The trouble is getting it working. The USB monitors use something called DisplayLink to work. Getting that to work is a little tricky. Fortunately, a few brave souls paved my way. You can see the links I checked out to get started

Once you install xserver-xorg-video-displaylink you’ll need an xorg.conf file since DisplayLink doesn’t work with all the hotplug business that makes modern video work.

It’s alive!

The problems

The real trouble is that I ONLY want this xorg.conf file when I’m actually using the USB display. When I’m docked at home or using a projector, I don’t need it. Right now I’ve just written a toggle script that I use to flip the xorg back and forth.

There are also some usage issues. It only works for me if the DisplayLink monitor is the primary one in the xorg server setup. This means the LightDM is running on there and it’s running in just a few hundred pixels of the display. I can still log in though so it’s not killer.

You can’t drag windows back and forth among them, which isn’t the end of the world, but some apps (like Google Chrome) only launch on the same display as the currently running instances. So I can’t find a way to get Chrome to run on both monitors. For now I just run Firefox on one and Chrome on the other.

Overall, I’m really digging the setup. I’m sitting at the bar with irc on a second display while I write this blog post out all unplugged from any power. I think it’ll make life a LOT nicer for road traveling for any extended time.

#!/bin/sh -e
# toggle xorg.conf on/off so I can add/remove it as needed
# requires a reboot after running to take effect

if [ -e /etc/X11/xorg.conf ]
then
    echo "Removing xorg.conf file"
    sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.usb
else
    echo "Setting xorg.conf file"
    sudo mv /etc/X11/xorg.conf.usb /etc/X11/xorg.conf
fi

My xorg.conf file I’m using

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

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

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

Section "Device"
    Identifier      "Configured Video Device"
    Driver          "intel"
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

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

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

Section "Monitor"
    Identifier      "DisplayLinkMonitor"
EndSection

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

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

Section "ServerLayout"
        Identifier      "Server Layout"
        Screen  0       "DisplayLinkScreen" 0 0
        Screen  1       "Default Screen" RightOf "DisplayLinkScreen"
        Option          "Xinerama" "Off"
EndSection

Visual of the display issue with LightDM

7 thoughts on “Mutli-monitor on the go, DisplayLink usb monitor

    • Yea, I think so. In the links I followed to get this running, the default “sample” xorg file in the xorg displaylink package actually lists 4 of them. The key is the number of usb ports. I also saw that while the monitor comes with a dual usb port cable, it might not always be necessary to use both. So if I had the $$ it’d be cool to try it out with 3 of these, one on each of my usb ports.

    • Thanks for the heads up John. The service had a hardware failure and should be back up by this weekend. The backups are being restored. Sorry, I don’t have the links anywhere else.

  1. I have a question. I tried your config file the first time and it didn’t work. I looked up in dmeg and saw that my usb was in /dev/fb1, I adjust the config file and started x backup. and then I rebooted later and the usb was loaded in /dev/fb0 instead.

    Anyway, I can make the script point to the right one when loaded?

    • I had this issue but I found that I had to get everything ready and then reboot. So I just deal with the reboot process vs restarting X. With the SSD isn’t not horrible since I don’t do it all the time.

      To enable this I’ve got a little script I use:
      #!/bin/sh -e

      if [ -e /etc/X11/xorg.conf ]
      then
      echo “Removing xorg.conf file”
      sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.usb
      else
      echo “Setting xorg.conf file”
      sudo mv /etc/X11/xorg.conf.usb /etc/X11/xorg.conf
      fi

      What you could do is run a check and sed against the xorg.conf file when you run it with the right fbX device.

  2. So, if you want to move apps between monitors, then turn Xinerama back on, and set ‘DefaultDepth’ of your laptop screen to match your USB monitor.

    Works for me (well, using wmfs [wmfs.info] as my WM, and not Unity or Gnome).

    Don

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s