Jump to content
Slice

VoodooBatterySMC for online laptop power monitoring

19 posts in this topic

Recommended Posts

Laptop battery monitoring

Screen Shot 2017-09-16 at 08.45.08.png

 

 

 

Using this driver you have to exclude other battery drivers: ACPIBatteryManager, AppleSmartBattery and so on.

This driver assumes to using HWSensors3 with FakeSMC 3.5 as being part of it.

 

19.01.2018

Updated version of VoodooBatterySMC will get extended battery information and so it will be more exact.

VoodooBatterySMC.kext.zip

 

Updated HWMonitorSMC by vector-sigma

HWMonitorSMC.app.zip

 

HWMonitor2 by vector-sigma

https://sourceforge.net/projects/hwsensors3.hwsensors.p/files/latest/download

Share this post


Link to post
Share on other sites
Advertisement

With VoodooBattery it shows the indicator on 10.13 (17A365) Menu Bar.. (ignoring 0% caused of battery device fault).

 

 

EH6Rkc1.png

 

May be you should correct your DSDT to make laptop battery monitoring. Something about 16 bit EC registers. It is common requirement while Dell laptops already have good DSDT.

Share this post


Link to post
Share on other sites

May be you should correct your DSDT to make laptop battery monitoring. Something about 16 bit EC registers. It is common requirement while Dell laptops already have good DSDT.

OK, NP now it gives normal indicator after I disassembled my laptop parts and may be EC reset, as "Charged / Full" instead of "0%".. but,

any idea how to disable this warning message upon every boot?

[Warning] Battery 0 has no remaining capacity reported

Thanks @Slice.

Share this post


Link to post
Share on other sites

OK, NP now it gives normal indicator after I disassembled my laptop parts and may be EC reset, as "Charged / Full" instead of "0%".. but,

any idea how to disable this warning message upon every boot?

[Warning] Battery 0 has no remaining capacity reported

Thanks @Slice.

may be set Name(_STA, 0) for this battery?

Share this post


Link to post
Share on other sites

may be set Name(_STA, 0) for this battery?

OK, but since under linux with "nosplash debug --verbose" also got similar warning about battery; I think simply ignoring above message due to my battery fault.

Thanks anyway.

Share this post


Link to post
Share on other sites

OK, but since under linux with "nosplash debug --verbose" also got similar warning about battery; I think simply ignoring above message due to my battery fault.

Thanks anyway.

A fortiori you have to set

 Name(_STA, 0)

for failed battery.

Share this post


Link to post
Share on other sites

thank you for voodoobatterysmc

 

i report experienced problem.

 

my laptop connected power cable.

 

first, dark theme, icon is black, need to change white icon if use black theme on setting.

post-980913-0-65723400-1507693494_thumb.png

 

two

i used rehabman's acpibatterymanager.kext before.

case1. only rehabman's acpibatterymanager

post-980913-0-86070500-1507696168_thumb.png

he's kext shown manufacture info and battery

 

case2. rehabman's acpibatterymanager + voodoobatterysmc.kext

post-980913-0-29000900-1507695780_thumb.png

i lost manufacture and shown differ battery size.

 

thanks in advance

 

EDIT1. i will get exact battery size info in windows. then will write here.

 

EDIT2.

i can't get battery cycle. because i used windows7.

post-980913-0-82401600-1507695796_thumb.png

post-980913-0-63872300-1507695799_thumb.png

only rehabman kext shown more correct battery info in macos. The battery capacity is slightly different, but it is almost the same.

 

EDIT3.

on slice's kext, battery capacity is more corrected

Share this post


Link to post
Share on other sites

Rehabman kext uses extended information _BIX while I didn't make it yet. Hope improve soon.

 

About battery capacity look Windows tells in mWh, while MacOS in mAh. Multilier is Voltage.

So Windows value 34610mWh / 8.643V = 4004mAh

Compare!

 

PS. Using VoodooBatterySMC assumes you need no double it by ACPIBatteryManager.

Share this post


Link to post
Share on other sites

Rehabman kext uses extended information _BIX while I didn't make it yet. Hope improve soon.

 

About battery capacity look Windows tells in mWh, while MacOS in mAh. Multilier is Voltage.

So Windows value 34610mWh / 8.643V = 4004mAh

Compare!

 

PS. Using VoodooBatterySMC assumes you need no double it by ACPIBatteryManager.

I learned it from you. I will report it to rehabman. Thank you so much.

 

 

나의 LG-F800S 의 Tapatalk에서 보냄

Share this post


Link to post
Share on other sites

Rehabman kext uses extended information _BIX while I didn't make it yet. Hope improve soon.

 

About battery capacity look Windows tells in mWh, while MacOS in mAh. Multilier is Voltage.

So Windows value 34610mWh / 8.643V = 4004mAh

Compare!

 

PS. Using VoodooBatterySMC assumes you need no double it by ACPIBatteryManager.

Using Rehabman's kext I can easily get some info:

2017-10-12 01:42:49.779 HWMonitorSMC[2331:128832] {
    Amperage = 0;
    AtCriticalLevel = 0;
    AtWarnLevel = 0;
    AvgTimeToEmpty = 65535;
    AvgTimeToFull = 65535;
    BatteryInstalled = 1;
    BatteryInvalidWakeSeconds = 30;
    BatterySerialNumber = "Primary- 2993";
    BatteryType = Lion;
    CellVoltage =     (
        3168,
        3168,
        3168,
        3170
    );
    CurrentCapacity = 3962;
    CycleCount = 0;
    DesignCapacity = 8719;
    DeviceName = Primary;
    ExternalChargeCapable = 1;
    ExternalConnected = 1;
    FirmwareSerialNumber = 11346;
    FullyCharged = 1;
    IOGeneralInterest = "IOCommand is not serializable";
    InstantAmperage = 0;
    InstantTimeToEmpty = 65535;
    InstantTimeToFull = 65535;
    IsCharging = 0;
    LegacyBatteryInfo =     {
        Amperage = 0;
        Capacity = 8719;
        Current = 3962;
        "Cycle Count" = 0;
        Flags = 5;
        Voltage = 12674;
    };
    ManufactureDate = 0;
    Manufacturer = "Hewlett-Packard ";
    MaxCapacity = 8719;
    MaxErr = 0;
    PermanentFailureStatus = 0;
    PostChargeWaitSeconds = 120;
    PostDischargeWaitSeconds = 120;
    "Quick Poll" = 0;
    Serial = " 2893";
    Temperature = 0;
    TimeRemaining = 65535;
    Voltage = 12674;
}

CFMutableDictionaryRef m , dict = NULL;

    io_registry_entry_t entry = 0;

    m = IOServiceMatching( "IOPMPowerSource" );

... bla bla

 

Isn't voodobattery published in the same path?

Share this post


Link to post
Share on other sites

Using Rehabman's kext I can easily get some info:

2017-10-12 01:42:49.779 HWMonitorSMC[2331:128832] {
    Amperage = 0;
    AtCriticalLevel = 0;
    AtWarnLevel = 0;
    AvgTimeToEmpty = 65535;
    AvgTimeToFull = 65535;
    BatteryInstalled = 1;
    BatteryInvalidWakeSeconds = 30;
    BatterySerialNumber = "Primary- 2993";
    BatteryType = Lion;
    CellVoltage =     (
        3168,
        3168,
        3168,
        3170
    );
    CurrentCapacity = 3962;
    CycleCount = 0;
    DesignCapacity = 8719;
    DeviceName = Primary;
    ExternalChargeCapable = 1;
    ExternalConnected = 1;
    FirmwareSerialNumber = 11346;
    FullyCharged = 1;
    IOGeneralInterest = "IOCommand is not serializable";
    InstantAmperage = 0;
    InstantTimeToEmpty = 65535;
    InstantTimeToFull = 65535;
    IsCharging = 0;
    LegacyBatteryInfo =     {
        Amperage = 0;
        Capacity = 8719;
        Current = 3962;
        "Cycle Count" = 0;
        Flags = 5;
        Voltage = 12674;
    };
    ManufactureDate = 0;
    Manufacturer = "Hewlett-Packard ";
    MaxCapacity = 8719;
    MaxErr = 0;
    PermanentFailureStatus = 0;
    PostChargeWaitSeconds = 120;
    PostDischargeWaitSeconds = 120;
    "Quick Poll" = 0;
    Serial = " 2893";
    Temperature = 0;
    TimeRemaining = 65535;
    Voltage = 12674;
}

CFMutableDictionaryRef m , dict = NULL;

    io_registry_entry_t entry = 0;

    m = IOServiceMatching( "IOPMPowerSource" );

... bla bla

 

Isn't voodobattery published in the same path?

Exactly

class AppleSmartBattery : public IOPMPowerSource {

Share this post


Link to post
Share on other sites

About battery capacity look Windows tells in mWh, while MacOS in mAh. Multilier is Voltage.

So Windows value 34610mWh / 8.643V = 4004mAh

Compare!

 

PS. Using VoodooBatterySMC assumes you need no double it by ACPIBatteryManager.

So "Battery Amperage,  mA" should be "Battery Amperage,  mAh"? 

And this refear to the current capacity then?

 

Share this post


Link to post
Share on other sites

 

Exactly

class AppleSmartBattery : public IOPMPowerSource {

 

 

i reworked the app, now show voltage and amperage using rehabman's kext by just reading kIOPMPSVoltageKey and kIOPMPSCurrentCapacityKey.

Did not test your kext yet but it should work if mentioned keys are present and populated by voodoobattery.

Source and precompiled app attached.

 

P.S. I introduced I little bug and by clicking voltage it may be always displayed in the top bar. Don't panic I'll fix it.... now I'v to go. please let me know

HWMonitorSMC.app.zip

HWMonitorSMC.zip

Share this post


Link to post
Share on other sites

So "Battery Amperage,  mA" should be "Battery Amperage,  mAh"? 

And this refear to the current capacity then?

 

No, mA means current in units "milliAmpers".

mAh means capacity in units mA * hours.

How many hours the laptop can work with battery can be calculated from capacity and current

Hours = mAh/mA 

So, If I'll use your kext, I need to delete the RehabMan's kext?

 

Yes

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Allordcs
      I have done everything related to this problem but without any results, can anyone help ?

    • By Slice
      Hi all,
       
      I created an installer for my version of FakeSMC with plugins and applications latest revision.
       
      Compatibility from 10.6 up to 10.15.
      Test, please.

      Download here: HWSensors.pkg.zip
      See my signature
       
      02.11.2019
      New project home
      https://github.com/CloverHackyColor/FakeSMC3_with_plugins
      FakeSMC v3.5.3 and plugins
       
      HWMonitorSMC2 at
      https://github.com/CloverHackyColor/HWMonitorSMC2
       
       
      FakeSMC 3.4.0 revision 751
      HWSensors.pkg-751.zip
       
      New project home is
      https://sourceforge.net/projects/hwsensors3.hwsensors.p/
      where you can download most recent versions.
      Now it is FakeSMC 3.4.1
       
      Explanations about the difference between versions 3 and 6
        #137 
       
      20.05.2016
      Revision 32 with explanation at    #220 
       
      10.10.2017
      FakeSMC is 3.5.0 compatible with High Sierra.
      New plugin VoodooBatterySMC created on the base of VoodooBattery by Superhai but with SMC keys generating to show Battery voltage and amperage. As well it created key BATP needed for right speedstep and FileVault2.
      Other kexts revised.
    • By Slice
      Dell laptops and desktop can be monitored by SMM methods as mentioned is the old topic
       
      I made a plugin SMIMonitor for FakeSMC in 2014 but it was 32bits and was not working. Only now I made it to be 64bits (as darkvoid did with kozleks branch) and got positive results
        
      and after heating 
      So I have monitoring of 4 additional temperature sensors (CPU Proximity, GPU, DIMM, and Motherboard) and a CPU fan which initially stay at 0 rpm and start rotating after heating with 2882rpm.
       
      Moreover I implemented a function for brave people to control fans
      sudo SMC_util3 -kF0As -w2 The last digit 2 is a FAN speed you want to set
      0 = Off
      1 = Low
      2 = High
      If you have more then 1 fan then you can manage other one by choosing next key F1As, F2As etc.
       
      Precaution! Writing the fan speed is dangerous and may cause a computer damage. Do this at your own risk!
      Note. SMIMonitor.kext will work only with FakeSMC v3 provided with HWSensors3 in my signature.
      Official release at sf.net contains SMIMonitor without write possibility.
       
      Please test and report your successes and fails.
       
       
      SMIMonitor.kext-110.zip
      SMC_util3.zip
      smcwrite.zip
    • By kalpesh2804
      Laptop Inbuilt Wifi and Battery Indicator not working in Catalina. (HP Pavilion 15t-au 100 Laptop)
       
       
      Laptop Config:
      HP Pavilion 15t-au100 * i7-7500u 2.90Ghz * Intel HD 620 Graphic Adapter * Intel Dual Band Wireless AC-3168 * Kingston SATA3 SSD 500 GB * HP Camera
×