After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 332566 - gpm suspended again with a charged battery
gpm suspended again with a charged battery
Status: RESOLVED FIXED
Product: gnome-power-manager
Classification: Deprecated
Component: gnome-power-manager
SVN TRUNK
Other All
: Normal normal
: ---
Assigned To: GNOME Power Manager Maintainer(s)
GNOME Power Manager Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2006-02-25 19:49 UTC by alejandro vera
Modified: 2006-03-05 21:53 UTC
See Also:
GNOME target: ---
GNOME version: 2.11/2.12



Description alejandro vera 2006-02-25 19:49:32 UTC
Please describe the problem:
This is related to bug 332055 (gpm doesnt suspend in critical battery). I used
the patch in that bug in a cvs version of gpm

then i waited until my notebook suspended. i plugged the AC cable, waited some
minutes and resumed. When my battery was 60% charged i unplugged my AC cable and
g-p-m suspended my notebook again.

Steps to reproduce:
1. wait until notebook suspends
2. plug cable, wait, resume, wait until battery is enough charged
3. unplug the cable


Actual results:
the notebook suspends again

Expected results:
to be awake :D

Does this happen every time?
yes

Other information:
Comment 1 alejandro vera 2006-02-25 20:17:17 UTC
the title of the bug is incorrect... it should be "gpm suspend with charged battery".. sorry
Comment 2 Richard Hughes 2006-02-25 20:51:07 UTC
Did you get a warning "The battery is below the critical level and this computer is about to suspend." when the battery was 60% charged?
Comment 3 alejandro vera 2006-02-25 21:25:03 UTC
i think not... it only suspend... i am going to try it again when it s discharged

Comment 4 Richard Hughes 2006-02-28 23:54:43 UTC
Alejandro, can you download CVS g-p-m, and then run the CVS version, and try to reproduce the problem. When you do, type this as root:

cat /var/log/messages | grep gnome

and tell me what it says.
Comment 5 alejandro vera 2006-03-01 02:06:47 UTC
Ok...  I'll do it tomorrow.

Comment 6 alejandro vera 2006-03-01 04:39:11 UTC
Hello

I pulled the new gpm and also dist-upgraded my SID debian... and now gpm doesnt recive any event... i unplugged my cable but gpm doesnt realized... i downgraded to gpm 2.13.92 and it was the same :(

This is the list of instaled software (dbus and hal)

dbus                              0.61-2    
dbus-1-utils                      0.61-2                         
libdbus-1-2                       0.61-2                         
libdbus-1-cil                     0.61-2                         
libdbus-1-dev                     0.61-2                         
libdbus-glib-1-2                  0.61-2                         
libdbus-glib-1-dev                0.61-2                         
hal                               0.5.6-4                        
libhal-dev                        0.5.6-4                        
libhal-storage1                   0.5.6-4                        
libhal1                           0.5.6-4   

Do you know how to find the problem??? could it be a dbus problem????
Comment 7 alejandro vera 2006-03-01 04:41:43 UTC
I looked at /var/log/acpid and plugged/unplugged the AC cable and i saw events... so i figure that the problem is in dbus...

is version 0.61 supported?
Comment 8 Richard Hughes 2006-03-01 10:06:40 UTC
Yes. Disable acpid, restart hald, and see if that works.
Comment 9 alejandro vera 2006-03-01 13:23:42 UTC
I remove (apt-get --purge removed  acpid) and rebooted the machine. Then gpm load but doesnt shows ...

So i tried installing acpid again and gpm was there again... but not working... i tried version 2.13.92 and dind't worked either...

BTW, If i press in gpms icon and select suspend, it works

any other idea?
Comment 10 alejandro vera 2006-03-01 14:41:42 UTC
I found that gpm doesnt refresh at all.. always shows the same amount of battery and state of AC cable... 

I tried recompiling it.. but it didn't worked either
Comment 11 Jaap A. Haitsma 2006-03-01 20:03:37 UTC
Richard,

On Debian it is necessary to have acpid installed. Otherwise you don't get the /proc/acpi/* files and HAL won't be able to read the battery status.

Jaap
Comment 12 Richard Hughes 2006-03-02 00:46:26 UTC
Jaap, thanks for the info, but are you sure? I thought that /proc/acpi/* was provided by the kernel, and acpid just read the /proc/acpi/event interface -- but then I guess debian is a different beast :-)

Alejandro, if you do "lshal -m", do you get events from HAL for the battery updates and the ac adapter inserts/removals?

Richard.
Comment 13 alejandro vera 2006-03-02 01:12:48 UTC
I have learned a lot in this bug about hal and dbus :D

This is the output of my "lshal -m"

I started with the AC cable plugged, lshal -m, then unplugged and plugged again... 

Start monitoring devicelist:
-------------------------------------------------
acpi_ADP1 property ac_adapter.present = false
acpi_BAT0 property battery.remaining_time = 17820 (0x459c)
acpi_BAT0 property battery.rechargeable.is_discharging = true
acpi_BAT0 property battery.rechargeable.is_charging = false
acpi_ADP1 property ac_adapter.present = true
acpi_BAT0 property battery.remaining_time = 180 (0xb4)
acpi_BAT0 property battery.rechargeable.is_discharging = false
acpi_BAT0 property battery.rechargeable.is_charging = true

So, i have the correct events :D
Comment 14 Richard Hughes 2006-03-03 11:43:18 UTC
>acpi_BAT0 property battery.remaining_time = 180 (0xb4)

This is the problem. .remaining_charge is emmitted before the is_* properties are changed. Now, a solution is going to be very difficult.

Richard.
Comment 15 alejandro vera 2006-03-03 12:23:01 UTC
you mean that HAL is the problem???

DO you think is a debian problem or a HAL Version problem?
Comment 16 Richard Hughes 2006-03-03 21:15:40 UTC
Please try 2.13.93 (available from http://ftp.gnome.org/pub/GNOME/sources/gnome-power-manager/2.13/) and tell me if this fixes the problem. Many thanks.
Comment 17 alejandro vera 2006-03-03 21:54:26 UTC
It worked!!! :D

I am really happy becous i was forced to use the old battery status applet (very old school :)

Now it works again.. I am going to try again the real bug and tell you if it is fixed :D
Comment 18 Jaap A. Haitsma 2006-03-05 00:32:01 UTC
(In reply to comment #12)
> Jaap, thanks for the info, but are you sure? I thought that /proc/acpi/* was
> provided by the kernel, and acpid just read the /proc/acpi/event interface --
> but then I guess debian is a different beast :-)

I just installed ubuntu on my new laptop (hibernate and suspend works. hoorray!! Only blank screen does not come back on automatically I need to do Alt-F1 and then Alt -F7) and it also runs acpid. If I don't run it HAL doesn't show the batteries.

Comment 19 Richard Hughes 2006-03-05 16:44:17 UTC
Cool, nice one on the new laptop. 

>If I don't run it HAL doesn't show the batteries.

by design.

Richard.
Comment 20 alejandro vera 2006-03-05 21:53:45 UTC
Using the 2.13.93 version i waited until notebook suspended, plugged the AC and resumed. waited ten until it was 20% charged and unplugged the AC... this time the machine didn't suspended again :D. The bug is fixed :D