Bug 233761

Summary: Failure to suspend on PowerBook
Product: [Fedora] Fedora Reporter: David Woodhouse <dwmw2>
Component: pm-utilsAssignee: Phil Knirsch <pknirsch>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-03-27 23:59:06 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 150226    

Description David Woodhouse 2007-03-24 19:08:23 UTC
/usr/sbin/pm-suspend fails on my PowerBook, with the following complaint:
Error: kernel cannot suspend to ram.

Commenting out the offending check makes it work, since it talks to the PMU
directly.

Comment 1 Will Woods 2007-03-24 19:14:58 UTC
Really? That's it? I had assumed the kernel actually wasn't capable of
suspending to RAM on PMU-using machines.

The check you're referring to, I assume, is this:

        if ! grep -q mem /sys/power/state ; then
            echo "Error: kernel cannot suspend to ram." 1>&2
            exit 1
        fi

Is there an equivalent sysfs file for PMU state/capabilities? Maybe the kernel
needs a simple patch to export the PMU info in /sys/power/state?

Comment 2 David Woodhouse 2007-03-24 19:25:43 UTC
The kernel has been suspending to RAM on PMU-based machines for _much_ longer
than it's been doing so with ACPI crap.

There is work afoot to make the kernel suspend/resume using the "generic" stuff
in /sys/power/state, but it isn't yet ready -- it isn't just a simple patch,
because that "generic" code was fairly poorly-designed.

I don't believe there's a sysfs file you can query to check if the machine can
suspend. Trust HAL; it has a special case. 

Comment 3 David Woodhouse 2007-03-25 00:06:54 UTC
Actually I have some working patches which make /sys/power/state work. I'll look
at putting them into the rawhide kernel.

Comment 4 David Woodhouse 2007-03-27 23:59:06 UTC
The kernel now lets you use /sys/power/state.