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

Quote:
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 'nvidia_drv.so' file:
Code:
!system=ACPI subsystem=ACAD type=\_SB_.AC__ notify=%x
It seems you are using wrong pattern. Look at following messages on my notebook:
Code:
!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