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

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 sysctl hw.acpi and acpiconf -i 0, with both commands giving, in my eyes, unexpected results, which I've also attached. I've also added the output the messages from dmesg, 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 uname -a:
Code:
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

  • acpi_disabled_result_in_kernel_panic.txt
    399 bytes · Views: 194
  • dmesg_output.txt
    18 KB · Views: 244
  • acpiconf.txt
    315 bytes · Views: 171
  • hw_acpi.txt
    499 bytes · Views: 190
andersbo87 said:
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 debug.acpi.max_tasks in /boot/loader.conf? As suggested in dmesg:
Code:
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:
debug.acpi.max_tasks="128"
in /boot/loader.conf. Not for the battery (dead since a long time) but to fix this error. May be it will help (?)

Regards.
 
andersbo87 said:
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 :)
 
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 acpi_cmbat_init_battery 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 debug.acpi.max_tasks to a high value (I used 128) is a stable workaround, and will restore functionality."
 
Back
Top