Contribute
Register

[Guide] How to patch DSDT for working battery status

You have unbalanced renames.
config.plist/ACPI/DSDT/Patches applies to ACPI/patched/DSDT.aml, but not the SSDTs there.
So, you have EC0 renamed to EC in DSDT, but not the SSDTs.
Must rename EC0->EC manually in all the SSDTs that reference EC0 (SSDT-9, SSDT-10, SSDT-11).
Also, ECDT.aml uses EC0.
You could try patching it, but I found it doesn't work (could be a Clover problem).
Probably best to avoid EC0->EC patch and add a Fake EC with SSDT-EC.aml.
See guide:
https://www.tonymacx86.com/threads/guide-usb-power-property-injection-for-sierra.222266/
I can understand: clover still eco_to_ec repair DSDT, by adding ssdt-ec.aml to fix ssdts?
But I encountered an error when dismantling: Pass 1 parse of [SSDT]
ACPI Error: [_PSS] Namespace lookup failure, AE_ALREADY_EXISTS (20161210 / dswload-462)
ACPI Exception: AE_ALREADY_EXISTS, During name lookup / catalog (20161210 / psobject-310)
Could not parse external ACPI tables, AE_ALREADY_EXISTS
 
Last edited:
I can understand: clover still eco_to_ec repair DSDT, by adding ssdt-ec.aml to fix ssdts?

SSDT-EC.aml cannot be used with EC0->EC rename.
The two solutions are mutually exclusive.
If you're planning to rename EC0->EC, you must do the rename manually to the SSDTs in ACPI/patched, as the config.plist setting applies only to ACPI/patched/DSDT.aml, not ACPI/patched/SSDT*.aml.
 
SSDT-EC.aml cannot be used with EC0->EC rename.
The two solutions are mutually exclusive.
If you're planning to rename EC0->EC, you must do the rename manually to the SSDTs in ACPI/patched, as the config.plist setting applies only to ACPI/patched/DSDT.aml, not ACPI/patched/SSDT*.aml.
Is that right? I found that there is an ec panel now in ioreg, which can not realize brightness adjustment! thank you
 

Attachments

  • MacBook Air.ioreg
    6.8 MB · Views: 113
  • extract.zip
    52.1 KB · Views: 98
Is that right?

Assuming 'that' references the text in my previous post, yes.

I found that there is an ec panel now in ioreg, which can not realize brightness adjustment! thank you

I don't see a question/issue.
This topic has nothing to do with brightness controls. This thread is for battery status only.
 
[QUOTE =“RehabMan,post:1562098,member:429483”]假设“那个”引用了我上一篇文章中的文字,是的。


Assuming 'that' references the text in my previous post, yes.



I don't see a question/issue.
This topic has nothing to do with brightness controls. This thread is for battery status only.
When I re-enter the system, the DSDT code extracted by extract is modified! Original code:
Method (_REG, 2, NotSerialized) // _REG: Region Availability
{
If (LEqual (Arg0, 0x03))
{
Store (Arg1, ECFL)
}
//added to turn nvidia/radeon off
If (LAnd(LEqual(Arg0,3),LEqual(Arg1,1)))
{
\_SB.PCI0.LPCB.EC0.SPIN (0x96, Zero)
}
}
Was modified to:
(_REG, 2, NotSerialized) // _REG: Region Availability
{
If (LEqual (Arg0, 0x03))
{
Store (Arg1, ECFL)
}
//added to turn nvidia/radeon off
If (LAnd(LEqual(Arg0,3),LEqual(Arg1,1)))
{
SPIN (0x96, Zero)
}
}
Turn off discrete graphics failed
 
[QUOTE =“RehabMan,post:1562098,member:429483”]假设“那个”引用了我上一篇文章中的文字,是的。



When I re-enter the system, the DSDT code extracted by extract is modified! Original code:
Method (_REG, 2, NotSerialized) // _REG: Region Availability
{
If (LEqual (Arg0, 0x03))
{
Store (Arg1, ECFL)
}
//added to turn nvidia/radeon off
If (LAnd(LEqual(Arg0,3),LEqual(Arg1,1)))
{
\_SB.PCI0.LPCB.EC0.SPIN (0x96, Zero)
}
}
Was modified to:
(_REG, 2, NotSerialized) // _REG: Region Availability
{
If (LEqual (Arg0, 0x03))
{
Store (Arg1, ECFL)
}
//added to turn nvidia/radeon off
If (LAnd(LEqual(Arg0,3),LEqual(Arg1,1)))
{
SPIN (0x96, Zero)
}
}
Turn off discrete graphics failed

Off-topic.
This thread is for battery status only.
For discrete disable, read here:
https://www.tonymacx86.com/threads/guide-disabling-discrete-graphics-in-dual-gpu-laptops.163772/
 
You have unbalanced renames.
config.plist/ACPI/DSDT/Patches applies to ACPI/patched/DSDT.aml, but not the SSDTs there.
So, you have EC0 renamed to EC in DSDT, but not the SSDTs.
Must rename EC0->EC manually in all the SSDTs that reference EC0 (SSDT-9, SSDT-10, SSDT-11).
Also, ECDT.aml uses EC0.
You could try patching it, but I found it doesn't work (could be a Clover problem).
Probably best to avoid EC0->EC patch and add a Fake EC with SSDT-EC.aml.
See guide:
https://www.tonymacx86.com/threads/guide-usb-power-property-injection-for-sierra.222266/
Hi, after 10.12.6 update, battery issue is no longer there. How come? I've changed nothing, kexts are the same, config is the same, DSDT and SSDTs are the same. EC0 -> EC rename is still on in config file.

Should I do anything after update? I already asked this question on another thread but your reply was like a general suggestion. So, should I refresh cache? or Update kexts? Update ACPI patches and fixes?

Thanks
 
Hi, after 10.12.6 update, battery issue is no longer there. How come? I've changed nothing, kexts are the same, config is the same, DSDT and SSDTs are the same. EC0 -> EC rename is still on in config file.

Should I do anything after update? I already asked this question on another thread but your reply was like a general suggestion. So, should I refresh cache? or Update kexts? Update ACPI patches and fixes?

Thanks

No guess possible without "Problem Reporting" files.
You should fix your unbalanced rename problem regardless.
 
No guess possible without "Problem Reporting" files.
You should fix your unbalanced rename problem regardless.

You are right. Something is not right with the system. Battery bar is not red and there is no warning but it doesn't even bother to warn me when battery gets 3%. So, it's not working. Besides, when it says 95% charging, my laptops charging light turned green, which means charge is completed. There is 5% inaccuracy with the reading.

Btw, before the update I was using EFI Mounter v3 and it was working fine. Now it warned me that Multiple EFI partition found. disk1s1 and disk2s1. Why do you think that happened? I have 2 physical disks. 1 SATA SSD and 1 mSATA SSD for ExpressCache. Now the mSata one is formatted to NTFS to serve a bridge between MacOS and Win. I can't write to NTFS from Mac though but I'll keep this question for another thread. And I didn't installed Windows yet. It's just MacOS.

Here's the PR files, Would you check it and tell me what's wrong? I'll work on disabling EC0 rename and doing it with a custom SSDT file as you suggested.

Thanks.
 

Attachments

  • AE's Problem Reporting for battery issue after update.zip
    5.4 MB · Views: 94
Hi RehabMan,

Here's Problem Reporting files after I've disabled EC rename and replaced it with a face SSDT-EC.aml file. I've also added it to SortedOrder list. Can you check if it's ok? Battery is still not showing me how long will it last though.

Thanks.
 

Attachments

  • AE's Problem Reporting for battery issue after update with EC replaced with SSDT-EC.zip
    5.3 MB · Views: 108
Back
Top