Debian on the Eee PC 1001P (and similar)

Share your wisdom. Not for support questions!

Moderator: How-to Curator

Debian on the Eee PC 1001P (and similar)

Postby julian67 » September 10th, 2011, 9:39 pm

This howto is for Debian Squeeze. It shouldn't be used for older versions of Debian.

This howto isn't an install guide as the standard Squeeze amd64 installer does a fairly decent job of getting your Eee PC useable, and there is plenty on the Debian Wiki about Eee PC. Don't make the mistake of thinking info for different series of Eee PC will work for yours, or that info for Lenny still applies for Squeeze or newer. The Squeeze installer works very well on the Eee PC and makes some Eec specific stuff on the wiki, and much elsewhere on the www, redundant. This is a summary of the post-install stuff you need to do to get everything really polished and nice to use after installing Squeeze. It shouldn't matter which desktop environment or window manager you use.

There are a few Eee PC models which only differ cosmetically, or are extremely similar, such as other 1001 models and the 1005 series. Here is the output of lshw so you can check what's what:
Code: Select all
eeepc
    description: Notebook
    product: 1001P
    vendor: ASUSTeK Computer INC.
    version: x.x
    serial: A2OAAS367778
    width: 64 bits
    capabilities: smbios-2.6 dmi-2.6 vsyscall64 vsyscall32
    configuration: boot=normal chassis=notebook uuid=80105F6C-0A8D-4681-2E6E-485B390C7B73
  *-core
       description: Motherboard
       product: 1005P
       vendor: ASUSTeK Computer INC.
       physical id: 0
       version: x.xx
       serial: EeePC-0123456789
       slot: To Be Filled By O.E.M.
     *-firmware
          description: BIOS
          vendor: American Megatrends Inc.
          physical id: 0
          version: 1202 (06/23/2010)
          size: 64KiB
          capacity: 448KiB
          capabilities: isa pci pnp apm upgrade shadowing escd cdboot bootselect socketedrom edd int13floppy1200 int13floppy720 int13floppy2880 int5printscreen int9keyboard int14serial int17printer int10video acpi usb ls120boot zipboot biosbootspecification
     *-cpu
          description: CPU
          product: Intel(R) Atom(TM) CPU N450   @ 1.66GHz
          vendor: Intel Corp.
          physical id: 4
          bus info: cpu@0
          version: Intel(R) Atom(TM) CPU N450   @ 1.66GHz
          serial: To Be Filled By O.E.M.
          slot: CPU 1
          size: 1667MHz
          capacity: 1667MHz
          width: 64 bits
          clock: 167MHz
          capabilities: fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx x86-64 constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm movbe lahf_lm cpufreq
        *-cache:0
             description: L1 cache
             physical id: 5
             slot: L1-Cache
             size: 24KiB
             capacity: 24KiB
             capabilities: internal write-back data
        *-cache:1
             description: L2 cache
             physical id: 6
             slot: L2-Cache
             size: 512KiB
             capacity: 512KiB
             capabilities: internal write-back unified
     *-memory
          description: System Memory
          physical id: 15
          slot: System board or motherboard
          size: 1GiB
        *-bank:0
             description: DIMM DDR2 Synchronous 667 MHz (1.5 ns)
             product: ModulePartNumber00
             vendor: Manufacturer00
             physical id: 0
             serial: SerNum00
             slot: DIMM0
             size: 1GiB
             width: 64 bits
             clock: 667MHz (1.5ns)
        *-bank:1
             description: DIMM [empty]
             product: ModulePartNumber01
             vendor: Manufacturer01
             physical id: 1
             serial: SerNum01
             slot: DIMM1
     *-pci
          description: Host bridge
          product: N10 Family DMI Bridge
          vendor: Intel Corporation
          physical id: 100
          bus info: pci@0000:00:00.0
          version: 00
          width: 32 bits
          clock: 33MHz
          configuration: driver=agpgart-intel
          resources: irq:0
        *-display:0
             description: VGA compatible controller
             product: N10 Family Integrated Graphics Controller
             vendor: Intel Corporation
             physical id: 2
             bus info: pci@0000:00:02.0
             version: 00
             width: 32 bits
             clock: 33MHz
             capabilities: msi pm vga_controller bus_master cap_list rom
             configuration: driver=i915 latency=0
             resources: irq:28 memory:f7e00000-f7e7ffff ioport:dc00(size=8) memory:d0000000-dfffffff(prefetchable) memory:f7d00000-f7dfffff
        *-display:1 UNCLAIMED
             description: Display controller
             product: N10 Family Integrated Graphics Controller
             vendor: Intel Corporation
             physical id: 2.1
             bus info: pci@0000:00:02.1
             version: 00
             width: 32 bits
             clock: 33MHz
             capabilities: pm bus_master cap_list
             configuration: latency=0
             resources: memory:f7e80000-f7efffff
        *-multimedia
             description: Audio device
             product: N10/ICH 7 Family High Definition Audio Controller
             vendor: Intel Corporation
             physical id: 1b
             bus info: pci@0000:00:1b.0
             version: 02
             width: 64 bits
             clock: 33MHz
             capabilities: pm msi pciexpress bus_master cap_list
             configuration: driver=HDA Intel latency=0
             resources: irq:22 memory:f7cf8000-f7cfbfff
        *-pci:0
             description: PCI bridge
             product: N10/ICH 7 Family PCI Express Port 1
             vendor: Intel Corporation
             physical id: 1c
             bus info: pci@0000:00:1c.0
             version: 02
             width: 32 bits
             clock: 33MHz
             capabilities: pci pciexpress msi pm normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:24 ioport:1000(size=4096) memory:40000000-401fffff memory:40200000-403fffff(prefetchable)
        *-pci:1
             description: PCI bridge
             product: N10/ICH 7 Family PCI Express Port 2
             vendor: Intel Corporation
             physical id: 1c.1
             bus info: pci@0000:00:1c.1
             version: 02
             width: 32 bits
             clock: 33MHz
             capabilities: pci pciexpress msi pm normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:25 ioport:2000(size=4096) memory:f8000000-fbffffff ioport:f0000000(size=117440512)
           *-network
                description: Wireless interface
                product: AR2427 Wireless Network Adapter (PCI-Express)
                vendor: Atheros Communications Inc.
                physical id: 0
                bus info: pci@0000:02:00.0
                logical name: wlan0
                version: 01
                serial: 00:25:d3:e7:79:ed
                width: 64 bits
                clock: 33MHz
                capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
                configuration: broadcast=yes driver=ath9k ip=192.168.1.9 latency=0 multicast=yes wireless=IEEE 802.11bg
                resources: irq:17 memory:f8000000-f800ffff
        *-pci:2
             description: PCI bridge
             product: N10/ICH 7 Family PCI Express Port 4
             vendor: Intel Corporation
             physical id: 1c.3
             bus info: pci@0000:00:1c.3
             version: 02
             width: 32 bits
             clock: 33MHz
             capabilities: pci pciexpress msi pm normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:26 ioport:e000(size=4096) memory:f7f00000-f7ffffff memory:40400000-405fffff(prefetchable)
           *-network
                description: Ethernet interface
                product: AR8132 Fast Ethernet
                vendor: Atheros Communications
                physical id: 0
                bus info: pci@0000:01:00.0
                logical name: eth0
                version: c0
                serial: 48:5b:39:0c:7b:73
                size: 100MB/s
                capacity: 100MB/s
                width: 64 bits
                clock: 33MHz
                capabilities: pm msi pciexpress vpd bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd autonegotiation
                configuration: autonegotiation=on broadcast=yes driver=atl1c driverversion=1.0.0.2-NAPI duplex=full firmware=N/A ip=192.168.1.10 latency=0 link=yes multicast=yes port=twisted pair speed=100MB/s
                resources: irq:29 memory:f7fc0000-f7ffffff ioport:ec00(size=128)
        *-usb:0
             description: USB Controller
             product: N10/ICH 7 Family USB UHCI Controller #1
             vendor: Intel Corporation
             physical id: 1d
             bus info: pci@0000:00:1d.0
             version: 02
             width: 32 bits
             clock: 33MHz
             capabilities: uhci bus_master
             configuration: driver=uhci_hcd latency=0
             resources: irq:23 ioport:d400(size=32)
        *-usb:1
             description: USB Controller
             product: N10/ICH 7 Family USB UHCI Controller #2
             vendor: Intel Corporation
             physical id: 1d.1
             bus info: pci@0000:00:1d.1
             version: 02
             width: 32 bits
             clock: 33MHz
             capabilities: uhci bus_master
             configuration: driver=uhci_hcd latency=0
             resources: irq:19 ioport:d480(size=32)
        *-usb:2
             description: USB Controller
             product: N10/ICH 7 Family USB UHCI Controller #3
             vendor: Intel Corporation
             physical id: 1d.2
             bus info: pci@0000:00:1d.2
             version: 02
             width: 32 bits
             clock: 33MHz
             capabilities: uhci bus_master
             configuration: driver=uhci_hcd latency=0
             resources: irq:18 ioport:d800(size=32)
        *-usb:3
             description: USB Controller
             product: N10/ICH 7 Family USB UHCI Controller #4
             vendor: Intel Corporation
             physical id: 1d.3
             bus info: pci@0000:00:1d.3
             version: 02
             width: 32 bits
             clock: 33MHz
             capabilities: uhci bus_master
             configuration: driver=uhci_hcd latency=0
             resources: irq:16 ioport:d880(size=32)
        *-usb:4
             description: USB Controller
             product: N10/ICH 7 Family USB2 EHCI Controller
             vendor: Intel Corporation
             physical id: 1d.7
             bus info: pci@0000:00:1d.7
             version: 02
             width: 32 bits
             clock: 33MHz
             capabilities: pm debug ehci bus_master cap_list
             configuration: driver=ehci_hcd latency=0
             resources: irq:23 memory:f7cf7c00-f7cf7fff
        *-pci:3
             description: PCI bridge
             product: 82801 Mobile PCI Bridge
             vendor: Intel Corporation
             physical id: 1e
             bus info: pci@0000:00:1e.0
             version: e2
             width: 32 bits
             clock: 33MHz
             capabilities: pci subtractive_decode bus_master cap_list
        *-isa
             description: ISA bridge
             product: NM10 Family LPC Controller
             vendor: Intel Corporation
             physical id: 1f
             bus info: pci@0000:00:1f.0
             version: 02
             width: 32 bits
             clock: 33MHz
             capabilities: isa bus_master cap_list
             configuration: latency=0
        *-storage
             description: SATA controller
             product: N10/ICH7 Family SATA AHCI Controller
             vendor: Intel Corporation
             physical id: 1f.2
             bus info: pci@0000:00:1f.2
             logical name: scsi0
             version: 02
             width: 32 bits
             clock: 66MHz
             capabilities: storage msi pm ahci_1.0 bus_master cap_list emulated
             configuration: driver=ahci latency=0
             resources: irq:27 ioport:d080(size=8) ioport:d000(size=4) ioport:cc00(size=8) ioport:c880(size=4) ioport:c800(size=32) memory:f7cf7800-f7cf7bff
           *-disk
                description: ATA Disk
                product: ST9160301AS
                vendor: Seagate
                physical id: 0.0.0
                bus info: scsi@0:0.0.0
                logical name: /dev/sda
                version: 0001
                serial: 5XT0SKCK
                size: 149GiB (160GB)
                capabilities: partitioned partitioned:dos
                configuration: ansiversion=5 signature=eda8a937
              *-volume:0
                   description: Windows NTFS volume
                   physical id: 1
                   bus info: scsi@0:0.0.0,1
                   logical name: /dev/sda1
                   logical name: /windows
                   version: 3.1
                   serial: 747e51ae-d87f-cd4c-b912-b5af4700459e
                   size: 20GiB
                   capacity: 20GiB
                   capabilities: primary ntfs initialized
                   configuration: clustersize=4096 created=2009-11-27 08:56:41 filesystem=ntfs mount.fstype=fuseblk mount.options=rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096 state=mounted
              *-volume:1
                   description: Extended partition
                   physical id: 2
                   bus info: scsi@0:0.0.0,2
                   logical name: /dev/sda2
                   size: 122GiB
                   capacity: 122GiB
                   capabilities: primary extended partitioned partitioned:extended
                 *-logicalvolume:0
                      description: Linux filesystem partition
                      physical id: 5
                      logical name: /dev/sda5
                      logical name: /
                      capacity: 9536MiB
                      configuration: mount.fstype=ext4 mount.options=rw,noatime,errors=remount-ro,barrier=1,data=ordered state=mounted
                 *-logicalvolume:1
                      description: Linux swap / Solaris partition
                      physical id: 6
                      logical name: /dev/sda6
                      capacity: 1939MiB
                      capabilities: nofs
                 *-logicalvolume:2
                      description: Linux filesystem partition
                      physical id: 7
                      logical name: /dev/sda7
                      logical name: /home
                      capacity: 110GiB
                      configuration: mount.fstype=ext4 mount.options=rw,noatime,barrier=1,data=ordered state=mounted
              *-volume:2
                   description: Windows FAT volume
                   vendor: MSWIN4.1
                   physical id: 3
                   bus info: scsi@0:0.0.0,3
                   logical name: /dev/sda3
                   version: FAT32
                   serial: cced-990e
                   size: 6999MiB
                   capacity: 7004MiB
                   capabilities: primary hidden fat initialized
                   configuration: FATs=2 filesystem=fat
              *-volume:3
                   description: EFI (FAT-12/16/32) partition
                   physical id: 4
                   bus info: scsi@0:0.0.0,4
                   logical name: /dev/sda4
                   capacity: 47MiB
                   capabilities: primary boot
        *-serial UNCLAIMED
             description: SMBus
             product: N10/ICH 7 Family SMBus Controller
             vendor: Intel Corporation
             physical id: 1f.3
             bus info: pci@0000:00:1f.3
             version: 02
             width: 32 bits
             clock: 33MHz
             configuration: latency=0
             resources: ioport:400(size=32)


The first thing to do is, as root, to edit /etc/default/grub and change the line

Code: Select all
GRUB_CMDLINE_LINUX=

to
Code: Select all
GRUB_CMDLINE_LINUX="pcie_aspm=force usbcore.autosuspend=1 acpi_osi="Linux" acpi_backlight=vendor"

The above should all be on one line. It doesn't look right here but if you copy and paste it everything is normal.

Now run
Code: Select all
# update-grub
and reboot.

The above forces power management on your wireless adapter (which is attached via internal PCIE) so that when it is toggled off it no longer consumes power. It also allows USB attached devices to sleep when idle. Finally it fixes ACPI compatibility so that the screen brightness is at normal levels (otherwise it's too dark).

Additional packages to install:


eeepc-acpi-scripts
laptop-mode-tools

If you run one of the 3.* Linux kernels you'll need laptop-mode-tools from Sid because the change of kernel name format from 2.6.* to 3.* made it brain fart. It pulls in no other non-Squeeze dependencies, so you can just download it from a mirror using a browser or wget or similar instead of using apt if you prefer.

The eeepc-acpi-scripts package gets the hotkeys and other model specific stuff working. The laptop-mode-tools package helps you set up some extra power savings. Here is my working config for each. Note that their functionality overlaps to some extent, so while I can say that my configs work together how I like, if you change the way one or other deals with power management then you may need to do some trial and error and check what works and what suits you.

/etc/default/eeepc-acpi-scripts
Code: Select all
# For a description of the available settings, see
# /usr/share/doc/eeepc-acpi-scripts/examples/eeepc-acpi-scripts.default.gz

ENABLE_OSD='no'
OSD_FONT='DejaVuSans 30'
ENABLE_OSD_BRIGHTNESS='no'
SOUND_LABEL=
SOUND_SWITCH=
SOUND_SWITCH_EXCLUSIVE=
SOUND_PREFER_MASTER=yes
SOUND_VOLUME_STEP=
DETAILED_SOUND_INFO=no
VGA_ON='--auto'
LVDS_OFF='--off'
SUSPEND_METHOD=pm-suspend
SUSPEND_OPTIONS=--quirk-s3-bios
LOCK_SCREEN_ON_SUSPEND='yes'
LID_CLOSE_ACTION=
BLUETOOTH_FALLBACK_TO_HCITOOL='yes'
SOFTBTN1_ACTION='handle_blank_screen'
SOFTBTN2_ACTION='NONE'
SOFTBTN3_ACTION='handle_camera_toggle'
SOFTBTN4_ACTION='handle_bluetooth_toggle'
SOFTBTNSHE_ACTION='handle_shengine'
FnF_TOUCHPAD='handle_touchpad_toggle'
FnF_RESCHANGE='NONE'
FnF_BACKLIGHTOFF='handle_blank_screen'
FnF_VGATOGGLE='handle_vga_toggle'
FnF_TASKMGR='NONE'
FnF_MUTE='handle_mute_toggle'
FnF_VOLUMEDOWN='handle_volume_down'
FnF_VOLUMEUP='handle_volume_up'
PWR_CLOCK_AC=0
PWR_CLOCK_BATTERY=2
DEFAULT_SHENGINE_CONFIG=auto
#SHENGINE_FORCE_ENABLE=0


/etc/laptop-mode/laptop-mode.conf

Code: Select all
###############################################################################
#
# Configuration for Laptop Mode Tools
# -----------------------------------
#
# There is a "system" to the configuration setting names:
#    CONTROL_something=0/1   Determines whether Laptop Mode Tools controls
#                            something
#    LM_something=value      Value of "something" when laptop mode is active
#    NOLM_something=value    Value of "something" when laptop mode is NOT
#                            active
#    AC_something=value      Value of "something" when the computer is running
#                            on AC power
#    BATT_something=value    Value of "something when the computer is running
#                            on battery power
#
# There can be combinations of LM_/NOLM_ and AC_/BATT_ prefixes, but the
# available prefixes are different for each setting. The available ones are
# documented in the manual page, laptop-mode.conf(8). If there is no LM_/
# NOLM_ in a setting name, then the value is used independently of laptop
# mode state, and similarly, if there is no AC_/BATT_, then the value is used
# independently of power state.
#
# Some options only work on ACPI systems. They are marked ACPI-ONLY.
#
# Note that this configuration file is a fragment of shell script: you
# can use all the features of the shell scripting language to achieve your
# desired configuration.
#
#
# Modules
# -------
#
# Laptop Mode Tools modules have separate configuration files, that can be
# found in /etc/laptop-mode/conf.d. Please look through these configuration
# files as well, there are many useful power saving tools in there!
#
###############################################################################


###############################################################################
# Enable/Disable laptop-mode-tools execution
# ------------------------------------------
# Set it to 0 to completely disable laptop-mode-tools from running
###############################################################################
#
ENABLE_LAPTOP_MODE_TOOLS=1


###############################################################################
# Configuration debugging
# -----------------------
###############################################################################

#
# Set this to 1 if you want to see a lot of information when you start/stop
# laptop_mode.
#
VERBOSE_OUTPUT=0

# Set this to 1 if you want to log messages to syslog
LOG_TO_SYSLOG=1

# Run in shell debug mode
# Enable this if you would like to execute the entire laptop-mode-tools program
# in shell debug mode. Warning: This will create a lot of text output
# If you are debugging an individual module, perhaps you would want to enable
# each module specific debug mode (available in module conf files)
DEBUG=0

###############################################################################
# When to enable laptop mode
# --------------------------
#
# "Laptop mode" is the mode in which laptop mode tools makes the computer
# consume less power. This includes the kernel "laptop_mode" feature, which
# allows your hard drives to spin down, as well as various other settings which
# can be tweaked by laptop mode tools. You can enable or disable all of these
# settings using the CONTROL_... options further down in this config file.
###############################################################################


#
# Enable laptop mode when on battery power.
#
ENABLE_LAPTOP_MODE_ON_BATTERY=1


#
# Enable laptop mode when on AC power.
#
ENABLE_LAPTOP_MODE_ON_AC=0


#
# Enable laptop mode when the laptop's lid is closed, even when we're on AC
# power? (ACPI-ONLY)
#
ENABLE_LAPTOP_MODE_WHEN_LID_CLOSED=0


#
# Enable all simple zero-configuration auto modules
# This option enables all simple modules (listed below) without requiring
# the user to enable each module individually
#
# List of modules which can be automatically enabled with this setting are:
#
# ac97-powersave
# cpufreq
# dpms-standby
# eee-superhe
# ethernet
# exec-commands
# hal-polling
# hdparm
# intel-hda-powersave
# intel-sata-powermgmt
# nmi-watchdog
# runtime-pm
# sched-mc-power-savings
# sched-smt-power-savings
# terminal-blanking
# usb-autosuspend
# wireless-ipw-power
# wireless-iwl-power
# wireless-power
#
# Set this to 1 to enable all simple zero-configuration auto modules listed above.
#
# NOTE: You can explicitly enable/disable any of the above modules by changing their
# values in the individual settings file
#
ENABLE_AUTO_MODULES=1



###############################################################################
# When to enable data loss sensitive features
# -------------------------------------------
#
# When data loss sensitive features are disabled, laptop mode tools acts as if
# laptop mode were disabled, for those features only.
#
# Data loss sensitive features include:
# - laptop_mode (i.e., delayed writes)
# - hard drive write cache
#
# All of the options that follow can be set to 0 in order to prevent laptop
# mode tools from using them to stop data loss sensitive features. Use this
# when you have a battery that reports the wrong information, that confuses
# laptop mode tools.
#
# Disabling data loss sensitive features is ACPI-ONLY, and it only works if
# your battery gives off frequent ACPI events to indicate a change in battery
# level.
#
# NOTE: If your battery does NOT give off battery events often enough, you can
# enable the battery-level-polling module to make this work. Look at the
# file /etc/laptop-mode/conf.d/battery-level-polling.conf for more information.
#
###############################################################################


#
# Disable all data loss sensitive features when the battery level (in % of the
# battery capacity) reaches this value.
#
MINIMUM_BATTERY_CHARGE_PERCENT=3


#
# Disable data loss sensitive features when the battery reports its state
# as "critical".
#
DISABLE_LAPTOP_MODE_ON_CRITICAL_BATTERY_LEVEL=1



###############################################################################
# Controlled hard drives and partitions
# -------------------------------------
#
# For spinning down your hard drives, laptop mode will remount file systems and
# adjust hard drive spindown timeouts. These parameters specify which
# devices and partitions are affected by laptop mode.
###############################################################################


#
# The drives that laptop mode controls.
# Separate them by a space, e.g. HD="/dev/hda /dev/hdb". The default is a
# wildcard, which will get you all your IDE and SCSI/SATA drives.
#
HD="/dev/[hs]d[abcdefgh]"


#
# The partitions (or mount points) that laptop mode controls.
# Separate the values by spaces. Use "auto" to indicate all partitions on drives
# listed in HD. You can add things to "auto", e.g. "auto /dev/hdc3". You can
# also specify mount points, e.g. "/mnt/data".
#
PARTITIONS="auto /dev/mapper/*"


#
# If this is enabled, laptop mode tools will assume that SCSI drives are
# really SATA drives that only _look_ like SCSI drives, and will use hdparm
# to control them. Set this to 0 if you have /dev/sd devices and you want
# laptop mode tools to use the "sdparm" command to control them.
#
ASSUME_SCSI_IS_SATA=1


###############################################################################
# Hard drive behaviour settings
# -----------------------------
#
# These settings specify how laptop mode tools will adjust the various
# parameters of your hard drives and file systems.
###############################################################################


#
# Maximum time, in seconds, of work that you are prepared to lose when your
# system crashes or power runs out. This is the maximum time that Laptop Mode
# will keep unsaved data waiting in memory before spinning up your hard drive.
#
LM_BATT_MAX_LOST_WORK_SECONDS=600
LM_AC_MAX_LOST_WORK_SECONDS=360


#
# Should laptop mode tools control readahead?
#
CONTROL_READAHEAD=1


#
# Read-ahead, in kilobytes. You can spin down the disk while playing MP3/OGG
# by setting the disk readahead to a reasonable size, e.g. 3072 (3 MB).
# Effectively, the disk will read a complete MP3 at once, and will then spin
# down while the MP3/OGG is playing. Don't set this too high, because the
# readahead is applied to _all_ files that are read from disk.
#
LM_READAHEAD=3072
NOLM_READAHEAD=128


#
# Should laptop mode tools add the "noatime" option to the mount options when
# laptop mode is enabled?
#
CONTROL_NOATIME=0

# Should laptop use relatime instead of noatime? The "relatime" mount option has
# more standards-compliant semantics, and allows more applications to work,
# while retaining a low level of atime updates (i.e., disk writes).
USE_RELATIME=1


#
# Should laptop mode tools control the hard drive idle timeout settings?
#
CONTROL_HD_IDLE_TIMEOUT=1


#
# Idle timeout values. (hdparm -S)
# Default is 2 hours on AC (NOLM_HD_IDLE_TIMEOUT_SECONDS=7200) and 20 seconds
# for battery and for AC with laptop mode on.
#
LM_AC_HD_IDLE_TIMEOUT_SECONDS=20
LM_BATT_HD_IDLE_TIMEOUT_SECONDS=20
NOLM_HD_IDLE_TIMEOUT_SECONDS=7200


#
# Should laptop mode tools control the hard drive power management settings?
#
# Set to 0 to disable
CONTROL_HD_POWERMGMT="auto"


#
# Power management for HD (hdparm -B values)
#
BATT_HD_POWERMGMT=1
LM_AC_HD_POWERMGMT=254
NOLM_AC_HD_POWERMGMT=254


#
# Should laptop mode tools control the hard drive write cache settings?
#
CONTROL_HD_WRITECACHE=0


#
# Write cache settings for HD (hdparm -W values)
#
NOLM_AC_HD_WRITECACHE=1
NOLM_BATT_HD_WRITECACHE=0
LM_HD_WRITECACHE=0




###############################################################################
# Settings you probably don't want to touch
# -----------------------------------------
#
# It is usually not necessary to change these parameters. They are included
# for completeness' sake.
###############################################################################


#
# Change mount options on partitions in PARTITIONS? You don't really want to
# disable this. If you do, then your hard drives will probably not spin down
# anymore.
#
CONTROL_MOUNT_OPTIONS=1


#
# Dirty synchronous ratio.  At this percentage of dirty pages the process
# which calls write() does its own writeback.
#
LM_DIRTY_RATIO=60
NOLM_DIRTY_RATIO=40


#
# Allowed dirty background ratio, in percent.  Once DIRTY_RATIO has been
# exceeded, the kernel will wake pdflush which will then reduce the amount
# of dirty memory to dirty_background_ratio.  Set this nice and low, so once
# some writeout has commenced, we do a lot of it.
#
LM_DIRTY_BACKGROUND_RATIO=1
NOLM_DIRTY_BACKGROUND_RATIO=10


#
# kernel default settings -- don't touch these unless you know what you're
# doing.
#
DEF_UPDATE=5
DEF_XFS_AGE_BUFFER=15
DEF_XFS_SYNC_INTERVAL=30
DEF_XFS_BUFD_INTERVAL=1
DEF_MAX_AGE=30


#
# This must be adjusted manually to the value of HZ in the running kernel
# on 2.4, until the XFS people change their 2.4 external interfaces to work in
# centisecs. This can be automated, but it's a work in progress that still
# needs some fixes. On 2.6 kernels, XFS uses USER_HZ instead of HZ for
# external interfaces, and that is currently always set to 100. So you don't
# need to change this on 2.6.
#
XFS_HZ=100


#
# Seconds laptop mode has to to wait after the disk goes idle before doing
# a sync.
#
LM_SECONDS_BEFORE_SYNC=2


There are some module (driver) specific configs you need to make. Some will have been made automatically in /etc/modprobe.d/eeepc.conf when you installed eeepc-acpi-scripts, others you may need to add yourself. Here is my /etc/modprobe.d/eeepc.conf

Code: Select all
# module options specific for Asus EeePC
blacklist pcspkr
blacklist i2c_i801
options snd_hda_intel power_save=0
install pciehp /bin/true
options i915 modeset=1


Depending on your kernel config and version you may not need the last two lines. It shouldn't do any harm to leave them in, except if you use the i915 line with a much older kernel such as in Lenny (oldstable). The disabling of snd_hda_intel power_save is to prevent the annoying and worrying loud pop intel_hda audio makes when resuming playback from idle. The pciehp line just suppresses a harmless* error message on boot and the i915 line ensures (Intel Graphics) Kernel Mode Setting is used.

Synaptics TouchPad:

The Eee PC 1001P has a really nice multi-touch touchpad. It's quite a small pad but the multi-touch capability makes it much more useable than bigger, simpler touchpads. Unfortunately with the standard kernel in Squeeze you won't be able to take advantage of it, but at least you can add tapping and horizontal and vertical edge scrolling. X in Squeeze does that magic thing of working fine without an xorg.conf but if you want to add tapping and edge scrolling then use the following as your /etc/X11/xorg.conf:

Code: Select all
Section "InputClass"
    MatchIsTouchpad "true"
    Identifier "Touchpad"
    Driver "synaptics"
    MatchDevicePath "/dev/input/event*"
        Option          "TapButton1"            "1"     # enables tapping
       #Option          "CircularScrolling"     "1"
        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

If you are happy to build your own kernel, or use one from Sid, then upgrade to a recent 2.6.39 or 3.* kernel and now you can run a different xorg.conf and take advantage of its multi-touch capability. I use the normal Xorg from Squeeze. Here is my xorg.conf for multi-touch:

Code: Select all
Section "InputClass"
        Identifier      "Touchpad"                      # required
        MatchIsTouchpad "yes"                           # required
        Driver          "synaptics"                     # required
   MatchDevicePath "/dev/input/event*"
        Option          "MinSpeed"              "0.5"
        Option          "MaxSpeed"              "1.0"
        Option          "AccelFactor"           "0.075"
        Option          "TapButton1"            "1"
        Option          "TapButton2"            "2"     # multitouch
       #Option          "TapButton3"            "3"     # multitouch-notworking
        Option          "RTCornerButton"        "3"     # rightclick
        Option          "LTCornerButton"        "2"     # middleclick
        Option          "VertTwoFingerScroll"   "1"     # multitouch
        Option          "HorizTwoFingerScroll"  "1"     # multitouch
        Option          "EmulateTwoFingerMinZ"  "35"    # emulation for multitouch
        Option          "EmulateTwoFingerMinW"  "8"     # emulation for multitouch
        Option          "LBCornerButton"        "8"     # browser "back" btn
        Option          "RBCornerButton"        "9"     # browser "forward" btn
EndSection



Custom Kernel
I'm running 3.1.0-rc6 from torvalds github, but this config is equally good for 2.6.39 series. The one thing I usually do with desktop/notebook computers that I found it important not to do in the case of the Eee PC is set the kernel's timer interrupt frequency to 1000. Debian's default is 250, github/kernel.org vanilla default is 1000, usual recommendation for desktop/GUI systems is 1000. But on the Eee PC CONFIG_HZ=1000 makes the touchpad go completely crazy, so if building from Debian source leave it as it is, and if from upstream source remember to change it to 250 (menuconfig "Processor type and features>Timer frequency". Here is a good kernel config you can use as is for the 1001P and with minimal changes for other similar models. It is for a 64-bit system. The text exceeds this board's character limit so it is up on pastebin indefinitely:

http://pastebin.com/WsCHMLJG

edit:amended kernel version and pastebin link from 3.1.0-rc5 to 3.1.0-rc6

Disk idle, load cycles and hdparm

The disk in my Eee PC uses very aggressive power management. This is handled by the disk firmware and is independent of the installed operating system, which is to say it makes the same bloody annoying pops and clicks in Debian as it does in Windows XP or Windows 7 or whatever yours came with. It's very noticeable because in normal use the Eee PC is almost silent. These noises are the disk heads being parked when the disk is idle and and re-engaged when required. If you google "load cycle count" you'll find that many people are worried that this means extreme wear and premature failure. Luckily they are wrong. On older disks this would be true but modern disks that use this technique are designed to do so. I did once find and read the Western Digital technical document which demonstrated this and showed typical lifespans and so on and I stopped worrying about it (Edit: it wasn't Western Digital, it was Hitachi and here is a link to the pdf http://www.hitachigst.com/tech/techlib. ... _FINAL.pdf It's a regular thrill a minute and I'm sorry I spoiled the cliff hanger ending). But I disable it anyway because I can't stand the constant pops and clicks. Here is how:

Install hdparm i.e. `apt-get install hdparm`

edit /etc/hdparm.conf and add
Code: Select all
command_line {
        hdparm -q -B 254 /dev/sda
}


Resuming from suspend/hibernate causes the above setting to be ignored. Here is the fix. Create the file
/etc/pm/sleep.d/01_hdparm_power-check
and edit it to read
Code: Select all
#!/bin/sh
if [ -n "$1" ] && ([ "$1" = "resume" ] || [ "$1" = "thaw" ]); then
        hdparm -B 254 /dev/sda > /dev/null
fi

and make it executable. No more noise! And there is still very good disk power management enforced by hdparm.

Super Hybrid Engine

is really super. It's a power management/saving feature which can do some clever stuff like reduce voltage and frequencies of components and complements the normal utilities such as CPU frequency scaling. It's supported in Linux kernel version 2.6.30 and above and enabled automatically. It has three settings:

0: Performance
1: Default
2: Powersave

To check the setting in use:
Code: Select all
cat /sys/devices/platform/eeepc/cpufv

which returns a 0x300 for Performance, 0x301 for Default or 0x302 for Powersave.

You don't need to care too much because it's all been set up beautifully by yours truly in the eeepc-acpi-scripts and laptop-mode-tools configs. If you do want to manually toggle the setting you do it in the same way as in Windows, that is by <Fn><SpaceBar> or by pressing the Express Gate Instant-On button (the mysterious shiny silver one, top left).

I added
Code: Select all
alias she="cat /sys/devices/platform/eeepc/cpufv"

to my ~/.bashrc so I can enter 'she' in a terminal to check the status.

edit: Powertop and power consumption

I thought I'd add some info and a tiny bit of data about power useage and powertop. If you run powertop it makes some good suggestions. Ignore them :-) This is because the grub config, eeepc-acpi-scripts, laptop-mode-tools, and hdparm set up as described already take care of it, mostly by dynamically switching to appropriate settings when AC is connected or disconnected. If you run powertop you can check what it suggests: instead of going ahead and doing `# echo <some value> >/proc/sys/foo or /sys/class/foo` you can run 'cat /proc/sys/foo' both on and off AC power and now you can see it's all taken care of, the suggested values have been loaded automatically. You did all that googling and read all that crap and you didn't have to!

btw here is what powertop reports on Linux 3.1.0-rc5 for power consumption, idling on battery power, backlit display on, wireless on and in use, running xfce4 with compositing enabled
Code: Select all
Wakeups-from-idle per second : 151.5    interval: 15.0s                                                           
Power usage (ACPI estimate): 3.8W (13.3 hours)


Those are some very good figures.

The regular Squeeze kernel 2.6.32-5-amd64 isn't brilliant:
Code: Select all
Wakeups-from-idle per second : 141.7    interval: 15.0s                                                           
Power usage (ACPI estimate): 5.6W (8.3 hours)


8.3 hours on idle is disappointing.

Squeeze kernel with display off:
Code: Select all
Wakeups-from-idle per second : 174.3    interval: 15.0s                                                           
Power usage (ACPI estimate): 5.1W (9.0 hours) (long term: 6.8W,/6.8h)

With the display off the Squeeze kernel still uses more power than the custom kernel with display on. A custom kernel is pretty much essential if you're going to use your Eee PC on battery power for more than a few hours.

If you read news/testing sites such as Phoronix you'll see there have been some regressions in power consumption in the Linux kernel on some hardware and that this is aggravated by certain very power hungry distros/UI such as Ubuntu Unity (no laughing please....ha ha ha suckers). If you run Eee PC 1001 or 1005 series on Debian Squeeze with a custom 3.1 kernel then in fact your Eee PC is probably running more quietly and consuming less power than it ever did, and also doing better than the proprietary OS that came pre-installed.

Audio Levels and some useful MPlayer stuff

Most people find the audio is too quiet. This is easily fixed if you use MPlayer for your video and audio playback. Edit ~/.mplayer/config and add
Code: Select all
af=volnorm


If you also want to always have video on top and the screensaver and screen dimming disabled while video is playing then also add
Code: Select all
heartbeat-cmd="/usr/bin/xscreensaver-command -deactivate > /dev/null"
ontop=yes
stop-xscreensaver=yes


Also useful are
Code: Select all
monitoraspect=1024:600
lirc=no
joystick=no
subfont-text-scale=3
subfont-osd-scale=2
spuaa=18
subpos=90
subalign=0
vo=xv


I can definitely recommend PulseAudio on the Eec PC. All you need to do is install it and then create ~/.asoundrc to read
Code: Select all
pcm.pulse {
    type pulse
}

ctl.pulse {
    type pulse
}

pcm.!default {
    type pulse
}

ctl.!default {
    type pulse
}


and you can add to ~/.mplayer/config

Code: Select all
ao=pulse


Debian Wiki Eee PC in your language: http://wiki.debian.org/EeePC/langs
You can ignore most of it as it's for older Eee PCs and older versions of Debian. Especially ignore any part which deals with a special Eee PC repository or a special installer, none of which is needed from Squeeze onwards. If your Eee PC has Atheros wireless and Ethernet you can ignore everything related to that as well because it all works out of the box in Squeeze, no funny firmware or vendor driver source required.

*I checked. PCI-Express spec requires hotplug. Hotplug can cause very frustrating problems with not resuming sleeping (or switched off via the keyboard button) wireless devices on PCI-E bus, such as the wifi on internal PCI-E in the Eee PC. The wireless toggles on and off and sleeps and resumes just fine without it. Everything else works normally too, so the hotplug functionality is not required. But even with a kernel with no pciehp driver you will see the kernel expects one and flashes a message at boot as it finds there isn't one, so this config just forces it to not try to load one.

Any questions, suggestions, comments can be posted at Discuss "Debian on the Eee PC 1001P"
User avatar
julian67
 
Posts: 249
Joined: February 9th, 2011, 12:59 pm

Return to HowTo

Who is online

Users browsing this forum: No registered users and 1 guest

cron

x