Bug 238087

Summary: Battery recall warnings are not shown
Product: [Fedora] Fedora Reporter: David Zeuthen <davidz>
Component: gnome-power-managerAssignee: David Zeuthen <davidz>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: mclasen, richard
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-05-03 03:25:47 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    
Attachments:
Description Flags
Screenshot of preferences none

Description David Zeuthen 2007-04-27 02:02:05 UTC
Description of problem:

There is no UI for setting

 action_ac_sleep_type (defaults to 'suspend')
 action_battery_sleep_type (defaults to 'hibernate')

which pretty much blows; I really don't want my laptop to hibernate when on
battery and I shouldn't need to go into gconf-editor to change this. See
attached screenshot.

Also, it seems like 

 /apps/gnome-power-manager/show_recalled_battery_warning

is set to FALSE by default? Why's that?

Version-Release number of selected component (if applicable):

gnome-power-manager-2.18.2-1.fc7

Marking this as a FC7 blocker...

Comment 1 David Zeuthen 2007-04-27 02:02:06 UTC
Created attachment 153566 [details]
Screenshot of preferences

Comment 2 David Zeuthen 2007-04-27 02:03:29 UTC
(adjusting Summary + version)

Comment 3 David Zeuthen 2007-04-27 02:09:14 UTC
Ricard, any chance there's an easy fix for this? Thanks!

Comment 4 Richard Hughes 2007-04-27 05:48:12 UTC
Battery warning defaults to true upstream:

    <schema>
      <key>/schemas/apps/gnome-power-manager/show_recalled_battery_warning</key>
      <applyto>/apps/gnome-power-manager/show_recalled_battery_warning</applyto>
      <owner>gnome-power-manager</owner>
      <type>bool</type>
      <default>true</default>
      <locale name="C">
        <short>If we should show the recalled battery warning for a broken
battery</short>
        <long>If we should show the recalled battery warning for a broken
battery. Set this to false only if you know your battery is okay.</long>
      </locale>
    </schema>

Also, we don't want the laptop to auto-suspend on idle, as suspend does not save
contents of the laptop if just left. Imagine you are just walking away from your
laptop on battery? Hibernate would preserve state but it would suspend after
maybe half an hour, and then competely (hardware) turn off after a couple of
hours. Suspend state is lost, and work is gone/disk corrupted.

Until we can reliably auko-wake up from suspend and re-hibernate I think this is
the safest thing to do.

Richard.


Comment 5 David Zeuthen 2007-04-27 07:15:12 UTC
(In reply to comment #4)
> Battery warning defaults to true upstream:

$ cat /etc/gconf/schemas/gnome-power-manager.schemas |grep -C 3 
"<applyto>/apps/gnome-power-manager/show_recalled_battery_warning</applyto>"

    <schema>
      <key>/schemas/apps/gnome-power-manager/show_recalled_battery_warning</key>
      <applyto>/apps/gnome-power-manager/show_recalled_battery_warning</applyto>
      <owner>gnome-power-manager</owner>
      <type>bool</type>
      <default>false</default>
[davidz@gemini ~]$ rpm -q gnome-power-manager
gnome-power-manager-2.18.2-1.fc7

And I don't see any patches here to change that

 http://cvs.fedora.redhat.com/viewcvs/devel/gnome-power-manager/

Yet you're right about the upstream SCM
 http://svn.gnome.org/viewcvs/gnome-power-manager/tags/GNOME_POWER_MANAGER_2_18_2/data/gnome-power-manager.schemas.in?revision=2135&view=markup

Hmm.. Aha! So this is caused by this patch

http://cvs.fedora.redhat.com/viewcvs/devel/gnome-power-manager/gnome-power-manager-2.15.4-nodefaultbeep.patch?rev=1.1&view=auto

Sigh. I thought patch(1) would be smarter. OK, sorry for the false alarm; I'll
nuke that patch.

> Also, we don't want the laptop to auto-suspend on idle, as suspend does not save
> contents of the laptop if just left. Imagine you are just walking away from your
> laptop on battery? Hibernate would preserve state but it would suspend after
> maybe half an hour, and then competely (hardware) turn off after a couple of
> hours. Suspend state is lost, and work is gone/disk corrupted.
> 
> Until we can reliably auko-wake up from suspend and re-hibernate I think this is
> the safest thing to do.

Well. I'm not a big fan of options, as you may know, but in this case I think
you ought to give the user the option of what to do (and gconf doesn't count)...
also, I think it just needs to be a single option that applies both for
on_battery/on_ac and that it belongs in under the "General" tab; e.g. 

 When system is idle: [Suspend |V]
 (that's a pull down menu)

or, I guess, have one for both on_ac and on_battery (and on_ups)...

But I guess we missed the boat for this for Fedora 7 :-/...  So I'm repurposing
this bug to only  be about the lack of battery recall notifications.

Thanks for the quick feedback, btw.