Thread: Macbook and ACPI Battery support
Brought to you by:
matthiasgrimm
From: PaulTT <pa...@gm...> - 2007-10-23 10:58:54
|
i had a problem with ACPI and MacBook... after a while, with pbbuttonsd running, acpi stopped giving (and readin) sane values for percent charge of the battery, answering with a 'nan%' looking in acpi files, it lost even data about voltage and so on... now i commented out the lines in pbbuttonsd accessing battery data, just to isolate the problem, and it worked, it's 4 days, and i still get correct battery charge values. i'll try to get around the problem and write a patch which could remove the problem. in the meantime i could post a patch which add an option in config file to enable/disable acpi battery check/control... can i go on? thanx, PaulTT |
From: PaulTT <pa...@gm...> - 2007-11-08 10:26:02
|
> > can i go on? i'm not sure if it was really pbbuttons fault after a while, one month of uptime, i say, acpi battery stat went away again. anyway, i'll put together a (trivial) patch to enable/disable battery pooling by pbbuttons, anyway Paul |
From: Matthias G. <mat...@us...> - 2007-11-10 10:27:05
|
On Thu, 8 Nov 2007 11:26:03 +0100 PaulTT <pa...@gm...> wrote: Hi Paul, > i'm not sure if it was really pbbuttons fault > after a while, one month of uptime, i say, acpi battery stat went away again. > anyway, i'll put together a (trivial) patch to enable/disable battery > pooling by pbbuttons, anyway ACPI support in pbbuttonsd is quite very basic yet. If you have any code that improves the situation, feel free to send it to me. ACPI should always report the correct battery values if pbbuttons polling the data or not. Possibly the ACPI kernel code might got confused by an error I made in pbbuttonsd but this is not very likely. (confusing the kernel, not making errors in pbbuttonsd ;-) ) If you have acpid running, it could also an incompatibility of acpid and pbbuttonsd. I made pbbuttonsd attach to acpid if it can't get the acpi kernel port directly, but possibly this failed somehow. I have only poor possibilities to test all this because I don't have a MacBook. So help is always welcome. Best Regards Matthias |
From: PaulTT <pa...@gm...> - 2007-11-26 14:38:17
|
On Nov 10, 2007 11:27 AM, Matthias Grimm <mat...@us...> wrote: > On Thu, 8 Nov 2007 11:26:03 +0100 > PaulTT <pa...@gm...> wrote: > > Hi Paul, > > > > i'm not sure if it was really pbbuttons fault > > after a while, one month of uptime, i say, acpi battery stat went away again. > > anyway, i'll put together a (trivial) patch to enable/disable battery > > pooling by pbbuttons, anyway > > ACPI support in pbbuttonsd is quite very basic yet. If you have any code > that improves the situation, feel free to send it to me. bein a little jammed in these days, as soon as i have the time, i'll write a patch to enable/disable battery check at runtime (it could be useful for desktop computers, anyway, i think) from configuration file > ACPI should always report the correct battery values if pbbuttons > polling the data or not. Possibly the ACPI kernel code might got > confused by an error I made in pbbuttonsd but this is not very likely. > (confusing the kernel, not making errors in pbbuttonsd ;-) ) i couldn't get any reasonable result, indeed. it may be that pbb could confuse the kernel, but even with battery code disabled, after a while -even if it was a loooong while- acpi stopped responding correctly. so it could or couldn't be the fault of pbb. now, with 2.6.24rc3 it seems to be stable. but i have to wait at least another few days to talk.... i'll let you informed, thanx for the work and the attention :) > If you have acpid running, it could also an incompatibility of acpid > and pbbuttonsd. I made pbbuttonsd attach to acpid if it can't get the i stopped acpid anyway since i didn't found any utility in having it > acpi kernel port directly, but possibly this failed somehow. I have > only poor possibilities to test all this because I don't have a > MacBook. So help is always welcome. if tou need something to test, tell me, i've got a macbook which is mine, and another to test on ;P > Best Regards > Matthias > bye |
From: PaulTT <pa...@gm...> - 2008-01-09 23:06:10
|
..... > > acpi kernel port directly, but possibly this failed somehow. I have > > only poor possibilities to test all this because I don't have a > > MacBook. So help is always welcome. > > if tou need something to test, tell me, i've got a macbook which is > mine, and another to test on ;P > ... i have put together a small patch that enables sleep and enables an option to ignore battery status. i did it togethere because of the problem i have with acpi. i added options Acpi_ForceSleep and IgnoreBatteryStatus to MODULE ACPI. sleep seems to work (i copied part of s2ram which actually does it) so far, i've got a little problem with the other part, about the battery. i added a line ti case TAG_TIMEREMAINING in acpi_handle_tags, where i say: if (base->flags.ignorebattery) break; before tf (cfgure) tagerr.... where flags.ignorebattery is in my case = true. but the case is that sometimes it decides that it should go to sleep, or when i'm in ac power mode, and unplug the power cable, it decides too to go to sleep. i have a question: am ia missing something and there's another path of the messages requesting time remaining and the need to sleep? have i explained it in a understandable way? thanx, Paul |
From: PaulTT <pa...@gm...> - 2008-01-11 18:06:06
|
.... > i added a line ti case TAG_TIMEREMAINING in acpi_handle_tags, where i say: > if (base->flags.ignorebattery) break; > before > tf (cfgure) tagerr.... changed those lines. now it seems to work reliably, i'll let you know, thanx |