Contribute
Register

[Guide] How to patch DSDT for working battery status

The only multibyte field (that is accessed) is ERIB, which appears to be fan related.

Well I found ENIB(16, in ERAM), ERIB(16, in ECRM).


What could cause this weird battery times ? As i was saying, I applied the 2 patches from your repo and installed ACPIBatteryManager.
 
Well I found ENIB(16, in ERAM), ERIB(16, in ECRM).

Only ERIB is accessed.

What could cause this weird battery times ? As i was saying, I applied the 2 patches from your repo and installed ACPIBatteryManager.

You would have to use the debug ACPIBatteryManager.kext and analyze the data returned by your battery methods (logs in system.log).
 
I only looked at your profile, which says ASUS...

Acer is different. But there are also some patches for Acer laptops.

You should fill out your profile to reflect your laptop...

A lot of trial and error but got there in the end !
Your patch for < Acer 3820-tg > was a good starting point, very close to what I needed.
Along with your tutorial , a must for anyone trying this for the first time.
I worked at patching for 16bit first , compiling ,then saving as I went.
Found this easier when correcting errors.
Slow getting there but worth it , the acer screen is 17.3'' led and Yosemite looks and sounds immaculate.
It might be only i3 350m but just installed an ssd boot drive and this system does everything I need it to.

< On a side note, custom edid with clover was more successful than any previous attempts I had with chimera/chameleon.
It may be the better option if user's have tricky graphics/screen res issues. >

Appreciate the help and the resources.
Great work !
 
After patching, and I choose to show my battery percentage in the menubar, the icon has a x on it and says there is no battery installed. Why is that?

Patches are incorrect. Use the debug ACPIBatteryManager.kext to get more information from system.log.
 
Should I undo the patch then redo it? Or just patch it again

Always patch from native. You should probably read over post #1, so you you know when you have successfully completed the patch.
 
AS you know there is constant flood of "Failed to read current rating xxxx" message in Yosemite. I had a quick look with IDA. I don't know MACOS but I felt like this. Hope it may help you to fix, FakeSMC

Code:
__text:00000001000100B6                 lea     rsi, [rbp+var_70]
__text:00000001000100BA                 lea     rdx, [rbp+var_69]
__text:00000001000100BE                 mov     edi, 'D0IR'
__text:00000001000100C3                 mov     ecx, 1
__text:00000001000100C8                 call    sub_1000105AB ;Get SMC Key???
__text:00000001000100CD                 mov     r8d, eax
__text:00000001000100D0                 test    r8d, r8d
__text:00000001000100D3                 jnz     @failed
__text:00000001000100D9                 mov     eax, [rbp+var_70
__text:00000001000100D9                 mov     eax, [rbp+var_70]
__text:00000001000100DC                 test    eax, eax
__text:00000001000100DE                 jz      @failed
....
...
__text:00000001000102DF @failed:                                ; CODE XREF: sub_100010033+A0j
__text:00000001000102DF                                         ; sub_100010033+ABj
__text:00000001000102DF                 lea     rcx, aFailedToReadCu ; "Failed to read current rating(0x%x)\n"
__text:00000001000102E6                 xor     ebx, ebx
__text:00000001000102E8                 xor     edi, edi        ; asl
__text:00000001000102EA                 xor     esi, esi        ; msg
__text:00000001000102EC                 mov     edx, 3          ; level
__text:00000001000102F1                 xor     eax, eax
__text:00000001000102F3                 call    _asl_log
__text:00000001000102F8                 jmp     loc_10001058B

Again I am sorry if my suspicion is not right, but it looks like it is trying to read D0IR key and because FakeSMC doesn't supply, it logs the error.

Another possibility is that because return value of ACID key is hardcoded maybe it it changed as well. I guess it is hardcoded as BA BE 3C 45 C0 03 10 43(ur48RcADEEM=) maybe it needs to be updated.
 
AS you know there is constant flood of "Failed to read current rating xxxx" message in Yosemite. I had a quick look with IDA. I don't know MACOS but I felt like this. Hope it may help you to fix, FakeSMC

Code:
__text:00000001000100B6                 lea     rsi, [rbp+var_70]
__text:00000001000100BA                 lea     rdx, [rbp+var_69]
__text:00000001000100BE                 mov     edi, 'D0IR'
__text:00000001000100C3                 mov     ecx, 1
__text:00000001000100C8                 call    sub_1000105AB ;Get SMC Key???
__text:00000001000100CD                 mov     r8d, eax
__text:00000001000100D0                 test    r8d, r8d
__text:00000001000100D3                 jnz     @failed
__text:00000001000100D9                 mov     eax, [rbp+var_70
__text:00000001000100D9                 mov     eax, [rbp+var_70]
__text:00000001000100DC                 test    eax, eax
__text:00000001000100DE                 jz      @failed
....
...
__text:00000001000102DF @failed:                                ; CODE XREF: sub_100010033+A0j
__text:00000001000102DF                                         ; sub_100010033+ABj
__text:00000001000102DF                 lea     rcx, aFailedToReadCu ; "Failed to read current rating(0x%x)\n"
__text:00000001000102E6                 xor     ebx, ebx
__text:00000001000102E8                 xor     edi, edi        ; asl
__text:00000001000102EA                 xor     esi, esi        ; msg
__text:00000001000102EC                 mov     edx, 3          ; level
__text:00000001000102F1                 xor     eax, eax
__text:00000001000102F3                 call    _asl_log
__text:00000001000102F8                 jmp     loc_10001058B

Again I am sorry if my suspicion is not right, but it looks like it is trying to read D0IR key and because FakeSMC doesn't supply, it logs the error.

Another possibility is that because return value of ACID key is hardcoded maybe it it changed as well. I guess it is hardcoded as BA BE 3C 45 C0 03 10 43(ur48RcADEEM=) maybe it needs to be updated.

Which kext?
 
powerd daemon
 
Back
Top