Search for:
You are here: start » aspireone » arch

Arch Linux on the Acer Aspire One

Arch is a simple Linux distribution, which is built from a base install. This is particularly suited to small footprint systems such as the Aspire One, where optimisation is important and allows you to reduce unneeded applications.

These are the stages I went through to install, it's really just to jog my memory should I need to do it again.

Last updated 11-Aug-09, using Arch Linux 2009-08.

Credit

Installing

Installation is relatively straight forward, follow the Arch Wiki Installation Guide. I used the USB Image.

Preparing

To increase the SSD's lifespan, you can avoid using swap space and use a non-journaled filesystem.

If you use encrypted disc then you need a seperate /boot partition - 100Mb is sufficient. I'm using:

/boot     100M
swap      1024M
/         Rest

Configuring timezone and keyboard

Localisation, modules, daemons and network are in /etc/rc.conf. Here is mine:

# /etc/rc.conf - Main Configuration for Arch Linux#
# -----------------------------------------------------------------------
# LOCALIZATION
# -----------------------------------------------------------------------
 
LOCALE="en_GB.utf8"
HARDWARECLOCK="localtime"
USEDIRECTISA="no"
TIMEZONE="Europe/London"
KEYMAP="uk"
CONSOLEFONT=
CONSOLEMAP=
USECOLOR="yes"
 
# -----------------------------------------------------------------------
# HARDWARE
# -----------------------------------------------------------------------
 
MOD_AUTOLOAD="yes"
MODULES=(!snd-pcsp acpi_cpufreq r8169 pciehp ath5k uvcvideo fuse)
 
# Scan for LVM volume groups at startup, required if you use LVM
USELVM="no"
 
# -----------------------------------------------------------------------
# NETWORKING
# -----------------------------------------------------------------------
 
HOSTNAME="aspireone"
 
# Interfaces are controlled by wicd
INTERFACES=(!eth0 !wlan0)
 
# Routes to start at boot-up (in this order)
gateway="default gw 192.168.0.1"
ROUTES=(!gateway)
 
# -----------------------------------------------------------------------
# DAEMONS
# -----------------------------------------------------------------------
DAEMONS=(hal fam syslog-ng !network @wicd @alsa)

If you use Gnome rather than XFCE, then for NM replace the Demons section with:

# -----------------------------------------------------------------------
# DAEMONS
# -----------------------------------------------------------------------
DAEMONS=(hal fam syslog-ng !network @networkmanager @alsa)

For kernels befpre 2.6.29 you need to disable the memstick module which causes 100% load on one core:

MODULES=(!memstick !snd-pcsp acpi_cpufreq r8169 pciehp ath5k uvcvideo fuse)

First system update

After installation, pacman must be updated:

pacman -Syu

Audio

We're using ALSA as I had mixed results with Pulse Audio that I hope to address for another guide.

Alsa needs to be added as a daemon and configured with alsaconf (sound is muted by default). Remember to:

alsactl store

Users need to be in the audio group and the sound is quiet until the “front speaker” volume is increased. Sound is better supported in kernel 2.6.28 onwards and requires an addition to /etc/modprobe.d/sound.conf:

All files in /etc/modprobe.d that don't end in ”.conf” are deprecated.

You'll see posts telling you to use /etc/modprobe.d/sound but these will be ignored in a future release.

options snd-hda-intel model=acer-aspire

Ensure that alsa is also added to the daemons line in /etc/rc.conf or the volume settings will not be restored on boot.

Xorg

Configure keyboard and mouse then restart HAL before starting X or you'll be unable to do anything but hard reset!

So, now we need some packages:

pacman -S libgl xorg xf86-input-evdev xf86-video-intel xf86-input-synaptics

The beginners guide over at the Arch Wiki covers this well enough that I don't need to regurgitate it but I will mention the keyboard and mouse.

First, add hal to the daemons in /etc/rc.conf and then copy the hotplug files to a permanent location (otherwise upgrades will remove them):

cp /usr/share/hal/fdi/policy/10osvendor/10-keymap.fdi /etc/hal/fdi/policy/.

Then edit it, changing the “input.xkb.layout” key to the right one for you (in my case the UK is “gb”). Now copy the files for the touch-pad (pre-configured ones are at the end):

cp /usr/share/hal/fdi/policy/10osvendor/*x11* /etc/hal/fdi/policy/.

Now restart hal:

/etc/rc.d/hal restart

And then get a default X config:

Xorg -configure

Test it using:

X -config /root/xorg.conf.new

If all is well, then copy it to etc:

cp /root/xorg.conf.new /etc/X11/xorg.conf

Here is mine:

Section "ServerLayout"
  	Identifier     "X.org Configured"
	Screen      0  "Screen0" 0 0
	InputDevice    "Mouse0" "CorePointer"
	InputDevice    "Keyboard0" "CoreKeyboard"
EndSection
Section "Files"
	ModulePath   "/usr/lib/xorg/modules"
	FontPath     "/usr/share/fonts/misc"
	FontPath     "/usr/share/fonts/100dpi:unscaled"
	FontPath     "/usr/share/fonts/75dpi:unscaled"
	FontPath     "/usr/share/fonts/TTF"
	FontPath     "/usr/share/fonts/Type1"
EndSection
Section "Module"
	Load  "glx"
	Load  "extmod"
	Load  "xtrap"
	Load  "dbe"
	Load  "dri"
	Load  "freetype"
EndSection
Section "InputDevice"
	Identifier  "Keyboard0"
	Driver      "kbd"
EndSection
Section "InputDevice"
	Identifier  "Mouse0"
	Driver      "mouse"
	Option	    "Protocol" "auto"
	Option	    "Device" "/dev/input/mice"
	Option	    "ZAxisMapping" "4 5 6 7"
EndSection
Section "Monitor"
	#DisplaySize	  200   110	# mm
	Identifier   "Monitor0"
	VendorName   "AUO"
	ModelName    "11c2"
EndSection
Section "Device"
	Option     "AccelMethod"		"exa"
	Option     "MigrationHeuristic"        "greedy"
	Option     "NoDDC"	
	Option     "ExaNoComposite" 		"false"	
	Identifier "Card0"
	Driver      "intel"
	VendorName  "Intel Corporation"
	BoardName    "Mobile 945GME Express Integrated Graphics Controller"
	BusID       "PCI:0:2:0"
EndSection
 
Section "Screen"
	Identifier "Screen0"
	Device     "Card0"
	Monitor    "Monitor0"
	SubSection "Display"
		Viewport   0 0
		Depth     1
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     4
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     8
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     15
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     16
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     24
	EndSubSection
EndSection

Desktop Environment

XFCE

For the lightweight XFCE desktop:

pacman -S xfce4

73.99Mb's later, XFCE is in place.

Gnome

A little slower to load but still quick and perfectly usable:

pacman -S gnome

You might want to confirm each package as there are some odd choices in this group you might not need.

Performance Tweaks

To improve the 2D graphics performance add the following lines to the Driver Section of your xorg.conf

Option "AccelMethod" "exa"
Option "MigrationHeuristic" "greedy"

In recent versions of X, I have had to add:

Option "ExaNoComposite" "false"

To improve the 3D graphics performance add the following to your /etc/profile

export INTEL_BATCH=1

Compiz Fusion

Install using:

pacman -S compiz-fusion-gtk compiz-decorator-gtk

The Intel car means you need:

Option "AccelMethod" "exa"
Option "MigrationHeuristic" "greedy"
Option "ExaNoComposite" "false"

Or the performance is awful and it will not improve until you set “Indirect rendering” to on in compiz options. Moreover, you need to use ccsm to enable window decoration or there will be no border.

Graphical Login

You can use “startxfce” to run it or configure a login manager - SLIM works well with XFCE and GDM with Gnome (already installed):

pacman -S slim

I use inittab - you can use /etc/rc.conf and load slim as a daemon but I don't care for that. So edit /etc/inittab, change:

id:3:initdefault:

To

id:5:initdefault:

You also need to set the login manager, so change:

x:5:respawn:/usr/bin/xdm -nodaemon

To:

x:5:respawn:/usr/bin/slim >& /dev/null

Or:

x:5:respawn:/usr/bin/xdm -nodaemon

Before we can reboot however, we need to add the XFCE or Gnome session to the system xinitrc (/etc/X11/xinit/xinitrc) to point to XFCE otherwise we get a error message. Remove the relevant comment mark to enable (exec startxfce4 or gnome-session).

Note that if using KDM then you will need to alter the kdmrc file to allow root logins:

vi /usr/share/config/kdm/kdmrc

Change

AllowRootLogin=False

To

AllowRootLogin=True

Improved fonts

I like the filters to improve the display of fonts, so download the tarballs from AUR

Uninstall libxft and cairo then build and install (using pacman -U filename.pkg.tar.gz).

libxft-lcd is now in community:

pacman -S libxft-lcd

I also think its worth installing the Bitstream fonts and removing the 75/100 dpi fonts:

pacman -Rns xorg-fonts-75dpi xorg-fonts-100dpi
pacman -S ttf-bitstream-vera

QT and GTK integration

The murrine themes integrate very well, set GUI Style in QT Config → Appearance to “GTK+”.

pacman -S gtk-engine-murrine murrine-themes-collection

Change the Gnome Icon for a nice Arch one

pacman -S imagemagick archlinux-artwork

I'm using Tango, so:

convert -resize 24x24 -background none /usr/share/archlinux/wmlogos/archlinux-wm-gnome.svg /usr/share/icons/Tango/24x24/places/start-here.png

It'll change on next login.

Enabling function keys and the WiFi switch

There are also some keyboard tweaks we require, so I changed /etc/rc.local to include the WiFi switch and the function keys:

/usr/bin/setkeycodes e055 159
/usr/bin/setkeycodes e056 158
/usr/bin/setkeycodes e025 130
/usr/bin/setkeycodes e026 131
/usr/bin/setkeycodes e027 132
/usr/bin/setkeycodes e029 122
/usr/bin/setkeycodes e071 134
/usr/bin/setkeycodes e072 135

We also need an '.Xmodmap' file

vi ~/.Xmodmap

Which should look like this:

keycode 160 = XF86AudioMute
keycode 174 = XF86AudioLowerVolume
keycode 123 = XF86AudioRaiseVolume
keycode 223 = XF86Standby
keycode 232 = XF86KbdBrightnessDown
keycode 126 = XF86KbdBrightnessUp
keycode 210 = XF86Display

We also need an entry in '.xinitrc':

xmodmap ~/.Xmodmap

XFCE volume keys

If you use XFCE then you can use “Settings→Keyboard Settings→Shortcuts” and add a new theme, set:

XF86AudioRaiseVolume to "amixer set Master 2dB+ unmute"
XF86AudioLowerVolume to "amixer set Master 2dB- unmute"
XF86AudioMute to "amixer set Master toggle"

Wireless

The Atheros chipset is supported from 2.6.27 - just need to install a management system. I prefer wicd for XFCE:

sudo pacman -S wicd

Notice from my /etc/rc.conf that I've stopped the eth0 and wlan0 interfaces loading and added wicd to the daemon list. This refused to play without a reboot and remember when using wicd-client to configure that when it says it can't do something without encryption it wants a password entered in the settings.

If using Gnome, you may prefer Network Manager's integration:

sudo pacman -S networkmanager network-manager-applet

To prevent gnome-keyring asking for a password each login, right click the tray icon, “Edit connections”, “Wireless”, choose the connection and click “Edit”. Tick “Available to all users”, enter your password on each screen then click “Apply” and “Close”.

Network Manager's Gnome applet will not load for non-root users unless you launch a console kit session, so change ~/.xinitrc from:

exec gnome-session

To:

exec ck-launch-session gnome-session

Power management

Power management is ACPI so lets install the daemon:

pacman -S acpid

Once installed, I added two events, one to suspend on shutting the lid and another to shutdown when the button is pressed, edit /etc/acpi/events/lid:

event=button/lid.*
action=/usr/sbin/pm-suspend

Then /etc/acpi/events/power

event=button/power.*
action=/sbin/poweroff

The wireless wont restart after suspend, so you need to add /etc/pm/config.d/modules:

SUSPEND_MODULES="ath5k"

CPU Frequency Scaling

Make sure that the acpi_cpufreq module is loaded in /etc/rc.conf, then add theses lines to /etc/rc.local:

echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo ondemand > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor

HAL

Corrects org.freedesktop.hal.storage.mount-removable no

PolicyKit needs a configuration change to allow hotplug with hal, edit /etc/PolicyKit/PolicyKit.conf:

<match action="org.freedesktop.hal.storage.mount-removable">
    <return result="yes" />
</match>

Restart HAL:

/etc/rc.d/hal restart

Mounting removable NTFS drives

Ensure the fuse module is in the modules array in /etc.rc.conf then install ntfs-3g suppport:

sudo pacman -S ntfs-3g

Adding users

First create their account and add some groups:

useradd -m -G users,audio,lp,optical,storage,video,wheel,power -s /bin/bash username
passwd username

Then, if you want sudo, install it and add them to the permissions file:

pacman -S sudo
visudo

Under “User privilege specification” add (type :wq to finish):

username      ALL = (ALL) ALL

Makepkg Optimisations

/etc/makepkg.conf

CHOST="i686-pc-linux-gnu"
CFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"

Terminal improvements

Colorise your console prompt (PS1)

From Arch Wiki.

As normal user:

vi~/.bashrc

Change the default prompt to:

PS1='\[\e[0;32m\]\u\[\e[m\] \[\e[1;34m\]\w\[\e[m\] \[\e[m\] \[\e[1;32m\]\$ \[\e[m\]\[\e[1;37m\] '

As root, edit the /root/.bashrc:

vi /root/.bash_profile

Change the default prompt to:

PS1='\[\e[0;31m\]\u\[\e[m\] \[\e[1;34m\]\w\[\e[m\] \[\e[0;31m\]\$ \[\e[m\]\[\e[0;32m\] '

History search

From Arch Wiki.

Add to /etc/inputrc or ~/.inputrc:

"\e[A":history-search-backward
"\e[B":history-search-forward

Shell completion

From Arch Wiki.

pacman -S bash-completion

Add to ~/.bashrc

if [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
fi

Configuration Files

These are the working configuration files from my install.

/etc/hal/fdi/policy/

/etc

/etc/X11