Henryk Fukś
   


Associate Professor
Dept. of Mathematics
Brock University
St. Catharines, ON
Canada L2S 3A1
tel. (905) 688-5550, Ext. 3296
email:
hfuks (AT) brocku.ca

  • Main
  • Activities
  • Publications
  • Software
  • Lingua Latina

  • Powered by blosxom.

           
    main :: linux :: tablet

    Xandros Linux on LG Electronics LT-20 tablet


    1. Hardware
    2. Installation
    3. Graphics
    4. Tablet digitizer screen
    5. Screen rotation
    6. Synaptics touchpad
    7. Battery and ACPI
    8. Frequency scaling
    9. Remaining issues
    10. Links
    imahe

    NOTE: This article, written in 2005 is somewhat dated now. Many things described here are done automatically in recent Linux distributions.

    Hardware

    I purchased the tablet from Online Electronics. Specifications can be found on the manufacturer's web page. It is a lightweight (1.75kg) tablet based on Intel Centrino with 1.5GHz Pentium M CPU, I got it with 1GB of RAM. It does not come with any disk drive by default, but I purchased external CD/DVD burner for it. I have decided to install Debian-based  Xandros  3.0 Linux  on this tablet.

    Installation

     At first, I planned to keep XP partition, but I had difficulties resizing it. Finally I got frustrated, booted Knoppix, and wiped out the entire disk with

    dd if=/dev/zero of=dev/hda

    This is a cruel way of removing Windows :-), but it makes sure that there is no trace of it left. Xandros 3.0 installed without major problems. I had to change BIOS settings to enable booting from external CD room (connected via USB port).  Wireless card and sound worked out of the box.

    Graphics

    Xandros installer recognized Intel 82852/855GM integrated graphics card, and configured X to use i810 display driver. I had one problem with this driver: when I pressed Ctrl+Alt+F1 to get text console, I got blank screen. I solved this by enabling i810fb framebuffer kernel module.  In /etc/lilo.conf, I changed the line

    append="rw acpi=on "

    to

    append="rw acpi=on video=i810fb "


    After modifying lilo.conf, it is necessary to run

    /sbin/lilo -C /etc/lilo.conf

    Tablet digitizer screen

    The tablet uses standard wacom tablet device, and an excellent driver is available for this device from
    http://linuxwacom.sourceforge.net. To compile it, I had to download "setserial"  and "libncurses5-dev" packages.
    The wacom tablet can be accessed via /dev/ttyS0 port. I obtained its address 0x300 from Windows Device Manager. The port needs to be configured by "setserial" command, and this has to be done before X starts. Normally one would put such command in /etc/rc.local, but Debian-based distros do not have rc.local. One can, however, create rc.local by running the following script:

    echo '#!/bin/sh' > /etc/rc.local
    chmod 744 /etc/rc.local
    RL=`grep ':initdefault:' /etc/inittab | cut -d: -f2`
    echo "LO:$RL:once:/etc/rc.local" >> /etc/inittab
    killall -HUP init

    After executing this script, I added the following line

    /bin/setserial /dev/ttyS0 port 0x300 autoconfig

    to /etc/rc.local. The next step was to compile and install wacom driver. If the port is configured correctly, typing

    wacdump -f c100 /dev/ttyS0

    should produce an output like this:
    Wacdump output

    When the tablet stylus touches the screen, POS_X and POS_Y show its coordinates. I noticed that when I placed the cursor in the lower right corner, the coordinates (which correspond to maximum x and maximum y values) were 24576 and 18432. This means that they were above the upper range of POS_X and POS_Y, but this does not seem to be a problem.

    The next step was to configure X. Xandros 3 uses 2.6.9 Linux kernel and X.org ver. 6.7. There was no pre-compiled driver in "prebuilt" directory of linuxwacom-0.6.6, so I used the closest possible, for X.org version 6.8. I copied the driver to X modules directory:

    cp wacom_drv.o_6.8k2.6 /usr/X11R6/lib/modules/input/wacom_drv.o

    Then I had to modify /etc/X11/xorg.conf by adding the following 3 sections

    Section "InputDevice"
        Driver        "wacom"
        Identifier    "cursor"
        Option        "Device"        "/dev/ttyS0"
        Option    "ForceDevice"    "ISDV4"
        Option        "Type"          "cursor"
        Option        "Mode"          "absolute"
        Option        "Speed"         "3.0"
        Option        "Threshold"     "2"
        Option        "Tilt"          "on"
        #Option    "DebugLevel"    "10"
    EndSection

    Section "InputDevice"
        Driver        "wacom"
        Identifier    "stylus"
        Option        "Device"        "/dev/ttyS0"
        Option        "Type"          "stylus"
        Option    "ForceDevice"    "ISDV4"
        Option        "Mode"          "absolute"
        Option        "Tilt"          "on"
        #Option        "TiltInvert"    "on"
        Option        "Threshold"     "2"
        #Option    "DebugLevel"    "10"
    EndSection


    Section "InputDevice"
        Driver        "wacom"
        Identifier    "eraser"
        Option        "Device"        "/dev/ttyS0"
        Option    "ForceDevice"    "ISDV4"
        Option        "Type"          "eraser"
        Option        "Mode"          "absolute"
        Option        "Tilt"          "on"
        #Option        "TiltInvert"    "on"
        Option        "Threshold"     "2"
        #Option    "DebugLevel"    "10"
    EndSection

    and adding these 3 lines to ServerLayout section:

    InputDevice "cursor" "SendCoreEvents"
    InputDevice "stylus" "SendCoreEvents"
    InputDevice "eraser" "SendCoreEvents"

    After restarting X with Ctrl+Alt+Backspace  the pen worked flawlessly! It is possible to further calibrate the pen, its perssure sensitivity, etc. using xsetwacom command, but the default settings work well for me. Detailed how-to can be found here. 

    Screen rotation

    In order to start X in portrait mode, one has to use fbdev X driver (framebuffer device). This is because, unfortunately, i810 does not support rotation.  Adding a line vga=791 to /etc/lilo.conf enables kernel framebuffer module. I had to play quite a bit with wacom driver parameters to make it work in the rotated mode. The rotated xorg.cong can be found here.
    When I want to use portrait mode, I modify xorg.conf (by running a simple script) and restart X. I have to say that I do not use it very often.

    Synaptics touchpad

    Synaptics touchpad gave me a lot of headache. While the touchpad worked out of the box, it was too sensitive for my taste, so I wanted to disable tapping.
    I  downloaded the newest Synaptics touchpad driver, and compiled it. When I used "checkinstall" to install it, it did not work. I had to copy synaptics_drv.o manually to X modules directory (I later discovered that "make install" does not work either - only manual copying does).
    The second problem seems to be kernel bug: the synaptics driver fails to detect the touchpad when X starts. To make it work, one has to unload kernel module psmouse ans reload it again with option psmouse_noext=1. I added the following two lines to my rc.local:

    /sbin/modprobe -r psmouse

    /sbin/modprobe psmouse psmouse_noext=1

    The strange thing is that in dmesg this produces a message "psmouse: Unknown parameter `psmouse_noext'", although everything works fine.
    Finally, I had to add Option    "AlwaysCore" "on" to all wacom InputDevice sections of my xorg.conf, and modify the ServerLayout section to look like this:

    Section "ServerLayout"
        Identifier    "Default Layout"
        Screen    "Screen1"
        InputDevice    "Keyboard1"    "CoreKeyboard"
        InputDevice    "mouse.usb"    "AlwaysCore"
        InputDevice "cursor" "SendCoreEvents"
        InputDevice "stylus" "SendCoreEvents"
        InputDevice "eraser" "SendCoreEvents"
        InputDevice "Synaptics Mouse"  "CorePointer"
    EndSection

    It is important that only one InputDevice is "CorePointer". Tapping can be disabled by setting Option        "MaxTapTime"    "0" in the InputDevice section of the Synaptics mouse.

    Battery and ACPI

    Xandros did not recognize the battery automatically. For some reason, it does not load "ac" and "battery" modules. I added the following two lines to rc.local to load these modules:

    /sbin/insmod /lib/modules/2.6.9-x1/kernel/drivers/acpi/battery.ko
    /sbin/insmod /lib/modules/2.6.9-x1/kernel/drivers/acpi/ac.ko

    I guess there is a better place to load modules, but I have not investigate this yet. After loading these modules, battery indicator in KDE works fine. I also found a very nice ACPI and battery monitoring tool, acpitool. It shows the state of the battery and ACPI devices, here is a sample output for my machine:

    Kernel version : 2.6.9-x1   -    ACPI version : 20040816
     ------------------------------------------------------------
     Battery #1     : present
       Remaining capacity : 3378 mAh, 98.74%
       Design capacity    : 3800 mAh
       Last full capacity : 3421 mAh, 90.03% of design capacity
       Capacity loss      : 9.974%
       Present rate       : 0 mA
       Charging state     : discharging
       Battery type       : rechargeable, LION
       Model number       : BAT1
       Serial number      : 1234
     AC adapter     : on-line
     Fan            : off
     Fan            : off
     Fan            : off
     Fan            : off
     Thermal info   : ok, 49 C
     Thermal info   : 69 C, 88 C

    Frequency scaling

    Out of the box, frequency scaling works partially. That is, when the machine is booted while running from the battery,  CPU frequency is set to 600MHz, and when ist starts while powered from AC, frequency is at the maximum value of 1.5GHz. But when the AC power is disconnected while the machine is on, the frequency remains at 1.5GHz, as verified by "cat /proc/cpuinfo".
    In order to enable frequency scaling, it is necessery to load appropriate kernel modules:

    modprobe speedstep-centrino

    modprobe cpufreq_userspace

    The following frequencies are available (in Hz): 1500000, 1200000, 1000000, 800000, and 600000. For example, to change the frequency to 1Ghz (1000000Hz), one needs to type

    cd /sys/devices/system/cpu/cpu0/cpufreq
    echo -n userspace > scaling_governor
    echo -n 1000000 > scaling_setspeed

    More information on this subject can be found here.
    In the slowest setting (600MHz), the tablet achieves 339 MFLOPS using the classic Whetstone benchmark test. In the highest setting (1.5 GHz) it achieves 853 MFLOPS.

    Remaining issues

    • There are 7 special buttons around the screen. Only one works right now (Enter). Remaining buttons are not producing any output in xev, so I suspect they will require a special driver. Windows Device Manager lists LG Tablet Buttons on I/O port 360-361 with interrupt ISA 15, but at the moment I have no idea how to access these from Linux.
    • When I enable framebuffer by using video=791 option, I cannot get the text console by Ctrl+Alt+F1. Instead, I get a blank screen. I have no idea how to fix this.
    • I have not tried to test the following items yet: build-in modem, SD card slot, firewire port. PCMCIA slot works - I tried to put Lucent Orinoco wireless card in it, and it worked.
    I will post updates here if I find solutions to these problems.

    Links

    Here are my xorg.conf files in landscape and portrait mode.

    I greatly benefited reading the following pages:
    If you wish to contact the author, please send email to hfuks AT brocku.ca (replace AT by @).


    Last modification: Mon, 29 Sep 2008