[PC-BSD] MacBook Pro 5,4 (mid 2009) ACPI problem (battery not properly detected?)

Internal storage, motherboards, PCI cards, stuff inside the case.

[PC-BSD] MacBook Pro 5,4 (mid 2009) ACPI problem (battery not properly detected?)

Postby andersbo87 » 23 Jan 2012, 19:35

Hey!

This is my first post here, so I apologize if this question already has been asked.

I don't rightly know how to ask this but I seem to have a small problem with the battery on FreeBSD 9. I've tried installing both FreeBSD 9 and PC-BSD 9 successfully, but when I install X and GNOME on FreeBSD 9, and/or when I start ut PC-BSD 9 my battery indicator on the desktop keeps showing 0.0% and discharging, even though the battery in my computer, a MacBook Pro 5,4 (mid 2009 model) is connected to a power source and is fully charged. I browsed around in the FreeBSD handbook about ACPI problems, and one of the steps I tried to follow was to disable ACPI on boot to see if things worked any better, but that only caused a kernel panic, with a message saying "no suitable timer found" (see one of the attachments). I've also been running [FILE]sysctl hw.acpi[/FILE] and [FILE]acpiconf -i 0[/FILE], with both commands giving, in my eyes, unexpected results, which I've also attached. I've also added the output the messages from [FILE]dmesg[/FILE], if that helps diagnose the problem and finding a solution to it. I am using PC-BSD now, but I've been experiencing this problem on "regular" FreeBSD 9 too, so that is why I am posting here and not on the PC-BSD forums.

Output from [FILE]uname -a[/FILE]:
Code: Select all
FreeBSD pcbsd-5866 9.0-RELEASE FreeBSD 9.0-RELEASE #3: Tue Dec 27 14:14:29 PST 2011     
[email]root@build9x64.pcbsd.org[/email]:/usr/obj/builds/amd64/pcbsd-build90/fbsd-source/9.0/sys/GENERIC  amd64


Any help would be greatly appreciated.
Thanks in advance :)
Attachments

[The extension txt has been deactivated and can no longer be displayed.]

[The extension txt has been deactivated and can no longer be displayed.]

[The extension txt has been deactivated and can no longer be displayed.]

[The extension txt has been deactivated and can no longer be displayed.]

andersbo87
Junior Member
 
Posts: 39
Joined: 23 Jan 2012, 19:11
Location: Sarpsborg, Norway

Postby plamaiziere » 23 Jan 2012, 22:52

andersbo87 wrote:I browsed around in the FreeBSD handbook about ACPI problems, and one of the steps I tried to follow was to disable ACPI on boot to see if things worked any better, but that only caused a kernel panic, with a message saying "no suitable timer found" (see one of the attachments)

It is a known problem see the thread http://lists.soekris.com/pipermail/soekris-tech/2011-December/018026.html for an explanation.

Anyway I don't think it will help to disable acpi.

Did you try to set the tunable [FILE]debug.acpi.max_tasks[/FILE] in [FILE]/boot/loader.conf[/FILE]? As suggested in [FILE]dmesg[/FILE]:
Code: Select all
AcpiOsExecute: failed to enqueue task, consider increasing the debug.acpi.max_tasks tunable


I own a macbook pro 3,1 and I've set
Code: Select all
debug.acpi.max_tasks="128"
in [FILE]/boot/loader.conf[/FILE]. Not for the battery (dead since a long time) but to fix this error. May be it will help (?)

Regards.
plamaiziere
Member
 
Posts: 184
Joined: 04 Jan 2009, 21:37
Location: Rennes, France

Postby andersbo87 » 24 Jan 2012, 07:49

Thank you so much! That solved my problem :D The battery indicator is now working properly :)
andersbo87
Junior Member
 
Posts: 39
Joined: 23 Jan 2012, 19:11
Location: Sarpsborg, Norway

Postby andersbo87 » 24 Jan 2012, 09:08

andersbo87 wrote:Thank you so much! That solved my problem :D The battery indicator is now working properly :)


Or to be more precise, it didn't solve the entire problem. The system sometimes seems unable to update when I plug in (or out for that matter) a power source but in most cases, after some more testing, it gives at least an idea of how much power remains, which is what I wanted. So thank you so much for the help :)
andersbo87
Junior Member
 
Posts: 39
Joined: 23 Jan 2012, 19:11
Location: Sarpsborg, Norway

Postby andersbo87 » 23 Mar 2012, 21:15

Hey! I know this is an old post, since I was the one that started this post in the first place, I decided to go ahead and post a little update, even if this thread is marked as solved. The other day I browsed around, still looking for a more "professional" solution to my ACPI problem, and I came across this website, where the probable cause of the problem is described: http://osdir.com/ml/freebsd-bugs/2011-09/msg00170.html. According to this site,

"The problem should occur on any system with a battery using the cmbat interface, which dispatches a large number of calls via AcpiOsExecute during initialization. This fills up the task queue, which results in the call to [file]acpi_cmbat_init_battery[/file] getting dropped due to the queue being full, which results in the bif information not being properly initialized. Because the cmbat driver only reads this information at initalization, the driver will incorrectly report the battery as not being present.

Similar issues with other ACPI features may have a similar root cause.
>Fix:
Setting [file]debug.acpi.max_tasks[/file] to a high value (I used 128) is a stable workaround, and will restore functionality."
andersbo87
Junior Member
 
Posts: 39
Joined: 23 Jan 2012, 19:11
Location: Sarpsborg, Norway


Return to System Hardware

Who is online

Users browsing this forum: No registered users and 0 guests