I've discovered that this script works well for standby/resume on the Asus Eee 900. It may not provide the same amount of power savings as suspend, but it works and it's better than nothing.
Just tried it on my 900 and seems to work fine. No corruption, confusion, etc. I wonder how much drain (over the normal unacceptable amounts of 900 powered-off drain) occurs.
I'd like, if possible to add an icon on the taskbar to initiate standby instead of having to open a root terminal and enter the command for the script. How would it do that?
Adding stuff on the wbar appears to be non-trivial in my brief reading. I think one has to basically make your own extension.
But one can easily make an entry on the menu. Check out the entries in ~/.wmx . I made a file called MyLauncher that calls other scripts that do stuff on my Eee:
#!/bin/sh
exec aterm -e sudo {path/to/my/multipurpose-script}
It appears in the menu and works as intended.
Backing up the ~/.wmx dir itself has unwanted consequences leading to duplicate menu entries so home/tc/.wmx is in .xfiletool.list. I tried to adding home/tc/.wmx/MyLauncher in /opt/.filetool.list to counteract the blanket exclusion of the dir .wmx but it wasn't backed up.
As a quick/dirty solution I put the MyLauncher file in /opt, added that file to .filetool.list, and use rc.bootlocal to copy it into my ~/.wmx dir at boot time. That works but there
has to be a more elegant solution that I am too newb to see.
# suspend
echo standby > /sys/power/state
# Reconnect to wifi.
iwconfig wlan0 essid any
This part confused me until I realized the script stops running immediately after the standby line and resumes there after button press and continues with the wifi line.