Nov 16 / Tim Lawrenz

Ubuntu Gutsy on my Asus R2H

Ubuntu R2H I today finally finished setting up Ubuntu on my Asus R2H. It was quite a challenge since the R2H uses some hardware that is not really mainstream and requires some manual work to set it up. I did not really cover everything: GPS, Webcam and Fingerprint reader are not configured yet (I just did not have the time to do this – I will update this post as soon as I figured out how these work) but WiFi, screen, touchscreen and Bluetooth work like a charm.
This is a HowTo specifically for Ubuntu Gutsy and only tested with this very version. I reference a lot of files that might not exist on your distribution of choice. This is also not a ‘copy&paste’ HowTo, you need a bit experience with linux and with the command line.
I am usually using vim and a lot of code below shows me using sudo vim …. Replace vim with the editor you like best.

Contents

  1. Basic Installation
  2. Screen setup
  3. WiFi
  4. Touchscreen
  5. Sound
  6. Additional Software
  7. Conclusions

Basic Installation

The basic Ubuntu Gutsy installation was done setting up a TFTP- and DHCP-server on a different machine and doing a PXE boot with the R2H (F12 during the startup). This is well documented all over the web, so I won’t go into any details in this post. I did a standard Gnome based installation using the alternate install cd.
I strongly recommend to install an ssh-server and a vnc-server on your handheld as soon as possible. The R2H is a mobile device to look things up, use it as a mythtv frontend, read rss feeds, etc. but it is not built to sit in front of it and work on it for hours. You should set up both servers and connect to the R2H from a desktop or laptop while setting it up.
Another thing that might sound silly: choose a short username and password (if it fits your personal security model). You might have to type both using an onscreen keyboard often.

Screen Setup

The basic setup went well and the screen was initialized except for that the default screen resolution that was set to 640×480. The built in graphics card is an Intel 810 and the correct driver was installed during the basic setup. To get the screen to display 800×480 pixels (it’s native resolution and mandatory to make the touchscreen work with the settings I present further down) I modified my /etc/X11/xorg.conf to look like this (excerpt):

Section "Device"
        Identifier      "Intel810"
        Boardname       "Intel 810"
        Busid           "PCI:0:2:0"
        Driver          "i810"
        Screen          0
        Vendorname      "Intel"
        Option          "XaaNoPixmapCache"
EndSection

Section "Monitor"
        Identifier      "TouchScreenDisplay"
        Vendorname      "Generic LCD Display"
        Modelname       "LCD Panel 1280x800"
EndSection

Section "Screen"
        Identifier      "Default Screen"
        Device          "Intel810"
        Monitor         "TouchScreenDisplay"
        Defaultdepth    24
        SubSection "Display"
                Modes           "800x480@60"
        EndSubSection
EndSection

Section "ServerLayout"
        Identifier      "Default Layout"
        screen 0        "Default Screen" 0 0
        Inputdevice     "Generic Keyboard"
        Inputdevice     "Configured Mouse"
EndSection

Annotation: I removed all synaptics and wacom related entries. They confuse me and I don’t need them. If you think you might need them please don’t simply copy and paste the code above but only modify the appropriate sections.

This does not yet contain the touchscreen but after restarting X (Ctrl-Alt-Backspace) you should see that the whole screen is used to display gnome.

WiFi

The built in WiFi model is a zd1211. There is a project on sf.net that provides the zd1211 firmware.

  • Download the tar.bz2 ( wget http://ovh.dl.sourceforge.net/sourceforge/zd1211/zd1211-firmware-1.4.tar.bz2 did it when I downloaded it. Please check if there is a newer version)
  • extract it
  • copy all zd1211* files to /lib/firmware/zd1211/
  • sudo vim /etc/modules and add zd1211rw to the bottom of the file

On the next reboot, the WiFi led should be lit. To make it work immediately, do a sudo modprobe zd1211rw.

The Touchscreen

To make the touchscreen work you have to install the evtouch drivers:

sudo apt-get install xserver-xorg-input-evtouch

Because the PANJIT touchscreen gets associated with a random input[0-4] I decided to create a new udev rule:

sudo vim /etc/udev/rules.d/10-local.rules

Add the following line to create a link /dev/input/touchscreen pointing to the currently linked input event at startup (in ONE line):

SUBSYSTEM=="input", KERNEL=="event*",
  ATTRS{name}=="PANJIT PANJIT TouchSet Digitizer",
  SYMLINK+="input/touchscreen"

Now edit your /etc/X11/xorg.conf to load the evtouch driver. I comment on the options in the code:

Section "InputDevice"
        # giving it a name
        Identifier      "touchscreen"

        # loading the driver
        Driver          "evtouch"

        # connect it to the previously created link
        Option          "Device"        "/dev/input/touchscreen"

        # defaults that I didn't touch but copied from the web
        Option          "DeviceName"    "touchscreen"
        Option          "ReportingMode" "Raw"
        Option          "SendCoreEvents"        "On"
        Option          "Emulate3Buttons"
        Option          "Emulate3Timeout"       "50"

        # copied from the web again. it worked for me,
        # but if your touchscreen does not cover the
        # whole display, mess with these values
        Option          "MinX"  "82"
        Option          "MinY"  "195"
        Option          "MaxX"  "3960"
        Option          "MaxY"  "3900"

        # add these to avoid the ugly ghost double click
        Option          "Taptimer" "100"
        Option          "LongTouchTimer" "200"
EndSection

Add the new InputDevice to your ServerLayout:

Section "ServerLayout"
        # [... keep everything as it was and add the line below ...]
        Inputdevice     "touchscreen"
EndSection

Restarting your X Server should make your touchscreen work. Important: evtouch supports a righ click through the so called ‘double tap’: tab twice fast but hold the second tap for a second. Then releasing the pen (or your finger) simulates a right click.

Sound setup

The integrated sound is supported by snd_intel_hda. You need to tell the ALSA some details to make it work.

sudo vim /etc/modprobe.d/alsa-base

Go to the very end of the file and add this line:

options snd_hda_intel model=3stack position_fix=1

After restarting your R2H your sound oficially works, but the ALSA interface decided that the ‘mono’ device should be silent so you won’t hear anything. To change this double click on the volume icon to open the volume manager. Ensure that you are modifying the right device by clicking ‘File’ -> ‘Change Device’ -> ‘HDA Intel (Alsa mixer)’. Now click ‘Edit’ -> ‘Preferences’ and scroll down until you find the ‘Mono’ device. Check it and click ‘Close’. Pull up the volume on the newly visible ‘Mono’ item and make sure it is not muted.

This is what I had to do to enable sound on my R2H. To be honest, I am not sure if that also enabled the output for the headset – I just checked everything in the steps above and pulled all the the volumes up.

Additional Software

The user interface is probably the most important part. I enjoy GNOME displaying only one panel on the top. I believe that giving away another 24-28 pxiels on a 480px high screen for a second panel is a waste of screen property. Unfortunatly we do not have access to the Eee distribution (that really looks nice) but I came up with a nice solution, too.

Automatic Login

In your GNOME panel, click on ‘System’ -> ‘Administration’ -> ‘Login Window’ and click on the ‘Security’ tab. enable automatic and timed login and enter your username.

The onscreen keyboard

The Asus R2H does not have any keyboard so you might need an onscreen keyboard from time to time. Ubuntu Gutsy comes with onboard which is a highly customizable keyboard that even offers macros.

Loading it on startup makes sense so click on your GNOME panel on ‘System’ -> ‘Preferences’ -> ‘Sessions’. Click on ‘Add’ and enter Name: onboard, Command: onboard. You can always minimize it by clicking on it’s symbol in the Notification Area.

Opera

I already am a big fan of opera and it is a wonderful solution for the R2H because of a couple of reasons:

  • it offers the so called Speed Dial (link to a flash demo)
  • it has a small memory footprint
  • it offers a nice fullscreen mode
  • you have a very fast browsing experience

Speeddial is exactly what we want: it offers nice big click targets and lets you easily customize the most important bookmarks.
Get Opera and install it.

To make it load on startup click on your GNOME panel on ‘System’ -> ‘Preferences’ -> ‘Sessions’. Click on ‘Add’ and add Name: opera, Command: opera -fullscreen. Leave out the -fullscreen if that scares you. Modify the Speeddial links according to your preferences. This is obvious: I added gmail, google reader (for easy rss reading), a couple of news sites and my flickr page to easily show off with my photos.
Enter opera:config in the address bar for very detailed settings. DO NOT enable mouse gestures. I usually use them when I have a mouse available, but with the touchscreen enabled the gestures will really mess with your browsing experience.

Additional Keys

The Asus R2H has a lot of additional keys. You might have found out that the built in trackpoint on the upper right, the mouse buttons on the upper left, the navigation element mid-left and page-up/down mid-right already work. What does not work – and these keys don’t even send events to any /dev/input/ devices are the buttons on the lower left (3dots, 3dashes) and lower right [:::]. If anybody can give me a hint where a keyboard/mouse/thing could send events to – or how to enable these buttons – please let me know.

The only key I was able to configure was the ‘login’ button right beside the power button on the upper left edge. I will tell you how to configure it but what you will do with it is up to you (suggestions: full screen mode in opera: F11, start the onscreen keyboard, start any other program of your choice, etc.)

To make the button work, install keytouch and it’s editor:

sudo apt-get install keytouch keytouch-editor

Go to ‘System’ -> ‘Administration’ -> ‘KeyTouch Editor’ . The keys of the R2H are not available in KeyTouch and the import function of KeyTouch seems to be available only the first time you start it. So calling KeyTouch itself won’t help you at all. The KeyTouch Editor lets you test your system’s events for activity and then lern the keys. Pick an event (hint: ‘event1′ -> ‘AT Translated Set 2 keyboard’) from the list and click ok. Press the login button: a new screen will appear. Fill out the form (do not bother to fill out the actions – this will be done in the KeyTouch application itself) but do ‘add’ the key before you ‘File’ -> ‘Save’ the data to ‘onboard_r2h’. Close the KeyTouch editor.

Now go to ‘System’ -> ‘Administration’ -> ‘KeyTouch’ to configure your new key and import your previously created onboard_r2h. Go to ‘Key settings’, pick the button you created (I’ve chosen to call it ‘Login’) and apply an action to it. For me it was F11 from the F-key plugin to switch between window- and fullscreen-mode in opera.

Panel

I suggest to set up only one panel in GNOME:

  • The Application Launcher (Applications, Places, System) to be able to start programs and modify settings
  • 2 application launchers (onboard and opera)
  • the window list
  • the brightness applet (gutsy dims your screen when you unplug the power cord)
  • volume control – because there is always a situation when sound will emberass you
  • the battery charge monitor
  • make the clock hide the date. you know the date already and it takes up too much space
  • the notification area

Conclusions

I am using Ubuntu (and linux) since a year. I am a software developer so I do not really have trouble finding out how stuff works and am ok with using the command line. Setting some of the things above up was not fun at all and i really would not recommend to my mother to try this at home. I didn’t do a windows installation to compare the usability of both, but I have a hard time to believe that setting up windows would be as hard as setting up ubuntu.

I can’t really believe that Ubuntu is at all usable by handicapped people. You won’t be able to use Ubuntu without an attached standard keyboard. First and foremost the ‘sudo’ window (where you have to enter your password to modify settings) disables the whole screen and with that any application that helps one typing.

Ubuntu is not made for screens with a low vertical screen height. If you followed this guide you will have learned that guessing the hotkey for ‘ok’, ‘save’, ‘close’ or guessing when you pressed ‘tab’ the right number of times is the only way to confirm changes in settings dialogs.

Opera should provide a ‘close tab’ in the right click menu. that would make browsing in full screen mode a lot easier. Opera should also offer the option to display one panel on the top showing back/forward/close/fullscreen/address bar as firefox is doing it. I even like how Internet Explorer is offering that toolset but is auto hiding the panel for maximum screen property (this is really done well). Opera also offers a smart scrolling system in their mobile (phone) version: you can use your finger to scroll up and down (think iPod interface). This should also be made available as an option in the desktop version: scroll up/down and left/right instead of mark and copy content when click-moving your mouse.

I began setting up the R2H as a mythtv frontend, but it turned out that WiFi doesn’t offer enough bandwidth for videos or recordings. That might be my very own problem – I guess I should transcode at least the recordings to a lower quality.

At the end, I am happy with the setup but wouldn’t I have had two days to figure things out, I would have sold the whole thing on ebay.

If you have any recommendations or if there are things I can make more clear or easier, please comment and let me know. What bothers me most is the requirement to get access to the keyring manager to use my WiFi. Is there a solution to use the keyring manager without password? Can’t I enter the WEP key somewhere to not require me typing in a password to let the network manager connect to my WiFi?

Cheers.

Creative Commons License
This work, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License.

3 Comments

leave a comment
  1. ralf / Mar 3 2008

    hi, thanks for your good work. i got a r2h 2 weeks ago and i try to run xubuntu gutsy. did you get any further with your work on your r2h??

    regards ralf

  2. nicolas / Apr 29 2008

    nice!
    point your browser to hardwarehacking.blogspot.com, you’ll find out how toget support for the camera and fingerprint sensor :D

  3. rog / Jun 20 2008

    Great work. I am trying to get my R2H working with the new Ubuntu-Netbook Remix code but am struggling with the Wifi in Hardy.
    Can anyone assist?

    modprobe zd1211rw doesn’t seem to work :(

    Any help would be much appreciated

    Many thanks

Leave a Comment

You must be logged in to post a comment.