GNOME Bugzilla – Bug 332566
gpm suspended again with a charged battery
Last modified: 2006-03-05 21:53:58 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:
the title of the bug is incorrect... it should be "gpm suspend with charged battery".. sorry
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?
i think not... it only suspend... i am going to try it again when it s discharged
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.
Ok... I'll do it tomorrow.
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????
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?
Yes. Disable acpid, restart hald, and see if that works.
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?
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
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
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.
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
>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.
you mean that HAL is the problem??? DO you think is a debian problem or a HAL Version problem?
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.
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
(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.
Cool, nice one on the new laptop. >If I don't run it HAL doesn't show the batteries. by design. Richard.
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