View Single Post
Old 12-06-08, 11:29 PM   #11
Registered User
tut's Avatar
Join Date: Dec 2008
Location: Kyiv/Ukraine
Posts: 13
Exclamation Re: Power source detection

Originally Posted by tut View Post
BTW, you can find proper power source detection example in src/usr.sbin/powerd/powerd.c - see 'acline_init' and 'acline_read' functions. Note that sometimes ACPI may be absent or disabled because of broken BIOS so power source detection using APM is preferable in the case.
zander, I've found following line in '' file:
!system=ACPI subsystem=ACAD type=\_SB_.AC__ notify=%x
It seems you are using wrong pattern. Look at following messages on my notebook:
!system=ACPI subsystem=ACAD type=\_SB_.PCI0.AC0_ notify=0x00
!system=ACPI subsystem=ACAD type=\_SB_.PCI0.AC0_ notify=0x01
I'm not sure you should do hardcoded 'type' parameter matching, numbers may vary. And as I wrote before the best method is in powerd.c implementation.
[nvidia-driver-180.16 @ FreeBSD 7.1-PRERELEASE @ GeForce Go 6100]
tut is offline   Reply With Quote