profzei / Matebook-X-Pro-2018

💻 macOS on Huawei Matebook X Pro 2018
Apache License 2.0
370 stars 48 forks source link

Disable touch screen for better battery life? #92

Closed JonnIEnglish closed 3 years ago

JonnIEnglish commented 3 years ago

Hi all,

I just came across this article on Reddit where a user claimed to get a few more hours of battery life by simply disabling the touch screen on his MBXP. https://www.reddit.com/r/MatebookXPro/comments/jvxg15/increase_battery_life/

I am assuming that he was running windows and was wondering if anyone knows how to disable the touch screen on a hackintoshed MBXP, whether it be through MacOS itself or through OpenCore?

Many thanks

Jonathan

jonescamilla commented 3 years ago

Hey Jonathan - Here's a link to release v1.4.0 profzei made in September with instructions on how to disable the touchscreen for our Matebook X Pro. There is an additional mention of it on release v1.1.0

yamanadamnor commented 3 years ago

Hey Jonathan - Here's a link to release v1.4.0 profzei made in September with instructions on how to disable the touchscreen for our Matebook X Pro. There is an additional mention of it on release v1.1.0

The new release (1.7.0) removed SSDT-TPXX.aml which is referred to when trying disable the touchscreen. Do you have any tips?

profzei commented 3 years ago

@JonnIEnglish Hi, I read that post... I never disabled touchscreen on Windows 10 so I don't have a term of comparison... However, when I tried on Catalina, I only got 15-30 more minutes of battery... it may also depends on the age and the state of my battery...

@jonescamilla @yamanadamnor You are right... I modified a lot of things in latest release (1.7.0) trying to get a more reliable touchpad... I'm monitoring discussions on VoodooI2C and it seems that VoodooI2c may be bugged for GPIO pinning when there are two I2C devices like in our MBXP (touchscreen and touchpad)... Honestly I don't know but I'll try to modify my old work to adapt it to current release...

Check this post soon... I'll edit it with a SSDT for disabling touchscreen (and therefore also testing touchpad...)

Edit: Add SSDT-DTPD.aml to /EFI/OC/ACPI folder and replace your previous config.plist with this one. SSDT-DTPD.aml.zip config.plist.zip Please, report your feedback about gain in battery life!

JonnIEnglish commented 3 years ago

@profzei I followed your instructions and added those files to my EFI but my MBXP failed to boot showing this on the screen. IMG_20201122_125417 IMG_20201122_125427

profzei commented 3 years ago

Hi @jonescamilla From your screen it is very clear you are not using/loading the latest release 1.7.0 from this repo on your MBXP... So, you cannot load the config.plistI attached above because it is a modified version from the one present in release 1.7.0

Therefore, you need to add to your config.plist the pieces of code:

1- in section ACPI -> Add (preferably at the end of this section as the last item...) you need to add the following

<dict>
    <key>Comment</key>
    <string>Disabling touchscreen</string>
    <key>Enabled</key>
    <true/>
    <key>Path</key>
    <string>SSDT-DTPD.aml</string>
</dict>

2- Then in section ACPI -> Patch (where is not relevant) you need to add the following

<dict>
    <key>Comment</key>
    <string>Rename TPD0._STA,0,N to XSTA (Touchscreen)</string>
    <key>Count</key>
    <integer>0</integer>
    <key>Enabled</key>
    <true/>
    <key>Find</key>
    <data>X1NUQQCgIpGTU0Q=</data>
    <key>Limit</key>
    <integer>0</integer>
    <key>Mask</key>
    <data></data>
    <key>OemTableId</key>
    <data></data>
    <key>Replace</key>
    <data>WFNUQQCgIpGTU0Q=</data>
    <key>ReplaceMask</key>
    <data></data>
    <key>Skip</key>
    <integer>0</integer>
    <key>TableLength</key>
    <integer>0</integer>
    <key>TableSignature</key>
    <data></data>
</dict>

The latest release (and previous ones) can be downloaded from the right sidebar on homepage Actually I'd like to change/restructure the repo so I do not yet synchronise it with latest release...

JonnIEnglish commented 3 years ago

I downloaded the latest release and followed the instructions for BigSur setup but heliport doesn't seem to be working anymore.

profzei commented 3 years ago

@JonnIEnglish HeliPort app is replaced by a more native support made by AirportItlwm.kext All the files in release 1.7.0 are perfectly auto consistent between them... there should not be any issue since it's the config I'm actually using...

profzei commented 3 years ago

@jonescamilla If you do not want to use the 1.7.0 release, then you have to use the following SSDT-DTPD.amlfile (in the one I posted previously there is a reference to a function present only from release 1.7 onwards) SSDT-DTPD.aml.zip

JonnIEnglish commented 3 years ago

@profzei Thank you so much! The native wifi support is so much nicer and I have 1.7.0 running. The touchscreen is now successfully disabled and I will let you know how my battery life is affected. One more thing, how can I switch the windows key and alt key as I am used to the original format?

profzei commented 3 years ago

@JonnIEnglish Great!

One more thing, how can I switch the windows key and alt key as I am used to the original format?

In your /EFI/OC/config.plist you need to set from true to false value for SSDT-KBD in ACPI -> Add initial section, i.e. obtaining the following:

<dict>
    <key>Comment</key>
    <string>Fixing keyboard-layout</string>
    <key>Enabled</key>
    <false/>
    <key>Path</key>
    <string>SSDT-KBD.aml</string>
</dict>
JonnIEnglish commented 3 years ago

@profzei Brilliant! Everything is working wonderfully now! I also love the new startup sound and boot graphics!

JonnIEnglish commented 3 years ago

@profzei Actually my brightness keys don't seem to be working anymore. I wonder if that has something to do with disabling the keyboard fix aml?

yamanadamnor commented 3 years ago

@profzei Actually my brightness keys don't seem to be working anymore. I wonder if that has something to do with disabling the keyboard fix aml?

Try using the FN-key while changing the brightness

JonnIEnglish commented 3 years ago

I did that and it still didn't work. I re-enabled the SSDT-KBD.aml and the brightness keys work again. So it seems that was the problem.

yamanadamnor commented 3 years ago

I have also disabled SSDT-KBD.aml. I can change the brightness only when using the FN-key in combination with the brightness keys. Although i agree with you that its not the most elegant solution.

profzei commented 3 years ago

@JonnIEnglish Ouch! Yeah! The file SSDT-KBD.aml fix brightness keys and Switch command - control keys... Try the following modified SSDT-KBD.aml (re-enabling its loading in config.plist obviously) where I removed the code for the switch between Windows and Alt keys... SSDT-KBD.aml.zip This is a clean solution!

I also love the new startup sound and boot graphics!

All this amazing work for OpenCanopy custom GUI was done by @R-Teer !

yamanadamnor commented 3 years ago

@JonnIEnglish Ouch! Yeah! The file SSDT-KBD.aml fix brightness keys and Switch command - control keys... Try the following modified SSDT-KBD.aml (re-enabling its loading in config.plist obviously) where I removed the code for the switch between Windows and Alt keys... SSDT-KBD.aml.zip This is a clean solution!

I also love the new startup sound and boot graphics!

All this amazing work for OpenCanopy custom GUI was done by @R-Teer !

This worked perfectly. Thanks

JonnIEnglish commented 3 years ago

@profzei Just replaced that file this morning and everything is working perfectly!

Thank you once again for all the amazing help!