News & Commentary: 2008-11-23

ASUS EEEPC701SD and CentOS

So I bought a new laptop when the tax agent saw my old laptop and used the euphemism, "You've got some fully depreciated equipment there." Being a cheapskate, I got the cheapest laptop available, even if the screen is tiny. For $350 I got hold of a 900MHz inteL "Dothan", with tiny keyboard, tiny screen, 512M of RAM, a bunch of USB devices and an SD card-reader tucked in the side.

Of course, I got the Linux version. They had MS-Windows versions of the higher-end EEEPC900 but they ran out of stock on the Linux version of the EEEPC900 and the newer EEEPC901 are outrageously overpriced (for reasons that don't make sense to me, but the market is getting more competitive at the low-end so I'm not worried about where this is going).

Of course, the Mandriva Linux that comes with it is way too annoying, not what I'm used to, not set up the way I wanted and I didn't get to install it. I mean, for people who like it, go for it, don't let me tell anyone what to like and what not to like. Suffice to say, I'm pretty fussy about having everything just the way I want, when it comes to my tools and equipment. So I downloaded Centos 5.2 and figured I wuld give that a go. Here's some tips:

Getting started

The easiest way to boot it up is off a USB device. If you hit the ESC key a few times while it boots up, you get a menu of boot devices and you can tell it what you want. My design was based off a USB hard drive and looked like this: That is enough to get up and into the CentOS installer, with media images so you can load the system. I loaded a basic system, enough to get started. Make sure you add C compilers and stuff because you do need to recompile a newer kernel.

Kernel stuff

The standard CentOS kernel does work on the EEEPC but doesn't work as well as you might like. Quite a few of the chips on this one are new. I figured I might as well jump to the latest kernel.org kernel and used linux-2.6.27.5 which I decided to cut down the the bone in order to tailor it for a lightweight platform like this. The standard CentOS kernel is really designed as a server platform and they try to keep it as general purpose as possible. The ASUS EEEPC is borderline on an embedded platform and the newer Linux kernels have lots of embedded style features available so it makes a lot of sense to use them here. Also it makes a lot of sense to jettison the heavyweight stuff that isn't going to get used. TODO: copy of kernel config

Graphical stuff

I'm a great fan of graphics, where used tastefully and respectfully. I'm not a big fan of window dongles, fancy widgets, stupid borders and all the rest. Normally I use the Ratpoison window manager which is lightweight, fast, easy to learn and very efficient. You can flip windows by name or by number and you can write little scripts to set things up the way you like. No borders, everything is keyboard driven and insanely fast -- that's the way to work.

Just for a change I installed the KDE desktop. Not sure if I like it yet, might go back to Ratpoison at some future stage.

Most important thing! The screen is too small for any normal application (even the KDE setup and config dialogs don't fit into 800x480 screen space). Thus, the only comfortable way to use X11 on an 800x480 screen is to run a virtual screen at 1024x768 and use the touchpad to scoot around. Hey, this scrolls just like the iPod does (only faster) and I'm using 10 year old Linux/XFree86 techonogy to do the job.

If you want the scrolly desktop on CentOS, you must have the i810 video driver. There is a newer "intel" driver, which also works on the EEEPC but can't do virtual desktop scrolling. You also need to modify your xorg.conf file (hey, maybe there's a CentOS system config tool that already does this, I found it faster just to edit the file, use the tool if you feel that's better).

Section "Device"
	Identifier "Videocard0"
	Driver "i810"
EndSection

Section "Screen"
	Identifier "Screen0"
	Device "Videocard0"
	DefaultDepth 16
	SubSection "Display"
		Virtual 1024 768
		Viewport 0 0
		Depth 16
	EndSubSection
EndSection
Also, the depth 16 is better supported by the intel hardware for acceleration (actually, this might also have changed, it used to be true: TODO, put some real test results here).

Ethernet

The wired chip is an Atheros chip. It uses the atl1e driver which reports "AR8121/AR8113 PCI-E Ethernet Network Driver". It is supported natively by the linux kernel 2.6.27.5 but just a little bit tricky because it is listed as a gigabit ethernet (but my laptop will not do any faster than 100M, I think that although the generic family might be gigabit, this one is a bit crippled, good enough for a netbook). You can find the kernel configuration option under "Ethernet (1000 Mbit) --->" directory.

You probably want an ethernet configuration, here's a simple one to go into /etc/sysconfig/network-scripts/ifcfg-eth0 :

DEVICE=eth0
ONBOOT=yes
NAME=eth0
BOOTPROTO=dhcp
If that sounds too complicated, then install the "NetworkManager" package and enable that, it will do the configuration for you, and it does hotplug and all that as well.

Wireless

The wireless runs on a Realtek chip which comes up in the PCI listing as an RTL8199 -- a newish chip. The driver that seems to work lists the official chip name as RTL8187SE which is a bit like an RTL8185 and also a bit like an RTL8187.

TODO: put lspci output here.

This requires a build outside the kernel. Realtek are supplying driver source code, but the base code for this is somewhat old. Meanwhile, the core kernel developers are busy rewriting it all and their code looks substantially different. The mainstream kernel support RTL8187 as a USB device, and RTL8185 as a PCI device. Note that the RTL8187SE is a PCI device and does not work with the standard kernel drivers as of 2.6.27.5 version of the kernel.

TODO: put tar.gz here

It builds with some warnings and also builds its own version of the IEEE helper modules which are required. The install process is somewhat manual, don't use their installer script because it tries to reboot your machine! Just copy over the *.ko files into the suitable /lib/modules directory.

If you use wpa_supplicant, be sure to use the "wext" driver API. The CentOS default is the "prism" driver which totally does not work with the EEEPC chipset, you get ACPI errors and the system starts responding very slow, I'm sure it isn't doing anything good. Don't use the default! You need to edit the file /etc/sysconfig/wpa_supplicant and change the DRIVERS variable to "-Dwext" to have any hope of getting it working.

You also need to put suitable local usernames and passwords into /etc/wpa_supplicant/wpa_supplicant.conf and there is a man page to help explain what goes into that one. Again, switching over to "NetworkManager" might solve some of these problems for you.

Power suspend

Suspend to RAM works very nicely. I never knew it before but there are two types of suspend to RAM. The KDE battery monitor supports detection of the laptop lid being closed and you can make it trigger a standby action. It looks like the KDE desktop setup is designed to trigger this type of suspend:
ACPI: Preparing to enter system sleep state S1
That works, and it is fast, but doesn't save hardly any power. Actually it barely shuts anything down at all. You don't want this one. This is the standby action. Thus, the Klaptop system is OK to display the batter power but seems useless for pretty much anything else.

If you type "echo mem > /sys/power/state" you get a better sort of power saving which shuts it down good. Unfortunately the KDE desktop settings don't seem to have a feature to trigger this "suspend to memory" state. I decided to setup ACPI daemon (and I'm annoyed by the CentOS default settings for this package, because they shut the whole machine down and they clobber your settings every time you upgrade).

ACPI: Preparing to enter system sleep state S3
That's the one you want, it blacks out the display, stops the fan and the CPU goes cold but it wakes up pretty quick.

After not being happy with either acpid nor with the Klaptop KDE system, I wrote a very small C program to handle the lid closing and power suspend.

TODO: put C code here.

Sound

The driver I'm using is the ALSA driver that comes with the Linux kernel. It is called "snd-hda-intel" and you need something like this in /etc/modprobe.conf :
alias snd-card-0 snd-hda-intel options snd-card-0 index=0 options snd-hda-intel index=0 model=asus
I can't find where the table of available models is, the "asus" seems to work for me, but I only get a basic volume control, PCM output and microphone input and that's it. Maybe that's all it is supposed to support... the old laptop had a lot more features in the sound card (admittedly, they were features I never used).

From testing the playback, it sounds good through the builtin speakers. The builtin microphone is fairly poor quality but good enough for a telephone, if you turn up the microphone input volume then it gives heaps of hiss and you can hear the system fan in the recording. The system has 3.5mm jack connections on the side for a headset if you want to buy good quality headphones and microphone. I recommend a headset for most times you want to used the audio.

Camera

There's a builtin camera which is disabled by the BIOS by default. Haven't tried it yet, from reading around it is pretty much a low-res webcam, only designed for video chat and stuff like that. I already have a good camera for actually taking real photos. TODO: do something with the camera.

Serial port

It ain't there, not even in the motherboard. Strangely the "udev" device manager shows the standard four PC style TTY ports but none of them actually work because the hardware is not available. You can use the USB ports with a serial dongle. Sadly, many serial dongles don't emulate serial ports very well which is especially painful when you want to send a BREAK to a Cisco console. Then you need to be sure to have a good serial dongle. When I find one that doesn't suck, I'll make a note here.

Analog phone port

It's blocked out, and I'm told that the wires don't go to anything internally. There is at least a space for a little RJ11 connector in the side which you could potentially use for something else. A pity Asus didn't use this for a motherboard serial port and maybe give a short RS232 adapter cable. Even just pin connections for the adapter cable would be good enough and people can make their own *SIGH*.

SD card reader

It is good. It runs internally to one of the USB hubs and seems to go pretty fast (I mean, fast for a flash card). Linux supports it with the standard usb-storage driver and it will mount up flash based filesystems with no problem. I use a 2G flash card as my /home partition so as not to overly exercise the built-in chips (and I can change /home to a different project if I need to or move it to another machine).

SD cards are nice and cheap considering the space you get (not as cheap as USB pen drives) and the card slot is easy to use on the move (USB pen drives get bashed around on the train).

SD Card whinge

A few times I have had write-errors on the SD card which will make the kernel remount the device as read-only (probably a safe idea). I'm not sure whether to blame the card or the card-reader device. It is sometimes not clear whether the card really is locked in properly so I wonder if there might be some bad contact here.

TODO: figure out how to make the usb-storage make a more serious effort at retrying write errors (like 20 times over or something) before it falls back to read-only mode. That would work around small problems with bad contacts.

Creative Commons License
This work is licensed under a Creative Commons License.

Back to News Commentary Index