bertolin Posted November 11, 2016 Share Posted November 11, 2016 NOTE: This guide mixes static patch with hotpatch. It will be edited to make it works only with static patch soon. There's zero issues with this guide but it seems better not to mix patching methods (thanks, RehabMan) Hello, everybody! After two years of using my Cintiq Companion 2 with Yosemite thanks to mactabletman’s guide and reading, testing a lot and trying to understand what I was doing, I’m in a good path to share my experiences and help you to install macOS Sierra in your Companion 2 keeping your Windows installation. There are a few things that need to be solved, like sleep/wake (Cintiq goes to sleep, led blinks but display doesn’t wake up, maybe framebuffer, IOKit or PWR related) or audio using AppleHDA for codec ALC286 instead of VoodooHDA (I will add notes in each section about all this). WE HAVE GOOD NEWS, CINTIQ MODE WORKS!! (see notes at the bottom) No need to say that I’m taking zero responsibilities of what happened if you follow this guide. We are all grown people and before taking any step you better read all the info you can find about what you are trying to accomplish. This guide is done for the Cintiq Companion 2 i5-4258U 128GB model (DTHW1310L) with the last BIOS version (MB01) but can be useful as a start for other CPU/graphic models. I’m assuming you updated or reinstalled and have Windows 10 running but same procedure is required for Windows 8/8.1. WORKING: All except wake from sleep using Power Button (wake well if previously connected in Cintiq mode), PCI Realtek SD Card Reader, volume buttons and HDMI audio. So first, things you are going to need: - 2 usb drives (16GB and 32GB minimum), one for create an installer and another to install Sierra into. - 1 usb keyboard and 1 usb mouse since Clover has no support for touch devices and touch doesn't work natively in Sierra as it does in Yosemite. - 1 usb drive for Clonezilla (*optional but recommended) - 1 external hard drive to backup your whole internal SSD using Clonezilla (*optional but recommended) - An original Apple computer to create installer. - A BCM94352Z WiFi and Bluetooth 4.0 card to replace default Intel wireless card. You can check how to open your device here. * In order to create a Clonezilla Live USB, I recommend to use Yumi. You can create a multiboot installer for your Windows version, Ubuntu, Wifislax… very useful stuff. CREATING THE INSTALLER… Ok, you did a backup of your data, so let’s create a usb installer for macOS Sierra: - Download macOS Sierra from App Store, this will download the last update 10.12.1 - Open Disk Utility and format your 16GB usb to HFS+J, GUID partition and rename it to install_osx. - Copy and paste these commands in Terminal, one by one: sudo "/Applications/Install macOS Sierra.app/Contents/Resources/createinstallmedia" --volume /Volumes/install_osx --applicationpath "/Applications/Install macOS Sierra.app" --nointeraction sudo diskutil rename "Install macOS Sierra" install_osx INSTALLING CLOVER IN USB INSTALLER… Now open the Clover installer and select your Install macOS Sierra USB, click on “Customize” and use this configuration: - Check Install for UEFI booting only, Install Clover in the ESP is also automatically selected - Check embebbed theme. - Check OsxAptioFixDrv-64 from Drivers64UEFI - Check PartitionDxe-64 from Drivers64UEFI - Check EmuVariableUefi-64 from Drivers64UEFI* - Check Install RC scripts on target volume from Drivers64UEFI* - Click Install. After install Clover, a EFI partiton is mounted. Go to EFI/CLOVER, delete that config.plist and put my config_install.plist there. Rename it to config.plist. - Go to EFI/CLOVER/Drivers64UEFI and delete VboxHfs-64.efi. Put there HFSPlus.efi. - Go to EFI/CLOVER/kexts/ and leave only "10.12" and “Other” folders. Put FakeSMC.kext inside both of them.Now your installer USB is ready. *NOTES ABOUT NVRAM EmuVariableUefi-64 and Install RC scripts on target volume might be needed to make NVRAM works in a dual boot configuration since both systems read and write there (I guess). Or maybe our device has not NVRAM hardware, I don’t know. Anyway, I’ve tested it. To test NVRAM, type this in Terminal: sudo nvram MyVar=TestValue Check/show NVRAM: nvram -p You should see the following entry among others: MyVar=TestValue Reboot, check NVRAM again and if above entry persists, your NVRAM is working. Mine didn’t installing only OsxAptioFixDrv-64, so I reinstalled Clover with EmuVariableUefi-64 and Install RC scripts on target volume. BIOS CONFIGURATION… Check your BIOS. Press power button while holding volume up button to enter BIOS. - CPU Configuration: Boot performance mode: Turbo performance; EIST: enabled; Turbo Mode: enabled; Performance/Watt: Performance; Configurable TDP: TDP Nominal. - Intel Smart Connect Technology: disabled. - CSM configuration: CSM Support: enabled; Network: Do not launch; Video: Legacy. - Chipset/System Agent (SA) Configuration/Graphics Configuration: Aperture Size: 256MB; DVMT Pre-Allocated: 128MB; DVMT Total Gfx Mem: MAX. - BOOT: Fast Boot: disabled; Boot mode select: dual; all fixed boot order priorities disabled except for UEFI USB KEY. - Save & Exit. BOOTING INSTALLER… Now, to boot into Clover you just need to reboot with your installer usb plugged, so your motherboard recognize the UEFI entry in that drive. Click on power icon in Windows, and while pressing SHIFT, click on reset to go to Windows Boot Manager. Click on "Use a device" and next on "UEFI: SanDisk, Partiton 1" (if you are using SanDisk drive, if not it will be diferent but easily to discover). Click enter in your keyboard to boot "Install macOS Sierra". You will se the verbose log in order to fix any boot issue (you shouldn't need to if you follow this guide). Open Disk Utility and format your 32GB drive to HFS+J, GUID partition and give it a name, for example, SierraHD. Close Disk Utility and Select Install macOS Sierra and install it to your SierraHD drive. Wait until it reboots after creating the Recovery partition. You will need to boot again into Clover and boot this time from your new boot entry in your SierraHD drive to finish installation. INSTALLING CLOVER TO SIERRAHD USB… After install macOS Sierra you might want to install Clover to your SierraHD drive so you don’t need both usb drives to be plugged in order to boot. Follow same steps than before in INSTALLING CLOVER IN USB INSTALLER… Ok, now you’re able to boot into your macOS Sierra but you don’t have CPU PM, IGPU PM, backlight control, battery level… Some of them will be fixed installing kexts, other with DSDT patches or renames, some with Clover… ACPI FILES - DSDT & SSDT ACPI Tables Extraction using Clover Press F4 in Clover boot menu and OEM ACPI tables will be placed in EFI/CLOVER/ACPI/origin. Copy only those files named DSDT.aml and SSDT-X.aml (where X is any number) to your desktop in a new folder called ACPI that we will use to disassemble with iASL. Disassembling ACPI files Download iASL to your Downloads directory, type this in Terminal: cd ~/Downloads git clone https://github.com/RehabMan/Intel-iasl.git iasl.git cd iasl.git make sudo make install Install MaciASL.app to your Applications directory and run this command in Terminal to update iASL: sudo cp /usr/bin/iasl /Applications/MaciASL.app/Contents/MacOS/iasl61 Now we are going to disassemble the files. Type in Terminal: cd Desktop cd ACPI iasl -da -dl *.aml You can also try to disassemble them using External declarations in a text file called refs.txt. This may help to fix some unresolved externals (symbols not defined in any file). Copy the following text and create a refs.txt into ACPI folder in your Desktop: External(MDBG, MethodObj, 1) External(_GPE.MMTB, MethodObj, 0) External(_SB_.PCI0.LPCB.H_EC.ECWT, MethodObj, 2) External(_SB_.PCI0.LPCB.H_EC.ECRD, MethodObj, 1) External(_SB_.PCI0.PEG0.PEGP.SGPO, MethodObj, 2) External(_SB.PCI0.GFX0.DD02._BCM, MethodObj, 1) External(_SB.PCI0.SAT0.SDSM, MethodObj, 4) External(_SB.PCI0.SAT1.SDSM, MethodObj, 4) External(_GPE.VHOV, MethodObj, 3) Type in Terminal: iasl -da -dl -fe refs.txt *.aml Using refs.txt or not, this will create .dsl files that we will use to patch. Open them using MaciASL and click “Compile” to check for errors. Main mission here is to have them compile without errors (warnings and optimizations are ok). We only need DSDT and all non dynamic SSDT files. Clover shows dynamic SSDT files adding "x" (SSDT-4x.aml for example). Use dynamic files only to disassemble. NOTE: never open .aml files with MaciASL and compile, if you ever get lost among DSDT and SSDT files, extract and disassemble them again. POST-INSTALLATION… Ok, we can boot our Sierra installation, we have our ACPI files disassembled and with no errors, not patched yet, so it’s time to start fixing things. First thing to fix must be CPU Power Management. For that we use ssdtPRGen.sh. In my CC2_PACK.zip there is a SSDT for my CPU (i5-4258U). If you have other CPU, you need to generate a proper one (you will need internet access so install now FakePCIID and FakePCIID_Broadcom_WiFi and copy all WiFi related Clover patches from config_OK.plist to your config.plist). Open Terminal and type this command to download ssdtPRGen: curl -o ~/ssdtPRGen.sh https://raw.githubusercontent.com/Piker-Alpha/ssdtPRGen.sh/master/ssdtPRGen.sh Now change the file mode (+x) with: chmod +x ~/ssdtPRGen.sh Default SSDT generation: sudo ~/ssdtPRGen.sh Type n and n one more time. Open Finder and go to /Library/ssdtPRGen/. You will see a SSDT.aml, this is our CPU Power Management SSDT. Copy it to your EFI/CLOVER/ACPI/patched. You will see if PM is well implemented if X86PlatformPligin is loaded under CPU0@0 in IOReg (use IORegistryExplorer to check it. You can also use AppleIntelInfo.kext) Open SSDT-HACK.dsl with MaciASL, save it as SSDT_HACK.aml and put it into EFI/CLOVER/ACPI/patched. You can check SSDT-HACK.dsl to see what I did there (Basically, emulate Windows (_OSI to XOSI), injecting IGPU properties and ig-platform, disabling EHCI, injecting XHC properties, fixing GPRW to avoid instant wake and making EXEL and ESEL do nothing). Second thing should be IGPU Power Management. For that GFX0 needs to be renamed to IGPU in our DSDT and all SSDT files that contain any GFX0 reference. We will rename it in DSDT using Clover patch and manually find/replace in SSDT files (in our case, SSDT-7 has some GFX0 code). Third, we are going to install some kexts to enable Bluetooth, WiFi (if you replaced default wireless card with BCM94352Z), all USB ports and backlight control. Just open Kext Wizard (we will always use it to install kext files), click “Install” and look for: - FakeSMC.kext - FakePCIID.kext - FakePCIID_Broadcom_WiFi.kext - IntelBacklight.kext - XHCInjectorCC2.kext - BrcmPatchRAM2.kext - BrcFirmwareRepo.kext Any time you install any kext file, you must rebuild your cache and fix permissions. You can do it with KextWizard but it is recommended to use Terminal (see TIPS AND EXTRAS) Now that you have WiFi enabled, OS X probably put it at en1 while Bluetooth PAN is at en0. To reorder them just do the following: - Go to System Preferences > Network and delete all interfaces (WiFi and Bluetooth PAN). If you are asked about bluetooth reappearing again, click no. - In Finder go to ~/Library/Preferences/SystemConfiguration and delete NetworkInterfaces.plist. - Reboot, go to System Preferences > Network and add your WiFi interface again. This will reorder your interfaces, leaving WiFi as en0 and letting you to access Apple services as Mac App Store. You still needing to create a good SMBIOS profile, with a serial, etc. in order to activate everything: FaceTime, iMessage, Mac App Store… You can follow these guides: How to enable iMessage Clover: iMessage/Facetime Fix for Yosemite With all this you will have everything working except for battery status and audio/sound. Now it's a good time to install Wacom drivers. Battery status needs ACPIBatteryManager.kext to be installed and a patched DSDT. I’ve created a patch that you can use with MaciASL and your DSDT (you extracted and disassembled before, remember?), just click “Patch” and look for Battery CC2 Patch.txt, apply and save. NOTE: Recent tests with RehabMan probes my patch matches Dell XPS 18, so that will work too. Use any of them. IMPORTANT: Until now we were booting with ACPI/SSDT/DropOEM=false because we weren't using patched OEM files. Now we are going to use a DSDT file, so we must also provide all patched SSDT files, set DropOEM=true and set SorterOrder (same order than OEM files, making SSDT.aml the first and SSDT-HACK.aml the last, so it will be: SSDT.aml, SSDT-0.aml, SSDT-1.aml, SSDT-2.aml, SSDT-3.aml, SSDT-7.aml, SSDT-HACK.aml). You can do this with PlistEdit Pro or Xcode by yourself (check Clover Wiki for how-to). Anyway, I've prepared config_OK.plist with all these changes and more patches. Paste it in EFI/CLOVER/ and rename it to config.plist to continue with post-installation. I would like to avoid adding patched ACPI files transforming my DSDT patch to the new hotpach method (thanks Rehabman!), adding code to SSDT-HACK and adding DSDT/patches to Clover if necessary but is waaaay out of my league. Any help achieving this will be appreciated. NOTE: DSDT only needs Battery CC2 Patch for now. SSDT files only need names to be balanced, so any rename we are doing with Clover in ACPI/DSDT/Patches need to be do it as well in all SSDT (GFX0 to IGPU; B0D3 to HDAU…) If you did it all well, you should have battery status working. Audio/Sound can be achieved installing VoodooHDA. You will be able to use the internal microphone and speakers, so Siri will work. Airplay audio works too. HDMI needs work. A better choice would be to patch our codec and use AppleHDA, HDMI audio seem to work better this way and might help to fix sleep/wake. I’ve attached a dump from my Realtek ALC286 and my Intel Haswell HDMI if somebody want to help with this matter. CLONING TO INTERNAL DRIVE Now that you have an almost fully working hackintosh, you probably want to clone it to your internal SSD. For that, just follow these steps: - Boot into Windows, and shrink your C: partition using Disk Management. - Format new volume to FAT32 and give it a name (you can use MacDrive to format to HFS+J) - Boot using your USB installer, open Disk Utility and format your new internal partition to HFS+J (if you didn’t do it before using MacDrive). If you are prompted with an error, try it again. If error persists, try next step. - Clone your current installation selecting as source your SierraHD drive and destination your new internal partition. After clone, you still needing to install Clover in your internal EFI partition, so boot again your Sierra installation using your USB and repeat steps in INSTALLING CLOVER IN USB INSTALLER… You also need to place proper config.plist and your ACPI patched files, SSDT.aml and SSDT-HACK.aml in EFI/CLOVER/ACPI/patched. Note that your internal EFI partition could have no name, mine in fact shows as NO NAME in Finder In order to boot your internal Clover installation, you might like to create an entry in your Windows Boot Manager. I use EasyUEFI for that. Just click on the Create a new entry icon, select Linux or other OS, and select the path to EFI/CLOVER/CLOVERX64.EFI. Give entry a name, for example macOS Sierra NOTES: I still having some doubts about this guide. For example: - Our graphics device 8086,0A2E is natively recognized but doesn’t show a name in DPCIManager, I don’t know if can be an issue. - PCI Realtek Card Reader 10EC,5229 has no support. - USB may need work to make wake from Power Button work properly. I’ve created an injector and disable EHC with SSDT-HACK.aml and it’s under 15 port limit. I did the same with a EHC injector and FakePCIID_XHCIMux.kext or USBInjectAll.kext and a SSDT-UIAC.aml. Same result, ports work, wake with Power Button doesn’t, some of them are lost when reboot after try to wake up from sleep (using Power Button) - There are some errors with methods in EC0 that probably need work (GBTT, SMB0._STA) - Good news!! Cintiq Mode works Just plug your cable to your PC or Mac, put your Companion to sleep and it should wake as a plain Cintiq and recognized by your PC or Mac. When you unplug your video cable, you Companion come back with everything working. Enjoy - I did another test and wake quite good but with black screen: go to sleep (no cable video plugged), plug video cable, this will make screen wake but remain black, unplug video cable, use screen sharing to access and change resolution or detect displays in SysPref to push the signal to your internal display. TIPS AND EXTRAS - If you want to install any software, you must enable the lost option inside Security and Privacy. Type this in Terminal: sudo spctl —master-disable - If you want to enable HiDPi resolutions, just copy DisplayVendorID-5c23 folder into ~/System/Library/Displays/Contents/Resources/Overrides and install RDM. - If you need to rebuild caches, run this in Terminal: sudo rm -r /System/Library/Caches/com.apple.kext.caches sudo touch /System/Library/Extensions && sudo kextcache -u / - Sometimes boot into safe mode is needed. Just add -x to boot flags in Clover or push spacebar in Clover boot menu (this second option is not working for me right now, I don’t know why). - To enable playing a power chime sound effect when battery charged is plugged, type this in Terminal: defaults write com.apple.PowerChime ChimeOnAllHardware -bool true; open /System/Library/CoreServices/PowerChime.app & - If you want to try the new TouchBar present in new MacBook Pro, you can give it a try! Go here and follow instructions CONCLUSIONS AND THOUGHTS The Cintiq Companion maybe is not a famous tablet because its mainly client target are professional artists than doesn’t have too much time to play with this hackintosh stuff, but it works very well in my opinion, better than Surface devices. Geekbench results is same than MacBook Pro with same CPU and LuxMark gives a result of more than 1600 for what I checked. The only thing that it would need to be perfect, in my opinion, is to sleep and wake properly. We can do that just plugin the video cable and entering Cintiq Mode, unplug and wake but it would be nice to wake it with the Power Button. For those who could help, here you have some clues you may find helpful to solve it. Sleep works, display goes off, fans go off and led starts blinking. But when wake (only with power button) display goes back but remains black for seconds and suddenly go off, fans keep running, led keep on without blinking, but can’t access using VNC or screen sharing. If you enable the power chime sound effect, you will hear it if you unplug and plug your battery charger. The only way to come back is to force a restart by holding power button and next time you boot some devices are missing (WiFi and some USB). Restarting one more time makes all devices work again. Since I have no idea of binary patching, programming or ACPI concepts, it was very hard for me to get all this together. I’m probably doing something wrong or there’s a better way to make things work, so if you have any idea or suggestion, don’t hesitate to comment or ask. I'm doing this for two reasons, to share what I learned and to keep all the information together in one post. And this is everything, folks! I hope this help you to install macOS Sierra in your Companion 2. Now that new model is out (but far away from my budget) you can find some affordable second hand units. DOWNLOAD MY CC2_PACK It contains: ACPI folder, before and after patches (for those who want to check). Battery CC2 Patch. Kexts folder. Official BIOS folder, in case you didn’t update your Companion 2 or disabled CSM support and can’t see BIOS menu. SSDT Files folder, containing SSDT-HACK.dsl and SSDT.aml for i5-4258U PM. APPS folder: Clover Configurator 2, DPCIManager, PlistEdit Pro, Kext Wizard, MaciASL, IORegistryExplorer. EXTRAS folder: Brightness app (slider control in menu bar), Intel Power Gadget, iStat Pro widget, AppleIntelInfo.kext (for checking CPU PM). HiDPi: DisplayVendorID-5c23 folder and RDM-2.2.pkg codec_dump_ALC286.txt and codec_dump_HDMI.text for someone to may help patching AppleHDA. I want to give a HUGE thanks to all the people that are involved in making this possible, from developers to testers (Piker, Rehabman, the-darkvoid, Slice, Allan... I don't know, I'm still learning who you are, people, you are a lot so don't be offended if I didn't mention you, please ). And sorry if there's some grammar mistakes or something, it's my first guide in english. 7 Link to comment https://www.insanelymac.com/forum/topic/317837-guide-macos-sierra-10121-windows-10-dual-boot-cintiq-companion-2/ Share on other sites More sharing options...
axel9546 Posted September 27, 2017 Share Posted September 27, 2017 thanks! Link to comment https://www.insanelymac.com/forum/topic/317837-guide-macos-sierra-10121-windows-10-dual-boot-cintiq-companion-2/#findComment-2501627 Share on other sites More sharing options...
kantin Posted December 15, 2017 Share Posted December 15, 2017 Amazing what you did mate, thanks a lot, I read your topic with a lot of attention, as well as the other one on the Cintiq, where your name occured many times ! I'm considering buying next week a second hand cintiq companion 2 with i7, 512Go SSD, 16Go RAM and intel Iris 6100. The thing is that there is a broadwell processor inside, from what i understood, it gets a bit tricky to deal with it. Anyway i will give a try. To make illustration and work for 2D animation, I prefer working with OSX. By the way, do you know if there is a chance that I can run El capitan or High Sierra with it instead of Yosemite ? Thanks again for the great work you manage to do ! Cheers. Link to comment https://www.insanelymac.com/forum/topic/317837-guide-macos-sierra-10121-windows-10-dual-boot-cintiq-companion-2/#findComment-2551265 Share on other sites More sharing options...
Recommended Posts