Contribute
Register

<< Solved >> OpenCore battery patch

Status
Not open for further replies.
@moh.96

Cool thing that you try to do it on your own! :) Offsets are in bytes, the field sizes in bits. Thus, 1+1+2+4 is +1 in the offset. Haven't looked at your other calculated offsets since I'm just on my phone rn, so I can't tell if they are correct or not.

thx for the help, now that make sense

got one more question :)
what's the first offset of this ? I assume offsets start at 0x01 ? am I right
 

Attachments

  • Screen Shot 2020-08-28 at 11.34.23 PM.png
    Screen Shot 2020-08-28 at 11.34.23 PM.png
    153.7 KB · Views: 55
@moh.96

The region starts at 0x0 (zero), so XIF0 is at 0x0, it's two bytes, thus IF10 is at 0x2, IF11 is at 0x3.
 
@AdorableTeemo

I've started to work on your SSDT, but it really is a lot of work, many methods need to be overridden. This will take some more time, so please be patient.
 
@AdorableTeemo

I've started to work on your SSDT, but it really is a lot of work, many methods need to be overridden. This will take some more time, so please be patient.
Hi, no worries, no rush, you can do it whenever u have free time, I really appreciate you wanting to help, I get massive headache reading the guides so I unfortunately won't be able to do it myself hehe
 
@BlvckBytes

I have a Zbook 17 G5 and I'm using the battery SSDT patch you have on your github page, and while it works as far as showing the battery status, it has an unintended side effect.
Native Audio using AppleALC only partially works.
I've tried renaming EC0 -> EC, as well as created a fake EC, and the results are the same.
If I don't use your patch, audio works as expected, headphones, speaker, mic input, etc... across sleep, etc... perfect.
But If I use your battery patch, the speaker output becomes erratic, sometimes it works for a couple seconds, and then silence, sometimes it works correctly but after sleep nothing, sometimes I get what seems like loudness DSP being applied to the output, etc...
This bug doesn't seem to be affecting the headphone out or the mic inputs, so I guess it must have something to do with the speaker amplifier, as the system "behaves" as if everything is ok and working (no errors) but silence from speaker out.
What could it be?, I'm guessing one of your methods could be causing this?

VoodooHDA "works" but I prefer the automatic plug switching, that the O/S remembers volume and output across reboots, as well as the possibility of HDMI audio if I find a way, and I've already done my homework and compiled my custom applealc with my codec (CX 8400)

I know your machine is a different model, but try for your build:

For the SD Card reader https://github.com/sinetek/Sinetek-rtsx

For HDMI outputs, try:
add boot arg: agdpmod=vit9696
And inject the following framebuffer info (In my case I'm using the built in screen + 2 more.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AAPL,ig-platform-id</key>
<data>AACbPg==</data>
<key>enable-hdmi20</key>
<data>AQAAAA==</data>
<key>enable-lspcon-support</key>
<data>AQAAAA==</data>
<key>framebuffer-con1-alldata</key>
<data>AQUJAAAIAACHAQAA</data>
<key>framebuffer-con1-enable</key>
<data>AQAAAA==</data>
<key>framebuffer-con2-alldata</key>
<data>AwQKAAAIAACHAQAA</data>
<key>framebuffer-con2-enable</key>
<data>AQAAAA==</data>
<key>framebuffer-con2-has-lspcon</key>
<data>AQAAAA==</data>
<key>framebuffer-con2-preferred-lspcon-mode</key>
<data>AQAAAA==</data>
<key>framebuffer-patch-enable</key>
<data>AQAAAA==</data>
<key>framebuffer-portcount</key>
<data>AwAAAA==</data>
<key>hda-gfx</key>
<string>onboard-1</string>
</dict>
</plist>

If we can figure the battery/EC bug, then the only 2 items on the to-do-list are Thunderbolt 3 hotplug (need a device to test my patches) and a custom voodoo input kext to enable the trackpad buttons alongside with voodooI2C.
 
@hugodlc

I don't own this system anymore and thus, cannot test it. I'm really under stress rn, so I'll be active on here on the weekend again.
 
Hi, I have successfully installed Catalina but the Battery is 0%, i try to write a battery patch but it doesn't work, my laptop' impormation:

System Manufacturer: HP
System Model: OMEN by HP Laptop 15-dc1xxx
System memory: 16 GB
System board: 8575 21.15
System board manufacturer: HP
Graphic device 1: NVIDIA GeForce GTX 1650
Graphic device 2: Intel(R) UHD Graphics 630
Microprocessor: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz

I'll attach my files, it's for Opencore(UEFI). Mind you give me some suggestions? I'll think a lot if you can help me fix it.

Thanks in advance
 

Attachments

  • acpi_dsdt.aml
    316.7 KB · Views: 66
  • EFI.zip
    2.3 MB · Views: 61
  • SSDT-BATT.dsl
    25.7 KB · Views: 63
Last edited:
@AdorableTeemo @ccBling

I just want to get this out to you guys. I'm kind of having a hard time right now, mental issues, which actually really pull me and my enthusiasm for development down. Next to that, I also have a lot of things to get done, which actually involve quite a ton of physical work and effort.

I am not going to stop helping people around here tho. I will get back to you as soon as possible and then also take on new requests for help. Please be patient, I'm sorry.
 
@AdorableTeemo @ccBling

I just want to get this out to you guys. I'm kind of having a hard time right now, mental issues, which actually really pull me and my enthusiasm for development down. Next to that, I also have a lot of things to get done, which actually involve quite a ton of physical work and effort.

I am not going to stop helping people around here tho. I will get back to you as soon as possible and then also take on new requests for help. Please be patient, I'm sorry.

Hey man, I hope everything will be okay for you, mental issues sucks, just take your time and do it when your body and mind are free, no need to rush, I will patiently wait. I hope everything will be okay for you.
 
@AdorableTeemo @ccBling

I just want to get this out to you guys. I'm kind of having a hard time right now, mental issues, which actually really pull me and my enthusiasm for development down. Next to that, I also have a lot of things to get done, which actually involve quite a ton of physical work and effort.

I am not going to stop helping people around here tho. I will get back to you as soon as possible and then also take on new requests for help. Please be patient, I'm sorry.
I'm sorry to hear that you're suffering from mental issues, don't worry about about my questions, just have a good rest, i'll wait patiently.
Hope you get better soon.
 
Status
Not open for further replies.
Back
Top