News Archive (1999-2012) | 2013-current at LinuxGizmos | Current Tech News Portal |    About   

Installing Linux (with pen support) on the Acer Travelmate C100

Jun 11, 2003 — by LinuxDevices Staff — from the LinuxDevices Archive — 93 views

The picture below essentially demonstrates the current working state of my Travelmate C100 in Linux. The EMR stylus is working, as is suspend/resume (to disk only), X in rotated mode, and wireless. It now fits my main uses, which are reading academic papers, writing notes, and doing calculations.

As you'll see below it's been a bit of an ordeal getting this going. I would not suggest this as a project for a Linux newbie, but anyone who has setup a few systems and compiled their own kernel before should be fine, and this should improve as driver updates migrate into distributions. (Enlarged photo is here.)

And for those who don't know, the LCD screen flips over so the TMC100 can be used just like a normal laptop. There's a nice demonstrative picture at the Acer page.

Another TMC100 user has set up a mailing list, and you can post questions/comments there.

While my hardware is still fine, obviously there is No warranty that any information below will not hurt yours.

The hardware

The tablet includes:

  • PIII-M 800MHz CPU
  • Intel 440MX chipset including
    • AC'97 sound
    • Modem
    • USB
  • Silicon Motion Lynx3DM video chipset
  • Realtec 8139 integrated Ethernet
  • Firewire
  • O2 Micro OZ6933 Cardbus controller
    • 1 Type II PC Card slot
    • 1 Smartcard slot
  • Lucent HERMES 802.11b integrated wireless (option)

Things which are not working include

  • The TabletPC buttons around the edge of the screen
  • Switching the wireless on/off while machine is on (but it can be set to be on at boot).
  • Suspend to RAM (presumably works with a 2.5 kernel)

Things I have not tried to get working include the Firewire, the Modem, and the Smartcard interface.

Installation Sketch

Here's a basic summary of the install process, which will be described in detail below: First, due to the fact that the USB cdrom would not boot the Debian install CDs I had to resort to a network boot. But once a boot server is setup it works fine and I then shrunk the WinXP partition and installed Linux as usual. Then the kernel must be patched to get ACPI and software suspend working, with some care to keep sound and pcmcia working, and finally both the Wacom tablet driver and the X windows ShadowFB driver must be patched to get X fully functional (with rotation).

Booting installation kernel

I tried booting from the USB cdrom, but it didn't work. It may be the CD I was using, but that CD worked fine on several desktop systems. It didn't even seem to read the boot image. The machine has the ability to do a network boot. This is disabled in the BIOS by default, but you can go in and turn it on and either make it the default or select it from the F12 boot method menu.

I'm installing Debian and the best doc I found essentially described the necessary steps. (the steps described in the installation guide for woody don't quite work because they are bootp/tftp instructions and the boot images are large enough that you need to use an actual PXE boot method.) Props to Roland for that doc. Here is the way to do it:

You need another box to use as the boot server. This server will be running both the dhcp server and the tftp server that serves up the PXE images. (I tried using different machines for the two servers but the ROM boot agent seems to assume that they are the same.) I'll assume you have Debian on the server.

Getting stuff together

You need to install on the server

  • dhcp
  • tftpd-hpa
  • syslinux

I had trouble with the vanilla “tftp” agent, but it may work with different options. I used the 2.4 boot kernel, so from my friendly neighborhood Debian mirror I got:

  • debian/dists/woody/main/disks-i386/current/bf2.4/linux.bin
  • debian/dists/woody/main/disks-i386/current/images-1.44/bf2.4/root.bin

Note the first is just the bootkernel, not the actual boot disk image. Now create a directory /tftpboot on the server and put the linux.bin and the root.bin in it. Also copy the file pxelinux.0 from /usr/lib/syslinux to /tftpboot.

Configuring the server

Now to create the PXE configuration: create a directory in /tftpboot called pxelinux.cfg (this will serve up the same image to everyone) and make a file in that directory called default which contains:

PROMPT 1
LABEL pxe
KERNEL linux.bin
APPEND initrd=root.bin flavor=bf2.4
IPAPPEND 1

The flavor parameter is important else the installation program will try to find files on the wrong location of a Debian mirror.

Now setup the tftp server by changing the entry in inetd.conf to read

tftp dgram udp wait root /usr/sbin/in.tftpd -s /tftpboot -r blksize

Now to set up the dhcp server, /etc/dhcpd.conf should contain:

option domain-name "YOURDOMAIN.org";
option domain-name-servers NAMESERVER;

option subnet-mask 255.255.255.0;
default-lease-time 600;
max-lease-time 7200;

subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.200 192.168.0.253;
option broadcast-address 192.168.0.255;
option routers 192.168.0.1;
}

host MACHINENAME {
filename "/tftpboot/pxelinux.0";
server-name "SERVERADDRESS";
hardware ethernet 0:0:0:0:0:0;
fixed-address 192.168.0.128;
}

You should replace YOURDOMAIN, NAMESERVER, MACHINENAME and the hardware address with your values and adjust the network settings to stuff valid for your local environment. There are more verbose explanations of many of these parameters in the example dhcp.conf file installed by default. If I just lost you, you should probably go do some reading in the Network-HOWTO.

Do the do

Restart dhcpd and inetd to make these settings take effect. Now boot up the laptop with the Ethernet plugged in and choose or set the “LANDesk Service Agent” boot method. You should get at boot: prompt at which you should enter pxe and hit enter. This will load the Debian install system and from there you're ready to go!.

Resizing Windows NTFS partition

Since I wanted to keep the Windows XP tablet software around to try things out after I installed Linux (since it would take me a bit to get the touch screen working and stuff) I was pleased to find out that I could just resize the NTFS file system instead of reinstalling. The NTFS for Linux site has a great page on how to go about this. The only sticky point is getting the pre-compiled binary ntfsresize onto the computer before installing the system. This isn't hard though, as long as you have a convenient web server.

Get the precompiled binary from the NTFS project page and put it on a webserver in an accessible place. First boot the install system and get as far as configuring the keyboard. Then hit alt-F2 and enter to get a console. The network isn't up yet but the driver is installed, so you just have to bring it up manually. I did this by doing essentially:

ifconfig eth0 192.168.0.128
route add default gw 192.168.0.1

You should adjust for your IP and gateway and add a netmask if necessary. Now do

cd /tmp
wget http://192.168.0.2/~user/ntfsresize

where the you need to adjust the webserver IP and the path to where you put the ntfsresize which you downloaded. Now you can follow the directions under question 7 on the ntfsresize docs. Be careful here, this is dangerous stuff!

(I had to defragment my windows drive and then was still only able to free up 14 GB, but that's plenty for now. I use only 60 GB to record TV for goodness sakes.)

With the space freed up you can now reboot to Windows (to fix the damaged NTFS) and then reboot again and do a standard Debian install!

Installation Tips

I won't walk through the Debian installation, but I will offer a few tips. Be sure to select the 8139too driver in the device selection dialog so that it is loaded at boot. Also I always run dselect again immediately after install to make sure that all packages got their dependencies satisfied correctly, just go in and do a 'Select' then an 'Install'. For X Windows use the siliconmotion driver, it works fine in laptop format.

As far as boot setup goes, I had lilo install in the MBR, and added the lines

other=/dev/hda1
label="WinXP"

so that I could boot WinXP. Note that if WinXP is not the default boot option it will not return from Hibernate correctly. I would just make WinXP the default until you're happy with you Linux setup and use it more.

ACPI and software suspend

Note: It would probably be a good idea to use the most recent version of the patches mentioned below from their source sites, I'm simply providing my copies for the sake of completeness and so my .config is sure to work.

Though the apm drivers do load, when I tried to suspend the machine locked up. Since the battery status also did not work, I figured that I needed the ACPI patches. So I grabbed the standard 2.4.20 kernel from ftp.kernel.org and applied this ACPI patch from the ACPI project and I installed the acpid Debian package. The daemon catches events, such as lid switch or power button press, and runs a corresponding script, which is configured in /etc/acpid/events. (I use this to software suspend the machine when I press the power switch.) Using ACPI /proc/acpi shows the battery status, two temperature sensors, the AC adaptor status and the controls for the SpeedStep stuff on the processor. For example, to set the processor to 400MHz do echo -n 1 > proc/acpi/processor/CPU0/performance. This only works for me outside of X, and I haven't confirmed that it saves power, but it does switch to the P1 mode. Check the documentation at the ACPI site for some more info on sleep and power states of the processor.

The TMC100 only supports S3 and S4, which are respectively suspend to RAM and suspend to disk (or hibernate). S4 is almost equivalent to so-called “software suspend” because it goes through what is essentially a boot cycle. S3, or suspend to RAM under ACPI is unfortunately not supported in the 2.4 kernel series, and I'm not brave enough yet to try out 2.5, so I'm going to live with S4, or it's equivalent, software suspend. I got the patch for my kernel with ACPI from the Software suspend site and the suspend script from there. The swsusp FAQ provides some good info on what to expect from swsusp — and I advise you read it — including that it doesn't work with the PCMCIA code in the 2.4.20 kernel, but does work with the standalone pcmcia_cs packages. Note also that for swsusp to work, you must pass as a kernel parameter where the swap partition is that you suspended to. My lilo.conf contains this:

image=/boot/vmlinuz-2.4.20-swsusp
label=swsusp
read-only
append="resume=/dev/hda2"
image=/boot/vmlinuz-2.4.20-swsusp
label=noresume
read-only
append="resume=/dev/hda2 noresume"

where the first is the normal kernel I boot and the second is a “rescue” kernel if something weird happens and I need to boot without trying to resume.

With both the above patches applied my .config should give you a working kernel with a fairly minimal set of “extra” features.

Recovering sound and PCMCIA

I build both of these components outside the kernel. I use the ALSA sound drivers, but I expect the normal kernel drivers would work too. There is a perfectly good description of the driver installation procedure on the ALSA site. I used the rc7 version of the drivers, but you should use the latest. I used the alsa-base and alsa-utils Debian packages for the 0.9 versions of alsa, building only the drivers myself.

For PCMCIA I just grabbed version 3.2.3 from The Card Services home site. And compiled and installed per the instructions in the PCMCIA-HOWTO included with that package. This seems to restart after software suspend just fine (if all goes well during the suspend otherwise.)

Wacom Serial pen tablet

The stylus interface appears as a serial device that is listed only in the ACPI tables (and is not support specifically by the kernel). But knowing what ioport to talk to it on is enough to talk to it, then we need an X driver which supports its protocol. To put the tablet on ttyS0 in Debian add

/dev/ttyS0 port 0x93f8 autoconfigure

to /etc/serial.conf. The stylus hardware is made by Wacom and the protocol bears a strong resemblance to that used by some of their commercial tablets, but it is incompatible. By watching packets I was able to reverse engineer the (fairly simple) default protocol, and then add support for it to the X driver for the other Wacom tablets. The Linux Wacom Project supports these drivers, and there have been several reports of success with this same driver on other laptops and TabletPCs. My patch to add support for this tablet is against linuxwacom version 0.5.0-beta, and I refer you to the Linux Wacom site for detailed build instructions. For the impatient, I have a precompiled version which works with the XFree86 4.1.0 shipped with Debian Woody. This file goes in /usr/X11R6/lib/modules/input/ and you need to add to your XF86Config-4:

Section "InputDevice"
Identifier "stylus"
Driver "wacom"
Option "AlwaysCore" "on"
Option "Device" "/dev/ttyS0"
Option "BaudRate" "19200"
Option "Type" "stylus"
Option "Mode" "Absolute"
Option "ForceDevice" "ISDV4"
EndSection

And modify the Serverlayout section to look like:

Section "ServerLayout"
Identifier "Default Layout"
Screen "Default Screen"
InputDevice "Generic Keyboard"
InputDevice "Configured Mouse"
InputDevice "stylus" "SendCoreEvents"
EndSection

Restart X and the stylus should work!

Screen Rotation

The siliconmotion video driver supports screen rotation, just by modifying the device section with a rotate option:

Section "Device"
Identifier "Generic Video Card"
Driver "siliconmotion"
Option "Rotate" "CCW"
EndSection

This will only work in 16-bit color mode, I presume because of the small amount of video RAM. (note that this CCW option actually rotates what is on the display clockwise.) Now the problem is that due to a bug in the shadowfb code (which is what is used to perform this rotation) if you switch away to a text console, X crashes. This also prevents suspend/resume from working. This bug is fixed in recent revisions of the driver, but in very recent ones, i.e. 4.3.0. I have rebuilt libshadowfb.a and you can just put that precompiled version in /usr/X11R6/lib/modules/ and it will fix the problem.

The easiest way to build this yourself is to do an apt-get build-dep xfree86 and apt-get source xfree86. Then follow these short instructions from the Debian Reference to build it. I used the current sources for shadow.c (v. 1.4) and shadowfb.h (v. 1.18) from the xfree86 cvs. These replace files in xc/programs/Xserver/hw/xfree86/shadowfb/. The only “trick” was that I took out the “-DRENDER” from the compile line in the Makefile so that it would compile. (RENDER support was added after 4.2 so I wasn't losing anything.) and finally did a make libshadowfb.a and put the result (linked to above) in my installed X modules directory.

Finally to get the stylus to work in rotated mode add the line

        Option          "Rotate"                "CW"

to the InputDevice section for the stylus.

Wireless Network

The machine has a feature that switches off the builtin Ethernet and switches on the wireless but this doesn't happen in Linux with the ACPI stuff in the kernel. But you can switch at boot by pressing the wireless button before the kernel starts booting, or you can set the default in BIOS setup. I haven't figured out anything better.

I grabbed a newer version of wireless-tools from their home site (used version 25) and forced it to use extensions version 14 by editing the makefile. Then the following lines in /etc/network/interfaces sets things up right for my access point.

iface eth0 inet static
address 192.168.8.2
netmask 255.255.255.0
network 192.168.8.0
broadcast 192.168.8.255
gateway 192.168.8.1
pre-up /usr/local/bin/iwconfig eth0 essid myownnet
key XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XX

where XX is a hex byte for the 104-bit WEP key.

Useful programs

Here are links to some programs I've found useful

  • xscribble — a Graffiti-like text input tool.
  • gsumi — a writing/drawing utility.


About the author: Dean Townsley is a Ph.D. student in Theoretical Astrophysics at the University of California, Santa Barbara. He earned a B.S. in Mechanical Engineering, Physics, and Applied Mathematics from Florida State University. He has enjoyed tinkering with Linux since 1995.


This article is copyright © 2003, Dean Townsley. All rights reserved. Reproduced by LinuxDevices.com with permission. Included materials (software, patches, etc.) are copyright their respective authors or as otherwise indicated.


Talk back!

Do you have comments or questions on this article? talkback here

 
This article was originally published on LinuxDevices.com and has been donated to the open source community by QuinStreet Inc. Please visit LinuxToday.com for up-to-date news and articles about Linux and open source.



Comments are closed.