-
Notifications
You must be signed in to change notification settings - Fork 71
How to patch your DSDT
Although there are pre-patched DSDTs available as downloads from the tonymacx86.com forums and in installer packages such as the HP ProBook Installer, there can be differences in individual DSDTs that can cause delays in booting and perhaps other problems. Perhaps there are slight differences in BIOS settings, memory installed, etc, that is causing these differences. It is best, therefore, to patch your own DSDT and install it into /Extra/dsdt.aml.
I have included 3 different methods for extracting your native DSDT. Just pick the method that seems easiest for you. The easiest one will depend on whether you still have Windows installed, whether you already have a Linux USB stick prepared, and just how familiar you are with both systems.
In order to use the patches provided in this repository, you first have to acquire your native/clean DSDT. One way to do that is with acpidump in Linux.
First of all, you need the ability to run Linux. For that I recommend creating a USB stick with Ubuntu. Read and follow these complete instructions: http://www.ubuntu.com/download/help/create-a-usb-stick-on-windows. After you get your Ubuntu USB stick made, boot from it. On the HP ProBook, you tap the F9 key during BIOS startup and you will get the opportunity to boot from devices other than the hard disk. Select your USB stick with Ubuntu on it. When the Ubuntu menu appears, choose the first one, where you are just running (not installing) Ubuntu. If you decide to use Ubuntu on a regular basis, you can install it. For that I suggest you see my guide at http://racerrehabman.wordpress.com/2012/07/06/guide-to-installing-windows-7-windows-8-mac-os-x-lion-and-ubuntu-multi-boot/ which has complete instructions for multi-booting Win7, Win8, Lion, and Ubuntu.
Now you should be running Ubuntu. To get 'acpidump' you first need to enable the 'universe' software repository. To do so, it is easiest to follow this guide: https://help.ubuntu.com/community/Repositories/Ubuntu#Adding_Repositories_in_Ubuntu
After adding 'universe' to the Ubuntu Software Center's software sources, you are ready to install acpidump and run it. You will need internet access to get the acpidump software, so if you are using a wireless connection, now is a good time to connect to it. After that, open Terminal (Ctrl+Alt+T), and type the following commands:
sudo apt-get update
sudo apt-get install acpidump
Now you have acpidump installed so, we can run it:
sudo acpidump -b -t DSDT -o dsdt.aml
Now copy the dsdt.aml file somewhere that you can access from your installation of Mac OS (a USB key perhaps). The dsdt.aml file you have now is a raw DSDT from your BIOS that you can use to apply the patches in this repository to create your patched DSDT.
I didn't know this, but evidently the ACPI tables are directly available and mounted in the file system. This is much simpler than using acpidump, especially if running from the Ubuntu Live USB.
All you have to do is run the following command in Terminal:
sudo cat /sys/firmware/acpi/tables/DSDT >dsdt.aml
Then copy resulting dsdt.aml somewhere convenient to bring with you to your OS X install for patching.
I haven't used this method personally, but have used this application for other things and it seems that it also has the capability to extract ACPI tables. The program is "Read-Write Everything" and it is available at the following website: http://rweverything.phpnet.us/index.htm
Once you have installed RW-Everything, run it and from the "Access" menu, choose "ACPI Tables". From the "ACPI Table" window that opens, first select the DSDT tab to make sure the DSDT table is active, then choose the "Save as Binary" button on toolbar (or Shift+F2). Save that file to a place easy to transfer to your MAC OS installation.
First of all, you need to download the patches I provide in this github repository. Go here: https://github.com/RehabMan/HP-ProBook-4x30s-DSDT-Patch, then download the ZIP (see the ZIP button there?), then extract the ZIP.
The whole suite of patches is broken down by function, and you can apply each patch individually with DSDT Editor. But if you are certain the patches are going to work on your DSDT (ie. you have a Sandy Bridge series ProBook 4x30s laptop), then it is easiest and fastest to combine all the patches into one, and apply them all at once.
I have provided a 'Makefile' to create both all-in-one patches, all.txt and all1080.txt. To create those files, just run 'make' at terminal and they will be created. If you wish to use the new fan control code in 04_FanExperimental.txt, use 'make allexp', which will create all_exp.txt and all1080_exp.txt.
If you don't have make (maybe only part of Xcode tools), then you can run the command manually.
Command for all.txt:
cat 01_Compilation.txt 02_DSDTPatch.txt 04_FanPatch.txt 05_OSCheck.txt 06_BatteryPart0.txt 07_BatteryPart1.txt 03a_HDMI.txt >all.txt
Command for all1080.txt:
cat 01_Compilation.txt 02_DSDTPatch.txt 04_FanPatch.txt 05_OSCheck.txt 06_BatteryPart0.txt 07_BatteryPart1.txt 03b_1080p+HDMI.txt >all1080.txt
Command for all_exp.txt:
cat 01_Compilation.txt 02_DSDTPatch.txt 04_FanExperimental.txt 05_OSCheck.txt 06_BatteryPart0.txt 07_BatteryPart1.txt 03a_HDMI.txt >all.txt
Command for all1080_exp.txt:
cat 01_Compilation.txt 02_DSDTPatch.txt 04_FanExperimental.txt 05_OSCheck.txt 06_BatteryPart0.txt 07_BatteryPart1.txt 03b_1080p+HDMI.txt >all1080.txt
Note: The difference between 03a_HDMI.txt and 03b_1080p+HDMI.txt is the difference between having or not having the dual-link HDMI patch for your built-in laptop display. So, if you have a laptop where you have replaced the stock screen with a 1080p screen (many have done this for the 15" 4530s), then you need the dual-link enabled version (03b_1080p+HDMI.txt). If you have the standard screen, then you don't need the dual-link enabled version. If you make the wrong choice here, you will be greeted by a black (or garbage) screen when you boot with the new DSDT you create, so it is imperative you make the right choice. It is my understanding that the 1600x900 display on the 4730s is also of the dual-link variety, so you will want to be sure to use the 03b_1080p+HDMI.txt if you have that particular 17" laptop.
For this step you will be running "DSDT Editor" under OS X. So first, you have to download the DSDT Editor. To download, visit this link: http://www.insanelymac.com/forum/topic/223205-dsdt-editor-and-patcher/
Note: DSDT Editor is written in Java, so you will need to install Java in order to run it. OS X should prompt you to install Java and automatically download and install it through Software Update.
After downloading the DSDT Editor, extract it, then run the "DSDT Editor" application. You can copy it to your Applications folder if you wish as well. Once in DSDT Editor, choose File, Open. Open your un-patched, native DSDT extracted earlier. It will take a while to load and parse. Once it is done, choose Patch, Open, then select the all.txt, all1080.txt, all_exp.txt, or all1080_exp.txt that you created earlier. In the Patch window that opens, click Apply, then wait for it to complete. After it is done, click Close. Do not move onto the next step right away. Instead wait for DSDT Editor to parse the results of the patch. It will do this a few seconds after you close the patch window. You will notice the progress indicator in the lower left light up and start animating. When the progress indication animation stops, you are ready to compile and save your patched DSDT. Choose IASL, Compile. In the window that results, you will see several Warnings and Remarks... this is normal. There should be no errors. Now choose IASL, Save AML as, and select a destination. After you have your new DSDT.AML saved, you may then copy it to /Extra/dsdt.aml. You can so so with Finder or at the command line in Terminal:
sudo cp path-of-patched-dsdt.aml /Extra/dsdt.aml
And that's all. Enjoy your custom patched DSDT...