Gentoo Archives: gentoo-user

From: Walter Dnes <waltdnes@××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] hibernate... /bin/echo: write error: No such device
Date: Wed, 03 Aug 2022 21:30:55
Message-Id: YurpDqSUN3h9cRHh@waltdnes.org
In Reply to: Re: [gentoo-user] hibernate... /bin/echo: write error: No such device by "J. Roeleveld"
1 Checking the obvious; "make menuconfig"...
2
3 > Power management and ACPI options
4 [ ] Suspend to RAM and standby
5 [*] Hibernation (aka 'suspend to disk')
6 [*] Userspace snapshot device
7 (/dev/sda2) Default resume partition
8
9 Checking where/how it'll suspend...
10
11 cat /sys/power/state
12 disk
13
14 So far, so good. I was ssh'd in and I shrank the font size to
15 "unreadable" and ran "hibernate --verbosity=4", to get debug level
16 output. It captured "only" the last 519 lines of output, attached as
17 errlog.txt.gz which I copy/pasted to vim on my desktop.
18
19 Line 305 is where "DoSysfsPowerStateSuspend" starts
20 Line 317 is the "/bin/echo -n disk" statement
21
22 Next we look at file /usr/share/hibernate/scriptlets.d/sysfs_power_state
23 which has a short function DoSysfsPowerStateSuspend(). Anyone remember
24 ye old dayes of FORTRAN, where you'd throw in print statements to debug
25 errors? I've added a few debug statements, like so...
26
27 DoSysfsPowerStateSuspend() {
28 if [ -z "$SYSFS_POWER_STATE_NO_SUSPEND" ] ; then
29 vecho 1 "$EXE: Activating sysfs power state $USING_SYSFS_POWER_STATE ..."
30 echo "1 ==> $USING_SYSFS_POWER_STATE"
31 echo "2 ==> $SYSFS_POWER_STATE_POWERDOWN_METHOD"
32 echo "3 ==> $SYSFS_POWERDOWN_METHOD_FILE"
33 echo "4 ==> $SYSFS_POWER_STATE_FILE"
34 [ -n "$SYSFS_POWER_STATE_POWERDOWN_METHOD" ] && \
35 [ -f "$SYSFS_POWERDOWN_METHOD_FILE" ] && \
36 /bin/echo $SYSFS_POWER_STATE_POWERDOWN_METHOD > $SYSFS_POWERDOWN_METHOD_FILE
37 /bin/echo -n $USING_SYSFS_POWER_STATE > $SYSFS_POWER_STATE_FILE
38 else
39 vecho 1 "$EXE: Not actually suspending (--no-suspend given)"
40 fi
41 return 0
42 }
43
44 The output from hibernate is...
45
46 1 ==> disk
47 2 ==>
48 3 ==> /sys/power/disk
49 4 ==> /sys/power/state
50 /bin/echo: write error: No such device
51
52 No powerdown method? I added "resume=/dev/sda2" to lilo.conf and
53 re-ran lilo. And now we cross the boundary from the ridiculous to the
54 totally utterly sublime.
55
56 [thimk][root][~] cat /sys/power/state
57 disk
58 [thimk][root][~] echo disk > /sys/power/state
59 -bash: echo: write error: No such device
60 [thimk][root][~] cat /sys/power/state
61 disk
62
63 WTF!!!
64
65 --
66 Walter Dnes <waltdnes@××××××××.org>
67 I don't run "desktop environments"; I run useful applications

Attachments

File name MIME type
errlog.txt.gz application/gzip

Replies

Subject Author
Re: [gentoo-user] hibernate... /bin/echo: write error: No such device Jack <ostroffjh@×××××××××××××××××.net>
Re: [gentoo-user] hibernate... /bin/echo: write error: No such device Neil Bothwick <neil@××××××××××.uk>