Table of Contents

AspireOne110L + Ubuntu 9.10 Karmic Koala

Summary

Many parts copied from https://help.ubuntu.com/community/AspireOne110L

Fan Control

The fan can be turned off most of the time. However, the netbook will not do this on its own. It can be achieved by compiling the acerhdf kernel module.

Compile: cd acerhdf_kmod && make
Install: make install
Load: modprobe acerhdf

In order to make the kernel load this module automatically the next time the netbook is switched on, add acerhdf to the file /etc/modules.

Add the following line to /etc/rc.local

echo -n "enabled" > /sys/class/thermal/thermal_zone0/mode

:!: upgrading to a more recent bios version might be necessary :!:

The current temperature can be accessed by:

cat /sys/class/thermal/thermal_zone0/temp

The fan can be monitored via:

cat /sys/class/thermal/thermal_zone0/cdev0/cur_state

Reduce SSD Wear

File System

Some people prefer EXT2 as the main file system, as it does not require a journal. However, EXT4 can be forced to store only metadata in the journal using the writeback mode. From my experience, the netbook is a lot faster with EXT4 compared to EXT2. The read and write operations take less time. As long as the SSD is writing large amounts of data, the whole netbook becomes quite unresponsive. Therefore speeding up these operations is very important.
The writeback mode cannot be activated during the installation process, this has do be done afterwards.

/etc/fstab

UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx       /       ext4   noatime,barrier=0,data=writeback,nobh,commit=100       0       1

Move logs and other temporary files to RAM

/etc/fstab

tmpfs   /var/log        tmpfs   defaults        0       0
tmpfs   /tmp            tmpfs   defaults        0       0
tmpfs   /var/tmp        tmpfs   defaults        0       0

/etc/rc.local

# create directories (tmpfs)
for dir in apparmor apt cups dist-upgrade fsck gdm installer samba unattended-upgrades ; do
        if [ ! -e /var/log/$dir ] ; then
                mkdir /var/log/$dir
        fi
done

Discourage Swapping

512MB RAM is not very much, hence swapping is sometimes inevitable. The vm.swappiness parameter tells the kernel if it is a good a idea to use the swap partition or not. A value of zero would disable swapping entirely, which can be done if the extra RAM slot is used. The maximum value is 100.
/etc/sysctl.d/60-aspireone.conf

###################################################################
# Settings for the Acer Aspire One
#
# Discourage Swapping
vm.swappiness = 10
# As suggested by PowerTOP
vm.dirty_writeback_centisecs = 1500
# Suggested by https://help.ubuntu.com/community/AspireOne
vm.vfs_cache_pressure = 0
vm.dirty_ratio = 20
vm.dirty_background_ratio = 10
vm.laptop_mode = 5

Utilize SD card

The swap partition can be moved to a SD card. Create appropriate partition and get UUID:
/etc/fstab

UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx       none    swap    sw      0       0

Move home to SD card

''/etc/fstab''
UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx       /home   ext2    noatime 0       0

DO NOT USE SUSPEND / HIBERNATE WHILE A CARD IS INSERTED - PARTITION TABLE WILL BE DAMAGED

WLAN

ath5k Module

The wireless LAN seems to work quite well with the ath5k module. In some cases, adding the following lines to /etc/modprobe.d/blacklist.conf can help:

blacklist ath_pci
blacklist ath_hal
blacklist acer_wmi

and install linux-backports-modules-karmic

Hardware Switch

Based on How to enable wireless card, with RFKILL support

Create the file /usr/local/bin/wirelessonoff.sh and make it executable with chmod +x

#!/bin/sh
if lsmod | grep ath5k > /dev/null; then
        modprobe -r -f ath5k
        notify-send --icon=/usr/share/icons/Humanity/actions/48/gtk-cancel.svg Wireless deactivated
else
        modprobe ath5k
        notify-send --icon=/usr/share/icons/Humanity/actions/48/gtk-apply.svg Wireless activated
        sleep 2
        ifconfig wlan0 up
fi
exit 0

The user has to be able to call this script, therefore a sudo rule has to added:

sudo visudo

This will open an editor. Go to the line

# Cmnd alias specification

Below it add this one:

Cmnd_Alias      WLTOGGLE=/usr/local/bin/wirelessonoff.sh

Now go to the end of file and add this line:

%admin ALL=(ALL) NOPASSWD: WLTOGGLE

Exit (CTRL+x) and save the file. This way, all the users in admin group can run the WLTOGGLE command (and ONLY this command) with no need for the password.

Configure XF86WLAN key:

gconftool-2 -s --type string /apps/metacity/keybinding_commands/command_2 'sudo /usr/local/bin/wirelessonoff.sh'
gconftool-2 -s --type string /apps/metacity/global_keybindings/run_command_2 XF86WLAN

SD Card Readers

Add pciehp to /etc/modules

Add “pciehp.pciehp_force=1 pciehp.pciehp_poll_mode=1” to “GRUB_CMDLINE_LINUX_DEFAULT” in /etc/default/grub.

Call update-grub

Bootup Speed

Add “elevator=noop enable_mtrr_cleanup” to “GRUB_CMDLINE_LINUX_DEFAULT” in /etc/default/grub.

Call update-grub

Speed up Firefox

Go to about:config and set “browser.cache.disk.enable” to “false”. This will disable all disk caching, but will still cache to RAM. You may also wish to decrease the cache size (browser.cache.disk.capacity) to a lower value to reduce memory usage over time.

Firefox tends to stall, halt or freeze for a few seconds while browsing. This is a result of Firefox writing indices that can grow to an impractical size. Limiting the size will result in increased performance.

Recommended AddOns:

Misc

Get UUID of a drive

$ blkid /dev/sda1
/dev/sda1: LABEL="/" UUID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" TYPE="ext4"

or

$ ls -l /dev/disk/by-uuid
lrwxrwxrwx 1 root root 10 2009-12-21 12:11 xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -> ../../sda1

Reduce Power Consumption

/etc/rc.local

# decrease power usage of usb while idle
[ -w /sys/bus/devices/1-5/power/level ] && echo auto > /sys/bus/devices/1-5/power/level
[ -w /sys/bus/devices/5-5/power/level ] && echo auto > /sys/bus/devices/5-5/power/level

# disable wake on lan
ethtool -s eth0 wol d

# linpus stuff
echo 1 > /sys/devices/system/cpu/sched_smt_power_savings