Home

Linux On Laptops TuxMobil - Linux on Laptops, Notebooks, PDAs and Mobile Phones

Debian Sarge on Compaq Armada 100s

Contents

1. Introduction
2. The hardware
3. SCU (BIOS) settings
4. Installing Debian Sarge (netinstall)
	4.1. Connecting to network
	4.2. Some useful packages to install
		4.2.1. hotplug
		4.2.2. ifplugd
		4.2.3. apmd
		4.2.4. isapnptools
		4.2.5. xfree86-driver-synaptics
		4.2.6. mp3blaster
	4.3. XFree86 configuration
	4.4. Kernel configuration
5. Enabling powersaving features
	5.1. APM support
	5.2. CPU frequency scaling
	5.3. Reducing the speed of the CD-rom drive
6. Upgrading the hardware and connecting external devices
	6.1. Getting more memory
	6.2. Cardbus cards
	6.3. Using external mouse
7. Problems and troubleshooting
	7.1. USB overcurrent change
		7.1.1. Getting rid of kernel messages
		7.1.2. Using USB memory sticks
		7.1.3. Connecting a digital camera

1. Introduction

Before I go on with introduction, I encourage you to consider installing FreeBSD instead of Linux on this laptop. It is very similar to Gentoo Linux, so if you are comfortable with that, you should have no problem switching to FreeBSD. Even Debian users should feel quite at home - at least after reading the FreeBSD install guide and the user guide.

So what are my reasons for the switch? Well, none of the distros I tried (Debian, Mandrake, Fedora Core 2) were able to make the USB port functional. For me USB support was essential, as I stored my personal documents in an usb thumbdrive. See section 7.1. below for more information. Once I got a newer laptop (a Armada M700) my Armada 100s was left more or less useless. So I decided to try FreeBSD 5.4, because there was no real risk involved anymore.

At first everything in FreeBSD 5.4 just worked. In a weekend I was able to tweak all the necessary settings and install all required programs. Of course I had gained much useful information from using Linux on this computer - without it my road to victory would have been much rockier. For example, starting X.org with wrong settings simply turned the display off. Using settings from my XF86Config-4 (below) I was able to make X.org working.

In time - however - the laptop started booting all by itself. I suppose that there is really something terribly wrong with the hardware. Due to these unpredictable boots - which I had not experienced to same extent when using Debian Testing - I gave FreeBSD the boot. Nowadays I have given up hopes of using USB on this laptop, and have installed Ubuntu Linux 5.1 (Breezy Badger) on this laptop. Check out this link to see how. So far it has worked without problems, though I use it only to listen to internet radios.

If you want USB support that works well, not just kind of, go for FreeBSD. As you can see from the troubleshooting section, for some reason USB is flakey with Linux. Especially 2.6 kernels are troublesome and unreliable on that area. I've encountered no problems with usb on FreeBSD. I have not - however - tried any powermanagement featyres in FreeBSD, nor CPU Frequency scaling.




I bought this laptop in 2004. It was manufactured in 2000 or 2001, but it seemed like a good purchase. It was cheap, reasonably powerful, and the battery was (as the guy selling it told me) in mint condition. It does actually last about 2 hours and 15 minutes on low load (viewing pdf-files with xpdf).

Immediately after purchase I wiped out all existing partitions (including the "Suspend-to-Disk"-partition). Byebye Windows 98. As I had downloaded full Debian Woody (3.0) CD-set before, it seemed like a good idea to try it out. It installed fine, and everything was pretty much ok.

I was not satisfied, however. I knew that 2.4.18 kernel that came with the distro did not support CPU frequency scaling. So I tried upgrading woody to 2.6 kernel. It was not as easy as I thought. In addition to the kernel-source packages I needed lots of other packages, which stepped on the toes of several other from the Woody distribution. So, in the end, the whole system was more or less broken.

After reinstall I managed to get plip link working. This made everything easier. I actually managed to upgrade the system to Debian Testing (sarge). But there were problems still. It seemed to me that the 2.6 kernels were extremely unstable on this machine. In maybe 15 seconds - if the system was on heavy load - the machine froze and did not recover. Later I found out the reason, but it did not help me at that time. In addition console and logs were filled with USB over-current messages (see Problems and troubleshooting).

After Debian Stable, I tried Knoppix 3.4 HD-install. It worked, but the unstability was not solved. After Knoppix I tried Mandrake 10. All worked - partly because I now knew the reason for unstability: I had CPU frequency scaling enabled in SCU (BIOS) settings. In addition, it cluttered the logs with the over-current messages, like Debian stable.

Mandrake worked quite well, but the distro was a pain in the ass, because I could not even compile a custom kernel. The system was thus pretty much useless. Most of all, it was slow, and I did not want to waste precious CPU power. It did not, however, produce any over-current messages, and USB devices worked even under 2.6.x.

Last distro I tried before Debian Sarge was Fedora Core 3. It was even slower than Mandrake, and I used it for maybe 4 hours. It also produced over-current messages.

All these distros I had chosen because I did not have any decent solution to connect the laptop to the outside world. After Fedora Core 3 I had had enough. I went to a hardware store and bough a D-link Cardbus ethernet card (rtl8139-based). It worked flawlessly, and so I wiped out Fedora and started Debian Sarge netinstall...

2. The hardware

This laptop seems to be from the cheapest end of Compaq Armada family. For example, the refresh rate of the display is low, causing lost mouse pointers and horrible video playback. I wouldn't use this machine for image manipulation, either: colors are displayed poorly. The viewing angle of the display is also very small.

The powerbutton is too sensitive and sometimes causes the laptop to power up while in backpack causing filesystem damage. This problem can be circumvented by keeping the laptop and the battery separated.

Luckily this laptop uses quite standard hardware, however. Besides the USB port everything works as it is supposed to. I have not tried out IRDA so I'm not sure if it is functional.

You can obtain all technical information from here or try googling with "Compaq Armada 100s"

Below I have a listing of all PCI hardware Debian sees. In this case, a ethernet card is inserted.


localhost:/home/samuli# lspci

0000:00:00.0 Host bridge: VIA Technologies, Inc. VT8501 [Apollo MVP4] (rev 04)
0000:00:01.0 PCI bridge: VIA Technologies, Inc. VT8501 [Apollo MVP4 AGP]
0000:00:07.0 ISA bridge: VIA Technologies, Inc. VT82C686 [Apollo Super South] (rev 22)
0000:00:07.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 10)
0000:00:07.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 10)
0000:00:07.4 Bridge: VIA Technologies, Inc. VT82C686 [Apollo Super ACPI] (rev 30)
0000:00:07.5 Multimedia audio controller: VIA Technologies, Inc. VT82C686 AC97 Audio Controller (rev 20)
0000:00:07.6 Communication controller: VIA Technologies, Inc. Intel 537 [AC97 Modem] (rev 20)
0000:00:0a.0 CardBus bridge: Texas Instruments PCI1211
0000:01:00.0 VGA compatible controller: Trident Microsystems CyberBlade/i7d (rev 5d)
0000:02:00.0 Ethernet controller: D-Link System Inc DFE-690TXD CardBus PC Card (rev 10)

Following modules are loaded on my custom 2.6.7 kernel. With these loaded pretty much everything should work. You might want to load snd-mixer-oss and snd-pcm-oss -modules also, if you want Open Sound System support besides ALSA support.


localhost:/home/samuli# lsmod

Module                  Size  Used by
8139too                19872  0 
mii                     3680  1 8139too
ds                     13604  2 
snd_via82xx            22084  0 
snd_ac97_codec         60740  1 snd_via82xx
snd_pcm                80840  1 snd_via82xx
snd_timer              20292  1 snd_pcm
snd_page_alloc          8584  2 snd_via82xx,snd_pcm
snd_mpu401_uart         5696  1 snd_via82xx
snd_rawmidi            19396  1 snd_mpu401_uart
snd_seq_device          6216  1 snd_rawmidi
snd                    45892  7 snd_via82xx,snd_ac97_codec,snd_pcm,snd_timer,snd_mpu401_uart,snd_rawmidi,snd_seq_device
soundcore               7136  1 snd
via_agp                 6464  1 
irtty_sir               5632  0 
sir_dev                13420  1 irtty_sir
irda                  114364  1 sir_dev
floppy                 52496  0 
psmouse                17096  0 
pcspkr                  3080  0 
evdev                   6944  0 
yenta_socket           16832  1 
pcmcia_core            55204  2 ds,yenta_socket
parport_pc             21248  0 
parport                33448  1 parport_pc
agpgart                26696  1 via_agp
powernow_k6             3016  0 
cpufreq_userspace       3800  2 
ide_generic              928  0 
ide_cd                 36576  0 
cdrom                  34428  1 ide_cd
rtc                     9880  0 

3. SCU (Bios) settings

This laptop's BIOS is rather limited. You can only customize very basic things.

To start with, disable all powersaving features from BIOS. You can always turn them on when the system is otherwise stable.

NOTE: You must disable the CPU frequency scaling from the SCU!

If you do not disable it, your laptop will freeze if you use 2.6 kernel and CPU frequency scaling kernel support. Even with 2.4 kernels it's a good idea to turn it of from the SCU. It does not scale the frequency without additional (windows) software, and probably makes the system less stable.

4. Installing Debian Sarge (netinstall)

4.1. Connecting to network

This laptop has only limited means to connect to outside world. Only built-in possibilities are the modem (winmodem, slow...), paraller port (plip, about 30KB/s) and the USB 1.1 port (~400KB/s). As the USB works poorly with 2.6.x kernels (see Problems and troubleshooting), use of USB-to-USB network cable could be problematic.

I recommend getting a decent Cardbus Ethernet Adapter and connecting the machine to the internet. Wireless adapters are much trickier to get working (like mine, a ra2400 adapter). Sarge netinstall should detect standard cardbus ethernet cards without problems.

I will not go into details of netinstall, as it is documented better elsewhere.

4.2. Some useful packages to install

4.2.1. hotplug
I suggest installing "hotplug" because it makes life much easier. It detects inserted usb-devices and cardbus cards automatically.
4.2.2. ifplugd
Ifplugd is very useful package. It monitors ethernet link status and brings up interfaces on demand. Be sure to install "etherconf" before this: ifplugd does not have any way to configure the interfaces in first place. Word of warning, though... if your ISP requires identification by network adapter's MAC-address, ifplugd can't fake it. Troublesome if you want to connect the laptop temporarily to such a connection.
4.2.3. apmd
To monitor battery status you should install "apmd". It also makes possible to put laptop to "suspend" or "standby" modes manually. Without "apmd" only the BIOS can turn on powersaving modes.
4.2.4. isapnptools
This package is useful if you want to use a serial mouse, for example. Serial mouse is somewhat easier to use on this laptop than a ps2-mouse.
4.2.5. xfree86-driver-synaptics
This driver makes the touchpad much more pleasant to use.
4.2.6. mp3blaster
Even though it is possible to use "xmms" or similar graphical player on this laptop, I prefer "mp3blaster". Unless you have cpu frequency scaling enabled after a while "xmms" will warm the CPU which in turn will turn on the (very) loud fan. After a while (30 secs) it turns off, but quite soon it turns on again. This is annoying, especially when you wan't to listen music at low volume levels.

Mp3blaster, however, uses only so little CPU that fan does not usually turn on at all. Of course if you do something else also (browse the web, for example) the fan may turn on every now and then. Mp3blaster is also much easier to use with the keyboard than xmms.

4.3. XFree86 configuration

There are some quirks in XFree86 Configuration. If I remember correctly, unless you explicitly specify "VideoRam 8192" (or whatever amount you have) the Xserver will freeze. Here are my (two) XF86Configs for reference: XF86Config-4.ps2mouse and XF86Config-4.synaptics

4.4. Kernel configuration

Compiling a custom kernel for this laptop is as easy as on any laptop or desktop. I've had several kernels compiled for my 100s, but nowadays I only have one left, a Debian patched 2.6.7. It has all basic things plus support for realtek 8139 network cards - I have one. You can download my 2.6.7 kernel config from here.

5. Enabling powersaving features

This laptop supports all basic powersaving features. It has APM and ACPI support, although linux disables ACPI by default (too old bios). I have not tried to enable ACPI support, as APM works perfectly. CPU (AMD k6-3) also supports CPU frequency scaling.

5.1. APM support

APM should work out of the box. Suspend and standby both work. Suspend-to-disk might work, but I have not tried it. The laptop has a hidden OS/2 partition designed for suspend-to-disk. You should not delete that partition if you want to try it out.

It should be possible to use program "hibernate" with appropriate kernel patches. I'm going to try it out myself.

The laptop has problems recovering from reset. After a reset the computer hang to the "Compaq"-screen. If I remember correctly, this can be fixed with right kernel options in "APM support". I managed to fix this on some of my custom kernels. I don't think it's that big a problem; shutdown works like it should.

5.2. CPU frequency scaling

CPU frequency scaling means modifying the CPU frequency (speed), usually depending on system load. Low load means slow frequency: less heat - less power consumption - less need for the fan - more battery life.

Main advantage that can be gained with CPU frequency scaling is that the small and noisy fan turns on only under heavy load (long compilations for example). In ordinary (office) use the fan does not turn on at all.

CPU frequency scaling in kernel 2.6.x works perfectly with modules "cpufreq_userspace" and "powernow_k6". In addition, you need the "powernowd"-daemon. It is available as a Debian package.

NOTE: You will have to disable CPU frequency scaling in SCU (BIOS). Otherwise the machine _WILL_ hang at random.

5.3. Reducing the speed of the CD-rom drive

I suggest you to reduce the speed of the CD-rom drive. It saves power but more importantly reduces resonance and thus noise. You can run this in some startup script:
hdparm -E 8 /dev/your_cdrom_device
This limits cdrom speed to 8x, which will result in very quiet operation. Most of the time you won't notice the difference between 8x and full speed. If you need the cdrom drive mostly for file transfer then set the limit higher or remove it altogether.

6. Upgrading the hardware and connecting external devices

6.1. Getting more memory

This computer - depending on the model - has only 32 or 64MB of RAM installed. Of this, 4MB (of 32) or 8MB (of 64) is given to the Trident Cyberblade graphics adapter.

Obviously the amount of memory is way too low for many programs today. OpenOffice is unusable, as are Gnome and KDE. Windowmaker works fine, but even the my 64MB model swapped continuously even when switching between light programs, such as Mozilla Firefox & Thunderbird, Gnumeric and Abiword. Difference between 64MB and 128MB, for example, can really be felt. Memory upgrade at least doubled my machine's perfomance.

Fortunately this laptop uses standard SO-DIMMs clocked at 100Mhz. Used ones can be purchased quite cheaply (I bought a 64MB chip for 16 euros, or rougly $18). New ones cost 3-4 times as much.

6.2. Cardbus cards

The system uses standard cardbus bridge. If "hotplug" is installed, cards should be detected automagically and required modules are loaded. Check that the card you are buying complies to standards and uses a chipset that is well supported by Linux.

6.3. Using external mouse

This laptop has one ps2 port that is used for a mouse or a keyboard. Both have to be inserted before the power is turned on; otherwise they are not detected.

When a ps2 mouse is inserted, it is detected automatically. Serial mice are detected only if "isapnptools" is installed.

Ps2 mice can cause a little headache, especially if you want to use the synaptics touchpad driver. If a ps2-mouse is inserted, it overrides the touchpad. This is no problem if touchpad uses basic ps2-mouse driver in xfree86. If you use "synaptics"-driver, however, X will refuse to start. If you use touchpad regularly, the ps2mouse -driver will drive you crazy.

Only way I managed to fix this was creating two separate configs (XF86Config-4.psmouse and XF86Config-4.synaptics) to /etc/X11. Then I edited my .bash_profile to ask if ps2-mouse is connected. This makes sure X is started with the appropriate settings. Just make sure you don't lie :)
# ~/.bash_profile: executed by bash(1) for login shells.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.

-- cut ---

echo "Is ps/2 mouse connected? (y/n)"
read yn
if [ "$yn" = "y" ]; then
	xps2
else
	xsyn
fi

xsyn

echo "XFree86 with ps2mouse: xps2"
echo "XFree86 with touchpad: xsyn"

--- end of file ---

You don't have to create the xps2 and xsyn scripts; instead, you could add appropriate startx line straight to .bash_profile. You'd just have to logout each time you end a X session and want to start another.

Making a serial mouse to work is easier. Just plug it in, add another pointerdevice to XF86Config-4 and start X. It should work, and no queries on login are needed. You could even use a login manager like xdm with a serial mouse.

7. Problems and troubleshooting

7.1. USB Overcurrent-change

When using a 2.6.x kernel, system logs (and the console) are cluttered with these messages:
:Dec 29 16:31:32 localhost kernel: >hub 1-0:1.0: over-current change on 
port 2

These messages can be turned off by loading the uhci_hci module with ignore_oc=1 parameter, e.g. by doing

rmmod uhci_hci
modprobe uhci_hci ignore_oc=1
Thanks to Clemens Hafner for letting me know of this workaround! With kernel 2.4.x no error messages are produced to start with.

7.1.1. Getting rid of the kernel messages

This can be circumvented (if using hotplug) by adding uhci_hcd to /etc/hotplug/blacklist. Of course, if the module is loaded, problem will appears again.

It is possible to filter the messages by adding switch "-c 2" to kernel logging daemon. Just edit /etc/init.d/klogd:

Change
KLOGD=""
to
KLOGD="-c 2"
Unfortunately this filters also many other useful kernel messages.

7.1.2. Using USB memory sticks

Above mentioned problem does affect normal usb usage. At least with my USB memory sticks hotplug gets confused. It cannot release the device correctly, meaning that USB port does not work after the device is unmounted.

There was another problem with the USB, which is unrelated to this machine. My solutions fixes them both. The second problem is that /proc/partitions maintains partition tables of disks inserted to the system. It does not, however, release the disk from partition table.

So, if several different usb disks are inserted one after each other, you can't tell which device (sda,sdb,sdc, etc.) to use.

My "solution" fixes both usb port lockup and the partition problem.

First, edit /etc/sudoers:

samuli  ALL = NOPASSWD: /sbin/modprobe

Second, add these scripts to /usr/local/sbin or whereever:
---

#!/bin/bash
# This mounts usb stick
sudo /sbin/modprobe uhci_hcd
/bin/sleep 1
/bin/mount /media/usbstick
---
#!/bin/bash
# This unmounts usb stick
/bin/umount /media/usbstick
/bin/sleep 1
sudo /sbin/modprobe -r uhci_hcd
---
Removing uhci_hcd is necessary because of the usb port lockups. On standard usb ports I simply remove the usb-storage module to get rid of the partition table.

7.1.3 Connecting a digital camera

I tried connecting a "Canon Digital Ixus 400" to this machine. With 2.6.7 kernel no luck. With stock 2.4.26 I did manage to download some photos, but then "gtkam" halted. I did not try it again.

I've had no problems with the camera on desktop systems with custom 2.4. kernels. I suppose there is really something wrong with the USB port.


Author: Samuli Sepp?en, University of Turku, Finland


Registered Linux user #392780 Linux On Laptops TuxMobil - Linux on Laptops, Notebooks, PDAs and Mobile Phones