Gentoo Linux on an Acer Travelmate 243X

How I got Gentoo Linux working on a tricky laptop.
.

Acer Travelmate 243X laptop Last update: 26th January 2005

The laptop

The Linux distro in the spotlight here is Gentoo Linux which is far different from the usual RedHat/SuSE/Mandrake crowd. It compiles everything from source and has an excellent package installation system called "Portage" which makes getting software on a breeze. In return Gentoo by itself does not include any helper tools; the important thing is that Gentoo requires you to configure and compile your own kernel from scratch, as well as edit files like XF86Config yourself. This is the ultimate way to customise Linux to your particular flavour of computer, but it takes knowledge and practice.

I will attempt to detail the various bits and pieces that make up this laptop and how to get them working, and if they work at all, if they work fully, or if they mostly work with some limitations. Most of these sections will have a "shot" of the make menuconfig options (or other file dumps) that you need to get them working. You can also download my kernel configuration.

Installation

The average Linux user could be put off straight away here as the BIOS seems to have a severe dislike of Linux boot CDs. The Gentoo 1.4rc2 boot CD gets as far as "booting the kernel..." and then hangs indefinetely. Knoppix 3.2 always did the same no matter what no... options I tried, even failsafe failed. The Redhat 7.3 CD did not even get that far, it just sat there with a black screen, refusing to respond to anything. Mandrake 8.0 was my only Linux CD to hand that would boot.

So how did I do it? Well the hard drive in the laptop was not the one it was supplied with, it was the one I put into the previous Compaq laptop and thus already had a fully working Gentoo installation, which in a way was lucky. So I booted the Mandrake 8.0 CD, mount the hard drive partitions and chrooted into it to reinstall GRUB and then rebooted, which enabled me to use the existing setup. It's kernel was configured for the previous laptop and was not quite compatible, so I recompiled the existing 2.4 kernel with the RealTek 8139 driver built in, this enabled me to grab a fresh 2.6.1 kernel and set it up.

Of course most people reading this probably won't have a 2.5" hard drive with an existing Linux installation to hand. With a blank hard drive and most Linux CDs refusing to boot, what can one do? Unfortunately I cannot really help you out, that Mandrake 8.0 install/rescue CD booted but I don't think it can network as-is. One may even be forced to transfer the hard drive to another laptop or into a PC courtesy of a 2.5"-3.5" adaptor.

I am currenly using a gentoo-dev-sources-2.6.10 kernel which is really a vanilla kernel with stable patches on top. I read somewhere else that SMP or APIC enabled may be the cause of the kernel boot stalling as described above.

Which CFLAGS you need for make.conf? The -march (or -mcpu) parameter for this Celeron should be set to pentium4. Yes there is a big warning above saying you shouldn't do so, but gcc 3.2.3 and above have cleared up the problem.

xorg-x11 6.8.0

Graphics are driven by the Intel 855GM chipset which doesn't have its own RAM, instead it "steals" 16Mb from the main RAM, so you actually have 240Mb of RAM. One essential thing you'll want is DRI support for graphics acceleration, which requires some kernel stuff as well as the right lines in my xorg.conf (formerly XF86Config).

TODO: Details of i810 driver in xorg.conf

Be sure to select the i915 driver in the kernel and not the older one above, since that is much more stable.

Device drivers --> Character devices -->
  <*> /dev/agpgart (AGP Support)
  <*>   Intel 440LX/BX/GX, I8xx and E7x05 chipset support
  [*] Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)
  <*>   Intel 830M, 845G, 852GM, 855GM, 865G (i915 driver)

Using an external VGA monitor can be awkward. Using the Fn+F5 keys you can swap between the laptops own LCD display only and the external VGA port only. To display the same image on both internal LCD and external VGA at the same time, a tiny utility called i855crt is needed. Xorg supposedly allows you to control this behaviour using the MonitorLayout and Clone commands but I've never been able to get that to work at all.

This only works for X (not the framebuffer), but more seriously XVideo overlay (used by video players) only appears on the LCD. If you want to play video on both displays, you either need to configure your video player to use a non-xv output plugin (such as xshm in Xine, or x11 in MPlayer) or use the "rawpipe" option on i855crt which causes a slightly fuzzy display on the external VGA port.

Synaptics touchpad

The touchpad appears as a standard PS/2 mouse. The event interface is used by Xorg's external synaptics driver (in Portage) to access the touchpads additional features (directional buttons, edge scrolling etc), which are configured in xorg.conf

Device drivers --> Input device support -->
  --- Mouse interface
  [*]   Provide legacy /dev/psaux device
  <*> Event interface
  [*] Mice
  <*>   PS/2 mouse
  < >   Serial mouse
  < >   InPort/MS/ATIXL busmouse
  < >   Logitech busmouse
  < >   IBM PC110 touchpad
  < >   DEC VSXXX-AA/GA mouse and VSXXX-AB tablet
Section "InputDevice"
        Identifier "Synaptics Touchpad"
        Driver "synaptics"
        Option "CorePointer"
        Option "Device"          "/dev/psaux"
        Option "Protocol"        "auto-dev"
        Option "LeftEdge"        "1900"
        Option "RightEdge"       "5400"
        Option "TopEdge"         "1900"
        Option "BottomEdge"      "4000"
        Option "FingerLow"       "25"
        Option "FingerHigh"      "30"
        Option "MaxTapTime"      "180"
        Option "MaxTapMove"      "220"
        Option "VertScrollDelta" "100"
        Option "MinSpeed"        "0.02"
        Option "MaxSpeed"        "0.18"
        Option "AccelFactor"     "0.0010"
EndSection

One thing to watch out for is that moving the mouse pointer occasionally causes it to misbehave, dancing around at wild speed and doing wild clicks along the way. When this happens, messages such as "Synaptics driver lost sync at byte 1" and "Synaptics driver resynced" appear in the kernel logs. This is a widely reported bug, but so far no solution has been found.

Even if this bug wasn't around, I still hate touchpads so much that I almost always plug in a USB mouse. My xorg.conf file allows both the touchpad and a USB mouse to be used at the same time; see the USB section below on what kernel options you need for a USB mouse.

Sound

The sound is provided by the AC97 based Intel 82801 chipset. ALSA is provided in the gentoo-dev-sources-2.6.5 kernel and works fine. There is no OSS support so you need to turn that off, and I recommend you enable ALSA's OSS emulation since many programs still use it.

Device drivers --> Sound -->
  [*] Sound card support
Device drivers --> Sound --> Advanced Linux Sound Architecture -->
  <*> Advanced Linux Sound Architecture
  <*>   Sequencer support
  < >     Sequencer dummy client
  <*>     OSS Mixer API
  <*>     OSS PCM (digital audio) API
  [*]     OSS Sequencer API
  <*>   RTC Timer support
Device drivers --> Sound --> Advanced Linux Sound Architecture --> PCI devices -->
  <*> Intel i8x0/MX440, SiS 7012; Ali 5455; NForce Audio; AMD768/8111
Device drivers --> Sound --> Open Sound System -->
  < > Open Sound System (DEPRECATED)

Keyboard

There is a very occasional but annoying bug regarding the keyboard, sometimes a key will seem to get "stuck" even though you've let go of it (likkkkke thisssss), more often it starts to type loads of digits after an arrow key is released. If this happens, quickly press one of the shift keys to stop it. This only seems to happen in X; text/framebuffer consoles are probably safe.

Above the keyboard there is a row of six silver hotkeys. These do not generate keyevents and in Windoze a driver is used to listen to them. There is an experimental driver module called acerhk (in Portage) that, when initiated with "modprobe acerhk poll=1", makes them generate keyevents that can be seen in showkey in the console or xev in X. Presumably one can then use something like xbindkeys or lineakd to get them to do something useful. Additionally, the e-mail button has a green LED underneath and this driver can make it flash.

The function keys have blue icons which, if you hold down Fn and press them, change various settings in Windoze. With the above driver module, Fn+F1 (help), Fn+F2 (setup), Fn+F3 (power management toggle) and Fn+F8 (mute) can be made to generate keyevents, otherwise they do nothing.

The other keys don't need the above driver. Fn+F4 (sleep) always generates an ACPI sleep event that can be caught with acpid and made to do something. Fn+F5 toggles displays (see xorg-x11 6.7.0 above) and Fn+F6 deactivates the LCD backlight*, these keys always work on their own. Fn+F7 is supposed to disable the touchpad but it has no effect.

Fn+up arrow and Fn+down arrow change the volume in Windoze XP, these always generate keyevents even without the acerhk driver module. Fn+left arrow and Fn+right arrow alter the display backlight level, this always works on it's own.

One minor annoyance is that the backslash and pipe key is next to the right hand shift key as opposed to the left hand. This can be a pain for us shell wizards who regularly type the pipe.

*Trivia: Fn+F6 deactivates the LCD backlight, but doesn't actually turn the LCD itself off. Shine a torch right on the apparently blank display and look closely!

Networking

The built-in network port is driven by a RealTek RTL-8139 chipset which is used by quite a lot of network cards out there. All works without a hitch.

Device drivers --> Networking support -->
  [*] Networking support
  [*]   Network device support
Device drivers --> Networking support --> Ethernet (10 or 100Mbit) -->
  [*] Ethernet (10 or 100Mbit)
  [*] EISA, VLB, PCI and on board controllers
  <*>   RealTek RTL-8139 PCI Fast Ethernet Adapter support
  [ ]     Use PIO instead of MMIO
  [ ]     Support for uncommon RTL-8139 rev. K (automatic channel equalization)
  [ ]     Support for older RTL-8129/8130 board
  [ ]     Use older RX-reset method

ACPI & CPU speed control

The acpid daemon can detect if the power or sleep (Fn+F4) buttons have been pressed and it's relatively easy to configure acpi to do something. It can also detect if the lid has been closed or opened, although the LCD turns off by itself when the lid is shut.

With thermal_zone the CPU and system temperature can be checked, but there seems to be no control or detection of the fan. The fan always works on it's own, turning on and off when needed and even speeding up during long compiles or emulation.

By using the "userspace" governor you can have full manual control over the CPU speed so you can satisfy yourself by proving it works like this...

# cd /sys/devices/system/cpu/cpu0/cpufreq
# echo userspace >scaling_governor
# cat scaling_setspeed
2500000
# cat scaling_available_frequencies
312500 625000 937500 1250000 1562500 1875000 2187500 2500000
# echo 312500 >scaling_setspeed
# cat scaling_setspeed
312500

...nice!

Those looking for automatic CPU speed regulation should check out both cpufreqd and cpudyn; both are in the Portage tree.

Power management options (ACPI, APM) -->
  [*] Power Management support
Power management options (ACPI, APM) --> ACPI (Advanced Configuration and Power Interface) Support -->
  [*] ACPI Support
  <*>   AC Adapter
  <*>   Battery
  <*>   Button
  <*>   Fan
  <*>   Processor
  <*>     Thermal Zone
Power management options (ACPI, APM) --> APM (Advanced Power Management) BIOS Support -->
  < > APM (Advanced Power Management) BIOS support
Power management options (ACPI, APM) --> CPU Frequency scaling -->
  [*] CPU Frequency scaling
  <*>   /proc/cpufreq interface (deprecated)
        Default CPUFreq governor (performance)  --->
  ---   'performance' governor
  <*>   'powersave' governor
  <*>   'userspace' governor for userspace frequency scaling
  [*]     /proc/sys/cpu/ interface (2.4. / OLD)
  <*>   CPU frequency table helpers
  ---   CPUFreq processor drivers
  [*] Intel Pentium 4 clock modulation

USB

There are four USB ports on the back. Three of them are USB1.1 ports and the one on the right side is USB2.

So far I've tried a joystick and a mouse in the USB1.1 ports and they all work flawlessly. I've also tried a USB-IDE hard drive adaptor and a digital camera; they both conformed to the standard USB Mass Storage device spec and they worked.

Device Drivers --> USB support -->
  <*> Support for USB
  ---   Miscellaneous USB options
  [*]   USB device filesystem
  ---   USB Host Controller Drivers
  <*>   EHCI HCD (USB 2.0) support
  < >   OHCI HCD support
  <*>   UHCI HCD (most Intel and VIA) support

  ---   USB Human Interface Devices (HID)
  <*>   USB Human Interface Device (full HID) support
  [*] HID input layer support

The last HID bits above are needed for external mice (and possibly keyboards). If you're going to use USB hard drives or keypens or other storage you'll need to turn on "USB Mass Storage support" as well.

PCMCIA slots

The two PCMCIA card slots on the left work without a hitch. As well as the 2.6 kernel options, one needs to emerge pcmcia-cs and make sure that PCIC="yenta_socket" is set in /etc/conf.d/pcmcia

Bus options (PCI, PCMCIA, EISA, MCA, ISA) --> PCMCIA/CardBus support -->
  <*> PCMCIA/CardBus support
  [ ]   Enable PCMCIA debugging
  <*>   CardBus yenta-compatible bridge support
  < >   i82092 compatible bridge support
  < >   i82365 compatible bridge support
  < >   Databook TCIC host bridge support

Leftovers: IrDA, modem and parallel port

I don't know about the parallel port or the infra-red port since I don't have anything that uses them. I also don't have any reason to use the modem since I have broadband.


Valid XHTML 1.0! Valid CSS! Viewable with any browser .