#!/bin/sh
/sbin/service haldaemon stop
/usr/bin/killall wmclock wmfire wmnd wmhdplop wmix wmacpi
/usr/bin/rovclock -c 60 -m 60
#/sbin/rmmod thinkpad_acpi # too frequent polling
echo 1 > /sys/module/snd_ac97_codec/parameters/power_save
echo 1 > /sys/bus/pci/devices/0000:02:02.0/rf_kill
echo 3000 > /proc/sys/vm/dirty_writeback_centisecs
echo 32 > /proc/sys/dev/hpet/max-user-freq
echo 5 > /proc/sys/vm/laptop_mode
/usr/bin/killall dbus-daemon dbus-launch
/sbin/service sshd stop
#service portmap stop
#service crond stop
/sbin/service messagebus stop
/sbin/service powersaved stop
#/sbin/service acpid stop
/sbin/service portmap stop
#service smartd stop
#service postfix stop
/sbin/service udevd stop
/sbin/service syslogd stop
/usr/sbin/ethtool -s eth0 wol d
/sbin/ifdown eth0
/sbin/ifdown eth1
/usr/bin/killall minilogd klogd rpc.idmapd wpa_supplicant
/sbin/rmmod uhci_hcd ehci_hcd usbcore
/sbin/rmmod e1000 ipw2100
/sbin/rmmod ieee80211 ieee80211_crypt
#/sbin/rmmod `/bin/lsmod | /bin/grep ^snd | /bin/cut -f1 -d' '`
#/sbin/rmmod soundcore ac97_bus
/sbin/rmmod yenta_socket rsrc_nonstatic pcmcia pcmcia_core
/sbin/rmmod ircomm_tty ircomm irtty_sir sir_dev nsc_ircc irda crc_ccitt
/sbin/rmmod cpufreq_stats cpufreq_powersave cpufreq_conservative cpufreq_userspace
/sbin/rmmod joydev pcspkr serio_raw
/sbin/rmmod reiserfs sr_mod cdrom
/sbin/rmmod parport_pc parport

echo level 0 >/proc/acpi/ibm/fan
echo 0 > /sys/class/backlight/thinkpad_screen/brightness
/sbin/rmmod led_class thinkpad_acpi

# multicore: http://www.lesswatts.org/tips/cpu.php#smpsched
echo 1 > /sys/devices/system/cpu/sched_mc_power_savings
