Jump to content

[Guide] Laptop Battery Indicator - The DSDT Patching Horror


Recommended Posts

Posted

[ref]yamvmax[/ref], not at my mac right now. But, which battery kext are you using? Try to rebuild cache and permissions and see if that helps


Also, upload debug files by running this app RunMe

 

All that work...and now i cant boot...I tried installing ACIPBatterymanager.kext...and she wont boot. UGH. Any ideas? How do I boot without that kext?


Added in 1 minute 40 seconds:

I should have left it alone


Added in 2 minutes 55 seconds:

It bootedTook forever.........i now have 100% batt with acpibattmanager. I will try removing smcbatt manager


Added in 33 seconds:

Sick of me yet? :D


Added in 37 minutes 49 seconds:

OK, smcbatterymanager kext...And i get 0%. Using acpibattery kext i get 100%....they never change.

Send me richs-MBP.zip

ASUS VivoBook Flip 14 TP412UA-IH31T

Posted

[ref]yamvmax[/ref], Virtualsmc kext will only work with smcbatterymanager kext. You are using virtualsmc with acpibatterymanager kext, which is wrong. If you prefer acpibatterymanager then use fakesmc kext.


Only use one of the combo and not both at the same time.

Donate

Gitter Chat


Acer Aspire V15 Nitro- Black Edition VN7-592G/HM170 Chipset

Intel i7-6700HQ, 8GB RAM (UEFI Clover Catalina)


MSI B360 Gaming Arctic

Intel i5-8600 16GB RAM Asus Radeon RX580 8GB (UEFI Clover Catalina)

Posted

[ref]yamvmax[/ref], Virtualsmc kext will only work with smcbatterymanager kext. You are using virtualsmc with acpibatterymanager kext, which is wrong. If you prefer acpibatterymanager then use fakesmc kext.


Only use one of the combo and not both at the same time.

I am using vitualsmc, and smcbattery manager...I get 0 percent....I tried only acpibatterrymanager, and get only 100. I sent the logs using virtual and smcbatt.

ASUS VivoBook Flip 14 TP412UA-IH31T

Posted

[ref]yamvmax[/ref], acpibattery shld be used with fakesmc not virtualsmc

Donate

Gitter Chat


Acer Aspire V15 Nitro- Black Edition VN7-592G/HM170 Chipset

Intel i7-6700HQ, 8GB RAM (UEFI Clover Catalina)


MSI B360 Gaming Arctic

Intel i5-8600 16GB RAM Asus Radeon RX580 8GB (UEFI Clover Catalina)

Posted

[ref]yamvmax[/ref], acpibattery shld be used with fakesmc not virtualsmc

I get that. Why am I getting 0percent with virtual smc, and smcbattery?

ASUS VivoBook Flip 14 TP412UA-IH31T

Posted

Why am I getting 0percent with virtual smc, and smcbattery?

No idea why. Possibly incompatibility issue with most Asus.

Donate

Gitter Chat


Acer Aspire V15 Nitro- Black Edition VN7-592G/HM170 Chipset

Intel i7-6700HQ, 8GB RAM (UEFI Clover Catalina)


MSI B360 Gaming Arctic

Intel i5-8600 16GB RAM Asus Radeon RX580 8GB (UEFI Clover Catalina)

Posted

No idea why. Possibly incompatibility issue with most Asus.

So I'm sol? I get 100% with acpibatterrymanager....but it's stuck on that.

ASUS VivoBook Flip 14 TP412UA-IH31T

Posted

[ref]yamvmax[/ref], my comment based on your config


1. You are using the wrong battery kext for virtualsmc. Read my previous comment. Use a combo or the other and definitely not all together.

https://imgur.com/tn4eovy

 

Virtualsmc kext will only work with smcbatterymanager kext. You are using virtualsmc with acpibatterymanager kext, which is wrong. If you prefer acpibatterymanager then use fakesmc kext.


Only use one of the combo and not both at the same time.

 


2. Disable these battery related patches in clover plist

https://imgur.com/4BkGZ8b


3. Make sure windows patch is implemented in DSDT.


4. You may try my patched DSDT instead if you prefer.

yamvmax- DSDT.aml.zip

Donate

Gitter Chat


Acer Aspire V15 Nitro- Black Edition VN7-592G/HM170 Chipset

Intel i7-6700HQ, 8GB RAM (UEFI Clover Catalina)


MSI B360 Gaming Arctic

Intel i5-8600 16GB RAM Asus Radeon RX580 8GB (UEFI Clover Catalina)

Posted

[ref]yamvmax[/ref], my comment based on your config


1. You are using the wrong battery kext for virtualsmc. Read my previous comment. Use a combo or the other and definitely not all together.

https://imgur.com/tn4eovy

 

 

 


2. Disable these battery related patches in clover plist

https://imgur.com/4BkGZ8b


3. Make sure windows patch is implemented in DSDT.


4. You may try my patched DSDT instead if you prefer.

yamvmax- DSDT.aml.zip

 

Wow. I completely forgot I had those edits in my config.plist. I will give that a try. Tha ks for being so understanding.

ASUS VivoBook Flip 14 TP412UA-IH31T

Posted

Your DSDT file worked!!!!!! Wondering why mine didnt? Thanks so much. Now I need to do a backup. Still working on getting f keys working,keyboard lights and hibernate. Thanks again!

ASUS VivoBook Flip 14 TP412UA-IH31T

Posted

Wondering why mine didnt?

 

No different from the patch I posted for you to try. Glad it works! Enjoy!


Btw, what is the model and make of your laptop?

Donate

Gitter Chat


Acer Aspire V15 Nitro- Black Edition VN7-592G/HM170 Chipset

Intel i7-6700HQ, 8GB RAM (UEFI Clover Catalina)


MSI B360 Gaming Arctic

Intel i5-8600 16GB RAM Asus Radeon RX580 8GB (UEFI Clover Catalina)

Posted

 

 

No different from the patch I posted for you to try. Glad it works! Enjoy!


Btw, what is the model and make of your laptop?

 

Thats strange, wouldn't boot the other day. Its an ASUS VivoBook Flip 14 TP412UA-IH31T. BTW, Donation coming when I get paid. I really appreciate it.

ASUS VivoBook Flip 14 TP412UA-IH31T

Posted

[ref]ameen[/ref], Hi, Sorry, I am not familiar with complex works for battery hot patch. But for certain it requires an extensive renames and overlay method that requires a lot of patience. ;)


However, for the kicks of it, try these files and see if works

 

Archive.zip

Donate

Gitter Chat


Acer Aspire V15 Nitro- Black Edition VN7-592G/HM170 Chipset

Intel i7-6700HQ, 8GB RAM (UEFI Clover Catalina)


MSI B360 Gaming Arctic

Intel i5-8600 16GB RAM Asus Radeon RX580 8GB (UEFI Clover Catalina)

Posted

For my laptop Hp Pavilion 15-au028ur worked patch for HP 3165sf

I also experimented with manual patching and assembled my own version:

#Maintained by: RehabMan for: Laptop Patches
#Battery_HP-DV6-1380ek.txt

# created by RehabMan 2019-xx-xx
# based on Battery_HP-DV6-1380ek.txt
# additional patches for dv6-1380ek provided by chihab222, credit gsly

# works for:
#  HP Pavilion 15-au028ur, per Drovosek

into method label B1B2 remove_entry;
into definitionblock code_regex . insert
begin
Method (B1B2, 2, NotSerialized) { Return (Or (Arg0, ShiftLeft (Arg1, 8))) }\n
end;

# 16-bit EC0 registers
#                BADC,   16,
#                BFCC,   16,
#                MCUR,   16,
#                MBRM,   16,
#                MBCV,   16,
into device label EC0 code_regex BADC,\s+16, replace_matched begin ADC0,8,ADC1,8, end;
into device label EC0 code_regex BFCC,\s+16, replace_matched begin FCC0,8,FCC1,8, end;
into device label EC0 code_regex MCUR,\s+16, replace_matched begin CUR0,8,CUR1,8, end;
into device label EC0 code_regex MBRM,\s+16, replace_matched begin BRM0,8,BRM1,8, end;
into device label EC0 code_regex MBCV,\s+16, replace_matched begin BCV0,8,BCV1,8, end;

# 16-bit method access
into method label CLRI code_regex (\^.*)MBRM replaceall_matched begin B1B2\(%1BRM0,%1BRM1\) end;
into method label UPBS code_regex (\^.*)MBRM replaceall_matched begin B1B2\(%1BRM0,%1BRM1\) end;
into method label UPBI code_regex (\^.*)BFCC replaceall_matched begin B1B2\(%1FCC0,%1FCC1\) end;
into method label UPBS code_regex (\^.*)MCUR replaceall_matched begin B1B2\(%1CUR0,%1CUR1\) end;
into method label UPBS code_regex (\^.*)MBCV replaceall_matched begin B1B2\(%1BCV0,%1BCV1\) end;

 

The only problem - when it reaches 100% charge, it no longer falls until you reset the CMOS (15-30 seconds hold down the power button on the laptop). In the rehabman guide there is a patch for ASUS in this case, there is a patch method FBST. There is no such method in my DSDT.


Can someone help?


Here's a patched and clean DSDT: https://vk.com/doc183234383_509697931

Posted

[ref]Drovosek[/ref], Try

 

DSDT.aml.zip

 

* Disable all battery related hot patches in plist (if any).

Donate

Gitter Chat


Acer Aspire V15 Nitro- Black Edition VN7-592G/HM170 Chipset

Intel i7-6700HQ, 8GB RAM (UEFI Clover Catalina)


MSI B360 Gaming Arctic

Intel i5-8600 16GB RAM Asus Radeon RX580 8GB (UEFI Clover Catalina)

Posted

Drovosek, Try

DSDT.aml.zip

(28.68 KiB) Downloaded 1 time

* Disable all battery related hot patches in plist (if any)

 

Hey, thank you)).

With your DSDT file, the battery power can be drained after reaching 100% and the power is turned off. I haven't checked other situations yet (battery work in Windows or battery work in mac OS after reboot), but can you describe what kind of magic you did?


PS

I tried to open my DSDT file and yours and compare on this site (http://text.num2word.ru/). I looked a bit but realized that you renamed my 16-bit registers and remade SMD and SMD methods. Could you describe in more detail what you need to do to repeat your result?


Also I did not disable any patches in config.plist. I don't know what patches there affect the battery, could you name them?

https://vk.com/doc183234383_509797234


UPDATE:


I did some "tests" and laptop reboots (sometimes with CMOS reset) and noticed that with your DSDT the charge indicator still hangs sometimes. I don't know what this has to do with. Also it is sometimes corrected when I connect an Android smartphone as a USB modem (this was 1 time).

Posted

[ref]Drovosek[/ref], your patched DSDT for battery has patches that should not be applied.


I simply did the battery patch as per guide.


I suggest you head over to DSDT patch request section for full patched acpi.

Donate

Gitter Chat


Acer Aspire V15 Nitro- Black Edition VN7-592G/HM170 Chipset

Intel i7-6700HQ, 8GB RAM (UEFI Clover Catalina)


MSI B360 Gaming Arctic

Intel i5-8600 16GB RAM Asus Radeon RX580 8GB (UEFI Clover Catalina)

Posted

[ref]Drovosek[/ref], your patched DSDT for battery has patches that should not be applied.


I simply did the battery patch as per guide.


I suggest you head over to DSDT patch request section for full patched acpi.

 

Thanks for the advice.


I managed to cope with the problem. I read the relevant topic on the applelife forum, they recommend using the special boot argument with ACPIBatteryManager.kext,

either use VirtualSMC with a driver and additional cakes, or use cakes from HWSensors3.


Links:

https://applelife.ru/threads/applesmartbattery-batareja-noutbukov.31744/

-----

https://bitbucket.org/RehabMan/os-x-acpi-battery-driver/downloads/

https://github.com/RehabMan/OS-X-ACPI-Battery-Driver/commit/28a0fbdcd5ed7598315948af4e1228683ff2fff2#diff-04c6e90faac2675aa89e2176d2eec7d8

https://sourceforge.net/projects/hwsensors3.hwsensors.p/

https://github.com/acidanthera/VirtualSMC/releases


What did I do:


In ACPI / patched put your patched DSDT


Removed ACPIBatteryManager.kext

I downloaded HWSensors3 and dropped the other cakes into the Other folder - FakeSMC.kext, VoodooBatterySMC.kext and just in case ACPIMonitor.kext (but judging by what is written in the Readme it is not needed for the battery, but this is not certain).

The bug with the freezing of the charge indicator is 100% corrected.

But there is a mini-bug: Sometimes the charge percentage indicator freezes at random values, for example, 92% and then the N-th number of minutes does not change. If you click on the charge icon in the top panel, then after a couple of seconds, the charge indicator will be updated to the current one, for example, 98%.

Perhaps after a large number of minutes, the indicator will update itself, but the figure with the charge percentage "will make the jump."

Slice told me that most likely the SMC or something else is involved in updating the charge in macOS and to fix it, it is necessary that the HWMonitorSMC2 application be launched and it updates the charge itself.


Then I deleted FakeSMC.kext, VoodooBatterySMC.kext and ACPIMonitor.kext and used the cakes and driver from VirtualSMC. He was all the same as above with the HWSensors3 cakes.


So, we can assume that the problem is solved.

Posted

[ref]Drovosek[/ref], the correct combination of kext for battery status would be

1. virtualsmc+smcbatterymanager

2. fakesmc + acpibatterymanager


Never combine all or use any other combinations. In fact, voodoobatterysmc is irrelevant. Glad you figured it out.

Donate

Gitter Chat


Acer Aspire V15 Nitro- Black Edition VN7-592G/HM170 Chipset

Intel i7-6700HQ, 8GB RAM (UEFI Clover Catalina)


MSI B360 Gaming Arctic

Intel i5-8600 16GB RAM Asus Radeon RX580 8GB (UEFI Clover Catalina)

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


×
×
  • Create New...