Contribute
Register

[Guide] XPS 13 9350 - Catalina 10.15.5 - Clover - HotPatch - Simple/Clean (ish)

Joined
Feb 4, 2017
Messages
184
Motherboard
Dell XPS 13 9350 - BIOS 1.7
CPU
i7-6500U
Graphics
HD 520, 3200 x 1800
Mac
  1. iMac
  2. MacBook Air
  3. Mac mini
Mobile Phone
  1. iOS
01 laptop.jpg

Introduction
With Catalina I took the opportunity to cleanup my XPS 13 Clover Config (used for Mojave) - to make it as simple/clean as possible. I am using hotpatching (no sorted order) and only installed minimal needed. The cleanup was made possible by the very extensive advances of Lilu.kext (and it’s) Plugins Whatevergreen, AppleALC, AirportBrcmFixup) and also I2C.kext - they have eliminated many of fixes and patches we used to do via Clover config.plist​
Not really a tutorial, but for beginners you may find some explanation of why settings have been chosen and some good links.​
Ofcourse as this is a laptop setup, this clover folder is only applicable to this particular brand and model of XPS13. If you want to use for your laptop different brand/model, please be aware that this will unlikely work or only partially.​

Notes
Win 10 Dual Boot working (*)​
Catalina 10.15.5 (19F101)​
Clover Bootloader 5119 (**)​

(*) I have a dual boot Win10 - macOS on same SSD​
I made an image of the original Dell Win10 using Macrium Reflect to an external drive​
Installed a new bigger 500GB SSD drive - 960 EVO NVMe M.2 500GB SS​
Then created 2 partitions via Diskmanager using macOS Installation USB​
I reinstalled Win10 onto the first partition - install macOS on the second partition​
I kept the original boot partition name on the XPS 13 - ESP (=EFI System Partition)​
If windows install/update repoint causes windows bootloader to load (boot\\boot64x.efi): you can either via bios set SSD boot to point to Clover\CLOVERX64.efi or copy CLOVERX64.efi to Boot\ and rename it to boot64x.efi to load Clover bootloader again.​
(**) I originally installed Mojave on this Laptop using Clover 4701 - be aware that the Clover folder structure changed going from 4xxx to 5xxx so that UEFI x64.efi drivers reside under Clover\UEFI\Drivers and not under Clover\Drivers64UEFi​
Specifications
Dell XPS 13 / Model 9350 / Bios 1.7 /04HR02 A00 / 2015 Model​
6th Generation Intel i7 6500u@2.5Ghz (Skylake)​
Intel HD 520 - QHD 3200 x 1800​
Display QHD - 3200 x 1800 (hardware id SHP144A)​
8GB Ram DDR3 900Mhzx2​
Samsung 960 EVO NVMe M.2 500GB SSD (replaced stock SSD)​
USB device id: 8086,9D2F​
USB c/Tb 8086,15b5​
Trackpad 8086,9D60 I2C​
Camera VendorID 1452, ProductID 34064​
Wifi 1820a device 8086, 43a3 replaced with DW1560​
ALC3246 audio dell XPS13 10EC, 0256 = ALC256​
Bluetooth: Vendor ID:0x0489 Product ID:0xE07A (via DW1560 module)​
02 Samsung 960.jpeg

What Works?
Battery Indicator​
Bluetooth (using DW1560 Card)​
Display Brightness Slider & Hotkeys​
Graphics​
Sound​
SSD​
Power Management​
Touchscreen​
Touchpad (I2C-HID)​
Webcam​
Wireless​
USB-C*​
iMessage​
(*) see what does not work​
What does not?
USB-C Thunderbolt​
USB-C hotplug*​
SD Card Reader**​
(*) there is kind of a solution out there using _RMV _WAK renames and adding some aml code, which most have called SSDT-TYPC.aml but it is not a 100% satisfactory solution. Using type C - thunderbolt 3 on macOS is quite complex due to a number of reasons - for people who are interested here is a link with more techie info​
https://osy.gitbook.io/hac-mini-guide/details/thunderbolt-3-fix - I just plug in my USBC device before boot when i need it​
.​
(**) no fix for macOS out there for this as far s I am aware - so best to disable in BIOS to increase battery life - it draws some power while enabled.​

BIOS Settings
Bios Version: 1.7 (*)​

(*) I realise there are bios upgrades for this machines up to 1.10 (as of June 2020) , but I am not that fuzzed about the spectre and meltdown vulnerabilities - I don’t use this machine as critical work laptop and also the remote exploits have been rare - in any case if you are worried please upgrade to 1.10 - I don’t know how much this will effect the configuration if you have used the new bios firmware with this machine let me know how you went.​
General/ Advanced Boot Options:​
* Enable Legacy Option ROMs: YES​
* Enable UEFI Network Stack: NO​
System Configuration​
* Sata Operation: AHCI​
* Drives: SATA-2: Yes / M.2 PCIe SSD-0: YES​
* SMART Reporting: Enable: YES​
* USB Configuration: Enable USB Boot Support: YES - Enable External USB port: YES​
* Dell Type-C Dock Configuration: Always allow Dell Dock: YES​
* Thunderbolt Adapter Configuration: Enable Thunderbolt Technology Support: Yes / Enable Thunderbolt Adapter Boot Support: NO / Enable Thunderbolt Adapter pre-boot Modules: NO / Security Level: No Security​
* USB PowerShare: enabled: YES​
* Audio: enabled Audio: YES / Enable Internal Speaker​
* Keyboard Illumination: Bright​
* Touchscreen: enable: YES​
* Unobtrusive Mode: enable: YES​
* Miscellaneous Devices: Enable Camera: YES / Enable Secure: YES​
Security​
* TPM 1.2 Security: NO​
* Computrace: Deactivate: YES​
* CPU XD Support: Enable: YES​
* OROM Keyboard Access: Enabled: YES​
Secure Boot​
* Secure Boot Enable: Disabled​
Intel Software Guard Extensions​
* Intel SGX Enable: Disabled​
Performance​
* MultiCoreSupport: Enable​
* Intel SpeedStep: Enable​
* C-States Control: YES​
* Intel TurboBoost: Enable​
* HyperThread Control: Enabled​
Power Management​
* AC Behaviour: Wake on LAN: NO​
* USB Wake Support: USB:NO / USB C Docks :NO​
* Wake on WLAN: Disabled​
* Block Sleep State S3: YES​
* Primary Battery Charge Configuration: Standard​
POST Behaviour​
* Adapter Warning: Enable:​
* Keypad Embedded: Fn-Key Only​
* Numlock Enable: YES​
* Fn key Emulation : Enable​
* Fn Lock Options: Fn Lock - Lock mode Disable/Standard​
* FastBoot: Minimal​
* Extend Bios POST Time: 0 Seconds​
Virtualization​
* Intel Virtualization Technology: enable: YES​
* VT for Direct I/O: NO​
Wireless​
* Wireless Switch: WLAN: NO / Bluetooth: NO​
Maintenance​
* BIOS Downgrade: Allow​
* BIOS Recovery from Hard Drive: YES​
Support Assist System Resolution​
* AUTO OS Recovery Threshold: OFF​


DVMT (Dynamic Video Memory Technology)
“In order for MacOS to use a IGPU it must have a DVMT pre-allocation memory size of at least 64MB, (higher with QHD screens). if you have this option in your BIOS then it's pretty straight forward as you can simply set it to at least 64MB (or 128MB) and move on.​
Unfortunately not all BIOS's (especially laptop's) allow you to manually set the DVMT pre-allocation memory size.”​
(Quoting Jaymonkey from Lilu beginners guide - see links section)​
The XPS 13 unfortunately does not have a bios setting for DVMT.​
So you have to set manually using GRUB command line shell.​
I set mine as follows:​
DVMT Preallocated - 192MB​
DVMT Total GFX Memory - MAX​
If you like to understand how to set DVMT via GRUB command line shell see spoiler section below​
WARNING!!! Be warned using wrong variables for your machine can potentially brick your bios
Grub Shell Commands
Install a GNU Grub Shell to Clover Tools folder.​
I found one at Darkvoid’s GitHub site called DVMT-grub.efi​
Rename it Shell64U.efi ( you can rename the original Shell64U.efi to something else)​
Now when you boot into Clover and go to shell option the grub shell will start.​
For this XPS13 model the variables we are interested in are​
0x432 (preallocated) and 0x433 (total)​
You can use the setup_var command to look at current settings of the variables but also to set a new value​
Typing “setup_var 0x432” on its own will return the current value of 0x432​
Typing “setup_var 0x432 0x06” will set preallocated to 0x06 (=192MB)​
0x01 = 32MB​
0x02 = 64MB​
0x03 = 96MB​
0x04 = 128MB​
0x05 = 160MB​
0x06 = 192MB​
Typing “setup_var 0x433 0x03” will set total Gfx memory to Max​
0x01 = 64MB​
0x02 = 128MB​
0x03 = MAX​

03 setupvar GNU GRUB.jpeg

How do you know 0x432 and 0x433 are the correct variables for this BIOS?​
That is a good question - if you are interested you can find out for yourself using a number of windows utilities​
In windows​
Extract rom file with universal bios backup toolkit 2​
Open image file with Uefitools_ne-a43​
Search for guid pattern 899407d7​
Doubled click guid pattern 899407...​
Right click setup extract as is > setup.bin​
Run universal ifr extractor​
Search for DVMT string​
04  Universal BIOS Backup ToolKit.jpg05 Universal BIOS Backup ToolKit 2.0.jpg05 Universal BIOS Backup ToolKit 2.0.jpg06 UEFITooI.jpg07 UEFITooI NE.jpg08 UEFITool.jpg09 IFT extractor DVMT preallocated.jpg10 IFT extractor DVMT total memory.jpg


Config.plist Settings
ACPI
ResetAddress = 0xB2 (*)​
ResetValue = 0x73 (*)​
(*) needed to allow proper reboot-restart - you can find these numbers by looking into one of your native RSDT (Root System Description Table) called RSDT-FACP.aml (Fixed ACPI Description Table) Dump you native ACPI files via <F4> in Clover boot and open in MaciASL​
11 ACPI RSDP FACP reset values.png
DSDT-Fixes:​
None needed​
DSDT-Patches:​
Rename OSID to XSID: to avoid match against _OSI XOSI patch​
Rename _OSI to XOSI: pair with SSDT-XOSI.aml​
Rename_DSM to XDSM: to rename existing native ACPI methods​
so that we can add new _DSM methods that won’t conflict (eg SSDT-USBX.aml)​
Rename ECDV to EC: existing embedded controller is called ECDV on XPS13​
Rename BRT6 to BRTX: use with SSDT-BRT6.aml, SSDT-PNLF.aml​
SSDT:​
Generate PluginType: Intel Powermanagement​
Boot
-cdfon: used for High_dpi displays connected to IGPU​
-v: Verbose startup - I like seeing all the boot command scroll by ;)
Devices
Properties​
PciRoot(0x0)/Pci(0x1f,0x3) = 0B000000 (*)​
PciRoot(0x0)/Pci(0x2,0x0) AAPL,ig-platform-id = 00001619 (skylake Intel HD520) device-id = 16190000 (**)​

(*) defines audio: via AppleALC.kext - I used layout 11 for ALC256 audio​
(**) defines internal graphic card (IGPU) via Whatevergreen.Kext​
(***) Properties settings were requested by Lilu Developers to be added to clover config.plist​

USB​
Fix ownership (*)​
(*) boot will hang without this fix - something to do with xHCI/EHCI handoff which we cannot set in Dell bios​

Kernel/Kext Patches
AppleRTC (*)​
DellSMBIOSPatch​
KernelLapic (*)​
KernelPM (*)​
MSR 0xE2 _xcpm_idle instant reboot(c) Pike R. Alpha (*)​

(*) these are legacy settings I had in my config.plist - have not tried without these to see if we still need them or not - if someone knows please let me know if I can eliminate any or all of these​

RTVariables
BooterConfig: 0x028​
CsrActiveConfig: 0x67​
(*) SIP System Integrity Protection Disable - you can check SIP status by typing ‘crsutil status’ in terminal​
SMBIOS
MacBook 14,1 - is a Skylake model and seems to work well for me​
Generate your own serial, board serial, UUID to make iMessage work - see links above​
SystemParameters
InjectKexts: Yes - from Catalina onwards it is the preferred/advisable way.​


Clover ACPI Patched (*)
SSDT-RMCF: contains variables values used by other patches (**)​
SSDT-XOSI: needed for trackpad to show up properly in ioreg (***)​
SSDT-BRT6: used for backlight control (****)​
SSDT-PNLF: used for backlight controlv(*****)​
SSDT-UIAC: used with USBInjectAll.kext to define USB ports (******)​
SSDT-USBX: used to define proper power settings for USB ports (*******)​

(*) it is important to note that how you name your .aml (ACPI machine language) file is up to you, you can name it whatever you like. So when comparing say a SSDT-UIAC.aml to someone else’s SSDT-UIAC.aml they may not be the same. So always look at the code inside the .aml file before deciding to copy from someone else’s clover.​
(**) I have called this SSDT-RMCF (RMCF=RehabManConfigurationFile) to give credit to the person who initially created this particular file for hotpatching. A lot of configs you will see have named this file SSDT-CONFIG. When you look at uncompiled code you will see a number of variables. SSDT-PNLF uses a number and also the AUDL variable (=0x48) is used by combojackinstaller/verbstub.kext (to enable use of audio jack)​
(***) if you rename _OSI to XOSI you need a patch - this SSDT_XOSI.aml simulates Windows10 behaviour, if you look at the code this will simulate Windows 2015 - this will cause trackpad to show up properly in IOreg.​
(****) BRT6 contains the codes for correct backlight function keys - in this case with Dell XPS13-9350 they are <F11> and <F12> you can see in the code the values 0x406 and 0x405 - these values don’t work for all laptops - so you can’t just copy a SSDT-BRT6 and think it will work - you will have to investigate and change the values - this is another example of a .aml file that is named the same across many builds however the content is different. - Also note when you look at the code this SSDT-BRT6.aml is using device name GFX0 and not IGPU as in many other builds - the reason is that the rename for GXF0 to IGPU is done by Whatevergreen.kext after all ACPI tables are loaded so I can leave GFXO in place - You can ofcourse also rename GFX0 to IGPU via clover and use IGPU in BRT6 and Whatevergreen will not need to rename. I quite like keeping a minimal of lines in config.plist. (You can see the device name in Windows 10 device manager -see screenshot)​
12 GFX0 in Device Manager.jpg
(*****) PNLF: creates a device for backlight control - needs SSDT-RMCF information - same as with BRT6 patch I choose to code the device GFX0 as the device instead of renaming in GFX0 to IGPU in clover config.plist and then using that device IGPU in code. Whatevergreen.kext will rename GFX0 to IGPU anyway for proper graphic management​
(******) UIAC: UsbInjectAllConfiguration: Custom ssdt for USB port layout . HS01 (USB2 right) - HS02 (USB2 left) - HS03 (Internal Bluetooth) - HS04 (Internal Touch Screen) - HS05 (Internal HD Web Cam) / SS01 (USB3 right) - SS02 (USB3 left). - requires USBInjectAll.kext​
(*******) USBX: Inject proper power settings for USB ports - note we do not need a fake EC (Embedded Controller) because we already have one called ECDV which we renamed EC. You can see the ECDV device in IOReg if you did not do rename in clover config.plist​
13 ECDV embedded controller.png


Clover Driver UEFI
ApfsDriverLoader.efi: extracts Apfs filesystem driver from macOS container​
AptioMemoryFix.efi: fixes memory problems on UEFI firmware​
AudioDxe.efi: HDA driver for Startup Sound - of course you want the chime sound​
DataHubDxe.efi: Datahub Protocol mandatory for macOS​
FSInject.efi: injection of extensions from Clover folder​
HFSPlus.efi: HFS+ filesystem driver​
VirtualSmc.efi: only needed for FileVault 2 compatability but without you may see some error in the logs​

(*) I don't use Filevault 2 so I did not install many of the needed efi drivers for that​

Clover Kext Other
AirportBrcmFixup.kext: needs Lilu - various Wi-Fi patches​
AppleALC.kext: native HD audio - needs Lilu - Devices Properties in config.plist​
BrcmBluetoothInjector.kext: Defines bluetooth device needed for Catalina​
BrcmFirmwareData.kext : Repository of bluetooth firmware BrcmPatchRAM3.kext(*)​
BrcmPatchRAM3.kext : injects firmware into bluetooth device at boot uses BrcmFirmwareData.kext (**)​
FaceTimeHDCam.kext: needed for camera to work with FaceTime​
IntelMausiEthernet.kext: ethernet driver I use for USBC to fixed ethernet adapter​
Lilu.kext: Patching Engine - on the fly patching of the kernel​
SMCBatteryManager.kext: battery sensor use with VirtualSMC.kext​
SMCLightSensor.kext: light sensor use with VirtualSMC.kext​
SMCProcessor.kext: processor sensor use with VirtualSMC.kext​
SMCSuperIO.kext: I/o sensors use with VirtualSMC.kext​
USBInjectAll.kext: works with SSDT-UIAC.aml for proper USB2/3 ports function​
VerbStub.kext: works with Combojack installer to allow headset/earphones audio plug to switch)​
VirtualSMC.kext: Advanced Apple SMC (system management controller) needs lilu to function fully (***)​
VoodooI2C.kext: kernel extensions to provide support for I2C (****)​
VoodooI2CHID.kext: satellite kext for I2C adding support for I2C-HID devices​
VoodooPS2Controller.kext: keyboard control​
WhateverGreen.kext: various patches for GPU’s - needs Lilu​

(*) BrcmFirmwareData: needed because we are injecting kexts via clover and not installing to l/e , BcrmFirmwarerepo.kext is faster but we cannot use when injecting​
(**) BrcmPatchRam3 is needed for Catalina do not use BrcmPatchRam2​
(***) sensor supports is much more extensive with FakeSMC - but VirtualSMC seems to get more updates and work better with Lilu​
(****) apart from _OSI to XOSI and SSDT-XOSI other renames (like _sta and _crs) and patches do not seem to be necessary for my trackpad to work​


Notes on Combo Jack / ALCplugFix = Headphonejack support
To get audio working on headset - works with verbstub.kext​
There are a couple of scripts out there which may work for you put let’s look inside the script to see what commands are in there, I don’t like just executing a script.​
Copy​
hda-verb to /usr/local/bin (*)​
ComboJack to /usr/local/bin (**)​
Copy​
Com.XPS.ComboJack.plist to /Library/LaunchDaemons (***)​
If you look at this plist it just makes sure ComboJack in /usr/local/bin is executing at startup​
(*) hda-verb is a small program from the Linux Community that sends HD-audio commands​
(**) ComboJack (shows popup screen when plug in headphones) or ALCPlugFix (develop by Goodwin improved by Sniki)​
(***) good.win.ACLPlugFix.plist​
Neither makes headset microphone work for me but headphones work well​


Powermanagement Settings
Hibernation (S4) is not supported on Hackintosh so make sure to switch off.​
‘sudo pmset -a hibernatemode 0’ (disable hibernate)​
‘sudo rm /private/var/vm/sleepimage’ (remove sleepimage folder if necessary)​
‘sudo touch /private/var/vm/sleepimage’ (create an empty sleepimagefolder)​
‘sudo chflags uchg /private/var/vm/sleepimage’ (make it unwriteable)​
Disable other hibernation related settings​
‘sudo pmset -a autopoweroff 0’​
‘sudo pmset -a standby 0​
Always check PM settings after an install and upgrade​
You can use ‘pmset -g’ command in terminal or use hackintool to see current settings​
14 Hackintool v3.4.0.png


Helpful Sites on Tonymacx86

Helpful External Sites

Credits (*)
the-darkvoid, Rehabman, jaymonkey, P1LGRIM, headkaze, UtterDisbelief, maz-1, tonymacx86, and others​
(*) in no particular order, you are all amazing, and if I left someone out by name please accept my apologies.​
 

Attachments

  • XPS9350 Catalina Clover.zip
    17.1 MB · Views: 143
Last edited:
Joined
Feb 4, 2017
Messages
184
Motherboard
Dell XPS 13 9350 - BIOS 1.7
CPU
i7-6500U
Graphics
HD 520, 3200 x 1800
Mac
  1. iMac
  2. MacBook Air
  3. Mac mini
Mobile Phone
  1. iOS
<place holder>
 
Top