Table of Contents

Debian Sid on an Acer 5051AWXMi

The motherboard on the old Vaio R600-HEP I've been using for work died at the start of 2007. I needed a new laptop in a hurry; nothing fancy, I use it for some light development work and reading mail while on the road. I dithered briefly over a cheapie Dell or the Acer, and ended up going for the Acer because it didn't look like the Dell offering had a 64bit CPU. There's a chance I might need to be doing some 64bit compilation during the lifetime of the beast.

The Vaio was running Debian Unstable (Sid). Rather than spend time copying stuff over, I just removed the hard drive from the Acer and replaced it with the one from the Vaio and reconfigured.

The Quick Summary

In 2007, it was not the best Linux platform, but it would just about do. Video and audio support weren't great.

Now nearing October in 2009, there is accelerated 3D Xorg support for the video, and the audio is fine. Updating to the latest BIOS means suspend and hibernate both seem now to work.

The Hardware

So, what's in the beast?

00:00.0 Host bridge: ATI Technologies Inc RS480 Host Bridge (rev 10)
00:01.0 PCI bridge: ATI Technologies Inc RS480 PCI Bridge
00:04.0 PCI bridge: ATI Technologies Inc RS480 PCI Bridge
00:05.0 PCI bridge: ATI Technologies Inc Unknown device 5a37
00:06.0 PCI bridge: ATI Technologies Inc RS480 PCI Bridge
00:07.0 PCI bridge: ATI Technologies Inc RS480 PCI Bridge
00:12.0 IDE interface: ATI Technologies Inc ATI 4379 Serial ATA Controller (rev 80)
00:13.0 USB Controller: ATI Technologies Inc IXP SB400 USB Host Controller (rev 80)
00:13.1 USB Controller: ATI Technologies Inc IXP SB400 USB Host Controller (rev 80)
00:13.2 USB Controller: ATI Technologies Inc IXP SB400 USB2 Host Controller (rev 80)
00:14.0 SMBus: ATI Technologies Inc IXP SB400 SMBus Controller (rev 83)
00:14.1 IDE interface: ATI Technologies Inc Standard Dual Channel PCI IDE Controller ATI (rev 80)
00:14.2 Audio device: ATI Technologies Inc SB450 HDA Audio (rev 01)
00:14.3 ISA bridge: ATI Technologies Inc IXP SB400 PCI-ISA Bridge (rev 80)
00:14.4 PCI bridge: ATI Technologies Inc IXP SB400 PCI-PCI Bridge (rev 80)
00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration
00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map
00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller
00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control
01:05.0 VGA compatible controller: ATI Technologies Inc RS482 [Radeon Xpress 200M]
08:01.0 CardBus bridge: ENE Technology Inc CB-712/4 Cardbus Controller (rev 10)
08:01.1 FLASH memory: ENE Technology Inc ENE PCI Memory Stick Card Reader Controller (rev 01)
08:01.2 Generic system peripheral [0805]: ENE Technology Inc ENE PCI Secure Digital Card Reader Controller (rev 01)
08:01.3 FLASH memory: ENE Technology Inc FLASH memory: ENE Technology Inc: (rev 01)
08:01.4 FLASH memory: ENE Technology Inc Unknown device 0551 (rev 01)
08:02.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
08:04.0 Network controller: Broadcom Corporation BCM4318 [AirForce One 54g] 802.11g Wireless LAN Controller (rev 02)

Video

Like the wireless drivers, you have a choice between drivers with open-source goodness and closed-source propriatory drivers that offer greater performance.

For my use, zippy 3D performance isn't so important. If it came down to it, I'd cheerfully swap that for reliability and especially smooth suspend and hibernate.

Update 2009: The Xorg drivers now have accelerated 3D support, which copes happily with KDE4 and its eye candy. Even more reason to stick with open source goodness.

Open source drivers

The open source drivers work well enough for my purposes. This is my /etc/X11/xorg.conf device section.

Section "Device"
        Identifier      "ATI Radeon Xpress 1100"
        Driver          "ati"
        BusID           "PCI:1:5:0"
EndSection

I explicitly set the monitor size to get the correct display dots per inch. If you don't do this, your font sizes will be wrong.

Section "Monitor"
        Identifier      "Acer Aspire 5050"
        Option          "DPMS"
        DisplaySize     301 192
EndSection

I haven't yet tried the external VGA.

My beef with the open source drivers at present (Xorg ATI 6.6.3) are:

The ATI binary driver does accelerated 3D. Is it a better bet?

ATI Binary drivers

I've not crossed swords with the ATI binary drivers before. I have had experience with the nVidia drivers.

AMD don't acknowledge such a thing as a Radeon Xpress 1100 on their website in the list of hardware supported by their Linux driver. The Linux driver is an all-in-one driver anyway, and according to the hardware list at The Unofficial ATI Linux Driver Wiki the 200M - to be precise, the 200M (RS482 5975), the device in the 5051AWXMi - is supported by the driver.

Section "Device"
        Identifier      "ATI Radeon Xpress 1100"
        Driver          "fglrx"
        BusID           "PCI:1:5:0"
EndSection

This driver has not been a pleasant experience for me. I eventually managed to get the 3D drivers installed and working, by downloading the latest (21/2/07) drivers from the AMD website and following their build and install process. Once I followed up hints on various web pages to blacklist the ati_agp kernel modules, commented out “dbe” and “dri” in /etc/X11/xorg.conf and added

Section "Extensions"
        Option      "Composite" "Disable"
EndSection

I got glxinfo to admit to ATI hardware acceleration. I very nearly gave up at several points along the way.

How about suspend and hibernate? Disaster! The entire machine locks solid.

I will be checking to see if things improve in the future. But as things stand, I will be suggesting to anyone thinking of getting a laptop that they make sure they get Intel or nVidia graphics.

For the present I'm sticking with the open source drivers.

Networking

Wired

The built-in wired Ethernet port is a good 'ol RTL-8139. The Linux kernel knows exactly what to do with these.

Wireless

Onboard wireless is provided by a Broadcom BCM4318.

Update for Linux kernel versions 2.6.24 and later

The new Linux wireless driver b43 works well. You will need to install the firmware; on Debian, all you need to do is to install the package b43-fwcutter. It will download the required firmware, extract it and install it into the right place.

I have found that, as with ndiswrapper, you need to explicitly unload b43 before suspending or hibernating. To do this, I added b43 to the list of modules SUSPEND_MODULES in /etc/pm/config.d/modules. In /etc/acpi/suspend.d/60-generate-modules-list.sh I added a section like this:

if [ -d /sys/module/b43 ]; then
        modprobe -r b43
        MODULES="$MODULES b43"
fi

and /etc/powersave/sleep I added b43 to UNLOAD_MODULES_BEFORE_SUSPEND2DISK, UNLOAD_MODULES_BEFORE_SUSPEND2RAM and UNLOAD_MODULES_BEFORE_STANDBY.

For Linux kernel versions 2.4.23 and earlier

In theory there are two possible lines of support, ndiswrapper and the native bcm43xx driver.

Like all right-thinking persons, I would much prefer to use the open-source kernel driver bcm43xx. Unfortunately I couldn't get it to work reliably. Sometimes I could get a connection, other times nothing would work. I think a possible clue to why arrived when I tried bcm43xx-fwcutter to cut firmware from the Windows XP driver. The firmware cutter did its job perfectly, but bcm43xx refused to load the resulting firmware blobs, saying that it didn't support firmware versions later than 0x128, and this firmware was 0x135. I suspect the hardware is a later revision than bcm43xx can handle.

So I fell back on ndiswrapper. This works beautifully with the Windows XP driver. As a bonus, it also observes the front network switch, so you can switch off wireless with a flick of the thumb.

There are comprehensive instructions on installing ndiswrapper on Debian at the main ndiswrapper site, http://ndiswrapper.sourceforge.net/mediawiki/index.php/InstallDebian. The module-assistant method to get the kernel module worked fine for me.

# apt-get install module-assistant
# module-assistant auto-install ndiswrapper

To stop the native driver being loaded, I created /etc/modprobe.d/wireless-blacklist containing

# Prevent loading of the native bcm43xx driver. I can't get it to work
# reliably with this machine.
blacklist bcm43xx

Then follow the instructions to install the Windows driver. If you need to, you can download the Broadcom Windows XP driver from http://support.acer-euro.com/drivers/notebook/as_5050.html.

ndiswrapper doesn't cope with attempts to suspend or hibernate. To get round this, force it to be unloaded before suspending.

Audio

Windows XP reports the audio hardware as Realtek High Definition Audio. lspci prefers to call it ATI Technologies Inc SB450 HDA Audio.

Update for Linux kernel versions 2.6.24 and later

Recent updates to the ALSA driver have improved support somewhat. The driver still doesn't automatically detect and set the hardware correctly, but can be instructed as to the correct course of action. I edited a file /etc/modprobe.d/sound to contain:

alias snd-card-0 snd-hda-intel
options snd-hda-intel mixer=acer-aspire

KMix' now shows a plausible set of outputs, and plugging headphones into the front socket turns off the speakers just as you'd expect. The two things I've found that aren't quite right is first, that if in KMix or Volume Control I turn off the microphone, the Mute item in KMix is highlighted. If I select KMix Mute by hand, the microphone is marked as turned off, and second I can't turn on the front mic at all.

For Linux kernel versions 2.4.23 and earlier

Spend 5 minutes with Google and you will find all manner of reports of intermittent working and logs filled with error messages for this audio hardware.

I bashed my head against this wall for a while, too, before digging down to an answer. The problem is that the ALSA driver thinks it finds an extra codec beyond the soft modem codec and the audio codec expected. It's that extra codec that confuses it beyond measure. The solution is to confine the driver to checking for the expected codecs. I made a new file /etc/modprobe.d/sound containing:

alias snd-card-0 snd-hda-intel
options snd-hda-intel index=0 probe_mask=3 position_fix=3

index=0 specifies that the HDA device is to be the first audio device, and is really redundant. probe_mask=3 restricts the driver to examining the first two codecs, and is the important bit here. Finally, on my laptop, on playing sound the driver would warn that it couldn't use its intended play method and would fall back to another. position_fix=3 specifies the fallback from the start, and so while it removes an entry from your logs it is probably redundant too.

The audio outputs are a bit curious. I recommend some playing with a mixer. I have tested the onboard speakers and the front headphone socket. These are not interlinked; plug in headphones and you will continue to frighten your neighbours with scratchy sounds coming from the onboard speakers until you take action with the mixer. On my machine I use the first channel labelled '3D' to control the external speaker volume. The headphones respond to the channel labelled 'Front'. The 'PC Speaker' channel does nothing. Under Windows the speaker audio is muted when headphones are plugged in, but this takes an appreciable time and Windows delivers a 'Jack (un)plugged' notification, so it looks to me like it is being done in software. Yuk.

With the 'Front' output being the headphones, you'd think that 'Front Mic' would be the microphone socket. Sorry, that's 'Mic'. 'Front Mic' is the microphone built into the case (look just above the F9 key).

I tried using my machine at a party recently. Plugging the headphone socket into an amp results in a loud buzzing. I guess the socket isn't properly grounded. All in all, rather a cheapskate connector. Don't buy this for audio work.

Other gadgets

The touchpad

I had configured the touchpad in /etc/X11/xorg.conf but it didn't work.

Section "InputDevice"
        Identifier      "Synaptics Touchpad"
        Driver          "synaptics"
        Option          "SendCoreEvents"        "true"
        Option          "Device"                "/dev/psaux"
        Option          "Protocol"              "auto-dev"
        Option          "LeftEdge"      "1700"
        Option          "RightEdge"     "5300"
        Option          "TopEdge"       "1700"
        Option          "BottomEdge"    "4200"
        Option          "FingerLow"     "25"
        Option          "FingerHigh"    "30"
        Option          "MaxTapTime"    "180"
        Option          "MaxTapMove"    "220"
        Option          "VertScrollDelta" "100"
        Option          "MinSpeed"      "0.09"
        Option          "MaxSpeed"      "0.18"
        Option          "AccelFactor"   "0.0015"
        Option          "SHMConfig"     "on"
EndSection

I then found that I needed the evdev kernel module loaded. I added it to /etc/modules and all is now fine.

Internal modem

I haven't tried this. I suspect the drivers sold by http://www.linuxant.com would work.

The keyboard

Acer pepper and salt the keyboard with a smattering of extra keys. On other Acer laptops you have to use either acer_acpi or acerhk to access these. Neither of these work on the 5051AWXMi, because the BIOS ACPI handling has changed. Luckily, the Linux 2.6.18 kernel sees all these keypresses as, well, keypresses. Some do not have entries in the kernel keymap, and generate logs telling you how to add them. Even the two front panel switches, for the wireless and bluetooth (if it had bluetooth) generate key events.

I have not yet hooked up any of these keypresses to do anything.

The function keys for adjusting screen brightness work out of the box.

Card Reader

There's a SD card reader just above the PCMCIA slot, the ENE Technology Inc CB-712/4 Cardbus. I plugged a SD card into it recently, and found it doesn't work with my current 2.6.22 kernel. Google turns up hints that support may turn up in 2.6.23. I'll try again soon.

ENE Technology have, apparently, been totally unhelpful with specs or other info. Gits.

Suspending/Hibernating

I recently upgraded to the Debian 2.6.22-3 kernel and the latest versions of powersave, kpowersave and pm-utils. powersave is really redundant now.

Hibernating now works fine, both from the command line and kpowersave. Hurrah! To enable it I set the kernel to use the swap partition, hda3, for hibernation by adding

# defoptions=resume=/dev/hda3

to /boot/grub/menu.lst and running update-grub.

As for suspending (suspend to RAM), the machine isn't currently on the list of machines known to s2ram. I did the experiments recommended with s2ram, and found that s2ram -f -a 1 produces the desired result. It needs -a 1 to reinitialise the console correctly; without it, the video mode isn't set properly for the console.

For pm-utils I created /etc/pm/config.d/local containing

S2RAM_OPTS="-f -a 1"

For powersave, I edited /etc/powersave/sleep and set

SUSPEND2RAM_FORCE="yes"
SUSPEND2RAM_ACPI_SLEEP="1"

Finally, I updated the BIOS to the latest Acer release, 3315. Acer still show 3109 on their European support site, but you can find 3315 here. This has sorted the remaining problems with suspend, so finally it looks like I have both suspend and hibernate working properly.

Power management

I added

cpufreq-userspace
powernow-k8

to /etc/modules and loaded powernowd. The CPU clock now steps between 800MHz, 1.6GHz and 2GHz depending on the load.

Acer Linux

The Acer support webpage at http://www.acer.com/support/download.htm has an interesting link. 'Linux Software' and a drop-down menu. One of the items listed here is 'Notebook Live CD'.

Follow that, and you'll find yourself in ftp://www.linpus.com.tw/pub/source/livecd. There's a subdirectory aspire and in that an ISO image.

I tried downloading that image. It downloaded very slowly, but after quite a few hours I eventually got a CD. On booting it, you see a splash for something called 'Linpus Linux'. That's as far as it gets for me; the whole thing then grinds to a complete halt saying it can't find the CD device. The problem seems to be that various kernel drivers are present in module form, but don't get loaded because they are for the wrong kernel version and anyway the booted kernel doesn't like the supplied insmod.

I had a quick look in some of the CD files. It looks like it will set you up to expect an i810 video driver.

All in all, I think this might at one time have worked for some Aspire models, but it's no more than a coaster for your 5051AWXMi.

Debian AMD64

There's nothing in the above that would suggest that running Debian/amd64 should be a problem. So I tried installed it on a spare partition. Sure enough, everything works exactly as Debian/x86.

The only item you'll need to obtain is the Windows 64bit driver for the wireless. Acer don't have one on the their website list of drivers for the Aspire 5050. A little googling found they do have one hidden away at ftp://ftp.support.acer-euro.com/notebook/ferrari_4000/driver/80211.zip. This works nicely.