One of the last few items on the laptop setup. I emerged hibernate
and copied over the /etc/hibernate/ directory from my desktop. When I
try to hibernate the laptop, I get...
[thimk][root][~] hibernate
/bin/echo: write error: No such device
On Thu, Jul 28, 2022 at 7:53 AM Walter Dnes <waltdnes@waltdnes.org> wrote:
One of the last few items on the laptop setup. I emerged hibernate
and copied over the /etc/hibernate/ directory from my desktop. When I
try to hibernate the laptop, I get...
[thimk][root][~] hibernate
/bin/echo: write error: No such device
Is the device there?
One of the last few items on the laptop setup. I emerged hibernate
and copied over the /etc/hibernate/ directory from my desktop. When I
try to hibernate the laptop, I get...
[thimk][root][~] hibernate
/bin/echo: write error: No such device
...with a beep, and the machine comes back. Grepping for the "echo"
command, I get...
[thimk][root][~] grep -r echo /etc/hibernate/
/etc/hibernate/common.conf:# OnSuspend 20 echo "Good night!" /etc/hibernate/common.conf:# OnResume 20 echo "Good morning!"
One of the last few items on the laptop setup. I emerged hibernate
and copied over the /etc/hibernate/ directory from my desktop. When I
try to hibernate the laptop, I get...
[thimk][root][~] hibernate
/bin/echo: write error: No such device
...with a beep, and the machine comes back. Grepping for the "echo"
command, I get...
[thimk][root][~] grep -r echo /etc/hibernate/
/etc/hibernate/common.conf:# OnSuspend 20 echo "Good night!" /etc/hibernate/common.conf:# OnResume 20 echo "Good morning!"
The latest entries in /var/log/hibernate.log are...
Starting suspend at Wed Jul 27 05:00:47 PM EDT 2022
hibernate: [01] Executing CheckLastResume ...
hibernate: [01] Executing CheckRunlevel ...
hibernate: [01] Executing LockFileGet ...
hibernate: [01] Executing NewKernelFileCheck ...
hibernate: [10] Executing EnsureSysfsPowerStateCapable ...
hibernate: [11] Executing XHacksSuspendHook1 ...
hibernate: [59] Executing RemountXFSBootRO ...
hibernate: [89] Executing SaveKernelModprobe ...
hibernate: [91] Executing ModulesUnloadBlacklist ...
hibernate: [95] Executing XHacksSuspendHook2 ...
hibernate: [98] Executing CheckRunlevel ...
hibernate: [99] Executing DoSysfsPowerStateSuspend ...
hibernate: Activating sysfs power state disk ...
hibernate: [90] Executing ModulesLoad ...
hibernate: [89] Executing RestoreKernelModprobe ...
hibernate: [85] Executing XHacksResumeHook2 ...
hibernate: [70] Executing ClockRestore ...
hibernate: [59] Executing RemountXFSBootRW ...
hibernate: [11] Executing XHacksResumeHook1 ...
hibernate: [01] Executing NoteLastResume ...
hibernate: [01] Executing LockFilePut ...
Resumed at Wed Jul 27 05:00:50 PM EDT 2022
Power management and ACPI options[ ] Suspend to RAM and standby
Checking the obvious; "make menuconfig"...No answers, but some thoughts. Remember the files in /sys/power are
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 <waltdnes@waltdnes.org>
I don't run "desktop environments"; I run useful applications
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
One of the last few items on the laptop setup. I emerged hibernate
and copied over the /etc/hibernate/ directory from my desktop. When I
try to hibernate the laptop, I get...
[thimk][root][~] hibernate
/bin/echo: write error: No such device
...with a beep, and the machine comes back.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 302 |
Nodes: | 16 (0 / 16) |
Uptime: | 96:58:08 |
Calls: | 6,764 |
Calls today: | 2 |
Files: | 12,295 |
Messages: | 5,376,370 |
Posted today: | 1 |