Jump to content
Allan

[Guide] AIO Guides For Hackintosh

Recommended Posts

Boot0: error while using Chameleon


?


This is the most common error after installing legacy bootloader like Chameleon on HDD which use Advanced Format 4 ( SSD doesn’t have this problem ). To solve this:


  • Download?boot1h.zip, unzip it and copy boot1h file to the OS X USB Installer

  • Boot into the installer, open Disk Utility and unmount the OS X partition ( important )

  • Close Disk Utility, open Terminal and type


diskutil list

  • In the Terminal window, there will be a list of all partitions available on the PC. Check and remember your OS X partition’s identifier

  • Depend on your OS X partition’s identifier, type these:


cd /
dd if=boot1h of=/dev/identifier

For example:



dd if=boot1h of=/dev/disk0s2

  • Reboot and the error will be gone

Share this post


Link to post
Share on other sites

DSDT/SSDT: Enable battery by patching your DSDT using pre-made patches

?

Requirements:
- Extract and decompile OEM DSDT
- Fix all errors by MacIASL
- Add RehabMan Laptop patch Repo

?

Credits to RehabMan:

?

Because the battery hardware in PCs is not compatible with Apple SMbus hardware, we use ACPI to access battery state when running OS X on laptops. Generally I recommend you use ACPIBatteryManager.kext, available here:?https://bitbucket.or...river/downloads

Later releases of AppleACPIPlatform are unable to correctly access fields within the EC (embedded controller). This causes problems for ACPIBatteryManager as the various ACPI methods for battery fail (_BIF, _STA, _BST, etc). Although it is possible to use an older version of AppleACPIPlatform (from Snow Leopard), it is desirable to use the latest version of AppleACPIPlatform because with computers that have Ivy Bridge CPUs it enables native power management for those computers. To use the latest version, DSDT must be changed to comply with the limitations of Apple's AppleACPIPlatform.

In particular, any fields in the EC larger than 8-bit, must be changed to be accessed 8-bits at one time. This includes 16, 32, 64, and larger fields.

?

Using pre-made patches

?

RehabMan has collected lots of battery patches for many laptops, and you can have a chance to apply other similar laptop's patches. To apply a pre-made patches to your dsdt:

?

- Open DSDT.dsl, select Patch > look for 4.0 Battery Patches in the left column, there will be a list of pre-made battery patches for laptops.

11649398415_27f5ae41dc_o.png

- Select your laptop patch. If you don't your model, you can try one of similar laptop patches (same brand, same laptop line). The patch with more Changes is usually the better one for your laptop.

- Press Apply.

- Press Compile to check for error, the common errors after applying the patches is "XXXXX not accessible".

For example:

^^EC0.BSVO not accessible

Open the patch you just applied again and look for the not accessible field. In example, the BVSO is divided in BVO1 and BVO2.

into scope label _SB.PCI0.LPCB.EC0 code_regex BSVO,\s+16 replace_matched begin BVO0,8,BVO1,8 end;

You have to find all BSVO in dsdt and replace it by B1B2(BVO0,BVO1), note that you have to add the scope identifier too. For example:

^^EC0.BSVO -> B1B2(^^EC0.BVO0,^^EC0.BVO1)

Some laptop does not need to patch battery because all fields are already in 8-bit. However, you can't access the battery indicator because there are many BAT devices in DSDT (BAT0, BAT1, BAT2,...) and they confuse the OS X battery driver. You need to disable all unnecessary BAT devices and keep the working one (usually BAT0) by apply the patch:

# Disable BAT1 and BAT2 devicesinto method label _STA parent_label BAT1 replace_content begin Return (Zero) end;into method label _STA parent_label BAT2 replace_content begin Return (Zero) end;

- Apply patch [7.11] Fix Mutex with non-zero SyncLevel.
- Download and install ACPIBatteryManager?https://bitbucket.or...river/downloads.

Share this post


Link to post
Share on other sites

Clover Config: Tweaking Clover menu entries

?
OS entries on Clover menu screen can be hidden, renamed by editing config.plist.
?
Step 1:?Get the entry partition’s UUID by opening boot.log in /Library/Logs/CloverEFI/ ( this file is created only if you selected Install RC Scripts to target partitions upon installing Clover ). Locate Volume section. Compare existing partitions on your HDD/SSD with the log by typing this in Terminal:

diskutil list

Or simply remember the line “Boot Windows from Legacy HD3”, “Boot OS X from Macintosh” on the Clover menu screen to find the entry partition’s name. Get its UUID then save it on a text file

?

rZHfRF5.png

Step 2:?Open Clover Configurator, import the current config.plist, switch to tab GUI.

If you want to hide all Legacy entries ( Boot … from Legacy HD… ), select Custom in Scan, then uncheck Legacy.

To edit entries manually, select the + button in Custom Entries (for UEFI entries like Windows UEFI, Linux UEFI, OS X ) or Custom Legacy ( for Legacy entries like Windows Legacy, Linux Legacy,…):

  • Volume: enter the entry partition’s UUID in step 1
  • Path: if the partition contains multiple entries, type the correct path to it ( separate by “\” )
  • Title/Full Title: check it to switch to Full Title, type the desired name which will shown on Clover menu screen.
  • Hidden: Hide the entry from Clover menu screen
  • Disabled: Completely remove this entry
  • InjectKexts: Automatically inject kexts in /EFI/Clover/kexts/ to this entry
  • NoCache: Don’t use cache for this entry
  • Type: Identify the type of OS

Note:

  • Entry partition’s UUID must be identified correctly. For example, Windows UEFI and Linux UEFI’s boot entries is stored in EFI partition ( because Windows’s bootmgfw.efi is located in \EFI\Microsoft\Boot, not in Windows partition, the same applies to Linux ). OS X boot entry is stored in \System\Library\CoreServices\boot.efi ).
  • If the Volume check mark is blank then Clover will identify the entry base on Type, and vice versa.

11096021326_2a9d6a965f_o.jpg

Share this post


Link to post
Share on other sites

Everything you need to know about NVRAM

?

What is NVRAM ?

?

NVRAM is not popular to PC users but it is very familiar to Mac users. NVRAM?is a type of RAM that retains data after the host device's power is turned off.?( in contrast to RAM ). NVRAM is used to store values like: brightness, volume, computer name, Find My Mac’s ID, etc… In Windows and Linux these values aren’t stored in NVRAM but on the HDD, as most PCs don’t have NVRAM. OS X utilizes NVRAM to run many services like iMessage, FaceTime, boot device, etc…

?

NVRAM on PC

?

NVRAM, like UEFI, is implemented many new PC models, and many OSes like Windows and Linux start using it. For example, Windows in UEFI mode uses NVRAM to check if Secure Boot is enabled or not.

?

But everything does not work smoothly in the world of PC. In the beginning of the migration from Legacy BIOS to UEFI, many PCs are badly damaged due to unstable NVRAM. Notably many Samsung PCs got bricked due to bad NVRAM writing, in which CMOS reset is the only option to revive it or worse, it can sometimes corrupt firmware. Other OEMs starts to take things carefully and in new BIOS update, they can turn off NVRAM if any possible dangers is exposed.

?

How to test NVRAM ?

?

Open Terminal in OS X, type:

sudo nvram MyVar=TestValue

Then type this to show the current NVRAM:

nvram -p

You will see:

MyVar?? TestValue

After rebooting, type nvram –p in Terminal and if you can still see the previous result then your NVRAM is working

?

NVRAM and Hackintosh

?

1/ Chameleon

?

Due to this bootloader’s limited implementation, Chameleon won’t keep all system’s efi-runtime before booting OS X, which means NVRAM won’t work even even if you already have native NVRAM enabled.

?

To solve the matter, the module “FileNVRAM” is created to emulate NVRAM for Chameleon. By integrating a NVRAM emulating module into OS X’s core, all features required working NVRAM will work normally. This module will loads the nvram file from disk early into memory so Filenvram has it before OS X is up and running, It also injects a kext in to OS X. The kext will handle the NVRAM API that OS X expects. This kext does legacy translation as well as writing the nvram to /Extra/nvramxxxxxxxx.plist when nvram is changed.

?

2/ Clover UEFI

?

Unlike Chameleon, Clover UEFI is more transparent for UEFI system, so it will use the system’s Native NVRAM (if exist).

?

To see if you have native NVRAM or not, go to /EFI/Clover/Drivers64UEFI/ and delete EmuVariableUEFI-64.efi, then restart. Follow the NVRAM testing procedure above, if it’s still working then you have native NVRAM support and you don't need to use EmuVariableUEFI-64.efi; if not then put back EmuVariableUEFI-64.efi to use NVRAM.

?

EmuVariableUEFI-64.efi works by loading the newest nvram.plist from HFS+/FAT32 partitions and emulate NVRAM for OS X. But this driver CAN NOT save NVRAM? into the nvram.plist. Therefore, we need some solution to save nvram.plist at shutdown.

?

Install RC Script

?

You can install this by select "Install RC Script to target partition" in Clover <=2711

?

This is how Clover Installer saved NVRAM (up to Clover 2711).? It utilizes OS X’s feature of loading /etc/rc.local when booting up, and /etc/rc.shutdown.local when shutting down, Clover Installer added execute scripts to save log files into rc.local and save nvram.plist into rc.shutdown.local.

?

The truth is RC Script has been deprecated since the day of Leopard (10.5) but for some reasons it still survives till Mavericks (10.9). Unfortunately it is gone completely in Yosemite ( 10.10 ), so Clover users using RC Script in old installer now won’t be able to keep NVRAM after restarting, due to nvram.plist saving scripts won’t run at shutting down.

?

Use LoginHook/LogoutHook

?

To temporarily replace RC Scripts, some users use LoginHook/LogoutHook to replace rc.local/ rc.shutdown.local. LoginHook command will be run when logging in, and LogoutHook will run when logging out. This method still has some problems. The scripts will run only when login/logout, not starting/shutting down. This method is also deprecated since Tiger ( 10.4 ), so it will be a matter of time until it’s completely disappears.

?

Launchd

?

You can install this by select "Install RC Script to target partition" in Clover > 2711

?

This is the official method that Apple recommends to run scripts when starting/shutting down, and Clover revisions since 2712 has implemented it for better OS X support.

Share this post


Link to post
Share on other sites

Issues while booting into OS X

?
Graphics related problem
?
This occurs when your verbose booting screen shows that things are stuck at Bluetooth or Network or loading partitions.? To fix this temporarily:
?
Revise config/bootflag:
?
Wrong bootflag ( for Chameleon ) or bad config.plist ( for Clover ) can cause graphics issues, you should check it again
?
Boot in Safe Mode
?
For Chameleon: Add –x to your bootflag
For Clover: Hit Spacebar and choose Boot to safe mode
?
Remove graphics kexts:
?
You can temporarily remove graphics kexts in order to boot. If you have Windows or Linux, go to /System/Library/Extensions and move these kexts to another folder:
AMD ( for AMD only or Intel HD + AMD systems ): AMD*.kext
Nvidia ( for Nvidia only or Intel HD + Nvidia systems ): NVDA.kext, Geforce*.kext
Intel ( if above methods don’t work ): AppleIntelHD*.kext
?
If you don’t have other OS, boot into the installer or the Recovery partition, open Terminal and type:

cd /Volumes/ls ( list of available partitions on the system )cd “OS X partition name”mkdir /Backupcp –rf AMD* /Backuprm –rf AMD* ( if you want to delete AMD kexts )cp –rf NVDA* /Backuprm –rf NVDA * ( if you want to delete NVDA kexts )cp –rf Geforce* /Backuprm –rf Geforce * ( if you want to delete Geforce kexts )cp –rf AppleIntelHD * /Backuprm –rf AppleIntelHD * ( if you want to delete AppleIntelHD kexts )

After successfully booting into OS X, you should patch your DSDT to inject the correct information about your GPU, or disable the dedicated GPU by DSDT/SSDT for AMD Switchable Graphics/Nvidia Optimus to prevent this from happening again.
?
Installing the kexts back to see if you have working graphics.
?
Still waiting for root device:
?
This happens because:

  • Using a 3.0 USB port to boot into the installer without having GenericUSBXHCI.kext in /Extra/Extensions or /EFI/Clover/kexts of the USB
  • Sata Mode isn’t set to AHCI in BIOS or is in RAID Mode that Apple doesn’t support

To fix this:

  • Add GenericUSBXHCI.kext to /Extra Extensions or /EFI/Clover/kexts of the USB
  • Add AHCIInjector.kext for systems using RAID Mode
  • Set Sata Mode to AHCI
  • If using Clover, you can try creating a config.plist with “still waiting for root device“ patch and use it

SMCReadKeyActionError:
?
This happens because vt-d is enable in BIOS

?

dscn20098ona2qd9y5_zps0fe8a64c.jpg

To fix this:

  • Disable vt-d in BIOS
  • If you don’t want to or you can’t disable vt-d, boot with dart=0 flag

PState Stepper Error on some Ivy Bridge CPUs:
?
If you follow the speedstep guide (link) and got this error, this happens because of bad ssdt for the cpu. To fix this:

  • Delete the current ssdt.aml
  • Create a Ivy or Haswell SMBios
  • Install vanilla AppleACPIPlatforms.kext
  • Generate SSDT with ssdtPrGen ( or can be found in HVT, which is always the latest version )
  • Copy vanilla mach_kernel to the root of the OS X partition, use HVT to patch it ( for Chameleon )or set KernelPM in config.plist ( for Clover )
  • Add –xcpm to your bootflag when booting ( org.chameleon.boot.plist for Chameleon/config.plist for Clover )

Share this post


Link to post
Share on other sites

Touchpad/Keyboard won’t work after using Hackintosh for a while ( Laptop-exclusive )


?


After some time, your touchpad and keyboard may malfunction: not working, laggy cursor when moving, a few keys don’t work even though you have installed the right kext and using them just fine earlier. This often related to EC ( Embedded Controller )


?


EC is a device which controls the touchpad/keyboard and some other devices on the mainboard. Sometimes EC may malfunctions due to many reasons ( electric shock, bad dsdt, etc… ). You have to force EC to reset itself:


  • Turn off your computer

  • Unplug your computer and remove the battery

  • Press Power button for about 30 seconds

  • Put the battery back and use it normally

Special method for users with Elan touchpad: hit Escape button when your keyboard isn’t working

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.