Contribute
Register

[solved] Asus UX330UA dsdt hotpach for battery not working

Status
Not open for further replies.
Joined
Feb 4, 2011
Messages
71
Motherboard
Gigabyte GA-Z170N-WiFi
CPU
i7-6700K
Graphics
GT 640
Mac
  1. MacBook Air
  2. MacBook Pro
Mobile Phone
  1. Android
Hey,
First THANK YOU RehabMan for your great work.
I've installed Sierra on ASUS UX330UA-FB018T and patched the DSDT the old way and I got almost all the components working (exception is the Intel WiFi - waiting for a DW1560 and the QHD is not working fully and for that I will make a different thread) but I want to do the DSDT patching using RehabMan's hotpatching way.
Doing so I've made the SSDTs for Battery and added DSDT patches in the config.plist but for sure I miss something and as result the battery icon is not working properly while if I use the patched DSDT it dose.
Attached are my config.plist with DSDT patches, original DSDT extracted with Clover F4, fully patched DSDT with working Battery (Used RehabMan's Asus N55SL/VivoBook Battery Patch) and my SSDT patch I've made.
 

Attachments

  • DSDT_patched.dsl
    1.2 MB · Views: 190
  • SSDT-BATT.dsl
    32.1 KB · Views: 205
  • config.plist
    10.3 KB · Views: 233
  • DSDT.dsl
    1.1 MB · Views: 175
Hey,
First THANK YOU RehabMan for your great work.
I've installed Sierra on ASUS UX330UA-FB018T and patched the DSDT the old way and I got almost all the components working (exception is the Intel WiFi - waiting for a DW1560 and the QHD is not working fully and for that I will make a different thread) but I want to do the DSDT patching using RehabMan's hotpatching way.
Doing so I've made the SSDTs for Battery and added DSDT patches in the config.plist but for sure I miss something and as result the battery icon is not working properly while if I use the patched DSDT it dose.
Attached are my config.plist with DSDT patches, original DSDT extracted with Clover F4, fully patched DSDT with working Battery (Used RehabMan's Asus N55SL/VivoBook Battery Patch) and my SSDT patch I've made.

Download patchmatic: https://bitbucket.org/RehabMan/os-x-maciasl-patchmatic/downloads/RehabMan-patchmatic-2015-0107.zip
Extract the 'patchmatic' binary from the ZIP. Copy it to /usr/bin, such that you have the binary at /usr/bin/patchmatic.

In terminal,
Code:
if [ -d ~/Downloads/RehabMan ]; then rm -R ~/Downloads/RehabMan; fi
mkdir ~/Downloads/RehabMan
cd ~/Downloads/RehabMan
patchmatic -extract

Note: It is easier if you use copy/paste instead of typing the commands manually.

Attach contents of Downloads/RehabMan directory as ZIP.

Attach ioreg as ZIP: http://www.tonymacx86.com/audio/58368-guide-how-make-copy-ioreg.html. Please, use the IORegistryExplorer v2.1 attached to the post! DO NOT reply with an ioreg from any other version of IORegistryExplorer.app.

Provide output (in Terminal):
Code:
kextstat|grep -y acpiplat
kextstat|grep -y appleintelcpu
kextstat|grep -y applelpc
kextstat|grep -y applehda

Attach EFI/Clover folder as ZIP (press F4 at main Clover screen before collecting). Please eliminate 'themes' directory. Provide only EFI/Clover, not the entire EFI folder.

Attach output of (in Terminal):
Code:
sudo touch /System/Library/Extensions && sudo kextcache -u /

Compress all files as ZIP. Do not use external links. Attach all files using site attachments only.
 
Thank you for quick reply.

Attached are the requested files from the hotpatch configuration.

The output for commands :
Code:
$ kextstat|grep -y acpiplat
   13    2 0xffffff7f82563000 0x60000    0x60000    com.apple.driver.AppleACPIPlatform (5.0) D748FA50-380C-3F0D-BAD9-EB7A15848EA8 <12 11 7 6 5 4 3 1>

Code:
$ kextstat|grep -y appleintelcpu
# no response as it should with a Skylake CPU

Code:
$ kextstat|grep -y applelpc
# no response as I did not yet implemented as SSDT hotpatch

Code:
$ sudo touch /System/Library/Extensions && sudo kextcache -u /
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext FakeSMC.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext VoodooPS2Trackpad.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext VoodooPS2Mouse.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext VoodooPS2Keyboard.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext VoodooPS2Controller.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext SATA-100-series-unsupported.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext NullEthernet.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext IntelBacklight.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext AsusNBFnKeys.kext
kext-dev-mode allowing invalid signature -67013 0xFFFFFFFFFFFEFA3B for kext AppleMobileDevice.kext
kext-dev-mode allowing invalid signature -67030 0xFFFFFFFFFFFEFA2A for kext aDummyHDA.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext ACPIBatteryManager.kext
KernelCache ID: 8920B2FB560CBEB5FD5E801C1A695DCB
symlink("/System/Library/PrelinkedKernels/prelinkedkernel", "/System/Library/Caches/com.apple.kext.caches/Startup/kernelcache") failed 17 (File exists) <createPrelinkedKernel 2795>

If needed I can do the same thing for the version with the classic DSDT patches applied. In this version everything is working as it should with the already known issues with Sierra (Intel 520/530 GPU glitches, no working FN keys for backlight and sound volume + I2C touch [not yet attempted to test the VoodooI2C driver] and Intel WiFi card).

As a side note/issue: I also attempted to get full screen resolution of 3200x1800 but with your clover config.plist for 520/530/540 GPU I get 2048x1152 with HiDpi patch to CoreDisplay.framework. When I went with only inject Intel and no ig-platform-id injection in clover Graphics I got 3200x1800 resolution but with no QE/CI and the 520 GPU recognized but with only 24Mb memory.
 

Attachments

  • CLOVER.zip
    1.6 MB · Views: 112
  • IOReg_hotpatch.zip
    534.8 KB · Views: 95
  • RehabMan_hotpatch.zip
    62.4 KB · Views: 109
Thank you for quick reply.

Attached are the requested files from the hotpatch configuration.

The output for commands :
Code:
$ kextstat|grep -y acpiplat
   13    2 0xffffff7f82563000 0x60000    0x60000    com.apple.driver.AppleACPIPlatform (5.0) D748FA50-380C-3F0D-BAD9-EB7A15848EA8 <12 11 7 6 5 4 3 1>

Code:
$ kextstat|grep -y appleintelcpu
# no response as it should with a Skylake CPU

Code:
$ kextstat|grep -y applelpc
# no response as I did not yet implemented as SSDT hotpatch

Code:
$ sudo touch /System/Library/Extensions && sudo kextcache -u /
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext FakeSMC.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext VoodooPS2Trackpad.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext VoodooPS2Mouse.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext VoodooPS2Keyboard.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext VoodooPS2Controller.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext SATA-100-series-unsupported.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext NullEthernet.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext IntelBacklight.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext AsusNBFnKeys.kext
kext-dev-mode allowing invalid signature -67013 0xFFFFFFFFFFFEFA3B for kext AppleMobileDevice.kext
kext-dev-mode allowing invalid signature -67030 0xFFFFFFFFFFFEFA2A for kext aDummyHDA.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext ACPIBatteryManager.kext
KernelCache ID: 8920B2FB560CBEB5FD5E801C1A695DCB
symlink("/System/Library/PrelinkedKernels/prelinkedkernel", "/System/Library/Caches/com.apple.kext.caches/Startup/kernelcache") failed 17 (File exists) <createPrelinkedKernel 2795>

If needed I can do the same thing for the version with the classic DSDT patches applied.

The problem is obvious... as per guide, you should have attempted to disassemble your hotpatch result (patchmatic result).

If you take the patchmatic *.aml output and disassemble... (iasl -da -dl *.aml):
Code:
ACPI Error: [ECOR] Namespace lookup failure, AE_ALREADY_EXISTS (20160422/dswload-462)
ACPI Exception: AE_ALREADY_EXISTS, During name lookup/catalog (20160422/psobject-310)

So... you have a duplicate symbol named ECOR somewhere...
If I then disassemble without -da (iasl -dl *.aml), then look for ECOR with 'grep ECOR *.dsl', this is what we find:
Code:
DSDT.dsl:            OperationRegion (ECOR, EmbeddedControl, Zero, 0xFF)
DSDT.dsl:            Field (ECOR, ByteAcc, Lock, Preserve)
SSDT-8.dsl:    External (ECOR, OpRegionObj)    // (from opcode)
SSDT-8.dsl:        Field (ECOR, ByteAcc, Lock, Preserve)

So, it appears your attempt to use External for the ECOR OpRegion does not work...

You will notice in my code that I use a different name for the EC region with the patched fields...

As a side note/issue: I also attempted to get full screen resolution of 3200x1800 but with your clover config.plist for 520/530/540 GPU I get 2048x1152 with HiDpi patch to CoreDisplay.framework. When I went with only inject Intel and no ig-platform-id injection in clover Graphics I got 3200x1800 resolution but with no QE/CI and the 520 GPU recognized but with only 24Mb memory.

No surprise. ig-platform-id inject is usually required for QE/CI.
As far as the limited resolution, where are you seeing that? Keep in mind SysPrefs->Displays shows perceived/HiDPI resolutions, not actual.
 
So, it appears your attempt to use External for the ECOR OpRegion does not work...

You will notice in my code that I use a different name for the EC region with the patched fields...

Stupid me :). Thank you for pointing me in to the right direction. I will look into that now and fix my mistake.

As far as the limited resolution, where are you seeing that? Keep in mind SysPrefs->Displays shows perceived/HiDPI resolutions, not actual.

The resolutions of the display are shown in System Informations Graphics/Dysplays.

This screen shot is with ig-platform-id set to 0x19160000 or 0x19160002 with CoreDisplay.framework patched for HiDpi (without it it shows a resolution of 1600x900
PQSBs0i.png


This screen shot is with the same configuration with only ig-platform-id removed from config.plist - no QE/CI but real resolution of display
QfKcf3o.png
 
Stupid me :). Thank you for pointing me in to the right direction. I will look into that now and fix my mistake.



The resolutions of the display are shown in System Informations Graphics/Dysplays.

This screen shot is with ig-platform-id set to 0x19160000 or 0x19160002 with CoreDisplay.framework patched for HiDpi (without it it shows a resolution of 1600x900
PQSBs0i.png


This screen shot is with the same configuration with only ig-platform-id removed from config.plist - no QE/CI but real resolution of display
QfKcf3o.png

You might want to check on an actual retina MacBook Pro that your assumptions of System Information->Graphics are correct.
 
Thank RehabMan for the help.
I've fixed the SSDT hotpatch for Battery and now I have it fully working.
 
Thank RehabMan for the help.
I've fixed the SSDT hotpatch for Battery and now I have it fully working.

hy octavian1979, hi have the ux330 too.
can you share your final DSDT/SSDT and your config.plist please.
thanks in advance
 
Hey,
First THANK YOU RehabMan for your great work.
I've installed Sierra on ASUS UX330UA-FB018T and patched the DSDT the old way and I got almost all the components working (exception is the Intel WiFi - waiting for a DW1560 and the QHD is not working fully and for that I will make a different thread) but I want to do the DSDT patching using RehabMan's hotpatching way.
Doing so I've made the SSDTs for Battery and added DSDT patches in the config.plist but for sure I miss something and as result the battery icon is not working properly while if I use the patched DSDT it dose.
Attached are my config.plist with DSDT patches, original DSDT extracted with Clover F4, fully patched DSDT with working Battery (Used RehabMan's Asus N55SL/VivoBook Battery Patch) and my SSDT patch I've made.

I didn't really check everything, but you have a very obvious oversight in SSDT-BATT.dsl:
- External OpRegion does not work
- You cannot define duplicate symbols... Field (ECOR,...) is full of duplicates.

Here is a tip from the guide:
- If you can't disassemble your patchmatic -extract output with 'iasl -da -dl *.aml', you made a mistake...
 
Status
Not open for further replies.
Back
Top