Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 197630 - sys-power/hibernate-script-1.97 reports "/sys/power/tuxonice/: Is a directory" and dies
Summary: sys-power/hibernate-script-1.97 reports "/sys/power/tuxonice/: Is a directory...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Alon Bar-Lev (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-31 13:00 UTC by Laurento Frittella (mrfree)
Modified: 2007-11-03 14:57 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
hibernate-script-1.97-suspend2.patch (hibernate-script-1.97-suspend2.patch,1.22 KB, patch)
2007-10-31 15:05 UTC, Alon Bar-Lev (RETIRED)
Details | Diff
hibernate verb=4, patched suspend2 (debug-patched,11.00 KB, text/plain)
2007-10-31 15:47 UTC, Laurento Frittella (mrfree)
Details
hibernate verb=4, original (1.97) suspend2 (debug-orig,11.48 KB, text/plain)
2007-10-31 15:58 UTC, Laurento Frittella (mrfree)
Details
suspend2.patch (suspend2.patch,549 bytes, patch)
2007-11-01 19:08 UTC, Laurento Frittella (mrfree)
Details | Diff
debug-busy (debug-busy,141.16 KB, text/plain)
2007-11-01 19:09 UTC, Laurento Frittella (mrfree)
Details
debug-with -F/etc/hibernate/suspend2.conf (debug-with,93.37 KB, text/plain)
2007-11-03 14:25 UTC, Laurento Frittella (mrfree)
Details
debug-without (debug-without,92.45 KB, text/plain)
2007-11-03 14:26 UTC, Laurento Frittella (mrfree)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Laurento Frittella (mrfree) 2007-10-31 13:00:01 UTC
cat: /sys/power/tuxonice/: Is a directory
ABORTING: /sys/power/tuxonice/ did not return a valid result.
hibernate: Aborting.

I'm using the fileallocator, I remember a similar problem with the 1.96 version.. but I'm not sure about this.
Comment 1 Alon Bar-Lev (RETIRED) gentoo-dev 2007-10-31 14:20:36 UTC
Please paste the output of hibernate runs with --verbosity=4
Thanks.
Comment 2 Alon Bar-Lev (RETIRED) gentoo-dev 2007-10-31 15:05:14 UTC
Created attachment 134805 [details, diff]
hibernate-script-1.97-suspend2.patch

Please try this patch.
Comment 3 Laurento Frittella (mrfree) 2007-10-31 15:47:45 UTC
Created attachment 134812 [details]
hibernate verb=4, patched suspend2

Using your patch the hibernate script dies with:

You haven't specified a resume=/resume2= parameter on your kernel command line

Your GRUB or LILO config should have something like resume=swap:/dev/hdaX
where /dev/hdaX is your swap partition. You will then need to either reboot
after doing so or set it manually (this time only) using:
    echo swap:/dev/hdaX > /sys/power/tuxonice/resume
hibernate: Aborting.

This is wrong because I'm using firewriter and my cmdline is correct
Comment 4 Laurento Frittella (mrfree) 2007-10-31 15:58:17 UTC
Created attachment 134813 [details]
hibernate verb=4, original (1.97) suspend2

This is the output of "hibernate --verbosity=4" using the original suspend2 file shipped with the 1.97 version
Comment 5 Laurento Frittella (mrfree) 2007-11-01 19:08:14 UTC
Created attachment 134937 [details, diff]
suspend2.patch

This is a simple patch as suggested by Pat Double on the suspend2-users mailing-list.

Using this patch the problem disappears but I receive:

# hibernate
/bin/echo: write error: Device or resource busy
Comment 6 Laurento Frittella (mrfree) 2007-11-01 19:09:08 UTC
Created attachment 134938 [details]
debug-busy

These are the debug messages with the previously attached patch
Comment 7 Laurento Frittella (mrfree) 2007-11-01 20:08:00 UTC
Oops my bad! The patch doesn't solve the problem :( 

I forgot I added "VerifyFilewriterResume2 no" to my suspend2.conf for
testing (it seems to skip the problem "is a directory" but hibernate script still not work).
Comment 8 Alon Bar-Lev (RETIRED) gentoo-dev 2007-11-02 19:11:15 UTC
You are trying to use sysfs and not suspend2 (DoSysfsPowerStateSuspend).
Please disable suspend emulation in suspend2 kernel configuration.
Comment 9 Laurento Frittella (mrfree) 2007-11-02 22:21:47 UTC
(In reply to comment #8)
> You are trying to use sysfs and not suspend2 (DoSysfsPowerStateSuspend).
> Please disable suspend emulation in suspend2 kernel configuration.

What do you mean? I tried to disable "Suspend to RAM and standby" and "Replace swsusp by default" but same "is directory" issue here.

#
# Power management options (ACPI, APM)
#
CONFIG_PM=y
CONFIG_PM_LEGACY=y
# CONFIG_PM_DEBUG is not set
CONFIG_PM_SLEEP=y
CONFIG_SUSPEND_UP_POSSIBLE=y
# CONFIG_SUSPEND is not set
CONFIG_HIBERNATION_UP_POSSIBLE=y
CONFIG_HIBERNATION=y
CONFIG_PM_STD_PARTITION=""
CONFIG_TOI_CORE=y

#
# Image Storage (you need at least one allocator)
#
CONFIG_TOI_FILE=y
# CONFIG_TOI_SWAP is not set

#
# General Options
#
CONFIG_TOI_CRYPTO=y
CONFIG_TOI_USERUI=y
CONFIG_TOI_USERUI_DEFAULT_PATH="/sbin/tuxoniceui_fbsplash"
# CONFIG_TOI_KEEP_IMAGE is not set
# CONFIG_TOI_REPLACE_SWSUSP is not set
CONFIG_TOI_CHECKSUM=y
CONFIG_TOI_DEFAULT_WAIT=25
Comment 10 Alon Bar-Lev (RETIRED) gentoo-dev 2007-11-02 23:19:31 UTC
Can you please apply my patch again? (attachment#134805 [details, diff])

1. Paste the output of:
cat /sys/power/tuxonice/resume

2. Execute:
hibernate --config-file=/etc/hibernate/suspend2.conf --verbosity=4

Thanks.
Comment 11 Laurento Frittella (mrfree) 2007-11-03 12:02:35 UTC
I re-emerged hibernate-script and applied your patch.

The /sys/power/tuxonice/resume was empty so I tried to use resume= instead of resume2= in my cmdline and now the suspend process seems to work (it seems I need to add --config-file=/etc/hibernate/suspend2.conf otherwise hibernate script dies with the "/bin/echo: write error: Device or resource busy" error) but the resume process *doesn't start* (the system boots normally) and there isn't any suspend/tuxonice message in dmesg.

I've just emerged sys-kernel/genkernel-3.4.9_pre6 and used it to build both kernel and initrd image.
Comment 12 Alon Bar-Lev (RETIRED) gentoo-dev 2007-11-03 12:10:31 UTC
See bug#197244 for genkernel patch.

After you have working system, we determine why it was not detected automatically.
Comment 13 Laurento Frittella (mrfree) 2007-11-03 13:58:57 UTC
Ok using both your patch (suspend2 and genkernel) now I am able to suspend and resume my laptop using tuxonice ;) Many thanks!

I reported the hibernate script bug upstream too and a patch slightly different from your was submitted, please take a look here http://bugzilla.tuxonice.net/show_bug.cgi?id=339

Now I'd like to know why the hibernate script doesn't recognize my shining tuxonice capable system :)

# cat /etc/hibernate/hibernate.conf 
TryMethod suspend2.conf
TryMethod disk.conf
TryMethod ram.conf
Comment 14 Alon Bar-Lev (RETIRED) gentoo-dev 2007-11-03 14:10:21 UTC
Please paste a new debug log, with suspend2.conf and without.
Comment 15 Laurento Frittella (mrfree) 2007-11-03 14:25:43 UTC
Created attachment 135085 [details]
debug-with -F/etc/hibernate/suspend2.conf
Comment 16 Laurento Frittella (mrfree) 2007-11-03 14:26:42 UTC
Created attachment 135087 [details]
debug-without

This time it worked without the -F/etc/hibernate/suspend2.conf too
Comment 17 Alon Bar-Lev (RETIRED) gentoo-dev 2007-11-03 14:32:17 UTC
So, can we close this bug?
Or you can reproduce a none working scenario?
Comment 18 Laurento Frittella (mrfree) 2007-11-03 14:37:29 UTC
I think so. I will eventually reopen this bug if I'll find a new non-working scenario.