Contribute
Register

<< Solved >> OpenCore battery patch

Joined
Mar 8, 2017
Messages
723
Motherboard
Lenovo ThinkPad T480s (OpenCore)
CPU
i7-8550U
Graphics
UHD 620, 2560x1440
Mobile Phone
  1. Android
@DaveJ1

I just need a screenshot from System Report with the latest SSDT loaded, and maybe also zip up your current EFI folder and attach it. This all seems weird, since I've hardcoded 123 Battery-Cycles now, and a Serial-Number of "Hello World". No idea why nothing would show up... This would suggest that it's not even called.

ACPIDebug would help greatly here, but it's a bit tough to do this remote, would require multiple back- and forths.
 
Joined
Feb 9, 2017
Messages
89
Motherboard
HP Elitebook 8470p
CPU
Intel Core i7-3740QM
Graphics
AMD Radeon HD 7570m 1GB
Mobile Phone
  1. iOS
ACPIDebug you mean Click. - i never tried.
Tell me what to do and i try it, if you want to.

* Look at this. I think this was make with Rehabman guide. It uses the ACPIBatteryManager with SSDT-8x70. Maybe it's helpful.
 
Last edited:
Joined
Mar 8, 2017
Messages
723
Motherboard
Lenovo ThinkPad T480s (OpenCore)
CPU
i7-8550U
Graphics
UHD 620, 2560x1440
Mobile Phone
  1. Android
@DaveJ1

Please boot with the attached file and send me another screenshot of System Report, nothing else needed so far.
 

Attachments

  • SSDT-BATT.aml
    1.3 KB · Views: 16
Joined
Feb 9, 2017
Messages
89
Motherboard
HP Elitebook 8470p
CPU
Intel Core i7-3740QM
Graphics
AMD Radeon HD 7570m 1GB
Mobile Phone
  1. iOS
Connected to a charger.
Cycle count "test" is confirmed i guess. - CoconutBattery fully empty.
 
Joined
Mar 8, 2017
Messages
723
Motherboard
Lenovo ThinkPad T480s (OpenCore)
CPU
i7-8550U
Graphics
UHD 620, 2560x1440
Mobile Phone
  1. Android
@DaveJ1

Hey, that's awesome tho! This means the code gets executed and I understand how this stuff works now. Just need to fiddle around with serial number and other things.

Please try the attached file once more, maybe it'll now display proper cycle count. In the mean time, I'll try to figure out the other things.
 

Attachments

  • SSDT-BATT.aml
    1.3 KB · Views: 19
Joined
Feb 9, 2017
Messages
89
Motherboard
HP Elitebook 8470p
CPU
Intel Core i7-3740QM
Graphics
AMD Radeon HD 7570m 1GB
Mobile Phone
  1. iOS
Okay, that was weird.
1st boot plug in. Sys Report showing the correct Cycle count. Coconut empty
2nd boot unplug. Hang on boot.
3rd boot unplug. booting up, on lock screen no battery icon and Sys Report correct CC. Coconut empty.
4th plug in. No CC and Hello world and Coconut is showing values but the Design Capacity is wrong i guess.

*Recheck, i attached wrongly.
 
Joined
Mar 8, 2017
Messages
723
Motherboard
Lenovo ThinkPad T480s (OpenCore)
CPU
i7-8550U
Graphics
UHD 620, 2560x1440
Mobile Phone
  1. Android
@DaveJ1

Okay, this is weird... I mean, it's nice that the cycles are correct now, but this whole dependency on whether or not the plug is active or not kinda weirds me out.

Already getting pretty late over here, I need to go to bed soon. Will continue on this with you tomorrow, okay?
 
Joined
Feb 9, 2017
Messages
89
Motherboard
HP Elitebook 8470p
CPU
Intel Core i7-3740QM
Graphics
AMD Radeon HD 7570m 1GB
Mobile Phone
  1. iOS
@DaveJ1

Okay, this is weird... I mean, it's nice that the cycles are correct now, but this whole dependency on whether or not the plug is active or not kinda weirds me out.

Already getting pretty late over here, I need to go to bed soon. Will continue on this with you tomorrow, okay?
I agree.
Late in here too, thanks for your effort! I'll be here.
 
Joined
Feb 23, 2020
Messages
132
Motherboard
Dell Precision M4700
CPU
i7-3740QM
Graphics
M4000
You don't need ACPIDebug if you add "acpi_layer=0x08" and "acpi_level=0x02" to your boot-args. To print, you then do something like:
Code:
Name (XORG, One)

Method (_INI, 0, Serialized)
{
    Debug = "INI Called"
    Debug = Concatenate ("XORG is: ", XORG)
}

Easier to use compared to ACPIDebug imo, and doesn't require any ACPI aside from what is already supported in the ACPI spec.

Edit: If you do this, you may want to also add "msgbuf=1048576" or use DebugEnhancer.kext, then use "sudo dmesg". The log command is a bit of a pain and often won't get data from early in the boot process. msgbuf will expand the dmesg buffer, though DebugEnhancer expands it even further. If you use msgbuf, you probably want to get the log ASAP after boot.
 
Joined
Feb 9, 2017
Messages
89
Motherboard
HP Elitebook 8470p
CPU
Intel Core i7-3740QM
Graphics
AMD Radeon HD 7570m 1GB
Mobile Phone
  1. iOS
You don't need ACPIDebug if you add "acpi_layer=0x08" and "acpi_level=0x02" to your boot-args. To print, you then do something like:
Code:
Name (XORG, One)

Method (_INI, 0, Serialized)
{
    Debug = "INI Called"
    Debug = Concatenate ("XORG is: ", XORG)
}

Easier to use compared to ACPIDebug imo, and doesn't require any ACPI aside from what is already supported in the ACPI spec.

Edit: If you do this, you may want to also add "msgbuf=1048576" or use DebugEnhancer.kext, then use "sudo dmesg". The log command is a bit of a pain and often won't get data from early in the boot process. msgbuf will expand the dmesg buffer, though DebugEnhancer expands it even further. If you use msgbuf, you probably want to get the log ASAP after boot.
That was a good shot.
I thought it could only be possible with the Debug OC version.
i added all 3 boot-args and i edited the SSDT-BATT with the code and without.
 
Last edited:
Top