# Gentoo GNU/Linux on Acer Extensa 5620Z

*2010-11-14*

> A guide to Gentoo GNU/Linux on the Acer Extensa 5620Z, covering kernel configuration, Xorg, touchpad setup, and power management.

This guide explains how to install and configure [Gentoo](https://www.gentoo.org/) GNU/Linux on an Acer Extensa 5620Z laptop. It describes my setup from 2010, using Linux 2.6.34, HAL, and KDE 4.

## Why Gentoo GNU/Linux?

Gentoo is my favorite GNU/Linux distribution because it has a great package management system, Portage, and lets you optimize the system for your machine. It also has a great community.

You can learn more about Gentoo, its philosophy, and its features on the [Gentoo website](https://www.gentoo.org/).

## Hardware information

| Component | Description |
| --- | --- |
| CPU | Intel Pentium Dual-Core T2330 (1.6 GHz, 533 MHz FSB, 1 MB L2 cache, 64-bit) |
| RAM | 2 GB DDR2 SODIMM, 533 MHz (1.9 ns) |
| SMBus | Intel Corporation 82801H (ICH8 Family) SMBus Controller |
| HDD | 160 GB WDC WD1600BEVS-2 |
| SATA controller | Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) SATA AHCI Controller |
| Video | Intel Mobile GM965/GL960 Integrated Graphics Controller |
| Audio | Intel Corporation 82801H (ICH8 Family) HD Audio Controller |
| Ethernet controller | Broadcom Corporation NetLink BCM5787M Gigabit Ethernet PCI Express |
| Wireless adapter | Atheros Communications Inc. AR5001 Wireless Network Adapter |
| FireWire | Texas Instruments PCIxx12 OHCI Compliant IEEE 1394 Host Controller |
| SD host controller | Texas Instruments PCIxx12 SDA Standard Compliant SD Host Controller |
| Card reader | Texas Instruments 5-in-1 Multimedia Card Reader (SD/MMC/MS/MS PRO/xD) |
| Webcam | SuYin Acer CrystalEye webcam |

The laptop also has two PCMCIA slots, a TV output, and a DVD-RW drive.

Detailed hardware information is available in these files:

- [Output of `lspci`](/blog/acer-extensa-5620z-lspci.txt)
- [Output of `lshw`](/blog/acer-extensa-5620z-lshw.txt)
- [Contents of `/proc/cpuinfo`](/blog/acer-extensa-5620z-cpuinfo.txt)

## Gentoo installation notes

I used the Gentoo amd64 minimal CD, `install-amd64-minimal-20101111.iso`, for the installation. After booting from the CD, all devices needed for installation were recognized.

To download the stage3 archive and Portage snapshot, or otherwise access the internet during installation, you need to configure the LAN interface, usually `eth0`. The minimal CD recognizes the wireless card, but its environment lacks the tools needed to configure it.

For complete installation instructions, consult the [Gentoo AMD64 Handbook](https://wiki.gentoo.org/wiki/Handbook:AMD64).

## Kernel configuration

This configuration is based on Linux 2.6.34. Download [my configuration file](/blog/acer-extensa-5620z-config.txt) and copy it into the kernel source directory:

```sh
cp acer-extensa-5620z-config.txt /usr/src/linux/.config
```

**Note:** I use LZO compression for the kernel image. If you use this configuration, install `lzop` with Portage or select another compression method, such as bzip2.

The supplied configuration includes support for the laptop’s hardware, temperature and other sensors, CPU frequency scaling, ACPI suspend and hibernation, ext2, ext3, ext4, NTFS (read/write), VFAT, an NFS client, and the Synaptics touchpad. Run `make menuconfig` from `/usr/src/linux` to review the full configuration.

Most options are built into the kernel rather than compiled as modules.

From `/usr/src/linux`, compile and install the kernel:

```sh
make && make modules_install
cp arch/x86_64/boot/bzImage /boot/kernel-2.6.34-gentoo-r12
```

## Terminal resolution

To improve the terminal resolution, append the following parameters to the kernel line in `grub.conf`:

```text
video=vesafb:1280x1024-24@60 vga=9
```

## Function keys

To enable the Fn key combinations and multimedia keys, copy the HAL policy file `10-laptop-panel-mgmt-policy.fdi` from `/usr/share/hal/fdi/policy/10osvendor` to `/etc/hal/fdi/policy`:

```sh
cp /usr/share/hal/fdi/policy/10osvendor/10-laptop-panel-mgmt-policy.fdi /etc/hal/fdi/policy
```

Restart HAL after copying the file.

## X server configuration

Add the following settings to `/etc/make.conf`, then install `xorg-server` with Portage:

```sh
VIDEO_CARDS="intel"
INPUT_DEVICES="evdev synaptics"
```

### Synaptics configuration

To configure the touchpad, copy the HAL policy file `11-x11-synaptics.fdi` to `/etc/hal/fdi/policy/99-x11-synaptics.fdi`:

```sh
cp /usr/share/hal/fdi/policy/10osvendor/11-x11-synaptics.fdi /etc/hal/fdi/policy/99-x11-synaptics.fdi
```

Open the copied file in your preferred text editor and uncomment the `<match>` block. To enable tapping (mouse clicks using the touchpad), add the following line inside that block:

```xml
<merge key="input.x11_options.TapButton1" type="string">1</merge>
```

Restart HAL.

To disable the touchpad while typing, start `syndaemon` with your X session. If you use `.xinitrc`, add `syndaemon -d` before the command that starts your window manager or desktop environment. The `-d` option runs it in the background. Alternatively, use your desktop environment’s autostart mechanism.

For KDE 4, create `~/.kde4/Autostart` if necessary. Then, as your regular user, create a file named `syndaemon` in that directory with the following contents:

```bash
#!/bin/bash
exec syndaemon
```

Make the script executable:

```sh
chmod +x ~/.kde4/Autostart/syndaemon
```

Run `man synaptics` for additional configuration options and help.

## Power management

HAL handles much of the laptop’s power management in this setup, but CPU frequency scaling, suspend, and hibernation require additional configuration.

### CPU frequency scaling

To enable CPU frequency scaling, install `cpufreqd` with Portage and add it to the default runlevel. For more information, see the [Gentoo power management guide](https://wiki.gentoo.org/wiki/Power_management/Guide).

### Suspend and hibernation

To use suspend and hibernation through HAL, install `pm-utils` with Portage and add your user to the `plugdev` group. Replace `your_username` in the following command with your username:

```sh
gpasswd -a your_username plugdev
```

### Resuming from hibernation

To resume from hibernation, enable hibernation support in the kernel if you are not using the supplied configuration. Then append the following parameter to the kernel line in `grub.conf`:

```text
resume=/dev/<SWAP>
```

Replace `<SWAP>` with your swap partition’s device name.

## Miscellaneous configuration

- [Update system time using NTP and NetworkManager (Gentoo)](/update-system-time-using-ntp-and-networkmanager-gentoo/).

