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 vector sigma
      HWSensor Features
      Control temperature of Intel and AMD CPU Control temperature of AMD, Intel and NVidia cards Control temperature of motherboard Control FANS Control Voltages Control HDD/SSD state (SATA & NVMe) with S.M.A.R.T. monitoring  Control frequencies Laptop Battery Monitoring Different applications support High Sierra compatible Installation to /S/L/E or in the ESP (Clover only)  
      Supported languages:
      English (base), Russian, Italian, Korean and semplified Chinese
       
      Source code: at https://sourceforge.net/p/hwsensors/hwsensors3/code3/HEAD/tree/
      Bugs report at https://sourceforge.net/p/hwsensors/hwsensors3/tickets/
      Topic for discussion at: https://www.insanelymac.com/forum/topic/299861-hwsensors3/
       
      Chief Developer @Slice, new HWMonitorSMC2.app and package by @vector sigma
    • By M3G4DR01D
      Hello everyone, I have an Asus gl502vmk (i7 kabylake + GTX 1060 6 gb) laptop and I tried all the patches/kexts to get the brightness with fn keys/touchpad (I2C ELAN 1200 works with VooDoo I2C kext v1.0 but no gestures/preference pane)/Keyboard backlight to work but no success so far, any help would be appreciated, thanks in advance.
      [EDIT] (10/04/2018)
      Battery status now works, thanks to @RehabMan turned out to be incorrect SMBIOS (used iMac instead of Mbp) lol, but it drains crazy fast (~1.5 - 2 hours while on standby (all apps quited!), on windows 10 it lasts 4 - 5 hours, and on linux it lasts 6 ~ 7 hours!)
      And with VoodooI2C v2.0.1 + VoodooI2CHID kext and patched DSDT, the touchpad is now detected in the sys pref pane but still no input.
      Sound works with VoodooHDA v2.9.1, but the only issue is that the jack sense isn't working (the output device doesn't auto switch to headphone when connected)
       
      [EDIT 2] (11/04/2018)
      The system brightness now works thanks to @onejay09 but I have no brightness slider, and there are 4 extra brightness levels (brightness stops increasing after 12 levels)  and the brightness keys are not mapped correctly, plus the brightness decreases when I plug in the ac adapter, then increases if I unplug it???, the brightness level isn't also saved after reboot.
      battery still drains crazy fast (~1.5 - 2 hours, even with brightness at 50%, so apparently it is a power management issue).
      and I also have shutdowns while in sleep mode (I tried darkwake=10 and darkwake-0 and darkwake=no)
       
      P.S. I have uploaded my new report files, thanks!
       
      Latest report files (11/04/2018): https://www95.zippyshare.com/v/AMOpP0AY/file.html
    • By Twml
      I have an HP Elitebook 8460P running OSx 10.13.4 High Sierra
       
      I have an odd issue i believe is related to DSDT patch for ACPI Power battery.
      My battery icon works the battery level goes up/down and battery goes black when charging/white when not.
       
      BUT... Always has a lightning bolt in it and says "Power Source: Power Adapter" no matter if its connected or not.
       
       
      How can i get it to recognize my adapter is unplugged?
    • By fiobig
      Hi everybody, I need help for patching my DSDT.
      I have a Asus f541uv-xx147t laptop and I have installed macOS Sierra successfully but I need to know the battery percentage and I want to control the brightness.
      What I have to post in attached file for help?
      files.zip
×