Contribute
Register

<< Solved >> OpenCore battery patch

Status
Not open for further replies.
Hi.
While I'm not the original requester, I was very happy someone had the trouble of creating an OC patch for our laptop's battery.
After testing, I can sadly report that under BigSur 11.0.1 and OC 0.6.4, the patches make the laptop instantly reboot.
I thought that even though my laptop is the same model as isaza15's the DSDT might be different enough, but after decompiling both DSDT's and comparing them using FileMerge, there's only one noticeable difference (which I think hasn't got anything to do with the instant reboot).

isaza15's DSDT Line 201:
OperationRegion (GNVS, SystemMemory, 0xCAA71C18, 0x02B2)
My DSDT Line 201:
OperationRegion (GNVS, SystemMemory, 0xBEB1BC18, 0x02B2)

I haven't tried booting with his patched DSDT yet, but just wanting to let you know the results.
If you need, I'm available for more tests as I'd love to have Battery Status working since it's one of the last things that aren't working on that laptop.

Edit: I've also added some missing parameters to the patches as they make OC complaint about missing values on each patch, even tho it doesn't really change the outcome.

Attached is my DSDT and EFI folder.

Many thanks for your hardwork and I hope you have a great and safe 2021!
~ Marcos
Hello, good to see some testers here

could you test his patched DSDT and the patched DSDT I'll include in attachment and report back ?

Edit: A little reminder, don't use any of my previous renaming patches or SSDT-BAT with the patched DSDT
 

Attachments

  • DSDT.zip
    30.5 KB · Views: 51
Hi BlvckBytes.....
I am attaching my EFI and the DSDT for my lenovo ideapad S540-14iwl runing open core 0.6.4 with macos 11.1
I am having a strange behaviour.
The full charge capacity fluctuates up and down and lately the power indicator (battery / power adapter) at the top bar changes very slowly after I plug or unplug the power cable it takes a good amount of seconds.

Could you be as kind as to give it a look and provide any assistance you can?
 

Attachments

  • DSDT.aml
    251.6 KB · Views: 51
  • EFI.zip
    5.3 MB · Views: 66
Hi BlvckBytes.....
I am attaching my EFI and the DSDT for my lenovo ideapad S540-14iwl runing open core 0.6.4 with macos 11.1
I am having a strange behaviour.
The full charge capacity fluctuates up and down and lately the power indicator (battery / power adapter) at the top bar changes very slowly after I plug or unplug the power cable it takes a good amount of seconds.

Could you be as kind as to give it a look and provide any assistance you can?
Failing/delaying to detect power cable is related to the dsdt failing to notify the system that the power adapter plugged in or out

now I see you have modified method _Q37 so disable SSDT-POWS and _Q37 to XQ11 renaming patch, restart and check if that solves the issue
 
thanks moh.96 for the reply. When I remove that, I get a pows acpi error whenever I plug or unplug the power cord....
It doesn’t bother me or at least it doesn’t appear to cause any other problems, but I modified method _Q37 and used the ssdt to solve it.....
is there any other way?

and regarding the rest of the issues?
 
Last edited:
Failing/delaying to detect power cable is related to the dsdt failing to notify the system that the power adapter plugged in or out

now I see you have modified method _Q37 so disable SSDT-POWS and _Q37 to XQ11 renaming patch, restart and check if that solves the issue
Ok .... I'm back on my hackintosh.

Thanks again for the shift reply. I am truly grateful.

If I remove SSDT-POWS and the patch .. the delay in power status update is gone... but ..... I have this ACPI error in console:
Code:
default    19:45:56.787784+0200    kernel    ACPI Error:
default    19:45:56.787837+0200    kernel    ACPI Error:
default    19:45:56.787854+0200    kernel    [POWS]
default    19:45:56.787857+0200    kernel    [POWS]
default    19:45:56.787872+0200    kernel     Namespace lookup failure, AE_NOT_FOUND
default    19:45:56.787874+0200    kernel     Namespace lookup failure, AE_NOT_FOUND
default    19:45:56.787940+0200    kernel     (20160930/psargs-463)
default    19:45:56.789896+0200    loginwindow    clamshellStateChanged | Clamshell state changed: closed=0, shouldSleepWhenClosed=2
default    19:45:56.787952+0200    kernel     (20160930/psargs-463)
default    19:45:56.788014+0200    kernel    [_Q37] @00043 #002D:
default    19:45:56.788017+0200    kernel    [_Q37] @00043 #002D:
default    19:45:56.791219+0200    loginwindow    clamshellStateChanged | Clamshell state changed: closed=0, shouldSleepWhenClosed=2
default    19:45:56.788036+0200    kernel    A
default    19:45:56.788038+0200    kernel    A
default    19:45:56.788041+0200    kernel    D
default    19:45:56.788043+0200    kernel    D
default    19:45:56.788047+0200    kernel    P
default    19:45:56.788048+0200    kernel    P
default    19:45:56.788064+0200    kernel    T
default    19:45:56.788077+0200    kernel    T
default    19:45:56.788083+0200    kernel  
default    19:45:56.788096+0200    kernel  
default    19:45:56.788103+0200    kernel    No Local Variables are initialized for method [_Q37]
default    19:45:56.788110+0200    kernel    No Local Variables are initialized for method [_Q37]
default    19:45:56.788127+0200    kernel  
default    19:45:56.788130+0200    kernel  
default    19:45:56.788136+0200    kernel    No Arguments are initialized for method [_Q37]
default    19:45:56.788141+0200    kernel    No Arguments are initialized for method [_Q37]
default    19:45:56.788170+0200    kernel  
default    19:45:56.788173+0200    kernel  
default    19:45:56.788184+0200    kernel    ACPI Error:
default    19:45:56.788187+0200    kernel    ACPI Error:
default    19:45:56.788218+0200    kernel    Method parse/execution failed
default    19:45:56.788223+0200    kernel    Method parse/execution failed
default    19:45:56.788243+0200    kernel    [\_SB.PCI0.LPCB.EC0._Q37] (Node ffffff93659a6ab0)
default    19:45:56.788256+0200    kernel    [\_SB.PCI0.LPCB.EC0._Q37] (Node ffffff93659a6ab0)
default    19:45:56.788265+0200    kernel    , AE_NOT_FOUND
default    19:45:56.788269+0200    kernel    , AE_NOT_FOUND
default    19:45:56.788275+0200    kernel     (20160930/psparse-632)
default    19:45:56.788290+0200    kernel     (20160930/psparse-632)
default    19:45:56.789565+0200    kernel    PMRD: clamshell closed 0, disabled 0/0, desktopMode 0, ac 1
default    19:45:56.789575+0200    kernel    PMRD: clamshell closed 0, disabled 0/0, desktopMode 0, ac 1
default    19:45:56.790870+0200    kernel    SmartBattery: notification received in message()
default    19:45:56.790885+0200    kernel    Starting poll type 2
default    19:45:56.790899+0200    kernel    Restarting poll type 2
default    19:45:56.790899+0200    kernel    PMRD: clamshell closed 0, disabled 0/0, desktopMode 0, ac 1
default    19:45:56.790927+0200    kernel    PMRD: clamshell closed 0, disabled 0/0, desktopMode 0, ac 1
default    19:45:57.017096+0200    kernel    Failed to read nominal voltage rating key     . voltage:0 rc:0x84
default    19:45:57.017281+0200    kernel    SmartBattery: finished polling type 2
default    19:45:57.018295+0200    powerd    Nominal Capacity percentage(2001) is less than the threshold(80)

Is there any other way to fix this?

Do you have any ideas on the general battery problem with the fluctuating maximum capacity? Can a patch solve this? Or is it a faulty battery?

Thanks again for all the help
 
Ok .... I'm back on my hackintosh.

Thanks again for the shift reply. I am truly grateful.

If I remove SSDT-POWS and the patch .. the delay in power status update is gone... but ..... I have this ACPI error in console:
Code:
default    19:45:56.787784+0200    kernel    ACPI Error:
default    19:45:56.787837+0200    kernel    ACPI Error:
default    19:45:56.787854+0200    kernel    [POWS]
default    19:45:56.787857+0200    kernel    [POWS]
default    19:45:56.787872+0200    kernel     Namespace lookup failure, AE_NOT_FOUND
default    19:45:56.787874+0200    kernel     Namespace lookup failure, AE_NOT_FOUND
default    19:45:56.787940+0200    kernel     (20160930/psargs-463)
default    19:45:56.789896+0200    loginwindow    clamshellStateChanged | Clamshell state changed: closed=0, shouldSleepWhenClosed=2
default    19:45:56.787952+0200    kernel     (20160930/psargs-463)
default    19:45:56.788014+0200    kernel    [_Q37] @00043 #002D:
default    19:45:56.788017+0200    kernel    [_Q37] @00043 #002D:
default    19:45:56.791219+0200    loginwindow    clamshellStateChanged | Clamshell state changed: closed=0, shouldSleepWhenClosed=2
default    19:45:56.788036+0200    kernel    A
default    19:45:56.788038+0200    kernel    A
default    19:45:56.788041+0200    kernel    D
default    19:45:56.788043+0200    kernel    D
default    19:45:56.788047+0200    kernel    P
default    19:45:56.788048+0200    kernel    P
default    19:45:56.788064+0200    kernel    T
default    19:45:56.788077+0200    kernel    T
default    19:45:56.788083+0200    kernel 
default    19:45:56.788096+0200    kernel 
default    19:45:56.788103+0200    kernel    No Local Variables are initialized for method [_Q37]
default    19:45:56.788110+0200    kernel    No Local Variables are initialized for method [_Q37]
default    19:45:56.788127+0200    kernel 
default    19:45:56.788130+0200    kernel 
default    19:45:56.788136+0200    kernel    No Arguments are initialized for method [_Q37]
default    19:45:56.788141+0200    kernel    No Arguments are initialized for method [_Q37]
default    19:45:56.788170+0200    kernel 
default    19:45:56.788173+0200    kernel 
default    19:45:56.788184+0200    kernel    ACPI Error:
default    19:45:56.788187+0200    kernel    ACPI Error:
default    19:45:56.788218+0200    kernel    Method parse/execution failed
default    19:45:56.788223+0200    kernel    Method parse/execution failed
default    19:45:56.788243+0200    kernel    [\_SB.PCI0.LPCB.EC0._Q37] (Node ffffff93659a6ab0)
default    19:45:56.788256+0200    kernel    [\_SB.PCI0.LPCB.EC0._Q37] (Node ffffff93659a6ab0)
default    19:45:56.788265+0200    kernel    , AE_NOT_FOUND
default    19:45:56.788269+0200    kernel    , AE_NOT_FOUND
default    19:45:56.788275+0200    kernel     (20160930/psparse-632)
default    19:45:56.788290+0200    kernel     (20160930/psparse-632)
default    19:45:56.789565+0200    kernel    PMRD: clamshell closed 0, disabled 0/0, desktopMode 0, ac 1
default    19:45:56.789575+0200    kernel    PMRD: clamshell closed 0, disabled 0/0, desktopMode 0, ac 1
default    19:45:56.790870+0200    kernel    SmartBattery: notification received in message()
default    19:45:56.790885+0200    kernel    Starting poll type 2
default    19:45:56.790899+0200    kernel    Restarting poll type 2
default    19:45:56.790899+0200    kernel    PMRD: clamshell closed 0, disabled 0/0, desktopMode 0, ac 1
default    19:45:56.790927+0200    kernel    PMRD: clamshell closed 0, disabled 0/0, desktopMode 0, ac 1
default    19:45:57.017096+0200    kernel    Failed to read nominal voltage rating key     . voltage:0 rc:0x84
default    19:45:57.017281+0200    kernel    SmartBattery: finished polling type 2
default    19:45:57.018295+0200    powerd    Nominal Capacity percentage(2001) is less than the threshold(80)

Is there any other way to fix this?

Do you have any ideas on the general battery problem with the fluctuating maximum capacity? Can a patch solve this? Or is it a faulty battery?

Thanks again for all the help
Hello, since the method is failing to execute then disable it, I’ll look into the ACPI log later and see if I can fix it somehow

just enable _Q37 to XQ11 (btw it should be _Q37 to XQ37 but name doesn’t matter as long as the values are correct)

For the inaccurate capacity I don’t have an idea tbh but I’ll check it later
 
Hello, since the method is failing to execute then disable it, I’ll look into the ACPI log later and see if I can fix it somehow

just enable _Q37 to XQ11 (btw it should be _Q37 to XQ37 but name doesn’t matter as long as the values are correct)

For the inaccurate capacity I don’t have an idea tbh but I’ll check it later

How do i disable the method?

THANKS AGAIN MATE!!!!!!
take your time .... i will be here...
 
OK ... If i remove the SSDT-POWS but retain the patch (by the way i corrected the typo to XQ37)... i don;t get the ACPI error but the power status DOES NOT update ....... Also reporting is going nuts!!!!!!

Screenshot 2021-01-04 at 8.30.26 PM.png

While i am on battery .... i am connected and discharging with 130,84 watts!!!!!!!!
 
OK ... If i remove the SSDT-POWS but retain the patch (by the way i corrected the typo to XQ37)... i don;t get the ACPI error but the power status DOES NOT update ....... Also reporting is going nuts!!!!!!

View attachment 503835
While i am on battery .... i am connected and discharging with 130,84 watts!!!!!!!!
The discharge reading is obviously wrong, can you replace SSDT-POWS with the one in attachment and enable it, and check if you get the ACPI error
 

Attachments

  • SSDT-POWS.aml.zip
    1,020 bytes · Views: 55
The discharge reading is obviously wrong, can you replace SSDT-POWS with the one in attachment and enable it, and check if you get the ACPI error
Thank you for your time and help.

I used your SSDT with the patch at the same time and although there is no ACPI error in console... the power status now just doesn't update at all.....

If i keep the ssdt and remove the patch, then I have a normal update status, but the ACPI error and the absurd readouts come back:

Code:
default    08:31:28.137866+0200    kernel    Failed to read nominal voltage rating key     . voltage:0 rc:0x84
default    08:31:28.138350+0200    kernel    SmartBattery: finished polling type 2
default    08:31:28.140336+0200    powerd    Nominal Capacity percentage(2001) is less than the threshold(80)
default    08:31:28.638680+0200    kernel    ACPI Error:
default    08:31:28.638710+0200    kernel    ACPI Error:
default    08:31:28.638720+0200    kernel    [POWS]
default    08:31:28.638722+0200    kernel    [POWS]
default    08:31:28.638727+0200    kernel     Namespace lookup failure, AE_NOT_FOUND
default    08:31:28.638731+0200    kernel     Namespace lookup failure, AE_NOT_FOUND
default    08:31:28.638740+0200    kernel     (20160930/psargs-463)
default    08:31:28.638745+0200    kernel     (20160930/psargs-463)
default    08:31:28.638760+0200    kernel    [_Q37] @00043 #002D:
default    08:31:28.638762+0200    kernel    [_Q37] @00043 #002D:
default    08:31:28.638770+0200    kernel    A
default    08:31:28.638771+0200    kernel    A
default    08:31:28.638773+0200    kernel    D
default    08:31:28.638776+0200    kernel    D
default    08:31:28.638778+0200    kernel    P
default    08:31:28.638780+0200    kernel    P
default    08:31:28.638782+0200    kernel    T
default    08:31:28.638784+0200    kernel    T
default    08:31:28.638787+0200    kernel   
default    08:31:28.638791+0200    kernel   
default    08:31:28.638797+0200    kernel    No Local Variables are initialized for method [_Q37]
default    08:31:28.638803+0200    kernel    No Local Variables are initialized for method [_Q37]
default    08:31:28.638808+0200    kernel   
default    08:31:28.638812+0200    kernel   
default    08:31:28.638818+0200    kernel    No Arguments are initialized for method [_Q37]
default    08:31:28.638822+0200    kernel    No Arguments are initialized for method [_Q37]
default    08:31:28.638828+0200    kernel   
default    08:31:28.638830+0200    kernel   
default    08:31:28.638840+0200    kernel    ACPI Error:
default    08:31:28.638843+0200    kernel    ACPI Error:
default    08:31:28.638849+0200    kernel    Method parse/execution failed
default    08:31:28.638853+0200    kernel    Method parse/execution failed
default    08:31:28.638860+0200    kernel    [\_SB.PCI0.LPCB.EC0._Q37] (Node ffffff9365cbdae0)
default    08:31:28.638864+0200    kernel    [\_SB.PCI0.LPCB.EC0._Q37] (Node ffffff9365cbdae0)
default    08:31:28.638870+0200    kernel    , AE_NOT_FOUND
default    08:31:28.638874+0200    kernel    , AE_NOT_FOUND
default    08:31:28.638880+0200    kernel     (20160930/psparse-632)
default    08:31:28.638884+0200    kernel     (20160930/psparse-632)

I am attaching my IOReg..... i dont know if that can help you......
 

Attachments

  • MacBook Pro.ioreg
    19 MB · Views: 46
Last edited:
Status
Not open for further replies.
Back
Top