Checking the obvious;  "make menuconfig"...

> Power management and ACPI options
    [ ] Suspend to RAM and standby
    [*] Hibernation (aka 'suspend to disk')
    [*]   Userspace snapshot device
    (/dev/sda2) Default resume partition

  Checking where/how it'll suspend...

cat /sys/power/state
disk

  So far, so good.  I was ssh'd in and I shrank the font size to
"unreadable" and ran "hibernate --verbosity=4", to get debug level
output.  It captured "only" the last 519 lines of output, attached as
errlog.txt.gz which I copy/pasted to vim on my desktop.

Line 305 is where "DoSysfsPowerStateSuspend" starts
Line 317 is the "/bin/echo -n disk" statement

  Next we look at file /usr/share/hibernate/scriptlets.d/sysfs_power_state
which has a short function DoSysfsPowerStateSuspend().  Anyone remember
ye old dayes of FORTRAN, where you'd throw in print statements to debug
errors?  I've added a few debug statements, like so...

DoSysfsPowerStateSuspend() {
    if [ -z "$SYSFS_POWER_STATE_NO_SUSPEND" ] ; then
        vecho 1 "$EXE: Activating sysfs power state $USING_SYSFS_POWER_STATE 
..."
echo "1 ==> $USING_SYSFS_POWER_STATE"
echo "2 ==> $SYSFS_POWER_STATE_POWERDOWN_METHOD"
echo "3 ==> $SYSFS_POWERDOWN_METHOD_FILE"
echo "4 ==> $SYSFS_POWER_STATE_FILE"
        [ -n "$SYSFS_POWER_STATE_POWERDOWN_METHOD" ] && \
            [ -f "$SYSFS_POWERDOWN_METHOD_FILE" ] && \
            /bin/echo $SYSFS_POWER_STATE_POWERDOWN_METHOD > 
$SYSFS_POWERDOWN_METHOD_FILE
        /bin/echo -n $USING_SYSFS_POWER_STATE > $SYSFS_POWER_STATE_FILE
    else
        vecho 1 "$EXE: Not actually suspending (--no-suspend given)"
    fi
    return 0
}

  The output from hibernate is...

1 ==> disk
2 ==> 
3 ==> /sys/power/disk
4 ==> /sys/power/state
/bin/echo: write error: No such device

  No powerdown method?  I added "resume=/dev/sda2" to lilo.conf and
re-ran lilo.  And now we cross the boundary from the ridiculous to the
totally utterly sublime.

[thimk][root][~] cat /sys/power/state
disk
[thimk][root][~] echo disk > /sys/power/state
-bash: echo: write error: No such device
[thimk][root][~] cat /sys/power/state
disk

WTF!!!

-- 
Walter Dnes <[email protected]>
I don't run "desktop environments"; I run useful applications

Attachment: errlog.txt.gz
Description: application/gzip

Reply via email to