First let me get some terminology on the table based on what I understand.
- Ubuntu says "suspend" to mean "suspend-to-ram". (Some folks call this "sleep".)
- Ubuntu says "hibernate" to mean "suspend-to-disk.
- Ubuntu says "resume" to mean restart after suspend-to-ram
- Ubuntu says "thaw" to mean restart after suspend-to-disk
I base this list on the parameters passed to scripts found in
/etc/pm/sleep.d/NN_* (where "NN" is 00 to 99, and * is some name).
Now for my REAL question...
I have two laptops that are essentially identical (Thinkpad 7764CTO).
Both will suspend+resume without troubles once we fixed some issues with USB and SD-card devices.
One laptop will hibernate+thaw without trouble.
One laptop will hibernate but it fails to "thaw". More precisely, the scripts that run fine during restart on one laptop, do not appear to run at all during restart on the other laptop. I use a diagnostic (details below) to shed some light on what is happening.
Can anyone help me discover what is causing power-manager to avoid this restart from suspend-to-disk processing on one laptop and not the other?
Thanks,
~~~ 0;-Dan
====================
A helpful diagnostic
====================
I modified the scripts surrounding power-manager to include statements like the following. See
man logger and
man syslogd for details.
Code:
...
myTag="SOMENAME"
myLogging="local7.notice"
...
#
#=== what is Power Management wanting to accomplish?
case "$1" in
hibernate|suspend)
#=== ACTION BEFORE SUSPEND/HIBERNATE
#
#=== announce to the logs
logger -t "$myTag" -p "$myLogging" "... $myOption requested"
...
;;
thaw|resume)
#=== ACTION AFTER RESUME
#
#=== announce to the logs
logger -t "$myTag" -p "$myLogging" "... $myOption requested"
...
;;
*)
#=== none of the above
#
#=== announce to the logs
logger -t "$myTag" -p "$myLogging" "... UNKNOWN $myOption requested"
;;
esac
...
I can now use
grep -i somename /var/log/messages to see the events of interest caused by my own logger statements. (This is similar to adding printf-calls into a program to display runtime details.) For example:
Code:
Jan 1 20:30:24 mumbles SOMENAME: START -- manage mounted usb ...
Jan 1 20:30:24 mumbles SOMENAME: ... suspend requested
Jan 1 20:30:24 mumbles SOMENAME: ... :SOMEDRIVE: mounted
Jan 1 20:30:24 mumbles SOMENAME: ... unmount SOMEDRIVE
Jan 1 20:30:24 mumbles SOMENAME: ... unmount /media/SOMEDRIVE status=0
Jan 1 20:30:24 mumbles SOMENAME: COMPLETED -- manage mounted usb
Jan 1 23:01:59 mumbles SOMENAME: START -- manage mounted usb ...
Jan 1 23:01:59 mumbles SOMENAME: ... resume requested
Jan 1 23:01:59 mumbles SOMENAME: ... nothing to do -- YET
Jan 1 23:01:59 mumbles SOMENAME: COMPLETED -- manage mounted usb
Jan 2 01:11:44 mumbles SOMENAME: START -- manage mounted usb ...
Jan 2 01:11:44 mumbles SOMENAME: ... hibernate requested
Jan 2 01:11:44 mumbles SOMENAME: ... :SOMEDRIVE: mounted
Jan 2 01:11:44 mumbles SOMENAME: ... unmount SOMEDRIVE
Jan 2 01:11:44 mumbles SOMENAME: ... unmount /media/SOMEDRIVE status=0
Jan 2 01:11:44 mumbles SOMENAME: COMPLETED -- manage mounted usb
Jan 2 01:12:35 mumbles SOMENAME: START -- manage mounted usb ...
Jan 2 01:12:35 mumbles SOMENAME: ... thaw requested
Jan 2 01:12:35 mumbles SOMENAME: ... nothing to do -- YET
Jan 2 01:12:35 mumbles SOMENAME: COMPLETED -- manage mounted usb