Bug 183658

Summary: Suspend on lid close does not work on my iBook
Product: [Fedora] Fedora Reporter: Andrew Overholt <overholt>
Component: halAssignee: David Zeuthen <davidz>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: dwmw2, frank, kate, mclasen, ncunning, redhat, richard
Target Milestone: ---   
Target Release: ---   
Hardware: powerpc   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-04-02 23:24:30 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:
Attachments:
Description Flags
Log of hal being run with --verbose=yes
none
Log of hal being run with --verbose=yes
none
Log of gpm being run with --verbose=yes
none
Log of gpm being run with --verbose=yes
none
Log of gpm being run with --verbose=yes (but hal was started using /etc/init.d/h aldaemon)
none
Log of gpm being run with --verbose=yes (but hal was started using /etc/init.d/h aldaemon) none

Description Andrew Overholt 2006-03-02 15:44:16 UTC
Description of problem:
Suspend on lid close does not work on my iBook

Version-Release number of selected component (if applicable):
2.6.15-1.1996_FC5 #1 Tue Feb 28 16:10:38 EST 2006 ppc ppc ppc GNU/Linux
gnome-power-manager-2.13.92-2

How reproducible:
Always

Steps to Reproduce:
1. Install FC5test3, update to rawhide
2. Ensure that the "When laptop lid is closed:  Suspend" is checked under
"Running on battery" preferences
3. Close lid
  
Actual results:
Nothing

Expected results:
Suspend .. like when I have apmud installed

Additional info:

Comment 1 Richard Hughes 2006-03-02 16:02:23 UTC
what does lshal -m print when you shut the lid of your iBook?

Comment 2 Andrew Overholt 2006-03-02 16:50:26 UTC
(In reply to comment #1)
> what does lshal -m print when you shut the lid of your iBook?

Nothing.

If I start monitoring before I unplug, I get this:

pmu_battery_0_0 property battery.remaining_time = 1692 (0x69c)
pmu_battery_0_0 property battery.rechargeable.is_discharging = true
pmu_battery_0_0 property battery.rechargeable.is_charging = false
pmu_info_1 property ac_adapter.present = false

Comment 3 Richard Hughes 2006-03-02 17:32:15 UTC
This is a HAL error (probably with the pmu addon) and not the fault of g-p-m.
HAL never sends the "lid is closed" event to g-p-m, so g-p-m is not even aware
that the lid is closed.

I'm guessing you are running rawhide HAL (which is pretty close to CVS for the
pmu stuff), so I would report this to the hal mailing list.

Comment 4 Andrew Overholt 2006-03-08 14:21:27 UTC
Adding as blocker for FC5.  Feel free to remove if this isn't important enough
for a blocker.

Comment 5 David Woodhouse 2006-03-08 15:01:55 UTC
Just install apmud -- it's far too late to be adding new blocker bugs to FC5.

Comment 6 Andrew Overholt 2006-03-08 15:04:54 UTC
I know about apmud but gnome-power-manager is supposed to work and is in core. 
If it doesn't work, apmud should be in core, IMO.

Comment 7 Richard Hughes 2006-03-08 16:01:25 UTC
This works on my iBook clamshell. g-p-m supports events for lid closure on 
iBooks and has for some time. It's likely that the pmu hal addon isn't picking 
up the lid changed events, therefore g-p-m would know nothing about the event.

Comment 8 Richard Hughes 2006-03-08 17:41:46 UTC
>Just install apmud

I'm guessing apmud might not work either. If it does, then the hal addon needs
patching.

Richard.

Comment 9 Andrew Overholt 2006-03-08 18:21:59 UTC
(In reply to comment #8)
> >Just install apmud
> 
> I'm guessing apmud might not work either. If it does, then the hal addon needs
> patching.

apmud _does_ work.

Comment 10 Richard Hughes 2006-03-09 00:16:52 UTC
In which case case you grab me a hal verbose trace (see
http://www.gnome.org/projects/gnome-power-manager/bugs.html), and shut and open
the lid a few times, and attach the output to this bug. Many thanks.

Comment 12 John (J5) Palmieri 2006-05-05 15:45:04 UTC
This has been pushed to FC5.  I'm going to push the patch to Rawhide today.

Comment 13 Andrew Overholt 2006-05-05 18:40:01 UTC
I updated just before lunch and rebooted when I came back.  If I unplug the
power adapter and close the lid, the backlight goes off but it doesn't seem to
get into a proper sleep and when I open the lid again it's got a black screen
but I apparently can't do anything locally.  I can ssh to the laptop, though.

Comment 14 Kate 2006-06-25 17:30:25 UTC
I have a similar problem too on my iBook G4. If I close the lid (to suspend),
the screen goes blank (like i've gone into suspend), but the backlight never
goes off (the apple logo still remains lit). 
The disk activity light 'pulses' like it's gone into sleep.

When I open the lid, I can hear the disk and cd spin up, the lcd flickers but I
never regain my desktop.

Installing apmud and running the pmud service makes no difference; neither does
removing/reinstalling gnome-power-manager.

It only worked intermittently previous to my last update (it would suspend once,
maybe twice and then blank screen again); i'm now running
kernel-2.6.17-1.2139_FC5 and it doesn't seem to work at all; don't know if
that's useful at all...

Comment 15 Andrew Overholt 2006-07-13 15:22:59 UTC
(In reply to comment #14)
> I have a similar problem too on my iBook G4. If I close the lid (to suspend),
> the screen goes blank (like i've gone into suspend), but the backlight never
> goes off (the apple logo still remains lit).
> [...]
> When I open the lid, I can hear the disk and cd spin up, the lcd flickers
> but I never regain my desktop.
> 
> Installing apmud and running the pmud service makes no difference; neither
> does removing/reinstalling gnome-power-manager.

I am in the *exact* same situation as Kate.

Comment 16 Richard Hughes 2006-07-30 22:06:57 UTC
Then it sounds very much like a kernel problem or an X issue, rather than a
g-p-m problem.

Comment 17 Matthias Clasen 2006-09-10 16:07:59 UTC
What is the status of this in rawhide ? 
Does lid-close-to-suspend work on iBooks there ?

Comment 18 Matthias Clasen 2006-09-25 17:16:25 UTC
David, any update ?

Comment 19 Frank Arnold 2006-10-14 16:40:06 UTC
At least on my PowerBook5,6 suspend-to-ram and suspend-to-disk are finally
working. No apmud installed.

Comment 20 W. Michael Petullo 2006-11-27 00:37:07 UTC
I have this problem in Fedora Core 6.  pm-suspend suspends my iBook G4, but
closing the lid does not.  Right-clicking on the gnome-power-manager
notification icon and selecting suspend *does* work.  gnome-power-manager is
running and is set to suspend on lid close.

BUT...If I run hal with "/usr/sbin/hald --daemon=no --verbose=yes" instead of
with /etc/init.d/haldaemon and run gnome-power-manager in the same way, things
seem to work (see attached logs).

Comment 21 W. Michael Petullo 2006-11-27 00:40:05 UTC
Created attachment 142143 [details]
Log of hal being run with --verbose=yes

This is hal's stdout.  I opened and closed the lid to my iBook three times. 
Each time the laptop suspended.

Comment 22 W. Michael Petullo 2006-11-27 00:41:08 UTC
Created attachment 142144 [details]
Log of hal being run with --verbose=yes

This is hal's stderr.  I opened and closed the lid to my iBook three times. 
Each time the laptop suspended.

Comment 23 W. Michael Petullo 2006-11-27 00:42:41 UTC
Created attachment 142145 [details]
Log of gpm being run with --verbose=yes

This is gnome-power-manager's stdout.  I opened and closed the lid to my iBook
three times.  Each time the laptop suspended.

Comment 24 W. Michael Petullo 2006-11-27 00:44:13 UTC
Created attachment 142146 [details]
Log of gpm being run with --verbose=yes

This is gnome-power-manager's stderr.  I opened and closed the lid to my iBook
three times.  Each time the laptop suspended.

Comment 25 W. Michael Petullo 2006-11-27 00:45:44 UTC
Created attachment 142147 [details]
Log of gpm being run with --verbose=yes (but hal was started using /etc/init.d/h
aldaemon)

This is gnome-power-manager's stdout.  I opened and closed the lid to my iBook
but it did not suspend.

Comment 26 W. Michael Petullo 2006-11-27 00:47:40 UTC
Created attachment 142148 [details]
Log of gpm being run with --verbose=yes (but hal was started using /etc/init.d/h
aldaemon)

This is gnome-power-manager's stderr.  I opened and closed the lid to my iBook
but it did not suspend.

Comment 27 David Woodhouse 2006-11-27 11:18:47 UTC
Reassigning to HAL. This works for me (and others) on various laptops -- not
entirely sure how to debug it if running with --verbose --no-daemon magically
fixes it.

What about when you just start it manually without those options?

Comment 28 David Zeuthen 2007-04-02 23:24:30 UTC
I'm pretty sure this is fixed now, otherwise reopen. Thanks.