schmosbyy / Asus-Vivobook-S510UA-Hackintosh-1

This repo enables you to run macOS on your VivoBook S15 as long as it matches below System specifications as close as possible, verified with macOS up to Big Sur.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Asus VivoBook S15 S510UA/ F510UA series

This build enables you to run macOS on your VivoBook as long as it matches below System specifications as close as possible - verified with macOS Mojave 10.14.6 - Big Sur 11.3

Alt text

Table of contents

Repo Details

Version:    	11.1
Repo Date:      Apr. 18, 2021
ReadMe Date: 	Apr. 27, 2021
Status: 	Stable
Support:    	All BIOS (verified 301-310)
Technology:	OpenCore and Clover with ACPI hotpatch by RehabMan  

Changelog: see Changelog.md

System specification & Introduction

• Model Name:		Asus VivoBook S510UA BQ514T
• CPU:			Intel Core i5-8250U Kaby Lake R 8th Gen. i5
• Video Graphics:	Intel UHD 620
• Wi-Fi & Bluetooth:	Intel Dual Band Wireless-AC 8265  // replacements see below
• Card Reader:		Realtek (RTL8411B_RTS5226_RTS5227)
• Camera:		ASUS UVC HD
• Audio:		Conexant Audio CX8050
• Touchpad:		ELAN 1300 I2C (ELAN 1200 supported, too)
• Keyboard Backlight:	Yes
• BIOS:			x510UAR 310 (X510UARAS310.zip)

     This repo is the continuation of the now archived tctien342 repo which has been discontinued because he upgraded to a different hackbook and gave his VivoBook away. It's based on whatnameisit's brilliant and cutting-edge repo for his VivoBook X510UA-BQ490 based on OpenCore ("OC"). The two main differences are:

  1. re-added keyboard backlight support
  2. re-added a Clover EFI as secondary bootloader alternative by backporting OC's ACPI into Clover config.

Users with VivoBooks without keyboard backlight are advised to rather use whatnameisit's repo. He also has been tending it very actively so it is more likely to be as up-to-date as possible! Note that he does not offer a Clover EFI and that you do need to be able to handle OpenCore! In any case please do read through his ReadME because it contains a wealth of important info and links which also apply to this repo!

Of the two bootloaders offered in this repo, OpenCore and Clover, OC can be considered the preferred one despite of still being beta by version number. As per whatnameisit and others, in contrast to OC, Clover at this point does not support OEMTableID, masking and many other sophisticated features. For a more detailed comparison, you could read Why OpenCore over Clover and others.

 

Unsupported Hardware & Features

• dGPU like NVIDIA GeForce 940MX, MX150 etc.
• Fingerprint reader
• FN + media controller key combo
• Apple Safe Sleep ("Hibernate")
• Intel Wi-Fi - replacement options see below

The support for DRM contents is limited due to incompatible firmware. Please see the DRM Compatibility Chart

VivoBooks with an additional dGPU (NVIDIA GeForce 940MX, MX150 etc.)

OpenCore via OpenCore Configurator:

  • ACPI: enable SSDT-RP01_PEGP.aml
  • NVRAM > 7C436110-AB2A-4BBB-A880-FE41995C9F82 > boot-args: add -wegnoegpu
  • save & reboot

Clover: via Clover Configurator,

  • Acpi > DisabledAML: remove SSDT-RP01_PEGP.aml
  • Boot > Arguments: add -wegnoegpu
  • save & reboot

If there is more than one boot-arg, make sure you separate them from each other with a space!

Known Issues, weaknesses and oddities

  1. The Touchpad is not perfect - you might encounter occasional hangs and possibly erratic movements because a) it's a weak piece of hardware to begin with (even under Windows), and b) the VoodooI2C driver for macOS is still work in progress. Some older info is archived at TOUCHPAD » consolidated links to related issues.
  2. Apple Safe Sleep ("Hibernate", "Deep Sleep") doesn't work and has been disabled. In any case, additionally apply "post macOS Installations/set hibernatemode to 0"
  3. Battery life isn't great to begin with, not even in Windows. On some VivoBooks it seems to be even worse in macOS. A S510UQ user (Quhuy0410) claims longer battery life with model MacBookAir8,2 chosen in the SMBIOS section (of Clover config.plist). Feel free to experiment. Mind that CPUFriendDataProvider.kext must match your chosen model. For that sake, navigate to post macOS Installations/[Optional]/change CPU Performance
  4. Sleep: in macOS, the VivoBook needs appr. 15 secs. to power down completely. You will hear the fan spin up again before the system finally settles (power LED on the left blinking white, indicating sleep mode).
  5. Swapped < and ^ keys: If you have a keyboard with a < key next to the left ⇧ and a ^ key below the ESC key (image) and these keys are reversed, and you neither want to use a tool like Karabiner-Elements nor know how to fix that via SSDT, simply stick to VoodooPS2Controller.kext v.2.1.9 which is the only version I know to map these keys correctly for such VivoBook S15 models like mine.

Tools to use

OpenCore:

Clover:

Steps to install macOS

  1. Enter the BIOS and set the following options:

    • Display memory: 64MB
    • Disable Fast Boot
    • Disable Secure Boot
    • recommended: set the EFI partition with OC as the first boot loader
  2. Prepare a macOS installer on a USB flash drive or external hard disk

  3. Download this repo, preferably as .dmg package from the Releases section because a) each release was tested thoroughly and can be considered a stable mile stone for most users, and b) macOS native icons and labels are maintained.
    

Alternatively you can download the repo at it's current "0-day" state if you see that's more recent than the latest release date and contains one or more updates you are looking for via the green "Clone or Download" button on the top right of the repo's main page, "Download ZIP". Consider the non-release state as BETA, and be aware that GitHub does not (yet?) sustain macOS native icons and labels in its open repo!

To be able to boot from your macOS install USB, it needs either one of this repo's EFI folders (recommended: OC EFI) on its FAT (16 or 32) partition.

  1. Recommended: connect a mouse via USB in case Trackpad does not work right away

  2. Boot your USB macOS installer device into the hackintosh bootloader.
    RECOMMENDED: already fix CFG lock before install by unlocking the MSR E2 register, reboot.

  3. Again boot into your USB installer and this time select the macOS installer entry

  4. Follow macOS' installation instructions (you can find them in your favorite hackintosh forum) to set up and boot into macOS.

Steps after installing macOS

  1. If you haven't done already before macOS install, fix CFG lock by unlocking the MSR E2 register, reboot.

  2. Open the folder "post macOS Installations" and install all from within its subfolders for Hibernate prevention, additional function keys, etc. Also (strongly recommended!) study and consider the content of the folder [Optional]!

  3. Fill your internal hard disk's EFI partition with the OC or Clover EFI folder. You can use the matching Configurator to mount your system ESP (EFI System Partition). Next back up the existing System EFI folder and copy one of this release's EFI folders to your system's ESP.

  4. OpenCore Configurator:

    • click onto PlatformInfo in the side bar on the left
    • on the right top, click onto the 1st tab 'DataHub - Generic - PlatformNVRAM'. You will see four text fields with update this field
    • If you are a new user w/o a previous Clover config.plist: while leaving the current instance open in the background, open a new empty instance of OC, navigate to the same tab, click onto the up/down arrow box next to Check Coverage and choose MacBookPro15,4
    • in the provided OC config.plist in the 1st window, fill ONLY the text fields reading update this field with the corresponding values from the 2nd window instance
    • existing user: if you have already been booting via Clover config.plist: copy the matching values over according to these conversion translations
    • save

    Clover Configurator:

    • new user: click onto SMBIOS in the side bar on the left. Under 'System', next to 'Serial Number', click onto the Generate New button. That will change both, system and board serial number.
    • existing user: use (recommended) PlistEdit Pro to first remove the dummy SMBIOS section and replace it with your existing one
    • Save.

Above steps are necessary to - amongst other things - hopefully enable the use of iCloud.

  1. Reboot and ENJOY :)

Unlock the MSR E2 register

from OpenCore Post-Install/Fixing CFG Lock (English slightly corrected):

CFG-Lock is a setting in your BIOS that allows for a specific register (in this case the MSR 0xE2) to be written to. By default, most motherboards lock this variable with many even hiding the option outright in the GUI. And why we care about it is that macOS actually wants to write to this variable, and not just one part of macOS. Instead both the Kernel(XNU) and AppleIntelPowerManagement want this register.

So to fix it we have 2 options:

  1. depreciated: patch macOS to work with our hardware

    This creates instability and unnecessary patching for many The 2 patches we use for this:

    • AppleCpuPmCfgLock for AppleIntelPowerManagement.kext (not necessary for our VivoBooks)
    • AppleXcpmCfgLock for the Kernel(XNU)
  2. recommended: patch our firmware to support MSR E2 write

    Very much preferred, as avoiding patching allows for greater flexibility regarding stability and OS upgrades.

OpenCore:

  1. In OC's Boot GUI, launch the 2nd-to-last entry labeled ControlMsrE2.efi:

    You should see:
  2. Confirm with y or the equivalent key on your keyboard if it's non-English (should be the key underneath the 6 and 7 keys).

  3. reboot

  4. OpenCore Configurator > Kernel: disable AppleXcpmCfgLock, save
    (note: optionally, before saving, you can also deactivate Boot > Tools: ControlMsrE2.efi)

  5. reboot

Clover:

  1. Right after turning on or rebooting your VivoBook, press the ESC key to intercept booting and to enter the built-in Boot Menu. THIS STEP IS MANDATORY so CFGLock.efi can find the CFG variable if run as a tool from within Clover - DON'T SKIP IT!

  2. Choose your partition with Clover and boot it.

  3. In Clover's Boot GUI, navigate into the Tools section below the icons and launch ControlMsrE2:
    CFGLock
    You should see:
  4. Confirm with y or the equivalent key on your keyboard if it's non-English (should be the key underneath the 6 and 7 keys).

    (Note: only if you get an error like "Couldn't find any Variable with cfg in name"), choose the next tool entry CleanNvram, reboot, and start again)
  5. reboot

Compliments, you're DONE! Now you should have correct CPU power management :)

  • IMPORTANT: Every time you reset your BIOS by loading ("Optimized") Defaults (F9) or install a different BIOS version, you will need to flip this bit again! Resetting or clearing NVRAM, however, should not re-lock the MSR E2 register.

Links: OC Debug (contains ControlMsrE2.efi - by utopia team) | CFGLock.efi (legacy 2020-06 - by Brummbär) | RU - CFG LOCK/Unlocking - Alternative method

Wi-Fi Replacement

As of 2021-02-23 there is still no fully working macOS driver for the Intel AC 8265 M.2 card - progress see at OpenIntelWireless. Therefore best replace it, preferably with a Fenvi BCM94360NG because it has macOS native Wi-Fi and Bluetooth chipset and IDs which should deliver a better Continuity experience. If you do so, you can/ should:

  • remove ALL related kexts from inside your EFI folder(s) (AirportBrcmFixup, BrcmBluetoothInjector, BrcmFirmwareData, BrcmPatchRAM2, BrcmPatchRAM3)

  • remove ALL related entries (brcmfx-country=US bpr_postresetdelay=400 bpr_initialdelay=400 bpr_probedelay=200) from your config.plist(s):

    OC: NVRAM -> 7C436110-AB2A-4BBB-A880-FE41995C9F82 -> boot-args
    Clover: Boot > Arguments (remove via the -)

  • save and reboot

  • Windows: Fenvi also delivers a driver for Windows which you can install AFTER you first completely remove any existing WiFi and Bluetooth drivers via Programs Uninstall, plus any such entries in Device Manager incl. their drivers!

Alternatively you can use a Dell DW1560 or a Lenovo FRU 04X6020 (or even a different kind if you can find a better one). If you opt for one of these, you should adapt the boot argument brcmfx-country=US to match your country code. Example: brcmfx-country=DE for Germany, VN for Vietnam etc. You find it at the same spot(s) as described above.

ATTENTION: be careful with Updates!

  1. Clover only: after updating AirportBrcmFixup.kext and/or VoodooPS2Controller.kext and (esp.) if you're running Big Sur, you have to (!!) run /EFI/CLOVER/kexts/Other/remove problematic kexts after update or Big Sur won't boot. See here for the sad and stubborn details...
  2. VirtualSMC: The VirtualSMC version should match those of accompanying plugin kexts (SMCProcessor, SMCBatteryManager) to avoid touchpad and battery issues! Please make sure you download the most recent stable release of the complete SMC package from its repo and replace each existing file with the matching new one.

Recommendations

  1. OC (1st) + Clover (2nd): On your SSD's ESP, have OC's EFI folder so OC is your main bootloader; additionally create a separate FAT partition with at least 50+ MB, label it Clover and copy the Clover EFI folder onto it and onfigure it accdg. to above instructions. Make sure you use the same SMBIOS Platform Info in both config.plists so you don't experience oddities!
  2. Downscale monitor resolution to 1600 x 900 for two reasons: a) you will need to squint much less or ideally not at all because human eyes are simply not made for a 1920 x 1080 resolution on a 15,6" screen, period; and b) your monitor will use less energy = longer battery life!
  3. Sound quality isn't great because the speakers are mediocre in general, and to make things even worse, Asus placed them into the bottom of the case, mostly facing down. For tips to improve the sound, please look at "docs/BetterSound.html"

Fine-tuning

  • Clover: how to create a GUI custom entry for Big Sur rather than 'Boot Big Sur from PreBoot'
  • When all is working fine for you and you prefer not to look at all the lines flashing by during boot, remove the -v verbose mode switch:
    OC: NVRAM > 7C436110-AB2A-4BBB-A880-FE41995C9F82 > boot-args
    Clover: Boot > Arguments
  • Want to edit (or even backup) your VivoBook's UEFI BIOS boot menu? I know of three Windows tools you can use:

Instructions to update from a previous version of this repo

Recommended procedure:

  • rename your existing /EFI/EFI to something else, e.g. EFI_202y-mm-dd
  • copy the new release's EFI folder as base to your /EFI volume
  • incorporate your custom changes to the previous release into the new one via copy/ paste, either with PlistEdit Pro, or with (OC or Clover) Configurator - most importantly your SMBIOS (Clover) respectively PlatformInfo (OC) section.

Alternative procedure: integrate new repo release changes into your EFI folder

Troubleshooting

Many issues can be solved by performing a NVRAM Reset, then reboot. Recommended: use Clover to do that by booting into its Boot menu, then press F11: Clover nicely keeps your UEFI BIOS boot menu intact by NOT touching your custom entries in there!

OC's NVRAM reset will also wipe any custom boot entries in your UEFI BIOS boot menu! You execute it either via the last entry in the boot menu picker, or via keyboard key combo Windows + Alt + P + R

Further topics:

If your issue is not listed or persists, either post to the VivoBook S15 X510UAR thread @tonymacx86, or open an issue here.

Knowledge Base

  • Quirks: Accdg. to Clover Documentation at the time of writing this section (r5129), Clover does not interpret the following Quirks taken from the VivoBook OC config.plist: SetApfsTrimTimeout, TscSyncTimeout, RequestBootVarRouting. They might or might not be functional at some point and can be considered placeholders or reminders until they are either relevant or removed.
    OC's Quirk 'PanicNoKextDump' is covered by Clover in Kernel & Kext Patches > PanicNoKextDump. AppleXcpmCfgLock is handled automatically and internally by Clover depending on if the MSR 0xE2 register is locked or unlocked.

  • Battery threshold: in general, a upper charging level limit is recommended for rechargeable lithium ion batteries. If you boot Windows and have the latest utilities and drivers from Asus installed, battery charging should halt at 83%. Hieplpvip adhered to that and included the same threshold in AsusSMC ever since v.1.4.0 which works in macOS 10.15+. You are advised to keep it turned on, but f you need full 100% charge for longer off-the-grid usage, it can be disabled by turning off Battery Health in the Energy Saver 10.15+ System Preference. Also the battery should charge up to 100% if you power your VivoBook off, then connect the power adapter.


Special Credits for this repo to these fellow hackintoshers:

whatnameisit: main contributor; maintainer of the VivoBook X510UA-BQ490 repo | tctien342: originator of this VivoBook S15 repo (archived) | hieplpvip: originator of the underlying/ upstream ZenBook repo and AsusSMC; contributor | fewtarius: facilitator | To many MANY others .........

About

This repo enables you to run macOS on your VivoBook S15 as long as it matches below System specifications as close as possible, verified with macOS up to Big Sur.


Languages

Language:ASL 87.1%Language:Shell 9.4%Language:Rich Text Format 3.5%