Monday 21 February 2011

Ubuntu 10.10: Mimo UM-720S single screen setup


I recently needed to temporarily put a screen on a completely headless system (no graphics card installed), so I decided to use a MIMO UM-720s which was lying around (almost literally).

Naturally, was not as easy at it initially seemed...

First of all, this guide is heavily based on the one written by Andrew Simpson, which can be found here.

SECTION A: Getting it to work


1. Install the required packages:
 $ sudo apt-get install libusb-dev xorg-dev build-essential xserver-xorg-video-displaylink git-core module-assistant git 

2. Download, compile and install the the updated drivers:
 $ git clone http://git.plugable.com/webdav/udlfb/  
 $ cd udlfb  
 $ make clean
 $ make
 $ sudo make install  
 $ sudo depmod -a  
Just in case, a copy of the git tree which worked for me can be found here.


3. Create a xorg.conf file (there is none by default) in /etc/X11/xorg.conf:
 $ sudo pico /etc/X11/xorg.conf  
and paste the following:
 # xorg.conf (X.Org X Window System server configuration file)  
 #################################################  
 Section     "ServerLayout"  
     Identifier   "Server Layout"  
     Screen 0    "DisplayLinkScreen" 0 0  
     InputDevice   "touchscreen" "CorePointer"  
     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"  
    # You might have to change the following line.  
    # check the troubleshooting section at the end of  
    # the post   
     Option     "fbdev" "/dev/fb0"  
 EndSection  
 Section     "Monitor"  
     Identifier   "DisplayLinkMonitor"  
 EndSection  
 Section     "Screen"  
     Identifier   "DisplayLinkScreen"  
     Device     "DisplayLinkDevice"  
     Monitor     "DisplayLinkMonitor"  
     DefaultDepth  16  
     SubSection   "Display"  
         Depth      16  
         Modes      "800x400"  
     EndSubSection  
 EndSection  
 Section "InputDevice"  
     Identifier "touchscreen"  
     Driver "evdev"  
    # You might have to change the following line.  
    # check the troubleshooting section at the end of  
    # the post   
     Option "Device" "/dev/input/event2"  
     Option "DeviceName" "touchscreen"  
     Option "ReportingMode" "Raw"  
     Option "SendCoreEvents" "On"  
     Option "Calibrate" "1"  
     Option "InvertY" "true"  
     Option "InvertX" "true"  
     Option "MinX" "630"  
     Option "MinY" "31000"  
     Option "MaxX" "31700"  
     Option "MaxY" "1000"  
 EndSection  
 # End of xorg.conf  

4. Fix the GDM login screen:
 $ sudo pico /etc/gdm/Init/Default  
and paste the following directly under the end of the "gdmwhich" function (i.e. right after the closing curly bracket '}').
 ######  
 XRANDR=`gdmwhich xrandr`  
 if [ "x$XRANDR" != "x" ] ; then  
 $XRANDR -o 0  
 fi  
 ######  

5. Reboot
 $ sudo reboot  

and that should be it! When the system restarts, the GDM login screen should appear on the screen!

SECTION B: Calibrating the screen
When using the "evdev" driver for the touchscreen, as per the configuration above, there is no way to calibrate the touchscreen. The "evdev" driver seems to be good enough, even though it does not seem to work very well near the edges but this should be solvable by changing the MinX/MinY/MaxX/MaxY values in the xorg.conf.

In principle, one could install the "evtouch" driver by typing:
$ sudo apt-get install xserver-xorg-input-evtouch  
change xorg.conf accordingly and then use the ev_calibrate application. 
When I tried calibrating though, it failed complaining about a missing font. I got that sorted by sym-linking another font but it then complained about a missing bitmap at which point I gave up.

SECTION C: Troubleshooting
1. The screen is solid green
Make sure that the /dev/fb* number is correct in the following line of xorg.conf.
Option     "fbdev" "/dev/fb0"  

To do that, type
 $ dmesg | grep /dev/fb  
and check for any relevant lines.

Make sure that you reboot after any changes in the xorg.conf file. You can also just restart GDM instead (sudo /etc/init.d/gdm restart).

Also, unless you are explicitly using the "evtouch" driver for the touchscree, make sure that you uninstall it, as it tries to autoload, breaking X:
 $ sudo apt-get remove xserver-xorg-input-evtouch  

If it still does not work, re-run step 1 of the installation process, to make sure that all necessary components are installed. Also, make sure that in step 2 you sudo the "make install" step.

2. The touchscreen is wildly inaccurate
Make sure that the "/dev/input/event*" number is correct in the following line of xorg.conf.
Option "Device" "/dev/input/event*"

To do that, type
 $ cat /var/log/Xorg.*.log | grep touchpanel 
and check for any relevant lines.

If the axes are inverted, edit the relevant lines in the xorg.conf file.

Make sure that you reboot after any changes in the xorg.conf file. You can also just restart GDM instead (sudo /etc/init.d/gdm restart).

14 comments:

  1. Thanks for this guide. In combination with other ones, I've managed to hook up Mimo Touch2 to ubuntu 10.10. I've got it showing a screen and touchscreen seems to be active. However, the x-y axis are reversed (moving horizontally moves the mouse up and down). I can improve on this with a xinput swap-axis command once logged in... but then I'm left with ONLY the x-axis reversed. Changing invert-x makes no difference, and I saw swap-y option in other posts neither of which makes any difference.

    Laptop touch-pad seems happy and works/well-scaled to screen.

    Anyone any ideas on what I'm missing, why xinput has to be used and how can I make this stick (not enter every time).

    I've not been able to run any calibration tool either, so for now have been using the min/max numbers in the above post.

    In addition, under U10.10 if the monitor is powered off or disconnected the kernel starts panicking and crashing. Has this been reported/fixed/addressed in U10.10 or newer?

    So close... any advice welcome. mythtv [at] dtmc [dot] ca.

    ReplyDelete
  2. Hi Mike, I have the same problem in 11.10 on a BeagleBone. I have X running using FluxBox but the X and Y are reversed. When I go up and down, the cursor goes right and left.

    Still looking for a fix. This is Mimo Touch2 720.

    Thanks!

    ReplyDelete
  3. Found it! Option "SwapAxes"


    Section "InputDevice"
    Identifier "touchscreen"
    Driver "evdev"
    Option "Device" "/dev/input/event1"
    Option "DeviceName" "touchscreen"
    Option "ReportingMode" "Raw"
    Option "SendCoreEvents" "On"
    Option "Calibrate" "1"
    Option "InvertY" "false"
    Option "InvertX" "true"
    Option "SwapAxes" "true"
    EndSection

    ReplyDelete
  4. This information is very useful and helped me to setup my device.

    I had it running with Ubuntu 10 and recently decided to reinstall my system with 12.04.

    The UM 720-S works but the axis are reversed.
    When I touch left up the pointer is right down.

    I tried different combinations of Option InvertY, InvertX and SwapAxes in xorg.conf.
    But this seems to have no effect at al.

    I also tried a direct configuration on the command line.
    sudo xinput set-int-prop "DisplayLinkDevice" "Evdev Axis Inversion" 8 1 1

    Further more I tried the evtouch driver.

    Has anybody an Idea what else I can try?

    Thanks,
    Tony

    ReplyDelete
  5. For people who have this similar problem, after a couple of frustrated hours I found the solution.
    The event mentioned in mine /etc/X11/xorg.conf was wrong.

    You can find the right event with the command:
    ls -al /dev/input/by-path
    pci-0000:00:04.1-usb-0:1.3:1.0-event -> ../event4

    The event listed should be used in xorg.conf:

    Option "Device" "/dev/input/event4"

    I had to invert both axes in xorg.conf
    Option "InvertY" "true"
    Option "InvertX" "true"
    Option "SwapAxes" "false"

    Hope this will help people with simular problem,
    regards Tony

    ReplyDelete
  6. You can use the device ID as well.

    "ls /dev/input/by-id"

    In my case following setting worked for MIMO Touch 2:

    Option "Device" "/dev/input/by-id/usb-Galax_Inc._USB_TouchController-event-mouse"

    ReplyDelete
  7. Min/Max axis calibration fail with my MIMO on lubuntu.
    Here is my fixed xorg.conf :

    Option "InvertY" "true"
    Option "InvertX" "true"
    Option "Calibration" "100 32500 100 32500"

    See the evdev driver man page:
    http://www.x.org/archive/X11R7.5/doc/man/man4/evdev.4.html

    Regards,
    Fkop

    ReplyDelete