Home

Awesome

macOS  on Huawei Matebook X Pro 2018

<p align="center"> <img src="Wiki/Images/matebook-x-pro-sonoma.png" alt="Huawei macOS Sonoma" /> </p> <p align="center"> <a href="https://consumer.huawei.com/it/support/laptops/matebook-x-pro/" target="_blank"><img src="https://img.shields.io/badge/Model-MACH_W29-orange.svg" /></a> <a href="https://consumer.huawei.com/it/support/laptops/matebook-x-pro/" target="_blank"><img src="https://img.shields.io/badge/BIOS-1.37-red.svg" /></a> <a href="LICENSE" target="_blank"><img src="https://img.shields.io/badge/License-APACHE_2.0-purple.svg" /></a> <a href="https://github.com/profzei/Matebook-X-Pro-2018/releases" target="_blank"><img src="https://img.shields.io/badge/Download-Releases-blue.svg" /></a> <a href="https://github.com/profzei/Matebook-X-Pro-2018/wiki" target="_blank"><img src="https://img.shields.io/badge/Support-Wiki-green.svg" /></a> </p> <div align="center">

Hits

</div>

⚠️⚠️ Advertisement ⚠️⚠️

Announcement - April 2023

My config supports native macOS loading drivers for our Thunderbolt 3 controller: the Thunderbolt hotplug is working without the need to plug in a device at boot!

What has been achieved so far:

What still needs to be done: see Changelog »

I published a YouTube video for documenting this success!

Thunderbolt_Hotplug

Warning


This repository is currently compatible with macOS Sequoia, Sonoma, Ventura, Monterey, Big Sur and OpenCore 1.0.1

<div align="center">
macOSStatus
<img src="Wiki/Images/assets_sequoia.png" width=25 hspace=2 /> <a href="https://developer.apple.com/documentation/macos-release-notes/" target="_blank"><img src="https://img.shields.io/badge/macOS-Sequoia-orange.svg" /></a>Stable 15.0 (24A335) » latestCurrently maintained
<img src="Wiki/Images/assets_sonoma.png" width=25 hspace=2 /> <a href="https://developer.apple.com/documentation/macos-release-notes/" target="_blank"><img src="https://img.shields.io/badge/macOS-Sonoma-brightgreen.svg" /></a>Stable 14.3.1 (23D60) » latestCompatible
<img src="Wiki/Images/assets_ventura.png" width=25 hspace=2 /> <a href="https://developer.apple.com/documentation/macos-release-notes/" target="_blank"><img src="https://img.shields.io/badge/macOS-Ventura-brightgreen.svg" /></a>Stable 13 (22A380) » 13.6.6 (22G630)Compatible
<img src="Wiki/Images/assets_monterey.png" width=25 hspace=2 /> <a href="https://developer.apple.com/documentation/macos-release-notes/" target="_blank"><img src="https://img.shields.io/badge/macOS-Monterey-brightgreen.svg" /></a>Stable 12.0.1 (21A559) » 12.5.1 (21G83)Compatible
<img src="Wiki/Images/assets_big_sur.png" width=25 hspace=2 /> <a href="https://developer.apple.com/documentation/macos-release-notes/" target="_blank"><img src="https://img.shields.io/badge/macOS-Big_Sur-brightgreen.svg" /></a>Stable 11.0.1 (20B29) » 11.6.8 (20G730)Compatible
<img src="Wiki/Images/assets_catalina.png" width=25 hspace=2 /> <a href="https://developer.apple.com/documentation/macos-release-notes/" target="_blank"><img src="https://img.shields.io/badge/macOS-Catalina-brightgreen.svg" /></a>Stable 10.15 (19A583) » 10.15.7 (19H15)Compatible
<img src="Wiki/Images/assets_mojave.png" width=25 hspace=2 /> <a href="https://developer.apple.com/documentation/macos-release-notes/" target="_blank"><img src="https://img.shields.io/badge/macOS-Mojave-red.svg" /></a>Stable 10.14 (18A389) » 10.14.6 (18G87)No longer maintained
</div>

If you find my work useful:

Configuration 💻

<div align="center">
SpecificationsDetails
Computer modelHuawei Matebook X Pro 2018 Space Gray
ProcessorIntel Core i7-8550U Processor @ 1.8 GHz
Memory8 GB LPDDR3 2133 MHz
Hard DiskLiteON SSD PCIe NVMe 512 GB [CA3-8D512]
Integrated GraphicsNVIDIA GeForce MX150 / Intel(R) UHD Graphics 620
ScreenJDI 3k Display @ 3000 x 2000 (13.9 inch)
Sound CardRealtek ALC256
Wireless CardIntel Dual Band Wireless-AC 8265/8275
Bluetooth CardIntel Bluetooth 8265/8275
</div>

Device Firmware Bios version: 1.37

<details> <summary><strong>Benchmarks</strong></summary>
System configurationGPU - OpenCL Performance 4731

Compare with these.

<p align="center"> <img src="Wiki/Images/LiteOn_AmorphousDiskMark.png" width="50%" alt="" /> </p> </details>

Changelog

2024 - September - 20

See Current status »

<p align="center"> <img src="Wiki/Images/AboutThisMac.png" width="50%" alt="About this Mac" /> </p>

DISCLAIMER ⚠️

<p align="center"> <img src="Wiki/Images/Disclaimer.png" width="70%" alt="Disclaimer" /> </p>

This repository is for personal purposes only.

Introduction

This repo contains the files needed for getting macOS working on a Huawei MateBook X Pro (2018 Edition) laptop with OpenCore.

Summary

<p align="center"> <img src="Wiki/Images/ScreenMenuBar03.png" width="90%" alt="MBXP Battery Menu bar" /> </p>

Generate your own SMBIOS Information

For privacy reasons, all SMBIOS information has been wiped out in the configuration file EFI/OC/config.plist. You need to generate your unique SMBIOS info by yourself (recommend to use CorpNewt's GenSMBIOS), and inject them into your config.plist.

Status

BIOS Settings

<details> <summary><strong>Notes</strong></summary>
  1. Intel Bluetooth could not support some Bluetooth devices like some Bluetooth mouse since it is only a firmware injector; please, report any issues not here but only on OpenIntelWireless/IntelBluetoothFirmware Gitter Chat
  2. Touchscreen support is disabled by default since release v. 1.8.0. Why? It seems that all VoodooI2C versions after 2.4 are affected to a greater or lesser extent by Multi_GPI0 issues. The solution proposed so far by VoodooI2C developers is only a workaround and not a real fix: proposing to use the GPI0 pinning for touchpad and polling method for touchscreen is not a real fix because this approach increases interrupts and causes a degrade in battery life. This being the case and not needing to use the touchscreen in my daily work, for the moment I have disabled this function pending improvements that can only come from VoodooI2C developers.
  3. If you would like to increase benchmark values for your Intel UHD 620 Graphics card, you need to set rps-control key in DeviceProperties -> PciRoot(0x0)/Pci(0x2,0x0), but keep in mind that rps-control property has been removed to lower down GFX Request:
...
<key>DeviceProperties</key>
<dict>
    <key>Add</key>
    <dict>
        ...
        <key>PciRoot(0x0)/Pci(0x2,0x0)</key>
        <dict>
            ...
            <key>rps-control</key>
            <data>AQAAAA==</data>
            ....
        </dict>
        ...
    </dict>
</dict>
...
</details> <details> <summary><strong>Notes: external Display support</strong></summary>

Intel UHD 620 Graphics card works well with external display from both USB type-C ports.

...
<key>DeviceProperties</key>
<dict>
    <key>Add</key>
    <dict>
        ...
        <key>PciRoot(0x0)/Pci(0x2,0x0)</key>
        <dict>
            ...
            <key>force-online</key>
            <data>AQAAAA==</data>
            <key>force-online-framebuffers</key>
            <data>Af////////8=</data>
            ....
        </dict>
        ...
    </dict>
</dict>
...
</details> <details> <summary><strong>Notes: NVMe SSD support</strong></summary>
  1. Very rarely some users reported the following kernel panic after sleep:
panic(cpu 0 caller 0xffffff800b6ce860): nvme: "Fatal error occurred. CSTS=0xffffffff
...

It's certainly a NVMe error, but it is not due to EFI released in the present repo:

In case you run into such an issue, it is recommended adding forceRenderStandby=0 boot-args in your config.plist to disable RC6 Render Standby.

  1. If your laptop has a Samsung PM981 NVMe SSD or any unsupported SSD listed in dortania/bugtracker#192, then it's obviously not supported here. I have no way to make my EFI work on broken IONVME compatibility SSDs.

Obvious solutions:

Even if your macOS installed on an external SSD drive, you need to add a new ACPI patch to disable PM981 (or other non-supported NVMe SSDs) detection on macOS:

DefinitionBlock ("", "SSDT", 2, "HUAWEI", "_DRP05", 0)
{
	External (OSDW, MethodObj)

    External (_SB_.PCI0.RP05, DeviceObj)

    Scope (\_SB.PCI0.RP05)
    {
        OperationRegion (DE01, PCI_Config, 0x50, One)
        Field (DE01, AnyAcc, NoLock, Preserve)
        {
                ,   1, 
                ,   3, 
            DDDD,   1
        }
    }

    Scope (\)
    {
        If (OSDW ())
        {
            \_SB.PCI0.RP05.DDDD = One
        }
    }
}
</details> <details> <summary><strong>Notes: Bios version</strong></summary>

Starting from BIOS version 1.33 and newer, Huawei added to default DSDT.aml a new method, called _QBF, related to battery thermal management.

As default, in config.plist in ACPI -> Add section it has been added SSDT-BIOS.aml (as enabled) for introducing method _QBF also for BIOS versions up to 1.30: proper BIOS version check has been implemented.

</details> <details> <summary><strong>Notes: OpenCore and Windows Activation</strong></summary>

For dual-booting systems, Windows Activation may fail due to different hardware UUID generated by OpenCore

</details> <details> <summary><strong>Notes: AirportItlwm support in macOS Catalina (or Mojave)</strong></summary>

If you use this release in macOS Catalina you need to make the following changes in the config.plist to make AirportItlwm.kext support active:

</details> <details> <summary><strong>Notes: Thunderbolt support</strong></summary>

As reported in NotebookCheck review our Matebook X pro (2018) is utilizing only half the PCIe lanes for its single Thunderbolt 3 port (TB). Thus, its PCIe x2 Thunderbolt 3 port is only capable of providing a maximum of 20 Gbps instead of 40 Gbps when compared to a standard Thunderbolt 3 port with PCIe x4 lanes.

The connector type is Usb-C and it can do multiple protocols (TB, USB 2/3/3.1, DP, etc...) with different backing controllers. The problem on Hackintoshes is mostly about TB on Usb-C, because the firmware and power management of Apple's TB-controllers works entirely different than those for other OS'es. So even if it's the same hardware found on Windows laptops, they don't "just work" because of the different firmware.

The ACPI-part for handling Thunderbolt 3 port and its power management has been implemented:

<p align="center"> <img src="Wiki/Images/TB3_01.png" width="75%" alt="Thunderbolt Controller: drivers loaded" /> </p> <p align="center"> <img src="Wiki/Images/TB3_02.png" width="75%" alt="Thunderbolt Controller: PCI section" /> </p> <p align="center"> <img src="Wiki/Images/TB3_03.png" width="75%" alt="Thunderbolt Controller with OWC Envoy Express" /> </p>

Since I was given an OWC Envoy Express Thunderbolt 3 Controller is enabled in my default config.plist.

Steps for disabling support for Thunderbolt controller (\_SB.PCI0.RP09):

Real-time power management for Thunderbolt controller with Discrete GPU (NVIDIA GeForce MX150) removed at PCI level are shown:

<p align="center"> <img src="Wiki/Images/TB3_DGPU_PM_01.png" width="80%" alt="Thunderbolt Controller with disabled Discrete GPU at PCI level" /> </p> <p align="center"> <img src="Wiki/Images/TB3_DGPU_PM_02.png" width="80%" alt="Thunderbolt Controller with disabled Discrete GPU at PCI level" /> </p>

For reference, see Thunderbolt 3 Fix and ThunderboltPatcher for related attempts to fix TB by patching its firmware.

</details> <details> <summary><strong>What's not working due to Incompatible Hardware</strong></summary> <p align="center"> <img src="Wiki/Images/DGPU_PCI_level.png" width="75%" alt="Discrete GPU removedat PCI level" /> </p> </details>

Bootloader Firmware

Install Settings

If you try to use latest EFI Release for installing macOS onto your Matebook X Pro, you'll realize it didn't work... Why?

Because our EFI is very fine tuned to overcome some InsydeH2O firmware's limits and therefore it is not suitable for installation process as it is.

Please refer to Wiki section for a detailed guide for installing macOS.

Post - Install Settings

<details> <summary><strong>Enable Tap (with one finger) for Touchpad</strong></summary>

Starting from VoodooI2C v. 2.4.1, the click down action is emulated to force touch, which causes the failure of click down and drag gestures.

For example, you can turn off Force Click in System Preferences -> Trackpad or choose three finger drag in System Preferences -> Accessibility -> Mouse & Trackpad -> Trackpad Options

Suggested configuration:

<p align="center"> <img src="Wiki/Images/ScreenTouchpad.png" width="75%" alt="Touchpad Settings" /> </p> </details> <details> <summary><strong>Enable Apple Services</strong></summary>

To use iMessage and other Apple services, you need to generate your own serial numbers. This can be done using CorpNewt's GenSMBIOS:

Default SMBIOS settings of this repo is MacBookPro15,2 MacBookPro14,1 MacBookPro16,3

  1. Launch Terminal app
  2. Copy the following script, paste it into the Terminal window, then press Enter
    git clone https://github.com/corpnewt/GenSMBIOS && cd GenSMBIOS && ./GenSMBIOS.command 
    
  3. Type 1 for downloading/updating MacSerial script
  4. Type 3, then press Enter
  5. Type MacBookPro15,2 10, then press Enter
  6. Then, go Apple Check Coverage page to check your generated serial numbers. If the website tells you that the serial number is not valid, that is fine. Otherwise, you have to generate a new set.
  7. Next you will have to copy the following values to your config.plist:
    • Serial Number -> PlatformInfo/Generic/SystemSerialNumber
    • Board Number -> PlatformInfo/Generic/MLB
    • SmUUID -> PlatformInfo/Generic/SystemUUID. Reboot and Apple services should work.
<key>PlatformInfo</key>
<dict>
    ...
    <key>MLB</key>
    <string>M0000000000000001</string>
    ...
    <key>SystemSerialNumber</key>
    <string>W00000000001</string>
    ...
    <key>SystemUUID</key>
    <string>00000000-0000-0000-0000-000000000000</string>
    ...
</dict>
  1. If they don't work, follow this in-depth guide. It goes deeper into clearing Keychain (missing this step might cause major issues), and much more.
</details> <details> <summary><strong>Sleep & Hibernation settings</strong></summary>

On a MacBook there are some stages of sleep:

<p align="center"> <img src="Wiki/Images/Sleep_macOS.png" width="60%" alt="Sleep stages for macOS" /> </p>

We could summarize sleep settings as the following:

  1. if sleep == 0, the computer will not sleep or hibernate any more
    • For MacBooks, the effective setting automatically changes whenever the charger is plugged in:
      • Normally, sleep minutes are simply equal to displaysleep minutes, which you can set in System Preferences -> Energy Saver
      • But under the Power Adapter tab, checking Prevent computer from sleeping automatically when the display is off option will override sleep minutes to 0
  2. if standby == 1 and hibernatemode == 3, the computer will wait another standbydelay seconds before really entering hibernation
  3. autopoweroff is just an extra implementation to fulfill regulatory requirement and has the same impact equivalent to 2)
  4. either 2) or 3) takes effect if one of them is reached at first
  5. if standby == 1 and hibernatemode == 25, the computer will enter hibernation immediately after sleep minutes.

For our Huawei Matebook X Pro sleep/standby function works flawlessly (both via software and via clamshell) like hibernation (suspend to disk or S4 sleep).

In order to get automatic sleep working properly like real Macs, the following settings are mandatory:

sudo pmset -a powernap 0 
sudo pmset -a proximitywake 0
sudo pmset -a tcpkeepalive 0
sudo pmset -a womp 0

After every update, ALL these settings should be reapplied manually!

Suggested configuration in System Preferences -> Bluetooth -> Advanced for Bluetooth devices for avoiding random wake events during sleep:

<p align="center"> <img src="Wiki/Images/ScreenBluetooth.png" width="80%" alt="Bluetooth settings" /> </p>

Default macOS setting for MacBooks is hibernatemode 3 i.e. sleep mode:

Concretely, the way I like to configure my Matebook X Pro is for it to do first a standby-only sleep, so that it quickly goes to sleep, with the chance of a very quick wake-up phase, and then, if I leave the laptop sleeping for a certain number of hours (say in my case 1 hour), it could write the RAM contents to disk and power off the computer, so as to save battery in case of an extended sleep (entering therefore hibernation phase).

In order to get this configuration, I suggest the following settings:

sudo pmset -a standby 1 
sudo pmset -a hibernatemode 3
sudo pmset -a standbydelaylow 3600
sudo pmset -a standbydelayhigh 3600

The following image is a screenshot about my current settings:

<p align="center"> <img src="Wiki/Images/Sleep_settings.png" width="100%" alt="macOS pmset current settings" /> </p>

Note: Keep in mind that, with the above settings, after 3600 seconds the laptop wake up itself only partially (display remains off) for switching from standby sleep to hibernation sleep: it is standard behaviour since all Macs use maintenance wake (dark wake - display remains off) to switch laptop from regular sleep into hibernation. It is not an issue! Reference

<p align="center"> <img src="Wiki/Images/Sleep_hibernatemode3.png" width="100%" alt="macOS hibernatemode3" /> </p>

Note: Hibernation mode can be enabled only via console command sudo pmset -a hibernatemode 25 and is fully supported by Matebook X Pro (obviously using HibernationFixup kext).

If, however, you would like to disable it, then

sudo pmset -a hibernatemode 0
sudo pmset -a autopoweroff 0
sudo rm -rf /private/var/vm/sleepimage
sudo touch /private/var/vm/sleepimage
sudo chflags uchg /private/var/vm/sleepimage

You can verify your power settings by typing in terminal sudo pmset -g live .

If you ever want to reset these settings: sudo pmset -a restoredefaults

About power consumption, HWMonitor reports for the idle state both before and after sleep phase the same value for "CPU package total" (0.65-0.70 W). Sleep discharge rate is about 1% every 4:30 hours (during night).

</details> <details> <summary><strong>Power Management settings</strong></summary>

With CPUFriend.kext and SSDT-PM.aml we achieved a very good power management on battery for Intel Core i7-8550U (without compromising performance) as reported in the following macOS menu bar screeshots:

<p align="center"> <img src="Wiki/Images/ScreenMenuBar01.png" width="110%" alt="MBXP Battery Menu bar" /> <img src="Wiki/Images/ScreenMenuBar02.png" width="95%" alt="MBXP Battery Menu bar" /> </p>

Suggested configuration for Battery and Power Adapter settings in System Preferences -> Battery are reported in the following:

<p align="center"> <img src="Wiki/Images/ScreenBattery.png" width="80%" alt="Battery settings" /> <img src="Wiki/Images/ScreenPowerAdapter.png" width="80%" alt="Power Adapter settings" /> </p>

It is also suggested to force pci-aspm-default property for activating on macOS Active-State Power Management for PCIe devices like:

We need to point out that macOS is obviously designed for working well/optimally only on Mac hardware, so in our hackintoshes it could be advisable to force a such property whenever possible...

<key>PciRoot(0x0)/Pci(0x1c,0x0)</key>
    <dict>
        ...
        <key>pci-aspm-default</key>
        <data>AgAAAA==</data>
        ...
    </dict>
    ...
<key>PciRoot(0x0)/Pci(0x1c,0x4)</key>
    <dict>
        ...
        <key>pci-aspm-default</key>
        <data>AgAAAA==</data>
        ...
    </dict>
    ...
<key>PciRoot(0x0)/Pci(0x1d,0x0)</key>
    <dict>
        ...
        <key>pci-aspm-default</key>
        <data>AgAAAA==</data>
        ...
    </dict>

This feature is working well on my system. It has not been inserted as default in config.plist for helping people to install EFI releases on Huawei Matebook X Pro lacking a discrete nVIDIA GPU (typically with i5 architecture and Intel only GPU). Reference

</details> <details> <summary><strong>Activate Surround Sound via MIDI</strong></summary>

By default macOS only uses 2 out of our MBXP 4 speakers: if you want to achieve a surround sound system on macOS, you need to create an Aggregate Device. But then macOS does not allow you to control the volume of the sound: yes, it is real and is a general behaviour of MacBookPro machines.

For a detailed guide on how to activate surround sound via MIDI on internal speakers and native audio shortcuts, see Wiki section

</details> <details> <summary><strong>Fix Headphone jack switch</strong></summary>

Refer to my custom ALCPlugFix instructions for properly setting/fixing headphone jack switch for Matebook X Pro.

</details> <details> <summary><strong>Undervolt using VoltageShift</strong></summary>

Undervolting is a great way to maximise performance, lower power consumption and reduce temperatures.

For a detailed guide on how to undervolt our MBXP using VoltageShift from the EFI folder instead of disabling SIP, see Wiki section

</details>

Optional Settings

<details> <summary><strong>Add custom shortcuts to F7, F9 & F10 hotkeys</strong></summary>

With the latest update and inclusion of the new SSDT-KBD.aml we are now able to reconfigure the shortcuts to custom settings.

For a detailed guide on how to enable original F7, F9 & F10 hotkeys using native Automator app, please see Wiki section.

Otherwise, you can follow these suggestions [credit @R-Teer]:

<p align="center"> <img src="Wiki/Images/Screenshot%202021-02-01%20at%2014.55.54.png" alt="BetterTouchTool Settings" /> </p> </details> <details> <summary><strong>Fix keyboard layout</strong></summary>

If you have a keyboard that is not identified correctly, i.e. some keys are swapped (common if you don't have a US layout), you can force macOS to re-detect keyboard layout by deleting the .plist file where settings are stored running the following command:

sudo rm /Library/Preferences/com.apple.keyboardtype.plist

Then reboot: macOS will prompt a guided process to identify your keyboard.

</details> <details> <summary><strong>Increase Launchpad icons number</strong></summary>

By default (for a 13 inch MacBook Pro), the Launchpad shows the icons in 5×7 format.

Type in Terminal the following commands:

defaults write com.apple.dock springboard-rows -int 6
defaults write com.apple.dock springboard-columns -int 9;killall Dock

Relaunch the Launchpad to see the icons are changed now.

Finally you can revert to the default setting with the following commands:

defaults delete com.apple.dock springboard-rows
defaults delete com.apple.dock springboard-columns
defaults write com.apple.dock ResetLaunchPad -bool TRUE;killall Dock

(Warning: the last command also will remove any custom folders you have created)

</details> <details> <summary><strong>Monitor temperatures and power consumption with HWMonitor</strong></summary>

HWMonitor is relatively old and no longer supported, but it gets the job done.

</details> <details> <summary><strong>Make macOS zsh Terminal colorful</strong></summary>

The default macOS Terminal looks very lame since it lacks in visibility: things should be colorful like Ubuntu. In the following steps, a proper solution for that is given without installing any custom theme:

cd
touch zshrc
open zshrc
export CLICOLOR=1
export LSCOLORS=GxBxCxDxCxegedabagaced
mv zshrc .zshrc

How did the customization worked?

By setting CLICOLOR=1 you are enabling colors.

LSCOLORS is the variable where you will define which file should display what color: it is used to color the directory and file list. It provides you 11 positions, each with FB (foregroundColor backgroundColor) combination. Thus it contains 22 characters. Below is the details of which position means what:

  1. directory
  2. symbolic link
  3. socket
  4. pipe
  5. executable
  6. block special
  7. character special
  8. executable with setuid bit set
  9. executable with setgid bit set
  10. directory writable to others, with sticky bit
  11. directory writable to others, without sticky

The colors for each position are placed as FB format; below is the list which color means what:

The colors mentioned above are ANSI colors, but according to the version of your macOS or terminal, they may differ a little.

</details> <details> <summary><strong>Remove Eject icon from macOS menu bar</strong></summary>

Apple no longer sells any Mac with a built-in optical drive, but many users still rely on CDs, DVDs, and Blu-ray discs for both work and entertainment.

How do I get rid of this icon?

How to add Eject icon to menu bar

</details> <details> <summary><strong>Dual Booting: fix Windows time</strong></summary>

Windows uses local time by default while macOS uses universal time. You can switch Windows to use universal time. Open up a command prompt in Windows as an administrator and copy and paste this in:

reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation" /v RealTimeIsUniversal /d 1 /t REG_QWORD /f

That will make Windows use universal time instead of local time. Then update your clock via the built-in internet time setting to update the time.

</details> <details> <summary><strong>Terminal Commands</strong></summary>

--> macOS specific

Disable Gatekeeper:

sudo spctl --master-disable

Disable Logging:

sudo rm /System/Library/LaunchDaemons/com.apple.syslogd.plist

Make dock animation faster and without delay:

defaults write com.apple.dock autohide-delay -float 0
defaults write com.apple.dock autohide-time-modifier -float 0.5
killall Dock

Show all Files in Finder:

defaults write com.apple.finder AppleShowAllFiles -bool true
killall Finder

Show User Library in Big Sur:

setfile -a v ~/Library
chflags nohidden ~/Library

Sidecar:

defaults write com.apple.sidecar.display AllowAllDevices -bool true
defaults write com.apple.sidecar.display hasShownPref -bool true

Update PreBoot Volume:

sudo diskutil apfs updatePreboot /

--> Hackintosh specific

Check working XCPM configuration:

sysctl machdep.xcpm.mode
   // If it returns '1', then it means the XCPM is active.

Check if the X86PlatformPlugin.kext is loaded:

kextstat|grep -y x86plat

Check loaded/injected kexts:

kextstat -kl | awk '!/com\.apple/{printf "%s %s\n", $6, $7}'

Debug ACPI Hotpatches:

log show --predicate "processID == 0" --start $(date "+%Y-%m-%d") --debug | grep "ACPI"

Debug Sleep/Wake-up issues

pmset -g assertions
pmset -g

Check sleep log: pmset -g log | egrep '\b(Sleep|Wake|Start)\s{2,}'

Save last boot info:

log show --predicate 'process == "kernel"' --style syslog --source --debug --last boot > sys_log.txt
</details>

Update tracker

<div align="center">
ItemVersionRemark
MacOS15.0
OpenCore1.0.1Default Bootloader
Lilu1.6.8Kext/process/framework/library patcher
WhateverGreen1.6.7Handle Graphics card
AppleALC1.9.1Handle/fix onboard audio
CodecCommander2.7.2Fix headphone audio switch
CPUFriend1.2.8Power management
HibernationFixup1.5.1Handle hibernate status
IntelBluetoothFirmware2.4.0Handle Bluetooth
AirportItlwm2.3.0Handle native Wi-Fi card
BlueToolFixup2.6.8Fix Bluetooth for macOS 12+
NullEthernet1.0.6Fake Ethernet card
NoTouchID1.0.4Disable TouchID
NVMeFix1.1.1Fix for NVMe SSDs
RestrictEvents1.1.4Block unwanted processes
VoodooI2C2.9Handle I2C device
VoodooI2CHID2.9Touchpad I2C satellite
VoodooPS2Controller2.3.5Enable keyboard, alternative trackpad driver
VirtualSMC + plugins1.3.3SMC chip emulation
USBInjectAll0.7.7Inject USB ports
VoltageShift1.25Undervoltage tool
</div>

Dev. Notes

In Wiki section are stored some significant/advanced technical guides.

<details> <summary><strong>USB port mapping scheme</strong></summary>

Proper SSDT-XHC.aml is used for USB Host Controller (XHCI-Device-ID: <2f 9d 00 00>): this file is configured to map only the necessary ports (tested with IOReg) with the correct connector type and prevent it from shutdown issues.

PortAddressPhysical LocationInternal/External
HS01/SS0100000001/0000000DLeft Port type-C (Power Source) - next to 3.5mm jack portE
HS02/SS0200000002/0000000ERight Port type-AE
HS0300000003Left Port type-C ThunderboltE
HS0500000005Bluetooth USB PortI
HS0700000007Integrated HD Camera moduleI
</details> <details> <summary><strong>Boot arguments</strong></summary>

A very minimal set of boot arguments has been achieved for actual config.plist:

  1. igfxrpsc=1 enables RPS control patch and improves IGPU performance
  2. itlwm_cc=IT changes/enables the country code to IT-Italy for AirportItlwm.kext
</details> <details> <summary><strong>Fixing Xcode issue</strong></summary>

If you encounter an issue with Xcode, you could kill it with the following commands:

killall Xcode
xcrun -k
xcodebuild -alltargets clean
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache"
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang.$(whoami)/ModuleCache"
rm -rf /Applications/Xcode.app
rm -rf ~/Library/Caches/com.apple.dt.Xcode
rm -rf ~/Library/Developer
rm -rf ~/Library/MobileDevice
rm -rf ~/Library/Preferences/com.apple.dt.Xcode.plist
rm -rf ~/Library/Preferences/com.apple.dt.xcodebuild.plist
sudo rm -rf /Library/Preferences/com.apple.dt.Xcode.plist
sudo rm -rf /System/Library/Receipts/com.apple.pkg.XcodeExtensionSupport.bom
sudo rm -rf /System/Library/Receipts/com.apple.pkg.XcodeExtensionSupport.plist
sudo rm -rf /System/Library/Receipts/com.apple.pkg.XcodeSystemResources.bom
sudo rm -rf /System/Library/Receipts/com.apple.pkg.XcodeSystemResources.plist
sudo rm -rf /private/var/db/receipts/com.apple.pkg.Xcode.bom
</details> <details> <summary><strong>Fixing Command Line Tools</strong></summary>

It may occur Big Sur (or Xcode) updates remove the CLT which are, for example, required by Homebrew. Simply removing their folder and reinstalling them worked; open your Terminal app and type the following commands:

sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install
</details> <details> <summary><strong>Fixing Notification banner</strong></summary>

It may occur some notifications won't appear in Big Sur (check you don't have "Do not Disturb" on...). Simply deleting ~/Library/Preferences/com.apple.ncprefs.plist and then restart your machine.

</details> <details> <summary><strong>Changing Mac computer name</strong></summary>
sudo scutil --set HostName ""
sudo scutil --set ComputerName "MacBook Pro"
sudo scutil --set LocalHostName MacBook-Pro

where

  1. HostName is your fully qualified hostname
  2. ComputerName is the user-friendly computer name you see in Finder
  3. LocalHostName is the name usable on the local network i.e. the Bonjour hostname of your Mac
</details> <details> <summary><strong>Fix AppleID issue on macOS Catalina</strong></summary>
sudo -v
killall -9 accountsd com.apple.iCloudHelper
defaults delete MobileMeAccounts
rm -rf ~/Library/Accounts
killall -9 accountsd com.apple.iCloudHelper
sudo reboot
</details>

Credits

Standing on the shoulders of giants! Based on the works of many great people.

The greatest thank you and appreciation to Zero-zer0, GZXiaoBai and Benbender whose work is very inspiring!

And to everyone else who supports and uses my repo.

<details> <summary><strong>Other Matebook X Pro repositories [Old]</strong></summary> </details>

License

This repo is licensed under the APACHE-2.0 License

OpenCore is licensed under the BSD-3-Clause License

<br> <p align="center"> <a href="https://github.com/profzei/Matebook-X-Pro-2018/blob/master/LICENSE"><img src="https://img.shields.io/static/v1.svg?style=for-the-badge&label=License&message=APACHE-2.0&logoColor=d9e0ee&colorA=363a4f&colorB=b7bdf8"/></a> </p>