Gentoo Wiki


This article is part of the Hardware series.
Laptops TV Tuner Cards Wireless Servers Storage Other Hardware Motherboards Related



Code: lspci
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: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]
06:01.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
06:02.0 Ethernet controller: Atheros Communications, Inc. AR5005G 802.11abg NIC (rev 01)
06:04.0 CardBus bridge: ENE Technology Inc CB-712/4 Cardbus Controller (rev 10)
06:04.1 FLASH memory: ENE Technology Inc ENE PCI Memory Stick Card Reader Controller (rev 01)
06:04.2 Class 0805: ENE Technology Inc ENE PCI Secure Digital Card Reader Controller (rev 01)
06:04.3 FLASH memory: ENE Technology Inc FLASH memory: ENE Technology Inc: (rev 01)
06:04.4 FLASH memory: ENE Technology Inc Unknown device 0551 (rev 01)

Not working or unknown status

Please note that you can determine the type of your modem using ScanModem, which gives a bunch of useful information. On this particular laptop, the PCI slot is 00:14.2 and the PCI ID is 1002:437b ("a High Definition Audio card, possibly hosting a soft modem"). Check this Ubuntu page for an open-source alternative that might work for you.


Note: You may require enabling 'Use older RX-reset method' under 8139too module options when building the kernel to get the driver to work. Also, I needed to load the 8139too module with mode=0x230 as parameter to get network access on the LiveCD (i.e. modprobe 8139too mode=0x230).


The audio chip is Intel's High Definition Audio, supported by the alsa drivers. Unfortunately, I never got the OSS to fully work -- I can't record. That means I can only listen to people on skype and they don't here me :(

Code: lspci -nv
00:14.2 0403: 1002:437b (rev 01)
        Subsystem: 1025:009f
        Flags: bus master, slow devsel, latency 64, IRQ 18
        Memory at c0000000 (64-bit, non-prefetchable) [size=16K]
        Capabilities: [50] Power Management version 2
        Capabilities: [60] Message Signalled Interrupts: 64bit+ Queue=0/0 Enable-

However, it uses a Realtek ALC883 codec:

Code: cat /proc/asound/card0/codec#0
Codec: Realtek ALC883
Address: 0
Vendor Id: 0x10ec0883
Subsystem Id: 0x1025140d
Revision Id: 0x100002

To have a proper support for this codec, you have to use alsa 1.0.13-rc2 (or newer). So you have to switch the alsa support in the kernel off and emerge it manually.

Linux Kernel Configuration: Kernel 2.6.17-gentoo-r5
 Loadable module support  --->
     [*] Enable loadable module support

 Device Drivers  --->
     Character devices --->
         <*> Enhanced Real Time Clock Support
     Sound  --->
         <M> Sound card Support
             Advanced Linux Sound Architecture  --->
                 < > Advanced Linux Sound Architecture
             Open Sound System  --->
                 < > Open Sound System (DEPRECATED)

We only want the alsa drivers for hda-intel chipset, so we add the following line to /etc/make.conf

File: /etc/make.conf

To install alsa-driver-1.0.13_rc2, we have to unmask it:

File: /etc/portage/package.keywords
=media-sound/alsa-headers-1.0.13_rc2 ~amd64
=media-sound/alsa-driver-1.0.13_rc2 ~amd64
=media-libs/alsa-lib-1.0.13_rc2 ~amd64
=media-sound/alsa-utils-1.0.13_rc2 ~amd64
File: /etc/portage/package.unmask

We now emerge all the packages (if you want the support for OSS, add it to your USE flags)

# emerge alsa-driver alsa-headers alsa-lib alsa-utils

And make alsa start automatically

# rc-update add alsasound boot

We have to modify the /etc/modprobe.d/alsa file by adding the following line

File: /etc/modprobe.d/alsa
options snd_hda_intel model=acer position_fix=1

Here's the whole file I use:

File: /etc/modprobe.d/alsa
alias char-major-116 snd
alias char-major-14 soundcore

alias snd-card-0 snd-hda-intel
alias sound-slot-0 snd-card-0

alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss

alias /dev/mixer snd-mixer-oss
alias /dev/dsp snd-pcm-oss
alias /dev/midi snd-seq-oss

options snd cards_limit=1
options snd_hda_intel model=acer position_fix=1

After that we have to run

# update-modules

to regenerate the /etc/modprobe.conf file.

To make the drivers load automatically at boot, add the following line to the /etc/modules.autoload.d/kernel-2.6 file

File: /etc/modules.autoload.d/kernel-2.6

The procedure for installing alsa is described in more detail ALSA/Install.

PC Card

See this guide. The socket is yenta-compatible.

Keyboard and LEDs

Getting the additional keys and LEDs on the keyboard to work is a bit tricky on Acer laptops. Some of the keys work after little X configuration and optionally assigning them keycodes first. Unfortunately, most don't, neither do the LEDs. There is a kernel module called `acerhk', but it doesn't work on a 64-bit kernel. It is still possible to get all the keys and the mail LED working. This is tested only on an Acer 5101, but should work аt least on 5100/5101/5102 and all models using Dritek keyboard extensions.

To make the keys work, you need a patched version of acerhk. You can manually download the tarball, untar it, patch it, and install it, but it is better to simply create a modified ebuild in your own portage overlay.


You will need the following patch:

File: amd64fix.diff
diff -bBur acerhk-0.5.35-old/acerhk.c acerhk-0.5.35/acerhk.c
--- acerhk-0.5.35-old/acerhk.c  2007-02-10 17:46:23.000000000 +0200
+++ acerhk-0.5.35/acerhk.c      2007-04-28 19:18:49.000000000 +0300
@@ -550,6 +550,7 @@
 static asmlinkage void call_bios_6xx(struct register_buffer *buf)
+#ifndef __x86_64__
   if (bios_routine) {
        __asm__ __volatile__(
@@ -578,10 +579,12 @@

 static asmlinkage void call_bios_52x(struct register_buffer *buf)
+#ifndef __x86_64__
   if (bios_routine) {
        __asm__ __volatile__(
@@ -611,6 +614,7 @@

 #define PRINT_BUFFER(x) \
@@ -783,7 +787,8 @@
   unsigned char c = 0;

   spin_lock_irqsave (&rtc_lock, flags);
-#ifndef DUMMYHW
+/* #ifndef DUMMYHW */
+#if !(defined(DUMMYHW) || defined(__x86_64__))
   if (cmos_index)
     c = CMOS_READ(cmos_index);
   else if (verbose > 3)
@@ -867,9 +872,9 @@

 static struct proc_dir_entry *proc_acer_dir;

-static unsigned int __init find_hk_area(void)
+static unsigned long __init find_hk_area(void)
-  int offset, sig;
+  long offset, sig;
   unsigned int fkt;
   fkt = 0;
   sig = -1; /* offset to signature in io area */
@@ -887,9 +892,9 @@
     fkt = readl(reg1 + sig + 5);
     /* adjust fkt to address of mapped IO area */
     if (fkt >= 0xf0000)
-      fkt = (unsigned int)reg1 + fkt - 0xf0000;
+      fkt = (unsigned long)reg1 + fkt - 0xf0000;
     else if (fkt >= 0xe0000)
-      fkt = (unsigned int)reg1 + fkt - 0xe0000;
+      fkt = (unsigned long)reg1 + fkt - 0xe0000;
       fkt = 0;
@@ -1144,6 +1149,7 @@
   case 2000:
   case 2010:
   case 2020:
+  case 5100:
     /* Aspire 13xx series laptops use dritek hardware, no
        acerhk-mapping needed
        VolUp and VolDown are managed as normal keys
@@ -1458,6 +1464,7 @@
   case 1800:
   case 2010:
   case 2020:
+  case 5100:
     /* Dritek EC, bluetooth, wifi, mail */
     acerhk_type = TM_dritek;
     acerhk_model_features = TM_F_MAIL_LED_EC2 | TM_F_WLAN_EC2 | TM_F_BLUE_EC2;
@@ -1792,6 +1799,8 @@
         case '2': series = 5020; break;
+      } else if (str[8] == '1' && str[9] == '0') {
+       series = 5100;
       } else {
         if (verbose > 1)
           printk(KERN_INFO"acerhk: model string indicates unknown Aspire 5xxx series\n");
@@ -2117,7 +2126,8 @@
 /* polling timer handler */
 static void acerhk_poll_event(unsigned long save_size)
-#ifndef DUMMYHW
+/* #ifndef DUMMYHW */
+#if !(defined(DUMMYHW) || defined(__x86_64__))
   unsigned int max = MAX_POLLING_LOOPS;
   /* make sure not to loop more then 32 times */
   if (!max || max > 32)
@@ -2139,7 +2149,8 @@
   if (acerhk_blueled_blinking != -1) {
     acerhk_blueled_blinking = !acerhk_blueled_blinking;
-#ifndef DUMMYHW
+/* #ifndef DUMMYHW */
+#if !(defined(DUMMYHW) || defined(__x86_64__))
     acerhk_timer_blinking.expires = jiffies + acerhk_blueled_blinking_delay;
@@ -2904,7 +2915,8 @@
     /* attach to input system */
     memset(acerhk_model_string, 0x00, ACERHK_MODEL_STRLEN);
-#ifdef DUMMYHW
+/* #ifdef DUMMYHW */
+#if !(defined(DUMMYHW) || defined(__x86_64__))
     acerhk_model_addr = (void*)0x12345678;
     /* copy the string, but not more than 15 characters */
     strncpy(acerhk_model_string, "TravelmateDummy", ACERHK_MODEL_STRLEN-1);

Patch info copyright info: Copyright (C) 2007 Milko Krachounov Under the GNU GPL2

If you don't have a overlay with personal and custom ebuilds, you should create a directory named /usr/local/portage, for example. Then add the following to your make.conf

Code: make.conf

Copy the Gentoo ebuilds of acerhk to this overlay, and if you wish remove the ebuild of the old versions.

mkdir -p /usr/local/portage/app-laptop/
cp -Rp /usr/portage/app-laptop/acerhk /usr/local/portage/app-laptop/

Put the amd64fix.diff in /usr/local/portage/app-laptop/acerhk/files. Edit the latest (e.g. acerhk-0.5.35.ebuild), adding ~amd64 to the KEYWORDS and epatch ${FILESDIR}/amd64fix.diff to the src_unpack function as follows

KEYWORDS="~x86 ~amd64 -ppc"
        unpack ${A}
        cd ${S}
        epatch ${FILESDIR}/amd64fix.diff
        # The following makes the module compile correctly with 2.6.24.
        sed -i s,^CFLAGS,EXTRA_CFLAGS, Makefile

Install acerhk by entering

echo app-laptop/acerhk ~amd64 >> /etc/portage/package.keywords
ebuild /usr/local/portage/app-laptop/acerhk/acerhk-0.5.35.ebuild digest
emerge acerhk

Now the `acerhk' module is installed. You should create a file in /etc/modprobe.d containing the following module configuration

File: /etc/modprobe.d/acerhk
options acerhk usedritek=1 force_series=5100

You should run update-modules to recreate module configuration files. Now you can load the module and test it by issuing modprobe acerhk. It is advisable that you make the module automatically loaded at startup by adding it to /etc/modules.autoload.d/kernel-2.6.

If you are using software suspend, the acerhk module should be reloaded after resume. Configure your hibernate-script to do so.

Configuring scancodes

Now the scancodes of all keyboard keys are recognised by the kernel and the LEDs also work (only mail and wireless LEDs are tested, though). You should proceed by assigning keycodes to the scancodes that do not have one assigned by default. Adding the following lines to some startup script, such as /etc/conf.d/local.start will do that for you

File: /etc/conf.d/local.start
# Keyboard keys
# Increase brightness
setkeycodes e059 225
# Decrease brightness (originally was 112)
setkeycodes e06f 224
# Euro key
setkeycodes e033 202 #148
# Dollar key
setkeycodes e034 203 #149

# Dritek keys
# Bluetooth key
setkeycodes e004 210
# Wireless off
setkeycodes e056 218
# Wireless on
setkeycodes e055 206
# P key
setkeycodes e073 148
# e key (Acer Empowering Technology)
setkeycodes e074 149
# Fn+F1 key (Acer Hotkey Help)
setkeycodes e025 138
# Fn+F2 key (Acer eSettings)
setkeycodes e026 141
# Fn+F3 key (Acer ePowerManagement)
setkeycodes e027 152
# Fn+F4 key (switch to external monitor?)
setkeycodes e041 212
# Fn+F4 key (switch to LCD panel?)
setkeycodes e078 213
# Fn+F7 key (turn on touch pad)
setkeycodes e071 222
# Fn+F7 key (turn off touch pad)
setkeycodes e072 223

Don't forget to execute the commands if you want to test the new configuration without rebooting. If you don't intend to use acerhk, you can leave out the section with Dritek keys. The keys should continue to work even after unloading the module, it should remain loaded if you intend to use the LEDs.

Configuring X

Now you should configure X to recognize the new keycodes. There are many ways to do this, the simplest of which is to create a file, e.g /etc/X11/inetkeys, mapping all of them as follows

File: /etc/X11/inetkeys
keycode 174 = XF86AudioLowerVolume
keycode 176 = XF86AudioRaiseVolume
keycode 162 = XF86AudioPlay XF86AudioPause
keycode 164 = XF86AudioStop
keycode 144 = XF86AudioPrev
keycode 153 = XF86AudioNext
keycode 101 = XF86BrightnessAdjust
keycode 212 = XF86BrightnessAdjust
keycode 171 = EuroSign
keycode 172 = dollar cent
keycode 245 = XF86Book
keycode 193 = XF86Launch3
keycode 146 = XF86Launch4
keycode 223 = XF86Sleep
keycode 187 = XF86Video
keycode 118 = XF86Display
keycode 148 = XF86LaunchA
keycode 202 = XF86LaunchB
keycode 236 = XF86Mail
keycode 178 = XF86WWW
keycode 159 = XF86Launch1
keycode 151 = XF86Launch2

Most likely you would like to make them load automatically at X startup. The best way is to create a file in /etc/X11/xinit/xinitrc.d that loads them

File: /etc/X11/xinit/xinitrc.d/10-xkb
if [ -f ~/ ]; then
        . ~/
xmodmap /etc/X11/inetkeys

Please note that the keys should be loaded after the keyboard map, so if you load a custom keymap with your login, you should move it to ~/, or another script that is called by the script above or before it. This technique is prefered, because recent apps ignore events for change in the keyboard maps from recent X server versions, and the keys might not work at all if, for example, xmodmap /etc/X11/inetkeys is executed after KDE starts.

Using the euro and dollar keys as designed is not very convinient, another possibility is to assign them to XF86Back and XF86Forward and use them to switch terminal sessions in your terminal emulator, virtual consoles, virtual desktops or whatever you wish.

Assigning key actions

To assing action to the keys you can use your desktop enviroment own tools. Getting volume keys working is a bit tricky, especially if you want them to work in games. One way to achieve this is to emerge hotkeys. While the tool is a little outdated, it works on your laptop configuration. The only shortcoming is that you need OSS emulation for your mixer to use it. You can use the following keyboard definition file, if you want to use hotkeys only for the volume keys

File: /usr/share/hotkeys/acer5101-simple.def
<?xml version="1.0"?>


  <config model="Acer 5101 Volume Keys">
    <PrevTrack    keycode="144"/>
    <Play         keycode="162"/>
    <Stop         keycode="164"/>
    <NextTrack    keycode="153"/>
    <VolUp        keycode="176" adj="2"/>
    <VolDown      keycode="174" adj="2"/>
    <Mute         keycode="160"/>


    <name>to be added</name>
    <email>to be added</email>


Then you can simply make hotkeys load with your login with the following command

hotkeys -t acer5101-simple -Z -o off -d none

Deciding what action to assign to the keys is up to your imagination, but if you are having trouble deciding, you can read your Acer manual and see what the keys are supposed to do. Here is an example configuration


The mail LED can be turned on by issuing

echo 1 > /proc/driver/acerhk/led

and can be turned off by

echo 0 > /proc/driver/acerhk/led

If you have trouble with invoking this from your application, you can create a script or scripts, that do it for you.

File: /usr/local/bin/mailled
if [ "$1" == "on" ]; then
        echo 1 > /proc/driver/acerhk/led
        echo 0 > /proc/driver/acerhk/led

You can now make your favourite mail client to turn on the LED when you have new mail. You might also be able to do that for you chat clients. If you are an advanced user, with a bit of imagination and scriting, you can do all and make the mail button open the correct application each time. You can also use /proc/driver/acerhk/wirelessled and /proc/driver/acerhk/blueled for the wireless LED and the Bluetooth LED.

Please note that toggling the wireless LED, it actually turns the wireless connection on and off. This can be useful for scripts.

Retrieved from ""

Last modified: Tue, 26 Aug 2008 21:32:00 +0000 Hits: 21,698