Jump to content

VoodooBatterySMC for online laptop power monitoring


Slice
 Share

30 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

 

07.03.2023

New HWMonitor from old sources, working with battery

HWMonitorSMC.app.zip

  • Like 8
Link to comment
Share on other sites

  • 3 weeks later...

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.

  • Like 1
Link to comment
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.

Link to comment
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?

  • Like 1
Link to comment
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.

Link to comment
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.

  • Like 1
Link to comment
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

Link to comment
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.

  • Like 1
Link to comment
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에서 보냄

Link to comment
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?

Link to comment
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 {
  • Like 2
Link to comment
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?

 

Link to comment
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

Link to comment
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

  • Like 2
Link to comment
Share on other sites

  • 3 months later...
  • 5 years later...

I love FakeSMC3 and VoodooBatterySMC.  My HackBookPro6,2 boots and runs perfectly after the switch to FakeSMC3 from VirtualSMC.

 

I just tried the "new" HWMonitor2 with my HackBookPro6,2.  It looks great!  HWMonitor2 shows my Battery Amperage as 1 when charging and 2.7+A when running on battery.

 

HWMonitor2 running on Battery

Spoiler

1170787945_ScreenShot2023-03-07at4_49_52PM.png.e4afd51abf082d1bc1b2e5c5b067387c.png

 

HWMonitor2 with AC Adapter connected (battery is charging) (Battery mVA = 1)

Spoiler

692974504_ScreenShot2023-03-07at4_37_32PM.png.d4fcb2e9247c5211fd50e0b044eac3d2.png

 

IOReg

Spoiler

2019371344_ScreenShot2023-03-07at4_48_22PM.png.909be0667ac575f121748243633b4ccb.png

 

My configuration is as follows:

  • OpenCore 0.9.0
  • FakeSMC.kext 3.5.5 (November 23, 2022)
  • VoodooBatterySMC.kext 1.2.1 (November 23, 2022)
  • GeForceSensor.kext 1.2.4 (November 23, 2022)
  • IntelCPUMonitor.kext 1.2.6 (November 23, 2022)
  • HWMonitorSMC 1.3.4 (March 6, 2023)

 

Edited by deeveedee
  • Thanks 1
Link to comment
Share on other sites

  • 3 weeks later...

Will This Work On MacBooks?

Works good on MacBook Air, but not as good as HWmonitor

I try it works well on desktop

Edited by STLVNUB
Link to comment
Share on other sites

12 hours ago, matgeo said:

Can someone compile FakeSMC with plugins from the latest commits https://github.com/CloverHackyColor/FakeSMC3_with_plugins/commit/3518049c0d450249833bf1022a24dba312d72068  ?

I can as I committed just now.

But I compiled in Mojave with Xcode11.3.1. For newer Xcode there must be new efforts.

Link to comment
Share on other sites

9 hours ago, Slice said:

I can as I committed just now.

But I compiled in Mojave with Xcode11.3.1. For newer Xcode there must be new efforts.

I'm sorry , I'm not familiar with Xcode and compilations.

Is there going to be a new release with the latest commits? Really looking forward to it.

Link to comment
Share on other sites

 Share

×
×
  • Create New...