I'm running kernel 3.0.0-12, laptop-mode-tools 1.57-1ubuntu1. I have traced the major processes that do regular writes (smbd, cups, network-manager) and made them write to /var/run (tmpfs filesystem) rather than to the main filesystem. I have also modified /usr/sbin/laptop_mode to recognize a 3.0 kernel. According to syslog, laptop_mode responds to changes in AC power. However, /proc/sys/vm/{laptop_mode,dirty_writeback_centisecs} are not updated, which causes frequent spin-ups in case of write activity. Regardless of AC/battery state, these files are:
/proc/sys/vm/dirty_writeback_centisecs - 500
/proc/sys/vm/laptop_mode - 0
Example test script (polls the spin-down state with two-second intervals, and writes a file half-way)
Code: Select all
$ cat /proc/sys/vm/laptop_mode ; for i in 1 2 3; do hdparm -C /dev/sda | grep state; sleep 2; done; echo > /tmp/lmtest ; echo; for i in 1 2 3 4 5; do hdparm -C /dev/sda | grep state; sleep 2; done
0 ## laptop_mode
drive state is: standby
drive state is: standby
drive state is: standby
## here, a file in /tmp is written
drive state is: active/idle
drive state is: active/idle
drive state is: active/idle
drive state is: active/idle
drive state is: standby
$ mount
/dev/sda8 on / type ext4 (rw,noatime,errors=remount-ro,commit=360,commit=360)
Code: Select all
ENABLE_LAPTOP_MODE_TOOLS=1
ENABLE_LAPTOP_MODE_ON_BATTERY=1
ENABLE_LAPTOP_MODE_ON_AC=1
ENABLE_LAPTOP_MODE_WHEN_LID_CLOSED=1
LM_BATT_MAX_LOST_WORK_SECONDS=600
LM_AC_MAX_LOST_WORK_SECONDS=360