Contribute
Register

[Guide] How to patch DSDT for working battery status

Joined
Jul 6, 2014
Messages
6
Motherboard
Asus G2S
CPU
Core2Duo T7700/PM965
Graphics
GeForce 8600M GT, 1920x1200
Mac
Classic Mac
Mobile Phone
How to patch DSDT for working battery status

Hi RehabMan, your tips were golden! I just came here to thank you!

Now it works as expected.

Unfortunately I'm not skilled enough to make a patch and contribute with your repo..
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
184,445
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
How to patch DSDT for working battery status

Hi RehabMan, your tips were golden! I just came here to thank you!

Now it works as expected.

Unfortunately I'm not skilled enough to make a patch and contribute with your repo..

It is likely there is an existing patch in the repo for your laptop already...

Please provide complete details in your profile/signature
(Profile/Settings link in upper right corner of this site)

System: manufacturer/model
CPU: detailed CPU model + motherboard chipset
Graphics: all graphics devices + laptop internal screen resolution

For example, typical Ivy laptop:
System: HP ProBook 4540s
CPU: i5-3320m/HM76
Graphics: HD4000, 1366x768

Use CPU-Z on Windows to find CPU (Core iX-xxx) and motherboard chipset (HMxx). For a laptop, these details are important and affect critical installation procedures.
 
Joined
Feb 18, 2011
Messages
78
Motherboard
ProBook 4340s B6L98EA
CPU
i5 2450m
Graphics
Intel HD 3000
Mobile Phone
  1. Android
How to patch DSDT for working battery status

What, exactly, is wrong?

Battery temperature -2,2C and 17,9C and Battery age -922blablabla. Why coconut battery reflects the right percentage, and stock battery icon is not updated well? If it's because of Clover, i can verify it. Maybe my patched dsdt is wrong after BPI Clover edition?
 
Joined
Jul 6, 2014
Messages
6
Motherboard
Asus G2S
CPU
Core2Duo T7700/PM965
Graphics
GeForce 8600M GT, 1920x1200
Mac
Classic Mac
Mobile Phone
How to patch DSDT for working battery status

I think my signature is correct now, I don't see a patch specific for this model though
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
184,445
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
How to patch DSDT for working battery status

Battery temperature -2,2C and 17,9C

Temperature is not provided by standard _BIF method. I have extended _BIF to provide it, but only if you implement it in DSDT. I have no idea where Coconut is getting the information if not provided. Check in your ioreg.

and Battery age -922blablabla.

There is no battery age provided in _BIF or in the ioreg. The only thing is CycleCount (which is estimated by default). Check your ioreg.
 
Joined
Feb 18, 2011
Messages
78
Motherboard
ProBook 4340s B6L98EA
CPU
i5 2450m
Graphics
Intel HD 3000
Mobile Phone
  1. Android
How to patch DSDT for working battery status

Temperature is not provided by standard _BIF method. I have extended _BIF to provide it, but only if you implement it in DSDT. I have no idea where Coconut is getting the information if not provided. Check in your ioreg.
There is no battery age provided in _BIF or in the ioreg. The only thing is CycleCount (which is estimated by default). Check your ioreg.

Thank you very much RehabMan,
I'm really didn't understand why coconut get the right percents and the stock battery icon didn't refresh percent value. Yesterday i've got 0 % on battery and laptop worked without system alert about low battery before i had 10%, 5% till the 0%. That's strange for me. It's interesting, that when i create recovery partition and boot into it, the default battery icon shows the right percents and update it normally. In EFI volume a saw folder /Volumes/EFI/EFI/CLOVER/kexts ? Do the clover boot this kexts? What about kexts in SLE?

RehavMan, can you please verify my default DSDT,patched DSDT, Ioregs with normal battery percentage behaviour and with abnormal behaviour?

Thank you in advance,
 

Attachments

  • Screen Shot 2014-07-27 at 14.51.31.png
    Screen Shot 2014-07-27 at 14.51.31.png
    32.2 KB · Views: 72
  • elrombios_normalbatterypercent.ioreg
    1.5 MB · Views: 59
  • elrombios_wrongbatterypercent.ioreg
    1.5 MB · Views: 63
  • DSDT_orig.aml
    133.2 KB · Views: 99
  • DSDT_patched.aml
    45.6 KB · Views: 77

RehabMan

Moderator
Joined
May 3, 2012
Messages
184,445
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
How to patch DSDT for working battery status

Thank you very much RehabMan,
I'm really didn't understand why coconut get the right percents and the stock battery icon didn't refresh percent value. Yesterday i've got 0 % on battery and laptop worked without system alert about low battery before i had 10%, 5% till the 0%. That's strange for me.

I've never experienced it, but from what I understand... OS X bug.

It's interesting, that when i create recovery partition and boot into it, the default battery icon shows the right percents and update it normally. In EFI volume a saw folder /Volumes/EFI/EFI/CLOVER/kexts ? Do the clover boot this kexts? What about kexts in SLE?

You can place certain kexts in Clover/kexts and they will load...

RehabMan, can you please verify my default DSDT,patched DSDT, Ioregs with normal battery percentage behaviour and with abnormal behaviour?

If you used the ProBook Installer to patch your DSDT then it must be correct...

ioregs look essentially identical and indicate the DSDT/battery manager kext is working...
 
Joined
Jul 28, 2014
Messages
51
Motherboard
10.9
CPU
inter
Graphics
hd4400
Mac
Classic Mac
Mobile Phone
How to patch DSDT for working battery status

You drive me Toshiba battery, must sleep once or insert the power time candisplay normal residual quantity. Ask God to help card to see my dsdt.aml,thank you.View attachment dsdt.aml
 
Joined
Jul 28, 2014
Messages
51
Motherboard
10.9
CPU
inter
Graphics
hd4400
Mac
Classic Mac
Mobile Phone
How to patch DSDT for working battery status

Need to sleep and wake up to display
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
184,445
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
How to patch DSDT for working battery status

You drive me Toshiba battery, must sleep once or insert the power time candisplay normal residual quantity. Ask God to help card to see my dsdt.aml,thank you.View attachment 100035

Read post #1. Work through the example DSDT, then work on your own.

- - - Updated - - -

Need to sleep and wake up to display

Off-topic. This thread is regarding DSDT patching for battery status.
 
Top