Jump to content

DSDT patching questions finding the right address


sakoula
 Share

11 posts in this topic

Recommended Posts

Hi I recently updated to ElCapitan and have a number of issues. I started looking at patching my DSDT and have some questions possibly easy to solve. So my configuration is:

 

Sandy Bridge (LGA 1155)

Asus P8P67 B3 3.0

patched bios 2303 (to remove lock from MSR 0xE2 register)

Intel Core i5-2500K 3.30GHz

XFX Radeon HD 6870 1024MB

 

I extracted my DSDT with clover (F4) and disassemble it using './iasl -da -dl *.aml'.

I attach my 'DSDT.P8P67.REV3.0.bios.2303.dsl' . I have used in the past the PJALM P8P67 3.1 (which is slightly different from my motherboard which is REV3.0). I attach the patch 'DSDT.patch.PJALM.P8P67.REV3.1.txt'

 

The issues that I am facing:

 

1. Audio. In order to use audio_CloverALC, I need an HDEF (or AZAL) device in the DSDT. I do not have such device in the stock DSDT (do not know why). How do I inject such device? In the PJALM patch, it assumes the existence of such device:  'into device label HDEF insert begin...'. Is it enough to look into IORegistryExplorer, find the address and add something like:

 



into device name_adr 0x001B0000 set_label
begin
HDEF
end;
into_all all code_regex AZAL replaceall_matched
begin
HDEF
end;
into device name_adr 0x001B0000 parent_label PCI0 remove_entry;
into device label PCI0 insert
begin
Device (HDEF)\n
{\n
    Name (_ADR, 0x001B0000)\n
    Method (_DSM, 4, NotSerialized)\n
    {\n
      Store (Package (0x10) {\n
        "AAPL,slot-name", "Built In",\n
        "name", "Realtek Audio Controller",\n
        "model", Buffer () {"Realtek ALC892 Audio Controller"},\n
        "device_type", Buffer (0x10) {"Audio Controller"},\n
        "layout-id", Buffer (0x04) {0x01,0x00,0x00,0x00},\n
        "PinConfigurations", Buffer (Zero) {},\n
        "MaximumBootBeepVolume", Buffer(One) {0x40},\n
        "hda-gfx", Buffer (0x0A) {"onboard-1"}\n
      }, Local0)\n
      DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))\n
      Return (Local0)\n
    }\n
}
end;


 

2. The PJALM patch apply a fix for the 'Built-in' status for Realtek Gigabit Ethernet. Again the device is missing. What is a valid GLAN entry to apply the following patch? A single 'Name (_ADR, 0x00xxxxxxx)' is enough?

 



# Fixes 'Built-in' status for Realtek Gigabit Ethernet
into method label _DSM parent_label GLAN remove_entry;
into device label GLAN insert begin
Method (_DSM, 4, NotSerialized)\n
{\n
  Store (Package (0x0C) {\n
    "AAPL,slot-name", "Built In",\n
    "name", "Realtek Ethernet Controller",\n
    "model", "Realtek RTL8111F Gigabit Network Controller",\n
    "device_type", Buffer (0x13) {"Ethernet Controller"},\n
    "built-in", Buffer (One) {0x01},\n
    "location", Buffer (0x02) {"1"}\n
  }, Local0)\n
  DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))\n
  Return (Local0)\n
}
end;


 

3. Lastly in order to have Power Management working I need (based on some other thread) to remove the _PR scope and use within clover 'Generate C/P States' or ssdtPRGen.sh. Since I do not really understand a lot of what is going on within the _PR scope I was wondering whether I should not get rid of the whole scope but some of these functions are useful.

 

 

The attached files can be downloaded from this link https://www.dropbox.com/s/508hr0e15zpcg84/DSDT.zip?dl=0

 

 

Thanks for your help!!!!

 

Link to comment
Share on other sites

  • 1 month later...

Hi sakoula.

 

i'm trying to go through the same thing you're doing right now, but I have no clue where to start.

 

currently i'm using Yosemite 10.10 with Chameleon and attempting to move over to clover with UEFI boot, and not Legacy (is this possible?) 

 

The only difference between our systems is that mine is a P8P67 Deluxe 3.0 running on 2302... I am trying to find a deluxe 2303 patched bios, but all the links are dead now.

 

I am still trying to figure out the best way to go about doing all this but there 1000 guides and my computer seems to fail from booting at various points in each guide...

 

I will subscribe here to see how far you progress.

Link to comment
Share on other sites

Hi,

 

I end up reading a lot and patched the DSDT by myself.

 

So you need to do the following steps:

 

1. patch your BIOS (I assume that you have P8P67 Deluxe Rev 3.0, right?)

 

download 2302 from here

https://www.asus.com/Motherboards/P8P67_DELUXE/HelpDesk_Download/

and patch it using this tool:

and flash your BIOS
 
2. Boot without DSDT.aml or SSDT.aml and grab your vanilla DSDT.aml using
and I will create a patch for your motherboard.
 
 
I will send you more details with the patched DSDT with how to proceed with the installation. Make sure that you will send me the vanilla DSDT.
 
What kind of GPU are you using?
 
 
Link to comment
Share on other sites

 

Hi,

 

I end up reading a lot and patched the DSDT by myself.

 

So you need to do the following steps:

 

1. patch your BIOS (I assume that you have P8P67 Deluxe Rev 3.0, right?)

 

download 2302 from here

https://www.asus.com/Motherboards/P8P67_DELUXE/HelpDesk_Download/

and patch it using this tool:

and flash your BIOS
 
2. Boot without DSDT.aml or SSDT.aml and grab your vanilla DSDT.aml using
and I will create a patch for your motherboard.
 
 
I will send you more details with the patched DSDT with how to proceed with the installation. Make sure that you will send me the vanilla DSDT.
 
What kind of GPU are you using?

 

 

I patched the 2302 bios yesterday after making that post, and i created a vanilla dsdt and applied generic asus series 6 patches and fixed all errors. and I also created an ssdt.aml as well.

 

everything seems to be working fine. the only Kext i had to load was FakeSMC.kext.

 

I am currently booted into my 10.10 install, but I cannot get it to boot using UEFI Clover on the EFI partition. I can only get it to boot using Legacy EFI.

 

I would like to boot it using UEFI Clover via the ESP.

 

 

 

Update you BIOS to 3602

 

What are the side effects? I read that a lot of people are moving back to the pre 3xxx bios revisions.

 

Some say that AI Tweaker is locked down on the 3xxx, and that sound doesn't work (i have a wireless headset anyways that uses USB so it's not an issue for me).

 

Will this allow Clover booting via UEFI? Is that one of the benefits of 3xxx bios?

Link to comment
Share on other sites

Hi,

It does not matter if you use classic or UEFI to boot Clover. Actually you CANNOT use UEFI on the P8P67 (6 series mobos). So you have to go with classic.

 

BIOS 3xxx has problems with audio from what I have read.

 

So this is what I did for mine:

 

BIOS Settings:

AI Tweaker > Ai Overclock Tuner > XMP (Profile 1) (To avoid random reboots)


Ai Tweaker > Internal PLL Overvoltage > Disabled (To avoid random freezes when trancoding with handbreak)


Advanced > CPU configuration > Intel Virtualization Technology > Enabled


Advanced > CPU configuration > CPU C1E > Enabled


Advanced > CPU configuration > CPU C3 Report > Enabled


Advanced > CPU configuration > CPU C6 Report > Enabled


Advanced > USB configuration > Legacy USB support > Enabled


Advanced > USB configuration > Legacy USB 3.0 support > Disabled


Advanced > Onboard Device Configuration > Bluetooth > Disabled


Advanced > Onboard Device Configuration > Marvel Storage Controller > Disabled


Advanced > Onboard Device Configuration > Serial Port Configuration > Serial Port > Disabled

prepare usb:

format usb stick:


GUID Partition Teble
Name: USB
Format: MacOS Extended (Journaled)
use command to install elcapitan to the stick:


$ sudo /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/Resources/createinstallmedia --volume /Volumes/USB --applicationpath /Applications/Install\ OS\ X\ El\ Capitan.app

install usb clover:

 

get clover from sourceforge.net or Clover_v2.3k_r3292.zip


Install clover on the USB stick ‘Clover EFI v2.3k r3292’:


Change Install Location
Customize
Bootloader > Install boot0af in MBR
CloverEFI > CloverEFI 64-bits BiosBlockIO
Install RC scripts on target volume
Note : for Asus P8P67 only the ‘CloverEFI 64-bits BiosBlockIO’ seemed to work
In the created USB stick add the following files found in /....../kexts in the /EFI directory:


/EFI/CLOVER/kexts/10.11/AppleIntelCPUPowerManagementInfo.kext # for monitoring
/EFI/CLOVER/kexts/10.11/FakeSMC.kext
/EFI/CLOVER/kexts/10.11/NullCPUPowerManagement.kext
/EFI/CLOVER/kexts/10.11/RealtekRTL8111.kext
/EFI/CLOVER/drivers64/HFSPlus.efi
and remove


/EFI/CLOVER/drivers64/VBoxHfs-64.efi


Note : Used AppleIntelCPUPowerManagementInfo.kext for monitoring the P/C states in /var/log/messages, RealtekRTL8111.kext is the ethernet driver, FakeSMC.kext is required as a hackintosh and HFSPlus.efi is a faster driver than VBoxHfs-64.efi

install el capitan 10.11 

unplug everything but a disk / keyboard / wired mouse.


Install el capitan using a USB2 port. USB3 is not working (looke further down)


Note : in order to complete the installation you have to boot twice using the clover stick.
boot in elcapitan. And run again the clover installation (‘Clover EFI v2.3k r3292’) in order to install clover on the disk . You need now:


Change Install Location
Customize
Bootloader > Install boot0af in MBR
CloverEFI > CloverEFI 64-bits BiosBlockIO
Install RC scripts on target volume
Install Clover Preference Pane
In the created USB stick add the following files found in /..../kexts in the /EFI directory:


/EFI/CLOVER/kexts/10.11/AppleIntelCPUPowerManagementInfo.kext # for monitoring
/EFI/CLOVER/kexts/10.11/FakeSMC.kext
/EFI/CLOVER/kexts/10.11/RealtekRTL8111.kext
/EFI/CLOVER/drivers64/HFSPlus.efi


Add the following files found in /data/sources.protected/hackintosh.10.11.sixty


/EFI/CLOVER/config.plist
/EFI/CLOVER/ACPI/patched/DSDT.aml


and remove


/EFI/CLOVER/drivers64/VBoxHfs-64.efi


Note : the only difference is config.plist and DSDT.aml which is described on how to create in the next section.
install Intel Power Gadget or IntelPowerGadget-Mac.zip in order to view the performance.


install Geekbench or Geekbench-3.3.2-Mac.zip


setup computer to never sleep (more on this later. Currently the computer looses video on wake up): Settings / Power Settings / Computer Sleep / Never


Install audio_CloverALC or audio_cloverALC-110.command.zip and accept the defaults. Make sure that while installing clover you have rootless=0 in order to patch AppleHDA in the system location (you can disable it later when tuning clover.plist)


Restart and you have a working mac with audio

generate your DSDT.aml

 

The first thing you need to do is to get your mobo’s/BIOS version DSDT. To do that you need to put clover on a FAT32 stick and on the boot screen press F4. the ACPI tables will be dumped on /EFI/CLOVER/ACPI/ORIGIN. Get the DSDT.aml (which is in some form of byte code) and download MaciASL or MaciASL.zip. This will dissanseble the DSDT.aml into a DSDT.dsl. You can play with your DSL and patch it, inject devices (required for audio), rename the lan device (required for imessage) etc. If you click on patch you can patch it with the built in repository and use the ‘P8P67 Rev 3.1’ which is not exactly what I have but it is close. However after close inspection I noticed that the patch was not right so I made some changes: Inject HDEF (audio), inject GLAN etc. Another thing I did is get rid of the ‘Scope _PR’. It seems that this is required in order to make the SpeedStepping work right (in yosemite I had to sleep the machine after boot prior getting it working right). The patch is located here


Note: another source for a patch for P8P67 Rev3.0 is olarila. I never had the time to start comparing.
One you patch your DSDT, compile it (no matter the ACPI specification and place the DSDT.aml in /EFI/CLOVER/ACPI/patched). Do the same for the SSDT.aml if you generated such.


Some claim that you should not use the MaciASL to dissansemble the DSDT.aml but use the command line iasl because there might be some references in the DSDT.aml to other files like SSDT*aml. I did not do this because I did not have any error. In order to do this you need:


# https://bitbucket.org/RehabMan/acpica/downloads


./iasl -da -dl *.aml
Generate clover.plist
 
Clover has the ability to do DSDT patching on the fly and apply various things. I did not do this. You can however (e.g. FixDisplay) on boot time and press F5 to dump the patched DSDT.aml on the FAT32 stick.


clover configuration is located in config.plist and placed on /EFI/CLOVER. Use ColverConfigurator or Clover Configurator.app to use it. Initially use Generate Config from the menu to detect the hardware and update as follows:


Acpi > DSDT name > 'DSDT.aml' # load my custom DSDT
Acpi > SSDT > Generate PStates # let clover handle SpeedStepping and not have a custom SSDT.aml
Acpi > SSDT > Generate CStates # let clover handle SpeedStepping and not have a custom SSDT.aml
Boot > Arguments > Verbose (-v) # if you want to
Boot > Arguments > kext-dev-mode=1 # is not required in ElCapitan
Boot > Arguments > rootless=0 # is not required, us Rt Variables
Boot > Default Boot Volume > LastBootedVolume
Boot > Legacy > PBR
Boot > Default Loader > boot.efi
Boot > XMPDetection=No
Boot > Timeout=5
CPU > Frequency MHz > 3,300
CPU > Bus Speed kHz > 100,000
CPU > QPI > 0
CPU > Type > 0x603
Devices > Fake ID > 0x0000 # in everything
Devices > Audio > Inject > 1 # may not required
Gui > Language > en
Gui > Sceen Resolution > 1920x1200
Gui > Theme > embedded
Gui > Mouse > Double Click > 500
Gui > Mouse > Speed > 8
Graphics > NVCAP > 0000000000000000000000000000000000000000
Graphics > VRAM > 0
Graphics > Video Ports > 0
Graphics > Display-cfg > 0000000000000000
Graphics > ig-platform-id > 0x0000
Graphics > Dual Link > 1
Kernel and Kext Patches # only what ALC command did
Rt Variables > ROM > UseMacAddr0
Rt Variables > MLB > C02032109R5DC771H
Rt Variables > BooterConfig > 0x28
Rt Variables > CsrActiveConfig > 0x67
SMBIOS > iMac12,2
System Parameters > Backlight Level > 0xffff
System Parameters > Inject Kexts > Yes
System Parameters > Inject System ID


Note: If you would like to experiment you can use a FAT32 stick with clover and change on the loader screen some settings and then press F5 to store the updated DSDT on the stick under /EFI/Clover/ACPI/origin/DSDTxxxxxxx.aml
Popping Sound
 
Problem:
After a short period of no audio, the amp is turned down/quieted to
eliminate static/noise. When the audio signal returns, the amp is powered
up causing a pop.


Work Around:


Turn Off Your Mac’s Volume Pop Sound with a Click
Digital audio (HDMI, optical, USB, etc.)
Black or orange ports (the popping sound is less)
Anti pop software
Macpro3,1 system definition
I installed antipop software antipop-1.0.2 or antipop-1.0.2.dmg

If you need help with the DSDT send me your vanilla DSDT to patch it. Make sure to use the right Ethernet device.

 

With this I have a working hackintosh with native speedstep. My hackintosh CANNOT wake up from sleep correctly (no video) but this is due to my GPU.

 

 

 

Link to comment
Share on other sites

Thanks Sakoula.

 

I've already done the dsdt and ssdt patching. I did it yesterday and I am currently typing this post from a USB legacy boot drive I configured with a good config.plist. I would like you to patch mine as well though so I can compare to see if I did it properly.

 

I've attached both in a zip file for you. Thank you.

 

Is there a reason why P8P67 does not do UEFI booting? The board supports UEFI and it even reads the UEFI partition on some drives and populates them in the boot menu with a "UEFI:" prefix to the drive name.

 

What is the cause of P8P67 not booting from UEFI? 

 

 

dsdt_ssdt.zip

Link to comment
Share on other sites

UEFI never worked for me and I read somewhere (do not remember) that 6-series motherboards (like P8P67) have problems with UEFI. It may related with BIOS version as well. On the other hand legacy does not really have any difference. The only difference is how to boot. This does not affect performance or anything else.

 

I will patch your DSDT later today. How did you generate the DSDT? Did you do it with Clover? 

Link to comment
Share on other sites

I created the DSDT using AIDA64 in windows, as well as the SSDT. It's for a patched 2302 bios, so I don't think I need to have NullCPUPowerManagement.kext for speedstep to function because I can see my cpu frequency fluctuate with the intel power gadget just fine with both the DSDT and the SSDT, and it will go to sleep and wake up if I ask it to.

 

I realize that UEFI isn't much different from Legacy Clover UEFI, but I would like to get it to work with UEFI if it can be done.

Link to comment
Share on other sites

Ok, So i installed a 3602 patched bios and it will successfully boot from EFI partitions on any drive- this tells me that it was an issue with the older bios versions not booting EFI properly. All entries in the boot menu stating "UEFI" prefix now boot properly.

 

However, it now shows an error when I try to load OSX from Clover, so I'm sure I'll figure it out. But I'm almost there.

 

3602 does not have native audio, only voodoohda. but i am using USB headphones so to me it does not matter.

Link to comment
Share on other sites

I managed to boot all USB keys using the UEFI partition successfully. No legacy booting of Clover or Chameleon whatsoever.

 

And I managed to get to the El Capitan installer booting from UEFI on the usb key there as well. 

 

Though, there were some AppleIntelCPUManagement kernel panics, but why? I had patched the bios... sooooo I tried to modify the 3602 Bios file again and got a different checksum between the two files this time, so I reflashed it. Now the MSRx02 flag for CPU Power Management within the UEFI bios seems to be removed, and AppleIntelCPUManagement.kext no longer throwing kernel panics and is patched successfully (with an updated Intel OROM firmware as well, available on a modder website).

 

While trying to boot my Macintosh HD partition with my Yosemite install, it would tell me that the drive failed to mount and just restart- which I thought was odd.  I must have messed with a part of the partition I shouldn't have when in Windows 10 moving files around on the USB keys or creating ROMs for firmware flashing... or I made a modification to something that I wasn't aware of, and it screwed up the drive catalog. It kind of strikes me as odd, though. Because even after modifying the EFI partition by doing a block-per-block copy of the bootable USB one, I was still able to get into Yosemite. I think it has something to do with the transition to the new bios, but it doesn't matter.

 

I guess futzing with all the BIOSes and whatnot and doing random things in clover really messed it up. Or maybe it was coincidence. I dunno! Attempting to repair it didn't work, so I am now using my Windows 10 installation to copy the files I need to back up.

 

I will then be booting into the Yosemite USB key and installing a fresh apple install on the same drive by formatting and starting fresh.

 

The main goal, and the reason why I've decide that now is the time to do this (I've held onto 2602 BIOS for a long time) was to reach my goal of UEFI native install. I So I'm glad I can finally reformat this drive and start fresh and new with a proper UEFI boot system on a fresh Macintosh HD partition. It's about time. I think I've been updating since version 10.6 on this installation.

 

Good thing I can copy all my files and stuff to my NAS through Windows 10, and that I have the space for about 70 gigs of things. Blessing in disguise, it's cleanup time!

 

Will report back with any other issues and also if everything works, i will upload my individual working files for all to use.

Link to comment
Share on other sites

 Share

×
×
  • Create New...