/temp/lidcheck remains empty and still no suspend.
My current accurately updated /etc/acpi/actions/suspend.sh is here:
Code: Select all
#!/bin/sh
# suspend.sh 28sep09 by shinobar
# 12feb10 pass poweroff
# 23apr12 fix was not suspend from acpi_poweroff.sh
#20140526 shinobar: avoid multiple run
#20140629 shinobar: ACPI_CONFIG
ACPI_CONFIG=/etc/acpi/acpi.conf
[ -s "$ACPI_CONFIG" ] && . "$ACPI_CONFIG"
case "$DISABLE_SUSPEND" in
y*|Y*|true|True|TRUE|1) exit;;
esac
#avoid multiple run
LOCKFILE=/tmp/acpi_suspend-flg
if [ -f "$LOCKFILE" ]; then
PID=$(cat "$LOCKFILE")
ps| grep "^[ ]*$PID " && exit
fi
echo -n $$ > "$LOCKFILE"
sync
[ "$(cat "$LOCKFILE")" = $$ ] || exit 0
# do not suspend at shutdown proccess
#111129 added suspend to acpi_poweroff.sh
PS=$(ps)
[ ! -f /tmp/suspend ] && echo "$PS"| grep -qE 'sh[ ].*poweroff' && rm -f "$LOCKFILE" && exit 0
rm -f /tmp/suspend
echo acpi config, multipleruntest, shutdowndisable ok >> /tmp/lidcheck #add
# do not suspend if usb media mounted
USBS=$(probedisk2|grep '|usb' | cut -d'|' -f1 )
for USB in $USBS
do
mount | grep -q "^$USB" && rm -f "$LOCKFILE" && exit 0
done
# process before suspend
# sync for non-usb drives
sync
rmmod ehci_hcd
#suspend
echo -n mem > /sys/power/state
echo sync ok >> /tmp/lidcheck # add
# process at recovery from suspend
#restartwm
modprobe ehci_hcd
#/etc/rc.d/rc.network restart
rm -f "$LOCKFILE
With the SD being mounted and read by a USB device (I'll reboot and do ESC to find out how the cardreader is defined, and come back), does that rule out Suspending entirely, or is there a possibility to exclude the Reader by specifying it as an exception to the mounted USB check, or is that ice too thin to skate on? And how does the Command line pull it off, but then is it ducking the USB mount question.
Thanks guys.
EDIT: The netbook sees the cardreader as:
USB:USB2.0 CardReader SD0.
-I'm tempted to comment out the USB mount check in suspend.sh to see what happens!