View previous topic :: View next topic |
Author |
Message |
marinheiro Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 16 Jan 2004 Posts: 140
|
Posted: Sun Mar 04, 2012 11:27 pm Post subject: battery charge sensing stopped workling |
|
|
I have an old 2nd-gen macbook. Somewhere after a recent emerge battery sensing stopped working. The battery always shows with a change of 0%. If I switch from mains to battery, It recognizes the switchover but sees the battery having zero charge and so goes straight into hibernation. It isn't a hardware problem, because I can boot into OSX which seems the battery as fine, and charging normally.
Can anyone suggest where I should look?
Thanks
Graham |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
CrankyPenguin Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/gallery/Star Wars/movie_star_wars_han_solo.gif)
Joined: 19 Jun 2003 Posts: 283
|
Posted: Mon Mar 05, 2012 1:49 am Post subject: |
|
|
Lets start by narrowing it down. In general the battery sensing is controlled by: the ACPI features; the /proc/ or /sys/ directories; and whatever charge sensing software you are using.
During or after this Emerge, did you:
- Build a new kernel? In which case the culprit may lie in missing or incompatable acpi drivers or a missing proc or sys interface.
- Change the system layout or some basic package which may also have played merry hell with your apis.
- Update your battery monitor app? In which case it may want a new api.
Given that it detects the AC adapter I would suspect that you built a kernel and either the battery module was not built or is giving an error. First check to see that it is loaded and/or built into the kernel. Then if so I'd check dmesg for any errors associated with it, say when you add the battery or modprobe the module. Then if that passes I'd check to see if the /proc/acpi battery directory and/or the appropriate sys directories are present. If they are (or at least the one one you had before is) then I'd check your monitor app. Perhaps it was updated and now wants to look in Sys instead of proc. _________________ Linux, the OS for the obsessive-compulsive speed freak in all of us. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
marinheiro Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 16 Jan 2004 Posts: 140
|
Posted: Mon Mar 05, 2012 11:55 pm Post subject: |
|
|
I have gnome-power-manager, which apparently sits on top of upower.
Code: | Device: /org/freedesktop/UPower/devices/line_power_ADP1
native-path: /sys/devices/LNXSYSTM:00/device:00/ACPI0003:00/power_supply/ADP1
power supply: yes
updated: Mon Mar 5 20:56:29 2012 (9550 seconds ago)
has history: no
has statistics: no
line-power
online: yes
Device: /org/freedesktop/UPower/devices/battery_BAT0
native-path: /sys/devices/LNXSYSTM:00/device:00/PNP0C0A:00/power_supply/BAT0
power supply: yes
updated: Mon Mar 5 23:35:38 2012 (1 seconds ago)
has history: yes
has statistics: yes
battery
present: yes
rechargeable: yes
state: charging
energy: 0 Wh
energy-empty: 0 Wh
energy-full: 0 Wh
energy-full-design: 0 Wh
energy-rate: 0 W
percentage: 0%
capacity: 100%
Daemon:
daemon-version: 0.9.13
can-suspend: yes
can-hibernate yes
on-battery: no
on-low-battery: no
lid-is-closed: no
lid-is-present: yes
is-docked: no |
The only relevant thing I can see from dmesg is:
Code: | 0.317530] ACPI: Battery Slot [BAT0] (battery present) |
My kernel cnfig just has:
Code: | CONFIG_ACPI_BATTERY=y |
so maybe I'm missing a specific battery driver in the kernel, though I never deliberately set one before.
Graham |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
CrankyPenguin Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/gallery/Star Wars/movie_star_wars_han_solo.gif)
Joined: 19 Jun 2003 Posts: 283
|
Posted: Wed Mar 07, 2012 5:26 am Post subject: |
|
|
It sounds like that may be the case. I know that some parts of the kernel were restructured for the most recent releases and make oldconfig didn't always function properly. I suggest that you go into menuconfig and see what you can find. As a quick sanity check you could also poke around in the /sys/devices/LNXSYSTM:00/device:00/PNP0C0A:00/power_supply/ directory to see what is there. It is unlikely that the information would be correctly present in the sys directory and have upower be wrong but stranger things have happened. _________________ Linux, the OS for the obsessive-compulsive speed freak in all of us. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
marinheiro Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 16 Jan 2004 Posts: 140
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
CrankyPenguin Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/gallery/Star Wars/movie_star_wars_han_solo.gif)
Joined: 19 Jun 2003 Posts: 283
|
Posted: Mon Mar 12, 2012 3:05 am Post subject: |
|
|
Hmm, that stinks. Can you roll back to an older kernel? _________________ Linux, the OS for the obsessive-compulsive speed freak in all of us. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|