ACPIBatteryManager 电池驱动汇总


介绍

为运行 OS X 的非 Apple 笔记本电脑实现基于高级配置和电源管理接口(ACPI)的电池管理器内核扩展(kext / driver)。

版本历史

2018-10-5 v1.90.1

  • fix a crash in ACPIBatteryManager due to notifications received very early in startup (may be in invalid configurations)

2018-09-15 v1.90

  • merge ‘refactor’ branch from the-darkvoid (details below)
  • removed BatteryTracker and allow existing services to communicate directly
  • drive AC status purely through ACPIACAdapter, not through battery charging/discharging status

2017-10-01 v1.81.4

  • add kernel flag “abm_firstpolldelay” to allow override of FirstPollDelay with simple kernel flag entry (config.plist/Boot/Arguments). For example, to set FirstPollDelay to 16000 (16 seconds), use abm_firstpolldelay=16000

2017-09-01 v1.81.3

  • Revert more 10.13 changes when running 10.12 and earlier (runtime checks). These changes are an attempt to solve issue #22

2017-08-30 v1.81.2

  • Revert some of the 10.13 changes for 10.12 and earlier (runtime checks)

2017-08-30 v1.81.1 (removed from bitbucket)

  • Change FirstPollDelay to 4000

2017-08-29 v1.81

  • More experiments for 10.13 and the startup problem.
  • Now we wait for AppleSMC to load before ACPIBatteryManager starts. This provides a better “anchor” for the FirstPollDelay wait.
  • FirstPollDelay now 1000. Tested on my 4530s (HDD, Sandy Bridge Core i3). It works with 500 (and with other larger values), but fails and 250. Decided to try 1000 as a default.
  • Avoid a problem where power management registration caues an early (but not real early) call to setPowerState which was triggering a pollBatteryState prior to the delay specified by FirstPollDelay.

2017-08-28 v1.80

  • Fix problem of losing battery icon on 10.13 High Sierra beta. It is a new timing bug introduced in High Sierra. Delaying the first poll and battery status publish fixes it. StartupDelay configuration is removed (not used, has no effect if specified in ACPI override). New configuration item FirstPollDelay is default at 7500. Slower computers may need a longer delay (for my Lenovo u430, 3500 is too short, 4000 is long enough).

2017-08-26 v1.71

  • Fix problem with Activity Monitor “Energy” tab, by changing class names to AppleSmartBatteryManager and AppleSmartBattery

2017-04-28 v1.70.3

  • Add quick polling for the first 10 seconds of startup for the case the EC/ACPI does not respond correctly at startup. This quick poll will be cancelled once a battery status is succesfully acquired, or after the 10 seconds.

2016-11-18 v1.70.2

  • Fix problem where incorrect _BST code returns status of “discharging” when at full charge, AC adapter still plugged in.

2016-06-28 v1.70.1

  • Fix bug involving BatterySerialNumber (always showing -Unknown)
  • Handle ACPI returning a blank string for serial# in _BIF (use “Unknown” in that case)
  • no longer setting Temperature when it is not available from ACPI
  • misc cleanup

2016-05-31 v1.70.0

  • added SSDT-BATC.dsl which allows multiple batteries to be dealt with as a single ACPI battery
  • changed the code that responds to battery notifications so it is not sensitive to incorrect remove/add flags
  • misc cleanup

2015-12-30 v1.60.5

  • Fixed bug with zero length dictionary (ACPI-based configuration)
  • correct capacities only if non-zero
  • change StartupDelay to 0ms

2015-11-09 v1.60.4

  • added configurable StartupDelay
  • changed default StartupDelay from 500ms to 50ms

2015-10-29 v1.60.3

  • Add correction for capacities that don’t conform to OS X expectations (CurrentCapacity<=MaxCapacity<=DesignCapacity)’

2015-09-30 v1.60

  • Add CurrentDischargeRateMax configuration key as a way to cap the discharge rate against bad data from ACPI _BST
  • Add ACPI method for overriding configuration data in Info.plist. See config_override.txt for more info

2015-01-23 v1.55

  • Add 500ms delay before polling initial battery state (_STA) to account for battery devices at are not ready early in the boot process. This avoids dimming the display when booting on battery, as the system doesn’t detect it as a battery present->battery removed transition.
  • some minor fixes for watts when CurrentRate is ACPI_UNKNOWN
  • debug messages are now in decimal

2014-10-16 v1.53

  • added debug output for _BIX

2014-02-07 v1.52

  • Fix deadlock caused by changes made for multiple batteries. See issue #3.
  • When determining if other batteries are discharging, ignore batteries that are not connected. See issue #2.
  • To provide AC status changes quicker after an AC change, poll battery objects more often after such a change. See issue #4.

2014-01-21 v1.51

  • Some fixes related to multiple batteries. Work in progress.

2013-12-04 v1.50

  • Added ACPIACAdapter implementation, which implemeents an ACPI compliant object to track status changes of the AC adapter. As the status change, the battery objects are notified.

prior fixes:

  • I didn’t really track a change log prior to now. Read the threads linked or the commit log in git.

下载链接

地址: https://taolu.lanzous.com/b01bd6med
密码: b9dh

资源来源

ACPIBatteryManager


文章作者: 套陆
版权声明: 本博客所有文章除特別声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 套陆 !
评论
 上一篇
Clover Configurator 5.17.1.0 四叶草图形化配置工具 Clover Configurator 5.17.1.0 四叶草图形化配置工具
Clover Configurator 是一款四叶草图形化配置工具。Clover Configurator 可以图形化的帮你编辑配置文件 config.plist,而且把四叶草的几项功能都分了区块,你可以很快的找到想要配置的属性。
2020-05-07
下一篇 
BT4LEContinuityFixup 蓝牙修补驱动 BT4LEContinuityFixup 蓝牙修补驱动
一个开源内核扩展程序,为 IOBluetoothFamily 提供一系列的修补。
2020-05-01
  目录