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:
- Loading native macOS drivers for Thunderbolt Controller
- Booting with Thunderbolt device connected
- Thunderbolt Hotplug with Cold Boot
- Thunderbolt Hotplug with Warm Boot
- Thunderbolt Hotplug with no Device Connected at Boot
- Sequence of multiple Thunderbolt Hotplug/unplug during same working session
- Sleep with Thunderbolt Device Connected
- Wake with Thunderbolt Device Connected
- Shutdown with Thunderbolt Device Connected
What still needs to be done: see Changelog Β»
I published a YouTube video for documenting this success!
Warning
- I'm sorry but I decided to remove all my releases: in this way I wanted to make it easier for people who have already copied what is on this site stating they made 'significant and unquestionable original changes' (instead of collaborating by suggesting pull requests)!
- I'll update this repo but only as my personal online report for how well this laptop could be turned as a full working hackintosh with full support for Thunderbolt devices
- I thank all those who have supported me during these two years of work, but seeing so many people copying (and then apologizing when confronted with a fait accompli!) templates + all the content of the related pages (even putting a link for a possible donation for their hard work!) + all the content of the ACPI folder of the EFI releases, has deeply disgusted me!
This repository is currently compatible with macOS Sequoia, Sonoma, Ventura, Monterey, Big Sur and OpenCore 1.0.1
If you find my work useful:
- please consider giving it a star βοΈ to make it more visible.
- please consider donating via PayPal.
Specifications | Details |
---|---|
Computer model | Huawei Matebook X Pro 2018 Space Gray |
Processor | Intel Core i7-8550U Processor @ 1.8 GHz |
Memory | 8 GB LPDDR3 2133 MHz |
Hard Disk | LiteON SSD PCIe NVMe 512 GB [CA3-8D512] |
Integrated Graphics | NVIDIA GeForce MX150 / Intel(R) UHD Graphics 620 |
Screen | JDI 3k Display @ 3000 x 2000 (13.9 inch) |
Sound Card | Realtek ALC256 |
Wireless Card | Intel Dual Band Wireless-AC 8265/8275 |
Bluetooth Card | Intel Bluetooth 8265/8275 |
Device Firmware Bios version: 1.37
- For best results, read the entire README before you start and follow the install instruction throughly.
- I am not responsible for any damages you may cause.
- This is not a support forum.
- Should you find an error or improve anything β whether in the config or in the documentation β please consider opening an issue or pull request.
- Complete EFI packs are available in the Releases Β» page (please, refer to the rightside menu).
- EFI is configured with Ventura, Monterey or Big Sur in mind: if you are using it on Catalina (or Mojave), read the whole guide to make the necessary changes.
- EFI is configured for loading macOS from internal NVMe SSD both in dual-boot configuration with Windows and as a single OS (macOS installation on external SSDs are not taken into account)
- EFI is not suitable, as it is, to be used for installing macOS: please refer to Wiki section for a detailed guide for installing macOS Β».
This repository is for personal purposes only.
This repo contains the files needed for getting macOS working on a Huawei MateBook X Pro (2018 Edition) laptop with OpenCore.
- This is intended to create a "fully" functional (as far as possible) hackintosh for the Huawei Matebook X Pro.
- The project can be considered stable.
- With each new release of macOS we need to resolve each new "minor issue" we run into. All of the steps I made to get to this point were a result of countless hours of reading along with trial and error, however I'm glad to say that I learned a lot in the meantime. I am by no means an expert so any effective help (suggestions, observations, ...) to tune this project is very appreciated!
- If you would like to get started with creating a hackintosh on your MBXP but have non experience, I would highly recommend following Dortania's OpenCore Install guide Β» and then returning here for troubleshooting or last improvements.
- The compatibility is very good for the most part, most of the stuff works like it would on a real MacBook, including camera, audio, touchpad, iCloud services.
- The experience is pleasant, as the laptop is smooth and responsive under macOS Ventura.
- Battery life is quite great (from personal experience it lasts from 8 to 10 hours for light works depending on its age with a behaviour very similar to Windows 10 as shown in the macOS menu bar screenshots below).
- The Intel WiFi card is soldered onto the motherboard, which means it can't be replaced with a Broadcom one, but the Intel card is now functional (it is fine for most use cases).
- With the latest
AirportItlwm.kext
even Handoff and Continuity features are working, but with a very limited support for AirDrop and Apple Watch unlocking (see Changelog for OpenIntelWireless). - For any issues about
AirportItlwm.kext
please refer first to OpenIntelWireless Troubleshooting page and then to OpenIntelWireless Gitter Page
- With the latest
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
.
- With every EFI update you retrieve from here, please, remember to transfer your Device details under
PlatformInfo -> Generic
in yourconfig.plist
. - For more details on dual booting settings, please, see also below OpenCore and Windows Activation notes.
- Intel(R) UHD 620 Graphics card
- Intel(R) Wireless-AC 8265/8275 & Intel(R) Bluetooth
- Power Management with support for HWP (Intel Speed Shift & Intel SpeedStep)
- Sleep and Wake (support for native macOS
hibernatemode3
) - Hibernation (support for native macOS
hibernatemode25
withHibernationFixup.kext
) - Battery support with better memory access and integration of Battery Information Supplement
- Automatic Backlight control (with more granular levels)
- Backlight shortcuts (F1 [brightness level down] - F2 [brightness level up])
- Volume shortcuts (F4 [mute] - F5 [audio level down] - F6 [audio level up])
- Audio for Realtek ALC256 card (via
AppleALC.kext
andlayout-id 97
) - Speakers (4 Channels) & Internal Mic
- Headphone jack [2 in 1] (via
ALCPlugFix
) - HDMI 2.0 up to two 4K @60 Hz monitors (via LSPCON)
- Native Color Profile for Display JDI 3k
- TouchPad (via
GPI0
interrupt mode) and native macOS gestures - Touchscreen
- Updated support for LiteON SSD PCIe NVMe
- PCI Devices latency support and complete description for System Information app
- USB Ports Mapping (Type-A & Type-C) with proper power levels
- Thunderbolt Port (with full native support!)
- HD Camera
- NVRAM native support
-
Main
->Thunderbolt Device
->Security Level
-> No Security -
Main
->Advanced
->PXE Device Enable
-> Disable -
Main
->Advanced
->Fingerprint Enable
-> Disable
Notes
- 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
- 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 byMulti_GPI0
issues. The solution proposed so far byVoodooI2C
developers is only a workaround and not a real fix: proposing to use theGPI0
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 fromVoodooI2C
developers. - If you would like to increase benchmark values for your Intel UHD 620 Graphics card, you need to set
rps-control
key inDeviceProperties -> PciRoot(0x0)/Pci(0x2,0x0)
, but keep in mind thatrps-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>
...
Notes: external Display support
Intel UHD 620 Graphics card works well with external display from both USB type-C ports.
- Suggestion: prefer USB type-C to DisplayPort cable over USB type-C to HDMI one where possible
- Removed for
PciRoot(0x0)/Pci(0x2,0x0)
the keyforce-online
(which was set to<data>AQAAAA==</data>
). Why?- With latest
WhateverGreen
releases our available connector types are 1 LVDS (internal monitor) and 2 DP; using an external monitor connected with a USB C-type to DP cable I verified the correct recognition and functioning of my BenQ PD2500Q even after the system wake-up. Thisforce-online
key could instead be useful for connections using a USB-C type to HDMI cable. - Eliminating this key reduces tons of warning messages like
[IGFB] [ERROR] [AGDC] Failed with status -536870212 for stream access aux
in system log during boot phase: that warning is correct/normal since it reports that the display is not connected for the remaining ports (i.e.FB1
andFB2
in our case using onlyFB0
i.e. internal display); eliminating those warnings reduces log-file size (in debug-mode) from 2.6 to 1.6 MB thus reducing slightly boot loading time. Reference
- With latest
force-online
andforce-online-framebuffers
work around (possible) HDMI black screen issues after waking from sleep
...
<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>
...
Notes: NVMe SSD support
- 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:
- it may be due to the power management of your NVMe device (mine is a LiteON SSD PCIe NVMe 512 GB [CA3-8D512])
- reference to this issue is in acidanthera/bugtracker#1193 IGP causes NVMe Kernel Panic CSTS=0xffffffff
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
.
- 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:
- buy another (internal) NVMe SSD
- or install macOS on an external SSD drive
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
}
}
}
Notes: Bios version
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.
Notes: OpenCore and Windows Activation
For dual-booting systems, Windows Activation may fail due to different hardware UUID generated by OpenCore
- According to OpenCore Official Configuration, you are highly recommended to inject the original Windows system UUID to
PlatformInfo -> Generic - >SystemUUID
inEFI/OC/config.plist
: runwmic csproduct get UUID
command in Windows PowerShell app
Notes: AirportItlwm support in macOS Catalina (or Mojave)
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:
DmgLoading
set toSigned
SecureBootModel
set toDefault
Notes: Thunderbolt support
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:
- it enables not only the
PCIe-to-PCIe
bridge-mode of the TB controller but also the native drivers which make it possible to completely poweroff the controller after using the TB port, saving battery life and prevent the controller from preventing the CPU goes into deeper C-State - the ICM is disabled on boot to let OSX' drivers take over the job
- the TB port works when any device is plugged into it at the boot time: this means no hot-plug
- the TB 3 XHC Controller is working fine when any device is plugged into it at boot time
- the TB drivers are loaded even if no device is plugged into it at boot time
- the TB 3 XHC Controller bus is loaded even if no device is plugged into it at boot time
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
):
- disable
SSDT-JHL6240-AR2.aml
- enable
SSDT-DTB3.aml
- disable all
TB3: *
binary patches
Real-time power management for Thunderbolt controller with Discrete GPU (NVIDIA GeForce MX150) removed at PCI level are shown:
For reference, see Thunderbolt 3 Fix and ThunderboltPatcher for related attempts to fix TB by patching its firmware.
What's not working due to Incompatible Hardware
- Discrete graphics card (NVIDIA GeForce MX150) is not working, since macOS doesn't support Optimus technology
Have usedSSDT-DDGPU.aml
to disable it in order to save power.- Removed it at PCI level reducing time for putting machine to sleep and for resuming it from sleep (i.e. laptop is more reactive during these phases!)
\_SB.PCI0.RP01
is not present anymore in IORegistryExplorer tree (this is proof for having disabled GPU at PCI level!)
- Fingerprint sensor is not working
- Fingerprint readers on Macbooks are managed by T2 chip which has not been very throughly reverse engineered yet
- Have used
SSDT-XHC.aml
to disable it (in order to save some power).
- Default bootloader:
OpenCore 1.0.1
Official release.- Support macOS 10.15 ~ latest macOS release
- As theme for
OpenCanopy
, a cleaner version with custom graphics has been provided by @R-Teer - See more info in Wiki section about migration from Clover.
- No longer maintained: Clover
r5118
Official releaser5103
Dids release
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.
Enable Tap (with one finger) for Touchpad
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:
Enable Apple Services
To use iMessage and other Apple services, you need to generate your own serial numbers. This can be done using CorpNewt's GenSMBIOS:
- If Serial numbers have been correctly generated, these services (iMessage, FaceTime, ...) should work for you
- If not, clean up and generate new serial number for your SMBIOS.
Default SMBIOS settings of this repo is MacBookPro15,2
MacBookPro14,1
MacBookPro16,3
- Launch
Terminal
app - Copy the following script, paste it into the
Terminal
window, then pressEnter
git clone https://github.com/corpnewt/GenSMBIOS && cd GenSMBIOS && ./GenSMBIOS.command
- Type
1
for downloading/updatingMacSerial
script - Type
3
, then pressEnter
- Type
MacBookPro15,2 10
, then pressEnter
- 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.
- 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.
- Serial Number ->
<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>
- 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.
Sleep & Hibernation settings
On a MacBook there are some stages of sleep:
- Sleep or memory sleep: this is what happens when you let the computer idle for some time (power to display is turned off);
- Standby or Safe Sleep: memory state is written to RAM and after a certain period memory power could be turned off;
- Hibernation: all power is off and all state has been written to a disk image (
/private/var/vm/sleepimage
); you know this has happened if when you open the lid you seeOpenCanopy
boot picker, and then see a progress bar while it is loading state from disk.
We could summarize sleep settings as the following:
- 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 todisplaysleep
minutes, which you can set inSystem Preferences -> Energy Saver
- But under the
Power Adapter
tab, checkingPrevent computer from sleeping automatically when the display is off
option will override sleep minutes to 0
- Normally,
- For MacBooks, the effective setting automatically changes whenever the charger is plugged in:
- if
standby == 1
andhibernatemode == 3
, the computer will wait anotherstandbydelay
seconds before really entering hibernation autopoweroff
is just an extra implementation to fulfill regulatory requirement and has the same impact equivalent to 2)- either 2) or 3) takes effect if one of them is reached at first
- if
standby == 1
andhibernatemode == 25
, the computer will enter hibernation immediately aftersleep
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
powernap
will wake up the system from time to time to check mail, make Time Machine backups, etc...proximitywake
can wake your machine when an iDevice is near.tcpkeepalive
has resolved periodic wake events after setting up iCloud.womp
is wake on lan.
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:
Default macOS setting for MacBooks is hibernatemode 3 i.e. sleep mode:
standby
causes kernel power management to automatically hibernate a machine after it has slept for a specified time periodstandbydelay
specifies the delay, in seconds, before writing the hibernation image to disk and powering off memory forstandby
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:
- add to
config.plist
inNVRAM -> Add -> 7C436110-AB2A-4BBB-A880-FE41995C9F82 -> boot-args
section the valuehbfx-ahbm=129
which controls auto-hibernation feature introduced byHibernationFixup
kext (in particular it is an arithmetic sum ofEnableAutoHibernation
= 1 andDisableStimulusDarkWakeActivityTickle
= 128 flags) Reference for deeper insight - run in Terminal
sudo pmset -a standby 1
sudo pmset -a hibernatemode 3
sudo pmset -a standbydelaylow 3600
sudo pmset -a standbydelayhigh 3600
- reboot your laptop
The following image is a screenshot about my current settings:
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
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).
Power Management settings
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:
- a mean 10% rate discharge for hour
- temperature range from 30Β°C to 40Β°C for light/medium CPU workload
- a mean
CPU package total
value of about 0.65-0.70 W for idle state
Suggested configuration for Battery and Power Adapter settings in System Preferences -> Battery
are reported in the following:
It is also suggested to force pci-aspm-default
property for activating on macOS Active-State Power Management for PCIe
devices like:
PciRoot(0x0)/Pci(0x1c,0x0)
which is PCI-Express bus for nVIDIA cardPciRoot(0x0)/Pci(0x1c,0x4)
which is PCI-Express bus for NVMe SSD (LiteOn in my case...)PciRoot(0x0)/Pci(0x1d,0x0)
which is PCI-Express bus for Thunderbolt Controller and therefore optimize power consumption for these buses.
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
Activate Surround Sound via MIDI
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
Fix Headphone jack switch
Refer to my custom ALCPlugFix instructions for properly setting/fixing headphone jack switch for Matebook X Pro.
Undervolt using VoltageShift
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
Add custom shortcuts to F7, F9 & F10 hotkeys
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]:
- There are various freeware software tools to achive this such as Karabiner Elements or Ukelele.
- Personally I use the application BetterTouchTool, which is paid but incredibly useful and allows custom trackpad gestures amongst other features.
- My current settings are as follows:
Fix keyboard layout
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.
Increase Launchpad icons number
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)
Monitor temperatures and power consumption with HWMonitor
HWMonitor is relatively old and no longer supported, but it gets the job done.
Make macOS zsh Terminal colorful
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:
- Choose any black theme first as the color combination of my snippet is dark theme friendly
- Open Terminal and type:
cd
touch zshrc
open zshrc
- Append the following code in the file:
export CLICOLOR=1
export LSCOLORS=GxBxCxDxCxegedabagaced
- Save the file and quit your default editor
- In Terminal type:
mv zshrc .zshrc
- Quit Terminal (
cmd + q
) - Now open a new Terminal window and the changes will be reflected
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:
- directory
- symbolic link
- socket
- pipe
- executable
- block special
- character special
- executable with setuid bit set
- executable with setgid bit set
- directory writable to others, with sticky bit
- directory writable to others, without sticky
The colors for each position are placed as FB
format; below is the list which color means what:
a
: blackb
: redc
: greend
: browne
: bluef
: magentag
: cyanh
: light greyA
: bold black, usually shows up as dark greyB
: bold redC
: bold greenD
: bold brown, usually shows up as yellowE
: bold blueF
: bold magentaG
: bold cyanH
: bold light grey; looks like bright whitex
: default foreground or background
The colors mentioned above are ANSI colors, but according to the version of your macOS or terminal, they may differ a little.
Remove Eject icon from macOS menu bar
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?
- Press and hold the
Apple/Command
key - Click and drag the
Eject
menu icon off the menu bar - Once you start dragging the
Eject
icon, you can release theApple/Command
key - When you see a small "x" icon appear, then release the mouse button: it will remove the
Eject
icon from your menu bar.
How to add Eject icon to menu bar
- From the macOS desktop, make sure Finder is the active application and then select
Go -> Go to Folder
from the menu bar. Alternatively, you can use the keyboard shortcutShift-Command-G
- Enter the following location:
/System/Library/CoreServices/Menu Extras/
- Find and double-click on
Eject.menu
Dual Booting: fix Windows time
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.
Terminal Commands
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 /
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
- Clean all the logs:
sudo log erase --all
- Enter sleep mode:
pmset sleepnow
- Wait a few minutes so the logs can collect some data and then wake up the machine
- Run
log show --style syslog | fgrep "[powerd:sleepWake]"
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
Item | Version | Remark |
---|---|---|
MacOS | 15.0 | |
OpenCore | 1.0.1 | Default Bootloader |
Lilu | 1.6.8 | Kext/process/framework/library patcher |
WhateverGreen | 1.6.7 | Handle Graphics card |
AppleALC | 1.9.1 | Handle/fix onboard audio |
CodecCommander | 2.7.2 | Fix headphone audio switch |
CPUFriend | 1.2.8 | Power management |
HibernationFixup | 1.5.1 | Handle hibernate status |
IntelBluetoothFirmware | 2.4.0 | Handle Bluetooth |
AirportItlwm | 2.3.0 | Handle native Wi-Fi card |
BlueToolFixup | 2.6.8 | Fix Bluetooth for macOS 12+ |
NullEthernet | 1.0.6 | Fake Ethernet card |
NoTouchID | 1.0.4 | Disable TouchID |
NVMeFix | 1.1.1 | Fix for NVMe SSDs |
RestrictEvents | 1.1.4 | Block unwanted processes |
VoodooI2C | 2.9 | Handle I2C device |
VoodooI2CHID | 2.9 | Touchpad I2C satellite |
VoodooPS2Controller | 2.3.5 | Enable keyboard, alternative trackpad driver |
VirtualSMC + plugins | 1.3.3 | SMC chip emulation |
USBInjectAll | 0.7.7 | Inject USB ports |
VoltageShift | 1.25 | Undervoltage tool |
In Wiki section are stored some significant/advanced technical guides.
USB port mapping scheme
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.
Port | Address | Physical Location | Internal/External |
---|---|---|---|
HS01/SS01 | 00000001 /0000000D |
Left Port type-C (Power Source) - next to 3.5mm jack port | E |
HS02/SS02 | 00000002 /0000000E |
Right Port type-A | E |
HS03 | 00000003 |
Left Port type-C Thunderbolt | E |
HS05 | 00000005 |
Bluetooth USB Port | I |
HS07 | 00000007 |
Integrated HD Camera module | I |
Boot arguments
A very minimal set of boot arguments has been achieved for actual config.plist
:
igfxrpsc=1
enables RPS control patch and improves IGPU performanceitlwm_cc=IT
changes/enables the country code to IT-Italy forAirportItlwm.kext
Fixing Xcode issue
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
Fixing Command Line Tools
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
Fixing Notification banner
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.
Changing Mac computer name
- Open your
Terminal
app and perform the following tasks to change the workstation hostname using thescutil
command
sudo scutil --set HostName ""
sudo scutil --set ComputerName "MacBook Pro"
sudo scutil --set LocalHostName MacBook-Pro
where
- HostName is your fully qualified hostname
- ComputerName is the user-friendly computer name you see in Finder
- LocalHostName is the name usable on the local network i.e. the Bonjour hostname of your Mac
- Flush the DNS cache by typing
dscacheutil -flushcache
- Restart the device.
Fix AppleID issue on macOS Catalina
- If you encounter the problem with AppleID which cannot login and logout, this problem happened on both Hackintosh and Macintosh.
- Fix this issue with the following commands:
sudo -v
killall -9 accountsd com.apple.iCloudHelper
defaults delete MobileMeAccounts
rm -rf ~/Library/Accounts
killall -9 accountsd com.apple.iCloudHelper
sudo reboot
Standing on the shoulders of giants! Based on the works of many great people.
- Acidanthera
- Dortania's OC guide
- Rehabman's battery patch guide and Rehabman's ACPI hotpatching guide
- CorpNewt's tools
- OpenWireless project
- Daliansky's OC-little repo
- Daliansky's Xiaomi Pro Hackintosh
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.
Other Matebook X Pro repositories [Old]
- Gnodipac886's MatebookXPro-hackintosh repo: this project was initially based on the hard work done by Gnodipac886 guy, but now it can be considered as a different project due to many and original very significant personal improvements in ALL the sections.
This repo is licensed under the APACHE-2.0 License
OpenCore is licensed under the BSD-3-Clause License