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 tom666
      osx10.14
      i5-4250u
      i have added "irq hdef hdau  mutex osys10" patch
      and install acpibettery on clover ,but the battery management still donot work

      my audio card is alc269vc ,i try to use applealc,and tried all the layoutid, all of those colud not work.
      2019-03-31 20:18:23.389590+0800  localhost kernel[0]: (kernel) AppleALC:     alc @ failed to find IOHDACodecVendorID, retrying 0
      i have also use linux to find the codec
      i uploaded the clover , dsdt,codec.
      This problem has been bothering me for two days.
      thanks
       
       
      all.zip
      2019-03-31 20:18:17.997435+0800  localhost kernel[0]: calling mpo_policy_init for Lilu
      2019-03-31 20:18:18.003796+0800  localhost kernel[0]: Security policy loaded: Lilu Kernel Extension 1.3.5 (Lilu)
      2019-03-31 20:18:23.389590+0800  localhost kernel[0]: (kernel) AppleALC:     alc @ failed to find IOHDACodecVendorID, retrying 0
      2019-03-31 20:18:23.398483+0800  localhost kernel[0]: (kernel) Lilu: patcher @ lookup patching applied only 0 patches out of 1
    • By RamLalith
      I executed all my DSDT's and SSDTs with no errors 
      I can't patch the battery

      I need help
      I am attaching my ACPI folder
      ACPI.zip
    • By antonioruri
      Buonasera, sono nuovo nel forum ho mandato a buon fine con l'aiuto di alcuni ragazzi il mio primo Hackintosh su ASUS x556u, il post installazione sembra essere buono. La scheda WI-FI non è riconosciuta (ho una Qualcomm QCA9377) non siamo riusciti a trovare dei Kext per farla funzionare, ho provveduto ad ordinarne una sperando di non avere problemi con la prossima configurazione. I problemi più grossi che sono sorti sono principalmente 3 ad ora di cui mi sono accorto. 
      1) Non funziona lo Splee-and-Wake (se così posso definirlo) quando faccio stop o chiudo il monitor, alla riapertura ho una schermata nera o con il solo cursore che si muove, devo quindi riavviare manualmente.
      2) Ho il problema dello status battery, non mi viene riconosciuta come carica ma costantemente a 0% anche sotto carica(viene notificato solo questo nell'cona)
      3) Il touchpad funziona un po' per i fatti suoi, posso solo muovere e cliccare. Una volta mosso se non ci clicco dopo continua a "camminare" verso l'ultima direzione, non funziona lo scroll con due dita.
      Spero di aver spiegato nel miglior modo possibile in attesa di una risposta. Grazie anticipatamente
    • 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
×