Contribute
Register

[Guide] Dell XPS 13 9333 using Clover

Status
Not open for further replies.

vbo

Joined
Jul 13, 2014
Messages
284
Initial Clover Install
Since tonymac has a good guide on how to do the initial clover setup (http://www.tonymacx86.com/yosemite-desktop-guides/144426-how-install-os-x-yosemite-using-clover.html), I'll just highlight what needs to be done differently for the XPS 13 9333 below. In other words, any step from the guide that is not specifically modified below should be performed.

Step 1:
Self explanatory - yes you need the installer.

Step 2:
2.17: In the ‘Customize’ screen, check ‘Install for UEFI booting only’ and ‘Install Clover in ESP’. Do not check anything under Bootloader, CloverEFI (should be grayed out). In themes, check (at least) ‘bluemac’ since that’s the one I use in the config file you’re about to download. Under ‘Drivers64UEFI’, check the same ones as in the guide screenshot.

2.20 (that’s right, there’s no step 18 or 19): Do what it says but instead of the attached config.plist, get this one: https://raw.githubusercontent.com/vbourachot/Dell-XPS13-9333-DSDT-Patch/master/config.plist

2.22: Do what it says, although I recommend getting RehabMan’s fork: https://github.com/RehabMan/OS-X-FakeSMC-kozlek

2.22b: Get RehabMan’s VoodooPS2Controller kext so you can use your keyboard/touchpad and put it in the same place as above: https://github.com/RehabMan/OS-X-Voodoo-PS2-Controller

2.22c: Get the-darkvoid/RehabMan's Fake-PCI-ID - Use FakePCIID.kext, FakePCIID_HD4600_HD4400, and BCM94352Z_as_BCM94360CS2 (last one is optional - only needed if you have replaced your wifi card with BCM94352Z) https://github.com/RehabMan/OS-X-Fake-PCI-ID
Note: The FakePCIID kexts have been renamed - see note "2016 update" in the second post.

2.23: Skip - no NIC in this laptop.

2.24: Skip.

2.25: Do this (just adding this here as people have been missing this step in the past).

2.26: Skip - we don’t need it for the installer.

Step 3:
Do it all - no change.
Note: If you get a garbled screen when the installer boots, try to boot without injecting intel graphics (in Clover boot menu >> Options >> Graphics injection >> uncheck Inject Intel). This will force the installer to fallback to software rendering. Don’t forget to do it for the 2nd reboot too.

Step 4:
4.5: In the ‘Customize’ screen, check ‘Install for UEFI booting only’ and ‘Install Clover in ESP’. Do not check anything under Bootloader, CloverEFI (should be grayed out). In themes, check (at least) ‘bluemac’. Under ‘Drivers64UEFI’, check the same ones as in the guide screenshot in step 2.

4.6: Copy the config.plist from the USB and put it where the guide says.

4.7: Copy the one from the USB, along with VoodooPS2Controller.kext and FakePCIID* kexts.

4.8: Skip.

4.9: Skip.

At this point, you should have a bootable 10.10 install. Remove the USB and try rebooting from the SSD. There’s a whole lot of things that are not working yet, but it’s a fine start.

Important: From this point on, you should not be booting from the USB anymore. The scripts below assume that your SSD EFI partition is at disk0s1, which will not be the case if you’re booting from USB. If you can’t boot from the SSD at this point, you need to fix whatever went wrong before proceeding.

First Boot
At the Clover screen, press F4. This will dump your ACPI tables (in particular DSDT and SSDTs) to the EFI partition.

Post Install
You’re going to need to download a few things to get started. I’m going to assume that you have some means of connecting to the internet, such as a USB wifi/lan. If you don’t, you’ll need to get the stuff below on a USB key and transfer it over. Note that the intel wifi card that comes with this laptop (like all intel cards) is not supported in OS X. However, if you've replaced it with a BCM94352Z card, it will already be working at this point.

5.1: Prep
Open a terminal and type ‘make’. This will download the CLI developer tools from Apple.
- If you’re going to install Xcode, just install it now instead and make sure you’re selecting the command line tools in the installer.
- If you have no internet connection, get the Command Line Tools installer from Apple developer website (https://developer.apple.com/downloads/index.action)

5.2: Tools
While 5.1 is downloading, get RehabMan’s iasl and patchmatic and copy both binaries in /usr/local/bin/
https://github.com/RehabMan/Intel-iasl
https://github.com/RehabMan/OS-X-MaciASL-patchmatic

5.3: Setup
Once 5.1 is finished, we set up our work environment. I’m setting up a directory named ‘git’ in your user Documents directory. If you don’t like this, modify the location to your liking.
Code:
mkdir ~/Documents/git && cd ~/Documents/git/
git clone https://github.com/vbourachot/Dell-XPS13-9333-DSDT-Patch.git
git clone https://github.com/RehabMan/Laptop-DSDT-Patch.git
cd ./Dell-XPS13-9333-DSDT-Patch/

5.4: Additional kexts
Download the following kexts and put them in your EFI CLOVER/kexts/10.10/ directory (use 10.11 or other directory if you install el capitan):
Download the following kext and put it in /S/L/E/ (if you do not know how to do this properly manually, use kext utility or a similar tool):

Note:
You can use the following scripts to mount/unmount your EFI partition:
Code:
# Mount your EFI partition (it will be mounted at /Volumes/EFI):
~/Documents/git/Dell-XPS13-9333-DSDT-Patch/tools/mount_efi.sh

# Unmount your EFI partition:
~/Documents/git/Dell-XPS13-9333-DSDT-Patch/tools/unmount_efi.sh
Note 2: There’s only one mSATA slot in this laptop, so I’m assuming your SSD EFI partition is at disk0s1. It should be the case as long as you’re currently booting from the SSD (check with ‘diskutil list’ if you have a doubt). If not, you will have to modify the 2 scripts above as well as the Makefile we’ll be using below with the appropriate disk index.

5.5: ACPI extract
This is where you get the ACPI tables dumped by clover:
Code:
make get_acpi
ls -l origin/
You should see a bunch of aml files (30 on my A06 BIOS), in particular DSDT.aml and SSDT-[0-8].aml. If the origin folder is empty, something went wrong: either you didn't press F4, or your EFI partition is not where the Makefile is expecting it. You must figure out and resolve the issue before proceeding.

5.6: DSDT patching
Finally we’re ready to get started on the DSDT:
Code:
make disassemble && make patch all
ls -l build/
You should see 5 aml files in the build/ directory (dsdt.aml, SSDT-2/3/7/8.aml). If not, go through the output that was just generated and figure out what happened.

If you want to start from scratch so you can do the process step by step, ‘make distclean’ will delete everything but the contents of the origin directory.

Assuming it all went well:
Code:
make install

Your patched DSDT/SSDTs are now copied in the EFI CLOVER/acpi/patched directory and renamed appropriately for Clover to load.

5.7: Power management
Get PikerAlpha’s ssdtPRGen script (https://github.com/Piker-Alpha/ssdtPRGen.sh) and generate a SSDT for your cpu (follow the readme instructions in github). Copy ssdt.aml to your EFI CLOVER/acpi/patched/ directory.

5.8: Audio
Apple HDA patch:
Code:
make patch_hda && sudo make install_hda
Next time you reboot, sound will be working.

5.9: OpenCL framework patch (HD4400 only)
Obsolete - skip this.

5.10: Optional: Null Ethernet
Gives you Apple store access with USB wifi/lan. Skip this if you replaced your internal wifi (and/or don’t care about apple store).
Get Rehabman’s NullEthernet kext (you should know where by now) and copy it into your CLOVER/kexts/10.10/ directory in the EFI.
Then run:
Code:
make null_eth && make install_null_eth

This will create a ssdt with a random MAC address to be used by null ethernet.
Note: If you had previously setup network interfaces, make sure to read the readme on the NullEthernet github to get the fake NIC at en0.

5.11: Enjoy
Reboot and you should be booting into a fully functional, power managed, sleep enabled, fully accelerated Yosemite installation.

As an additional bonus thanks to Clover, incremental updates (i.e., 10.10.1, 10.10.2 etc) should be painless. HD4400 support, AppleHDA, SSD trim, wifi, etc are all done dynamically via either Fake-PCI-ID or via Clover on boot, so you will never need to reapply these patches after an update.

"Post" Post-Install
Next steps:
  • If you have the issue where the laptop locks up on sleep/shutdown after it has been on for more than 3 hours, you need to update your intel ME firmware. Details are here: http://www.tonymacx86.com/yosemite-...own-after-few-hours-uptime-6.html#post1029282 thanks to JVital2013.
  • Enable SSD trim with trimforce.
  • The smbios section of the config.plist is voluntarily left incomplete - it is supposed to contain info that is specific to your machine. At a minimum, I encourage you to generate a serial number and add it to your config.plist smbios section.
    You can use tools to do this automatically (Clover configurator) although I don’t recommend it (at least in its current version). I like to keep my config.plist small so it’s easy to read and debug if need be, and this tool does the opposite of that. My advice would be to use clover configurator or chameleon wizard to generate an appropriate serial number for your machine, and then paste it into your config.plist manually (look at the install_config rule in the Makefile and the config.plist.smbios.template if you want to automate this somewhat).
  • Fix iMessage/Facetime by adding the proper values in your config.plist smbios section. Since this is a moving target and some people are much better able to help than I am, I won’t cover it here. Refer the ‘How to fix iMessage’ thread for some extensive info, and implement the recommended clover fixes.
  • There are some more rules in the Makefile that I haven’t used in this guide but that I use in my own install. If you’re curious, just open it up - it’s fairly well commented.
  • All of the above requires some understanding of how Clover's config.plist works. The Clover wiki (http://clover-wiki.zetam.org/Contents) is a great source of info, and it's pretty well documented/updated (by fast moving open source projects standards anyway).
  • Once you have your system stable, it's a good idea to copy all the kexts from the EFI into /S/L/E. Make sure to keep at least FakeSMC and VoodooPS2 in the EFI as they are required to boot/enable trackpad when booting the recovery partition.

Known Issues
  • Headphone out does not work. Edit 01/27: Fixed by the-darkvoid with CodecCommander
  • Sleep/shutdown locks up if the laptop is used for more than ~2.5 hours without a period of sleep. Edit: In order to properly fix this issue, intel ME firmware needs to be updated. See above.

Credits
I only put this together for this specific machine out of info that’s available on the web, but credit should go to everyone in the community who contributed software to make it possible.
In particular, all the Clover devs for this awesome, feature-packed bootloader; RehabMan for all his kexts, DSDT patches, and the hundreds (thousands?) of hours supporting users on this forum; Piker Alpha for his power management script, AppleHDA injection method, and his ongoing developments; and all the individuals patches contributors (toleda, skvo, the-darkvoid, all the ones I forget go here).

References
http://clover-wiki.zetam.org/Contents
https://github.com/vbourachot/Dell-XPS13-9333-DSDT-Patch
http://www.tonymacx86.com/mavericks- laptop-support/136988-dell-xps-13-9333-haswell-clover-install-dsdt-guide.html

Changelog:
Edit 11/17: Graphics corruption fixed via framebuffer patch

Edit 12/05: the-darkvoid wrote a new bluetooth firmware uploader which works perfectly in 10.10.

Edit 12/06: Sleep lockup fixed via framebuffer kext (MEIDriver class) patch

Edit 01/03: A06 bios released - updated accordingly

Edit 01/04: Guide modified to use the-darkvoid/rehabman's FakePCIID and the-darkvoid's AirportTakeOff.

Edit 01/27: Headphone out is now fixed thanks to the-darkvoid.

Edit 02/18: Refactored to use CLOVER ACPI dump instead of pulling the tables from linux. Attached a release build of the-darkvoid's CodecCommander MMIO branch (built from MMIO/HEAD on 02/07).

Edit 04/29: Added proper fix for intel ME thanks to JVital2013 (first bullet point under 'Post post-install')

Edit 05/31: Latest merged version of CodecCommander works fine for this laptop - removed the built kext from this post and updated the guide
 
Last edited:
[GUIDE] Dell XPS 13 9333

10.10.1 update - no issue. Reapply OpenCL patch after the update (step 5.9). Everything else works right after updating.

10.10.2 update - HD4400 support is now completely removed from the OS. config.plist on github is updated to inject HD4600 Desktop FakeID to restore QE/CI. Also contains updated '2nd stage boot' patches for .2. Everything else seems to be working fine as in .1.

10.10.3 update - just works, no change required.

10.10.4 update - just works, no change required. Clover trim patch removed from config.plist on github; use trimforce instead)

10.11 update:
  • update clover to latest (3270 or newer). Update drivers too.
  • replace ACPIBackLight.kext with IntelBacklight.kext
  • update FakePCIID* and install FakePCIID_XHCIMux
  • replace brcmPatchRam with brcmPatchRam2 and BrcmFirmwareRepo
  • use updated config.plist
  • re-patch dsdt with updated patches from my repo (to fix usb2 issue after sleep)
about_10_11.png

10.11.1 update - just works, no change required. Update Clover to 3292+ before upgrade to .1

10.11.5 update / 2016 update:
The FakePCIID kexts have been renamed since this post was written. You should use:
FakePCIID.kext
FakePCIID_Broadcom_WiFi.kext
FakePCIID_Intel_HD_Graphics.kext
FakePCIID_XHCIMux.kext
 
Last edited:
[GUIDE] Dell XPS 13 9333

thanks for your great work :)
Just for information: i got my wifi card working with a dsdt patch, Bluetooth is working via BTFirmwareUploader.kext
 
[GUIDE] Dell XPS 13 9333

thanks for your great work :)
Just for information: i got my wifi card working with a dsdt patch, Bluetooth is working via BTFirmwareUploader.kext

Glad we got you sorted out in the other thread in the end. Hopefully having a cleaner guide will make the process easier for the next one going through the install.

I know you used the dsdt patch for wifi (I remember seeing it in your modified makefile). I just wanted to try something different here so that one can have wifi on the first reboot after install (before any dsdt patches) as that greatly simplifies getting all the stuffs you need to start the post install. It may even work when booting from USB, which would be nice for full disk recovery from Time Machine backup on a NAS. But we'll have to see if it works.
 
[GUIDE] Dell XPS 13 9333

For me the DSDT patch doesn't work..

i've just patch kext via Clover and Inject fake id for wifi
 
[GUIDE] Dell XPS 13 9333

make patch_hda && sudo make install_hda

I get this when i run only patch_hda

Code:
Creating AppleHDA injector for ALC668...-i used with no filenames on the command line, reading from STDIN.
-i used with no filenames on the command line, reading from STDIN.
-i used with no filenames on the command line, reading from STDIN.
-i used with no filenames on the command line, reading from STDIN.
 Done: ./build/AppleHDA_ALC668.kext

but when i run
Code:
make patch_hda && sudo make install_hda

it says :
Code:
make: *** No rule to make target `install_hda'.  Stop.

i am trying to use this on my asus q550lf as it has ALC668 too.
there is no install_hda file in folder.
 
[GUIDE] Dell XPS 13 9333

but when i run
Code:
make patch_hda && sudo make install_hda

it says :
Code:
make: *** No rule to make target `install_hda'.  Stop.

i am trying to use this on my asus q550lf as it has ALC668 too.
there is no install_hda file in folder.

Runs fine here:
Code:
$ make patch_hda && sudo make install_hda
./patch_hda.sh
Creating AppleHDA injector for ALC668...-i used with no filenames on the command line, reading from STDIN.
-i used with no filenames on the command line, reading from STDIN.
-i used with no filenames on the command line, reading from STDIN.
-i used with no filenames on the command line, reading from STDIN.
 Done: ./build/AppleHDA_ALC668.kext
if [ -d /System/Library/Extensions/AppleHDA_ALC668.kext ]; \
	then rm -rf /System/Library/Extensions/AppleHDA_ALC668.kext && cp -R ./build/AppleHDA_ALC668.kext /System/Library/Extensions/; \
	else cp -R ./build/AppleHDA_ALC668.kext /System/Library/Extensions/; fi
touch /System/Library/Extensions

Make sure there's no changes in your Makefile. What do you get from 'git diff Makefile'?
Alternatively, just copy the AppleHDA_ALC668.kext that is in the build/ folder into /S/L/E and fix permissions/rebuild cache.
 
[GUIDE] Dell XPS 13 9333

Runs fine here:
Code:
$ make patch_hda && sudo make install_hda
./patch_hda.sh
Creating AppleHDA injector for ALC668...-i used with no filenames on the command line, reading from STDIN.
-i used with no filenames on the command line, reading from STDIN.
-i used with no filenames on the command line, reading from STDIN.
-i used with no filenames on the command line, reading from STDIN.
 Done: ./build/AppleHDA_ALC668.kext
if [ -d /System/Library/Extensions/AppleHDA_ALC668.kext ]; \
    then rm -rf /System/Library/Extensions/AppleHDA_ALC668.kext && cp -R ./build/AppleHDA_ALC668.kext /System/Library/Extensions/; \
    else cp -R ./build/AppleHDA_ALC668.kext /System/Library/Extensions/; fi
touch /System/Library/Extensions


Make sure there's no changes in your Makefile. What do you get from 'git diff Makefile'?
Alternatively, just copy the AppleHDA_ALC668.kext that is in the build/ folder into /S/L/E and fix permissions/rebuild cache.
I tried this, and injected the clover kext to patch https://github.com/vbourachot/Dell-...mmit/e0b803f0b63a614a3bf389ca6cb3859fe9d1b243 , rebuild cache, restarted, but not working. when i checked the loaded kexts via kext wizard both of these kexts were not the loaded. kext AppleHDA_ALC668.kext is just 16 KB.

I didn't made any changes to the file.. the file install_hda does not exist in the folder.

i run command like this:
sudo make patch_hda && sudo make install_hda
 
[GUIDE] Dell XPS 13 9333

I didn't made any changes to the file.. the file install_hda does not exist in the folder.
install_hda is not a file, it's a rule inside the Makefile.
Code:
# Install AppleHDA_ALC668.kext injector in SLE
install_hda:
	if [ -d /System/Library/Extensions/AppleHDA_$(HDACODEC).kext ]; \
	then rm -rf /System/Library/Extensions/AppleHDA_$(HDACODEC).kext && cp -R $(BUILDDIR)/AppleHDA_$(HDACODEC).kext /System/Library/Extensions/; \
	else cp -R $(BUILDDIR)/AppleHDA_$(HDACODEC).kext /System/Library/Extensions/; fi
	touch /System/Library/Extensions


I tried this, and injected the clover kext to patch https://github.com/vbourachot/Dell-...mmit/e0b803f0b63a614a3bf389ca6cb3859fe9d1b243 , rebuild cache, restarted, but not working. when i checked the loaded kexts via kext wizard both of these kexts were not loaded.
Do you boot with kext-dev-mode=1?
 
[GUIDE] Dell XPS 13 9333

install_hda is not a file, it's a rule inside the Makefile.
Code:
# Install AppleHDA_ALC668.kext injector in SLE
install_hda:
    if [ -d /System/Library/Extensions/AppleHDA_$(HDACODEC).kext ]; \
    then rm -rf /System/Library/Extensions/AppleHDA_$(HDACODEC).kext && cp -R $(BUILDDIR)/AppleHDA_$(HDACODEC).kext /System/Library/Extensions/; \
    else cp -R $(BUILDDIR)/AppleHDA_$(HDACODEC).kext /System/Library/Extensions/; fi
    touch /System/Library/Extensions

hmm..

Do you boot with kext-dev-mode=1?
Yes i do.
 
Status
Not open for further replies.
Back
Top