[Pm-utils] pm-utils 1.2.1 and 1.1.2.5 released
Victor Lowther
victor.lowther at gmail.com
Sun Oct 5 07:45:02 PDT 2008
On Sun, 2008-10-05 at 13:00 +0200, Michael Biebl wrote:
> 2008/10/5 Michael Biebl <mbiebl at gmail.com>:
> > 2008/10/4 Victor Lowther <victor.lowther at gmail.com>:
> >
> >> * pm-utils has support for saving quirks as a HAL FDI file. If
> >> called with --store-quirks-as-fdi, an .fdi file specific to the
> >> machine and quirks passed on the command line will be written
> >> to /tmp/pm-utils-created.fdi.
> >
> > Btw, this doesn't seem to work for me.
> > pm-suspend --store-quirks-as-fdi only does a suspend but not actually
> > write the fdi file.
> > I'd expect that --store-quirks-as-fdi will *only* write the fdi file
> > and stop afterwards.
> >
> > I also wonder, if we shouldn't always reset acpi_flags to 0.
> > Example: I have tested
> > pm-suspend --quirk-s3-bios --quirk-s3-mode
> >
> > and afterwards
> >
> > pm-suspend --quirk-vbe-mode --quirk-vbestate-restore
> > and /proc/sys/kernel/acpi_video_flags was still set to 3.
> >
>
> I have more issues with this release:
>
> Setting
> SLEEP_MODULE has no effect, it always uses kernel.
> I tried to set it to auto or explicitely to uswsusp to no avail.
That is due to another thinko on my part. I was trying to name the
enviromnent variables consistently, but only did half the job. I blame
being distracted by a crying baby.
diff --git a/pm/module.d/tuxonice b/pm/module.d/tuxonice
index f4e3de9..3db8cbe 100755
--- a/pm/module.d/tuxonice
+++ b/pm/module.d/tuxonice
@@ -13,7 +13,7 @@ done
if [ -z "$HIBERNATE_MODULE" -a -n "$TUXONICE_LOC" ] && \
[ -f "${TUXONICE_LOC}/do_hibernate" ]; then
- HIBERNATE_METHOD="tuxonice"
+ HIBERNATE_MODULE="tuxonice"
do_hibernate()
{
echo 5 > "${TUXONICE_LOC}/powerdown_method"
@@ -24,7 +24,7 @@ fi
if [ -z "$SUSPEND_HYBRID_MODULE" -a -n "$TUXONICE_LOC" ] && \
grep -q mem /sys/power/state && \
[ -f "${TUXONICE_LOC}/do_hibernate" ]; then
- SUSPEND_HYBRID_METHOD="tuxonice"
+ SUSPEND_HYBRID_MODULE="tuxonice"
do_suspend_hybrid()
{
echo 3 >"${TUXONICE_LOC}/powerdown_method"
diff --git a/pm/module.d/uswsusp b/pm/module.d/uswsusp
index 1bb1e68..9da30c9 100755
--- a/pm/module.d/uswsusp
+++ b/pm/module.d/uswsusp
@@ -52,10 +52,10 @@ uswsusp_help()
echo " --quirk-none"
}
-if [ -z "$SUSPEND_METHOD" ] && command_exists s2ram && \
+if [ -z "$SUSPEND_MODULE" ] && command_exists s2ram && \
( grep -q mem /sys/power/state || \
( [ -c /dev/pmu ] && pm-pmu --check; ); ); then
- SUSPEND_METHOD="uswsusp"
+ SUSPEND_MODULE="uswsusp"
do_suspend()
{
uswsusp_get_quirks
@@ -67,23 +67,23 @@ if [ -z "$SUSPEND_METHOD" ] && command_exists s2ram && \
fi
fi
-if [ -z "$HIBERNATE_METHOD" ] && \
+if [ -z "$HIBERNATE_MODULE" ] && \
[ -f /sys/power/disk ] && \
grep -q disk /sys/power/state && \
[ -c /dev/snapshot ] &&
command_exists s2disk; then
- HIBERNATE_METHOD="uswsusp"
+ HIBERNATE_MODULE="uswsusp"
do_hibernate()
{
s2disk
}
fi
-if [ -z "$SUSPEND_HYBRID_METHOD" ] &&
+if [ -z "$SUSPEND_HYBRID_MODULE" ] &&
grep -q mem /sys/power/state && \
command_exists s2both && \
check_hibernate; then
- SUSPEND_HYBRID_METHOD="uswsusp"
+ SUSPEND_HYBRID_MODULE="uswsusp"
do_suspend_hybrid()
{
uswsusp_get_quirks
> Unfortunately the new logic is a bit hard to decipher, so I haven't
> found out yet where the problem is.
> Part of the code is now in pm-functions, part of it in the modules;
> there is a function check_suspend() which is never called, etc. The
> old code was clearer in that regard.
As pm-functions sources the sleep modules, the modules themselves check
to see if all the prerequisites are met for suspend, hibernate, and
suspend_hybrid. If they are, they set the appropriate _MODULE
environment variable and declare the appropriate do_ function on a
method by method basis, otherwise they don't do anything for that
method.
The check_ functions are stubs now, and mainly exist for
pm-is-supported.
>
> Cheers,
> Michael
--
Victor Lowther
Ubuntu Certified Professional
More information about the Pm-utils
mailing list