Debian on Asus Eee PC 1001P

I’m now running Debian 6.0 Squeeze on the Asus Eee PC 1001P.  It’s a reasonably easy job to set it up with just a few things different from a normal desktop or server install.  Here’s a brief guide.  It’s not a comprehensive install guide but offers some useful links & pertinent information specific to the Eee PC 1001P (and similar models).

Useful Link: http://wiki.debian.org/DebianEeePC/HowTo/InstallUsingStandardInstaller

Read it!

Install:

Installer: debian-6.0.0-amd64-xfce+lxde-CD-1.iso

As described in the wiki page linked above I used dd to make a bootable USB flash drive.  I installed Debian in the usual way.  Prior to installing Debian I used GParted to shrink the Windows partition down to 20GB and delete the extra Windows DATA partiton (D: in MS speak).  I retained the small (49MB) partition which is used by Asus’ Boot Booster as this facility works equally well regardless of OS as it caches POST data.  I also retained the recovery partition (accessed via F9 on powering up).  If you find Windows and/or the recovery partition are not added to GRUB automatically during the install then as root run `update-grub` and it will get sorted out (os-prober runs and detects them and they get added to GRUB).

All the hardware is supported and no non-free firmware or driver is required.  To ensure the screen backlight functions as expected you need to edit /etc/default/grub and add

GRUB_CMDLINE_LINUX=”acpi_osi=”Linux” acpi_backlight=vendor”

The above should all be on one line with a space between x” and acpi_backlight.

Now run `update-grub` and reboot.  The above will not be needed in newer kernels, in fact it may cause problems, but for the 2.6.32 Squeeze kernel it is required.

What you now need is some help to take advantage of that supported hardware.  The help comes in the form of the Debian package eeepc-acpi-scripts so install that, read the package docs example and make any changes you prefer to /etc/default/eeepc-acpi-scripts

Asus Super Hybrid Engine:

The S.H.E. works alongside CPU frequency scaling (which automatically works as expected), not as a replacement.  It has three settings.  On Power Save it underclocks/undervolts the hardware and saves more power than CPU frequency scaling alone.  Next setting is automatic and the third setting is Maximum Performance.  I edited /etc/default/eeepc-acpi-scripts so that I always have max power savings on battery and max performance on mains power.

PWR_CLOCK_AC=0
PWR_CLOCK_BATTERY=2
DEFAULT_SHENGINE_CONFIG=auto

You can check the status of the S.H.E. with `cat /sys/devices/platform/eeepc/cpufv` so I made an alias in my ~/.bashrc

alias she=’cat /sys/devices/platform/eeepc/cpufv’

It returns 0x300 for max power, 0x301 for auto, 0x302 for power saving mode.

Clicking Disk

Also install laptop-mode-tools and hdparm and you can fix that annoying clicking from the disk and save some power as well.  The clicking is the disk heads parking and unparking and it is bad news – the manufacturers achieve extra power saving at the expense of disk lifespan.  Search the www for ‘load cycle disk’ for more info.  If you like you can use smart tools to get the load cycle count values for your disk and you will indeed see that your disk is apparently killing itself (perhaps) to achieve an extra few minutes of battery life.  The issue is with the disk firmware, not the OS, and is identical on the pre-installed Windows XP Home.  According to docs* from the disk manufacturers this behaviour isn’t killing the disks but lots of people seem doubtful.  Personally I just can’t stand the constant clicking…..

How to Fix(?) it:

After installing hdparm you can, as root, run `hdparm -B 254 /dev/sda` which takes the disk from aggressive power saving to a low setting that still saves power but doesn’t continually park and unpark the disk.  So that the setting survives suspend/hibernate and resume you need to also edit /etc/hdparm.conf and add:

command_line {
hdparm -q -B 254 /dev/sda
}

Now create the file /etc/pm/sleep.d/50_hdparm-pm and make it executable.  Its content should be:

#!/bin/sh
if [ -n “$1” ] && ([ “$1” = “resume” ] || [ “$1” = “thaw” ]); then
hdparm -B 254 /dev/sda > /dev/null
fi

Laptop Mode

After installing laptop-mode-tools you can edit /etc/laptop-mode/laptop-mode.conf   You really should read through it before making any changes and only make changes you’re confident you want.  Anyway an obvious one to enable is auto-modules

ENABLE_AUTO_MODULES=1

The rest is up to you; read carefully and if in doubt don’t do it.

Synaptics Touchpad

The hardware supports Multi Touch but the Xorg driver doesn’t.  You can emulate some of the Multi Touch features really nicely but not all.  If you enable two and three finger scrolling you’ll find the cursor going crazy any time there is more than one touch.  It’s not worth the bother.  I tried with newer kernels including 2.6.37 and the latest release candidate for 2.6.38.  2.6.38 is the first kernel that has full Multi Touch support, though some people have erroneously claimed this for older kernels.  I suspect they didn’t differentiate between emulation and a fully working driver.  Anyway, you can get the touchpad working perfectly in 2.6.38 but you run into issues with the Super Hybrid Engine and disk controller in newer kernels.  Having problems with a disk controller or with a mechanism that under and overvolts your hardware can get expensive….I’ve settled for accepting a laptop and touchpad running a 2.6.32 kernel that works perfectly but uses traditional edge scrolling. Tapping is disabled by default in Squeeze so I re-enabled it.  Here’s my working /etc/X11/xorg.conf

Section “InputClass”
MatchIsTouchpad “true”
Identifier “Touchpad”
Driver “synaptics”
MatchDevicePath “/dev/input/event*”
Option     “TapButton1”            “1”    # enables tapping
Option     “LBCornerButton”        “8”     # browser “back” btn
Option     “RBCornerButton”        “9”     # browser “forward” btn
Option     “RTCornerButton”    “3”    # rightclick
Option     “LTCornerButton”    “2”    # middleclick
Option     “PressureMotionMinZ”    “20”
Option     “VertEdgeScroll”    “1”
Option     “HorizEdgeScroll”    “1”
Option     “EdgeMotionUseAlways”    “1”
EndSection

As you can see I have horizontal and vertical edge scrolling, tapping,  right and middle clicking and browser back and forward buttons. The “browser” back and forward buttons are useful in the file manager as well.  Overall this is really good and while I’d prefer true Multi Touch it’s not a big deal.  I find the touchpad to be too small to make circular scrolling reliable but if you have dainty fingers it might be worth trying.  Add

Option          “CircularScrolling”     “1”

Audio:

A lot of people find the Eee PC’s output too quiet, and I agree.  I installed pulseaudio so I can have a little more control.  There are lots of places to read about pulse audio and a good place to start for Debian users would be http://forums.debian.net/viewtopic.php?t=12497

If you’re an MPlayer user you can make life better with a sensible ~/.mplayer/config.  I use mplayer-nogui from debian-multimedia and my ~/.mplayer/config enables on the fly volume normalisation for video soundtracks:

# Write your default config options here!
# Global Options
lirc=no
joystick=no
vo=xv
ao=pulse
use-filename-title=yes
ontop=yes
menu=yes

[extension.mkv]
font=~/.mplayer/subfont.ttf
subfont-text-scale=2
subfont-osd-scale=2
stop-xscreensaver=yes
vf=screenshot
cache=4096
cache-min=10
af=volnorm=2

[extension.mp4]
font=~/.mplayer/subfont.ttf
subfont-text-scale=2
subfont-osd-scale=2
stop-xscreensaver=yes
vf=screenshot
cache=4096
cache-min=10
af=volnorm=2

and so on

The cache settings are to assist smooth playback of movies on samba or sshfs shares over wifi.

For audio file types I don’t use normalisation because my audio files and player are already using replay gain.  I just give the volume an ugly boost for the Eee PC

[extension.ogg]
af=volume=2

[extension.mp3]
af=volume=2

Horrible, but it works.

Miscellaneous:

When you install from a USB stick the installer erroneously adds that USB stick to /etc/fstab as though it’s a CD drive.  You’ll see the line which starts

/dev/sdb1       /media/cdrom0   udf,iso9660

This unwanted /dev/sdb1 prevents removable media from mounting.  Edit /etc/fstab and remove that line.

Adobe Flash:

It seems there’s no escape so it’s on there as Lightspark and Gnash aren’t compatible with BBC iPlayer.  But like Steve Jobs keeps telling the world, Flash sucks and kills your battery and crashes your browser.  UK based iPlayer addicts can use get_iplayer instead and download and stream iplayer content, both live and listen/watch again.  Use the get_iplayer from http://www.infradead.org/get_iplayer/html/get_iplayer.html in preference to the repo version because there are vital improvements and fixes.  rtmpdump from Debian repos is fine.  For youtube try youtube-dl or one of the graphical front ends.  Just about anything you do on the Eee PC is less power draining than streaming flash video so for me it’s used only as  last resort; downloading and playing with mplayer, or streaming to mplayer with get_iplayer, is a massively better experience both for battery life and for control of image size and for smooth playback.

The following script can be made executable and placed in your path.  As long as you have youtube-dl and mplayer installed then it will pass any youtube video to mplayer for playback:

#!/bin/sh
# Public domain
# Author: roman [] tsisyk.com
COOKIE_FILE=/var/tmp/youtube-dl-cookies.txt
mplayer -v -cache 4096 -cache-min 10 -cookies \
-cookies-file ${COOKIE_FILE} $(youtube-dl \
-f 18 -g –cookies ${COOKIE_FILE} $*)

 

Any other configurations relate to the desktop environment so I’ll not go into them.  Using Xfce I have all the special function buttons working as desired on what has become a small, capable, snappy, highly portable facsimile of my home desktop. The battery lasts all day and it can even play back 720p video easily.  Best of all it was very, very cheap 🙂  This is now an end of line product so watch out for amazing deals on refurbs, returns and items with damaged or missing packaging.   I got mine as a return from Amazon, boxed and as new, and it cost only about 60% of the usual second hand price.  If buying used/refurb/returned you can, on receiving the laptop, use smartctl to see how many hours the disk has actually been powered up.  It’s reassuring to have the data that confirms your trust in the seller.

 

 

* http://www.hitachigst.com/tech/techlib.nsf/techdocs/9076679E3EE4003E86256FAB005825FB/$file/LoadUnload_white_paper_FINAL.pdf

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: