Re: sysctl hw.acpi.acline

看板FB_hackers作者時間11年前 (2014/06/17 14:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串7/10 (看更多)
On Tue, Jun 17, 2014 at 2:29 AM, John-Mark Gurney <jmg@funkthat.com> wrote: > CeDeROM wrote this message on Tue, Jun 17, 2014 at 00:25 +0200: >> On Tue, Jun 17, 2014 at 12:10 AM, Anthony Jenkins >> <Anthony.B.Jenkins@att.net> wrote: >> > The absence of hw.acpi.battery and child oids probably implies there is no battery and the system may be assumed to be on line (A/C) power. >> >> Hello Anthony! I would prefer to have that information clearly defined >> in the manual :-) I guessed that this is a quick fix to first check > > Which manual? man acpi > ACPI have tons of optional stuff that isn't required to be present, > and apparently acline is one of them. Also, acline is only useful > if there are multiple power sources, what if you have a desktop > machine always running off a battery, if we defaulted acline=1, then > you'd complain that the status is wrong... :) There is no information in the ACPI Manual that the OID's are optional and may not exist in some cases. This is exactly the problem, an undefined and undocumented situation. Maybe its just worth putting a note :-) " hw.acpi.acline AC line state (1 means online, 0 means on battery power). " I expect code based on this oid to work on both desktop and laptop with no additional guessing. For me this manual information means that acline oid is always available, and will show 1 in case of desktop where no battery (maybe no UPS as well) is available. There is no information that this oid is optional. For desktop/server a battery power would mean UPS, right, so then I would also expect to see the battery charge status information.. but I understand this would be more complicated than in a laptop thus may not be implemented. Still, I would always expect power source type OID to tell me what is the power source, even if there can be only one. Best regards :-) Tomek -- CeDeROM, SQ7MHZ, http://www.tomek.cedro.info _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
文章代碼(AID): #1Jd-3Y9d (FB_hackers)
討論串 (同標題文章)
文章代碼(AID): #1Jd-3Y9d (FB_hackers)