Contribute
Register

[solved] Hotpatch battery status does not show

Status
Not open for further replies.
Already uploaded.

The files you attached (this time and last time) are still incomplete... they were not generated by gen_debug.sh.
Please read carefully.
 
The files you attached (this time and last time) are still incomplete... they were not generated by gen_debug.sh.
Please read carefully.

Uh..It looks can not run.
20181024-022649.png
 

Attachments

  • debug_2518_Use Hotpatch.zip
    2.9 MB · Views: 73
  • debug_27090_Use SSDT.zip
    2.9 MB · Views: 73
OK, It works now.Thanks for your hard work! :)

Your hotpatch is still bugged. Note output from disassembly of patchmatic -extract output:
Code:
Firmware Error (ACPI): Failure creating [\_SB.PCI0.LPCB.H_EC.ECF4], AE_ALREADY_EXISTS (20180427/dswload-498)
ACPI Error: AE_ALREADY_EXISTS, During name lookup/catalog (20180427/psobject-371)
Could not parse external ACPI tables, AE_ALREADY_EXISTS

For the EC overlays in your hotpatch SSDT, you must come up with different names than those used in the original code.
And you should not be including symbols that don't need patching, as those are simply referred to with External.
Only the symbols which needed splitting into 8-byte registers should be present (with names that don't conflict, in regions with names that don't conflict, but with a matching offset of the original).
 
Your hotpatch is still bugged. Note output from disassembly of patchmatic -extract output:
Code:
Firmware Error (ACPI): Failure creating [\_SB.PCI0.LPCB.H_EC.ECF4], AE_ALREADY_EXISTS (20180427/dswload-498)
ACPI Error: AE_ALREADY_EXISTS, During name lookup/catalog (20180427/psobject-371)
Could not parse external ACPI tables, AE_ALREADY_EXISTS

For the EC overlays in your hotpatch SSDT, you must come up with different names than those used in the original code.
And you should not be including symbols that don't need patching, as those are simply referred to with External.
Only the symbols which needed splitting into 8-byte registers should be present (with names that don't conflict, in regions with names that don't conflict, but with a matching offset of the original).

I read the Guide again, I found where i did wrong.
I fixed Battery Hotpatch file by These operations:
- for the EC fields, create another EC OperationRegion (use a name that is different from the original) and Field definition as a sort of "overlay" which contains only the EC fields you need to patch.
But it still not work, i disassembly of "patchmatic -extract" 's output, it looks like doesn't have problem now.
 

Attachments

  • debug_20940.zip
    3 MB · Views: 59
I read the Guide again, I found where i did wrong.
I fixed Battery Hotpatch file by These operations:
- for the EC fields, create another EC OperationRegion (use a name that is different from the original) and Field definition as a sort of "overlay" which contains only the EC fields you need to patch.
But it still not work, i disassembly of "patchmatic -extract" 's output, it looks like doesn't have problem now.

Use debug ACPIBatteryManager.kext so you can see in the kernel logs which method is failing.
Then use ACPIDebug.kext to debug/trace your code.
 
Use debug ACPIBatteryManager.kext so you can see in the kernel logs which method is failing.
Then use ACPIDebug.kext to debug/trace your code.

I got "battery_status = 0xb" when i use debug ACPIBatteryManager.kext
20181024-145803.png

I don't know how to fix this... Thanks for sparing a time to help me.
 

Attachments

  • debug_1096.zip
    3.2 MB · Views: 88
  • SSDT-BATT.dsl
    18.8 KB · Views: 86
  • SSDT-Origin.dsl
    46.4 KB · Views: 85
  • SSDT-Patched.dsl
    48.5 KB · Views: 80
I got "battery_status = 0xb" when i use debug ACPIBatteryManager.kextView attachment 360048
I don't know how to fix this... Thanks for sparing a time to help me.

Your SSDT-1 has a Mutex with non-zero synclevel. Requires config.plist/ACPI/DSDT/Fixes/FixMutex=true.
No such setting in your config.plist.
 
Your SSDT-1 has a Mutex with non-zero synclevel. Requires config.plist/ACPI/DSDT/Fixes/FixMutex=true.
No such setting in your config.plist.

I added FixMutex=true in config.plist the result are same too.."battery_status = 0xb"
 

Attachments

  • debug_28308.zip
    3 MB · Views: 73
Status
Not open for further replies.
Back
Top