EeePC Tweaks
Asus came out with the EeePC, a small linux compatible 900Mhz laptop. with
a 2GB, 4GB, or 8GB SSD. This page highlights some of the software modifications
that can be done to a linux system, Basically a broad crosssection of performance
tweaks, reducing SSD writes, and how to use this laptop to it's fullest. My
base system is built using the
Linux from Scratch project,
which means the instructions below should be relatively distro independant.
Keep in mind that your distribution may already use some of these tools, and
that these changes would have to be modified to fit what your distribution does.
Kernel:
Untar the madwifi snapshop & linux kernel
patch the linux kernel with the atl2 Wired Ethernet patch
- patch -Np1 -i ../atl2-2.0.4.patch
patch the kernel with the eeepc_ata_piix_fix-1 patch
- patch -Np1 -i ../linux-2.6.25-eeepc_ata_piix_fix-1.patch
patch the linux kernel with the eeepc platform drivers
- patch -Np1 -i ../linux-2.6.25-eeepc_linux-base.patch
- patch -Np1 -i ../linux.2.6.25-eeepc_linux-backlight.patch
- patch -Np1 -i ../linux.2.6.25-eeepc_linux-fan_hwmon.patch
copy and rename the config file to .config, and place in the linux kernel directory
- cp ../config-2.6.25.4-2 .config
run the kernel patch program from within the madwi directory
- cd patch-kernel && ./install.sh ../../linux-2.6.25.4
Compile the linux kernel
- make menuconfig
- make &&
- make modules_install &&
- cp .config /boot/config-2.6.25.4 &&
- cp arch/x86/boot/bzImage /boot/bzImage-2.6.25.4 &&
- cp System.map /boot/System.map-2.6.25.4 &&
Kernel parameters
- video=intelfb: This will use the intelfb code. Note that this will not suspend, if you use this option while you are in the console. Suspending still works from Xorg. I would not recommend using this, unless you also use the grub2 patch below to unlock the 800x480 resolution.
- usbcore.autosuspend=1: This will autosuspend usb devices by default.
- pciehp.pciehp_force=1: This forces the use of the PCIE Hotplug system. This is required for enabling/disabling the wifi through the /proc/acpi/asus/wlan.
Power reduction optimizations
lesswatts.org is a webpage maintained by intel, that
helps to reduce the power usage of computers while idle. Most of the optimizations
listed here were taken from this resource. This is also the home of a utility called
PowerTop, a handy tool that can be used to determine what processes are preventing
linux from staying in the C3 state.
- uhci_hcd: this causes 20 wakeup's a second. If you compile your kernel as a module,
and then blacklist it, You will have the ability to use it when necessary. UHCI is a
USB 1.1 driver, to load any devices not USB 2.0 compliant.
- echo 0 > /sys/class/graphics/fbcon/cursor_blink: This will disable the blinking
cursor in the console. This causes about 20 wakeup's a second when enabled. Note that this
does not cause any wakeup's while Xorg is running.
- echo "vm.dirty_writeback_centisecs=1500" >> /etc/sysctl.conf: This increases the time data can
stay in memory before it is written to the harddrive. Remember that since this is a laptop
with a limited battery life, you will loose whatever information that is still in memory
when the power dies.
- echo "/proc/sys/vm/laptop_mode=5" >> /etc/sysctl.conf: This will enable laptop mode
- mount / -o remount,noatime: This disables noatime support for all files on your
root filesystem. atime is the last time a file is read. This will cause less writes
to your drive (Allowing the SSD to last longer), and free up some IO cycles. This
can be done at boottime, by adding it to your options in /etc/fstab
- echo 0 > /proc/acpi/asus/wlan: This will disable your wireless network device.
When active and connected to a network, madwifi prevents the kernel from entering the C3
state (which allows more datterylife). Simply echo 1 to the above file to reenable
the device.
- CONFIG_SND_HDA_POWER_SAVE=y & CONFIG_SND_HDA_POWER_SAVE_DEFAULT=10: These are
kernel configuration options that will allow your soundcard to suspend itself when it
has not been used for 10 seconds. The above kernel configuration kernel already has
this enabled.
- echo 0 > /proc/acpu/asus/camera: This will disable your USB Camera. (You can
reenable this echo 1 to the above file. The usb camera drastically shortens your
batterylife when enabled.
Enabling support for the hotkeys
The ACPI Daemon is a basic utility that
listens for events from /proc/acpi/event, matches them up with a event from
/etc/acpi/event, and runs the shell script. Each file in the /proc/acpi/event folder
has 2 lines.
event=
action=
Please note that as of 2.6.26-rc1 (or the above patches in my kernel section), the files
in /proc/acpi/asus/ have been moved to /sys/devices/platform/eeepc/.
The following events are the ones that acpid can respond to:
- sleep: Triggerd by Function F1 (Sleep). action=echo mem > /sys/power/state
- hotkey ATKD 00000010: Triggered by Function F2 (Wireless), when wireless is disabled.
action=echo 1 > /sys/devices/platform/eeepc/wlan
- hotkey ATKD 00000011: Triggered by Function F2 (Wireless), when wireless is enabled.
action=echo 0 > /sys/devices/platform/eeepc/wlan
- hotkey ATKD 00000020 to hotkey ATKD 0000002f: Triggered by Function F3 and F4 (Brightness).
The asus acpi module automatically adjusts the brightness, requiring no further effort on
behalf of the user.
- hotkey ATKD 00000030: Triggered by Function F5.
- hotkey ATKD 00000012: Triggered by Function F6 (Taskmgr).
- hotkey ATKD 00000013: Triggered by Function F7 (Mute).
action=amixer -q setMaster toggle
- hotkey ATKD 00000014: Triggered by Function F8 (VolumeDown).
action=amixer -q set Master 1- unmute
- hotkey ATKD 00000015: Triggered by Function F9 (VolumeUp).
action=amixer -q set Master 1+ unmute
- lid: Triggered when the laptop is closed. The asus acpi module automatically dims the screen.
- power: Trigerred when the power button is closed. action=shutdown -t1 -a -h now
- hotkey ATKD 00000050: Triggered when the AC Adapter is plugged in.
- hotkey ATKD 00000051: Triggered when the AC Adapter is unplugged.
800x480 resolution in the console
Getting the 800x480 resolution working in the
console takes some effort. You have to set the kernel to
use (via vga=) one of the modes listed in the videobios.
800x480 is not one of the valid choices.
915resolution
was designed for this purpose, but the intelfb driver only supports
changing the resolution with a VGA monitor. All others have to
select a mode (via the vga= argument) at boottime.
The solution to this is to set the video modes before the kernel
is loaded. I have ported 915resolution to the grub2 bootloader
by converting a few system calls to grub basd calls. The code
still needs some work done to it, but it currently works
Please ensure that you are familiar with grub2 before attempting
to use this software. This will replace your current bootloader,
and the grub2 syntax has changed slightly from grub legacy.
Consult their wiki for more information.
Untar the grub tarball, and apply the patch
- patch -Np1 -i ../grub-1.96-915resolution.patch
Compile and install
- ./configure --prefix=/opt/grub-1.96 &&
- make &&
- make install &&
- /opt/grub-1.96/sbin/grub-install /dev/sda
To use this software, you have to do the following (either in
/boot/grub/grub.cfg, or the grub commandline. See the 915resolution
manual for more information.
- insmod 915resolution
- 915resolution 32 800 480
- 915resolution 34 800 600
- 915resolution 38 1024 768
- 915resolution 3a 1280 1024
- 915resolution 3c 1600 1200
Enabling BootBooster
BootBooster allows a system to start [with a 1/2 second delay] the MBR of the harddrive.
To enable this feature, you must create a partition for it to use, and change the type to 0xEF.
The bios can still be reached by hitting F2 as it starts.
This partition seems to be used to cache the results of the bios post, as well as containing a copy
of the bios & video bios [seen by using strings on the partition]. As far as I can tell, this
partition has nothing to do with Intel's EFI (Especially since it is populated by the bios), and just
reuses the EFI partition id. Thanks to [mbm] on the eeepc freenode irc channel for your help.
The fileformat of this partition appears to be a memory dump (Probably created right after the bios
post has been complete). This memorydump starts at the 0x200 address.
Links:
- EEEUser: a user driven community for discussion & modifications to the EeePC.
Home |
Forum |
Contact Me |
Links
EeePC |
C/C++ |
Java |
PHP|
Web Development
|