Differences between revisions 56 and 57
Revision 56 as of 2008-09-07 17:41:52
Size: 12942
Editor: ?Antti''''''Kaleva
Comment:
Revision 57 as of 2008-09-07 17:43:01
Size: 12944
Editor: ?Antti''''''Kaleva
Comment:
Deletions are marked like this. Additions are marked like this.
Line 92: Line 92:
== Audio == === Audio ===

This is a wiki dedicated to getting Debian to work optimally on the Acer Aspire One

http://www.tommasovitale.it/images/AcerAspireOne.jpg

The ["DebianEeePC"] project also has a fair amount of documentation for getting Debian installed on an Atom processor, this page is devoted however solely to the Acer Aspire One. You can boot and install the debian-installer from lenny and the snapshot images without needing anything from the DebianEeePC project.

About this page

This page is designed to help with installation of Debian GNU/Linux on the Acer Aspire One Netbook.

Prerequisites

There are many ways to install Debian. One way to install Debian on the Acer Aspire One is to use a flash USB drive. You will need a flash USB drive that is 256MB or larger. The below method outlines how to make a flash drive with the installer on it. For other methods of installation please reference the [http://d-i.alioth.debian.org/manual/en.i386/ install guide]. If using another method, just make sure the installer's kernel is 2.6.25 or greater to have support for the ethernet adapter (if needed during the install process).

Preparing the USB flash drive

Get the latest daily built Lenny (testing) [http://people.debian.org/~joeyh/d-i/images/daily/hd-media/ boot.img.gz drive image] and the latest [http://cdimage.debian.org/cdimage/daily-builds/daily/arch-latest/i386/iso-cd/ netinst ISO image]. It is critical that the kernel version in the boot.img.gz image and the net-install ISO are the same! If they are not the same, the installer will not be able to detect your hardware and will fail before it gets anywhere.

Creating a USB flash boot drive

As the [http://d-i.alioth.debian.org/manual/en.i386/apas02.html#howto-getting-images-usb Installation Manual] says: "The easiest way to prepare your USB memory stick is to download hd-media/boot.img.gz, and use "gunzip" to extract the 256 MiB image from that file."

This method limits your drive to 256 MiB but it is simple to get working. You can chose to re-partition your USB flash drive once you are done installing Debian with it. To keep the flash drive in its current size and still have the installer on it, follow the Formatting your drive with additional software for booting directions below.

First, make sure you have a recent backup of your data. Then find the device node of your flash drive; using the wrong node will destroy data on that node. Assuming your flash drive is /dev/sdz, execute this command as root:

# zcat /path/to/boot.img.gz > /dev/sdz

Afterwards, mount the flash drive and copy over the net-install ISO file.

Formatting your drive with additional software for booting

If you want to fully utilize your flash drive with the Debian net-installer, you can loop mount the boot.img.gz first, copy over the files, and then run SYSLINUX (a bootloader) on your flash drive. If your USB flash drive is already partitioned properly for booting, you can skip this next step.

You can format your flash drive to make it bootable (USB-ZIP compatible). This requires the mkdiskimage script included in the SYSLINUX package. The following table shows commands to create the correctly sized partitions for booting from your USB flash drive, found at [http://www.knoppix.net/forum/viewtopic.php?p=111677 this forum post].

Size of drive

mkdiskimage command

1GB or less

# mkdiskimage -4 /dev/sdz 0 64 32

1GB < drive <= 2GB

# mkdiskimage -4 /dev/sdz 0 128 32

2GB < drive <= 8GB

# mkdiskimage -F -4 /dev/sdz 0 255 63

greater than 8GB

# mkdiskimage -F -4 /dev/sdz 1 255 63?BR# dd if=/dev/zero of=/dev/sdz bs=1 seek=446 count=64?BR# echo -e ',0\n,0\n,0\n,,C,*' | sfdisk /dev/sdz?BR# mkdosfs /dev/sdz4

Next copy over the contents of the boot.img.gz into a directory on your newly formatted USB flash drive;

 # gunzip boot.img.gz; mkdir /mnt/loopback; mount -o loop boot.img /mnt/loopback;
 # mkdir /mnt/usb; mount /dev/sdz4 /mnt/usb; mkdir /mnt/usb/debian_installer;
 # cp -r /mnt/loopback/* /mnt/usb/debian_installer
 # cp debian-XXX-netinstall.iso /mnt/usb
 # umount /mnt/usb; umount /mnt/loopback

Install SYSLINUX on the partition and subdirectory that contain the contents of boot.img:

 # syslinux -d debian_installer /dev/sdz4

If you rename/move/modify this debian_installer directory you will need to run "syslinux" again afterwards or it will not boot.

Install

Reboot your Aspire One with the USB stick in one of its USB sockets. When you see the BIOS screen, hit F12 to select the USB stick as the boot device. This will cause the Aspire One to boot the Debian installer from the USB stick.

When presented with the boot menu, you may need to pass "noacpi" to the kernel to get the Ethernet card to work.

After this, installation should proceed as normal; the installer will load the net-install ISO image's installer components and will continue the net-install procedure. Note that you will need a wired connection, as WiFi will not work in the installer.

Setup

Almost everything should work out of the box once installation finishes. However, the wireless card needs extra attention; it is based on a AR5007 chipset, which requires an updated driver. The status of support for the AR5007 chipset is tracked at [http://madwifi.org/ticket/1192]. The updated driver can be obtained from the madwifi-source package in Lenny or directly from ?MadWiFi svn.

WiFi via Module Assistant

Make sure you have a non-free and a contrib stanza in /etc/apt/sources.list and then as root:

# apt-get update
# apt-get install build-essential module-assistant madwifi-source
# m-a prepare
# m-a auto-install madwifi

WiFi from Source

Make sure to have build-essential and the relevant kernel headers installed, and follow the instructions at [http://madwifi.org/wiki/UserDocs/FirstTimeHowTo], with reference to the information in [http://madwifi.org/ticket/1192].

Webcam

Another piece of hardware that may not work after installation is the webcam. For this, you will need the uvcvideo driver. Simply checkout the latest revision of uvcvideo from svn://svn.berlios.de/linux-uvc/linux-uvc/trunk, and build it from source. (Note, again, the source package included in testing works.).

Frequency scaling

Frequency scaling is supported via the acpi-cpufreq module. Loading this module will allow you to scale between 800 MHz and 1.6 GHz.

This module should be enabled on the default install.

Screen resolution

The highest video mode available from the video bios is 800x600x32. To get a fairly reasonable framebuffer for your virtual terminals pass "vga=8" to the kernel. This will give you a framebuffer of 800x600x16.

When running under X, the native/optimum resolution is 1024x600 (standard widescreen ratio). The default X11 configuration will give you fonts that are too large for this resolution - You can add the following line to the "Monitor" section of your "/etc/X11/xorg.conf" file:

 DisplaySize  195 113 

That sets the resolution to the correct 96 DPI.

Card reader

The card reader is hidden for some reason; As a workaround to unhide it on boot, add "setpci -d 197b:2381 AE=47" to your rc.local script. A script to poll the card reader for card and power events (AC unplugged, etc.) is included on the recovery DVD shipped with the machine within the "hdc1._.tar.bz2" archive as /usr/sbin/jmb38x_d3e.sh.

Audio

In order to get audio working in Lenny, you must retrieve ALSA source package (alsa-source_1.0.17.dfsg-2) from unstable (sid) repository because 1.0.16 (timer.c) fails to compile on Lenny. After adding unstable repository to /etc/apt/sources.list you can continue to build and install ALSA. Instructions below are borrowed from Ubuntu Install guide and are confirmed to work with kernel 2.6.26-1.

# apt-get install module-assistant
# m-a update
# m-a prepare
# m-a a-i alsa
# alsa force-unload
# depmod -ae
# modprobe snd-hda-intel

NOTE: You may need to run "m-a a-i alsa" twice in order to build the modules successfully.

After completion, add the required module to /etc/modules

 snd-hda-intel 

After reboot you should have functional sound. Remember to comment out unstable repository from apt's sources.list. See Ubuntu Install guide for further configurations with snd-hda-intel module.

Troubleshooting

Since these instructions involve using the latest available net-install ISO image and the latest USB installer image, you may encounter some difficulties.

One such difficulty the author experienced was that the USB stick image did not have the nls_utf8 kernel module available, preventing the installer from mounting the ISO image. The "fix" was to grab the nls_utf8 kernel module from a working Debian system with the same kernel version, put it on the USB stick, execute a shell from the installer, and insert the nls_utf8 module manually before continuing.

The Aspire One has a ?RealTek RTL8101E Fast Ethernet controller, which uses the r8169 driver in kernels after 2.6.23. Earlier kernels (i.e. 2.6.18) will detect the card and you will see an eth0 device, but it will not be usable. The author used the driver that shipped with Debian's 2.6.25-2-486 kernel image without any problems after passing "noacpi" to the kernel at boot time. (Note, I haven't needed "noacpi" on my Acer One at all, so it is probably not necessary). With the kernel version that will likely appear in Lenny (2.6.26-1), no special options needed to be passed - the network card got detected and worked just fine.

This is likely a bug in the Aspire One's hardware/firmware, but at the time of this writing it does not detect an SD card insertion in either of the card slots. However, rebooting the computer with the card inserted will cause it to be detected (as /dev/mmcblk0). (The hardware requires a script to poll it; see above.)

Kernel versions lower than 2.6.25 cause modprobe to stall on boot, and the boot process will seem to hang. Waiting and pressing Ctrl-C a few times will allow the machine to boot. Once it's running you should update the kernel.

Also note, that on some stages (e.g., hardware detection) the system may seem to be hanging: try detaching eth cable from ?AcerOne. Note that with 2.6.26 no lockups have been observed.

Tips and Tricks

Reducing Disk Access

The SSD on the Aspire is somewhat slow (the author recorded a peak 28.8 MB/s read time with O_DIRECT and 7.0 MB/s write time). Consequently, you may want take extra measures to minimize disk I/O.

If you are using ext3 as your filesystem, you may want to add "noatime" and "nodiratime" to the options section of /etc/fstab. This will turn off timestamps on your files, but it will noticeably decrease the number of I/O ops.

Another trick is to mount /var/cache, /var/lock, /var/log, /var/run, /var/mail, /var/spool, /var/lock, /var/tmp, and /tmp on one or more ramdisks. Here are the steps to do this:

  1. Add this line to your /etc/fstab:

none /tmp tmpfs defaults 0 0
  1. Make directory /var/volatile
  2. Mount /var/volatile as a tmpfs volume (the command is "mount -t tmpfs none /var/volatile")
  3. Move /var/cache/apt to /var/apt. This way, /var/apt will not take up RAM (because it can become large when installing software).
  4. Move the cache, lock, log, run, mail, spool, and lock directories to /var/volatile.
  5. Symlink those directories in /var/volatile to their counterparts in /var. Now any I/O ops to files in these directories will happen on the ramdisk mounted on /var/volatile transparently.
  6. Optional: Put this script in /etc/rcS.d/S36setup-volatile.sh:

error() {
  echo $1; exit 1
}

echo "Setting up /var/volatile..."
mount -t tmpfs none /var/volatile || error "Could not mount /var/volatile!!!"
for i in cache local lock log mail run spool; do mkdir -p /var/volatile/$i
done
ln -s /var/apt /var/volatile/cache/apt
exit 0
  1. Enjoy a faster system!

Faster Compiz

Using the below option in the Device section improves compiz performance about x2.

        Option "AccelMethod" "xaa"

and this in your /etc/profile

export INTEL_BATCH=1

Quiet Fan

[http://wiki.aspireone.net/index.php/How_to_hack_the_noisy_fan Here] is a ?HowTo guide on setting up a daemon script that will turn on/off your fan dependent on the temperature.

Other distributions

Where to buy

AOA110-1295 - [http://www.newegg.com/Product/Product.aspx?Item=N82E16834115489]