Using Xcode Instruments on hackintosh

前端 未结 3 1471
不思量自难忘°
不思量自难忘° 2021-02-01 09:10

Using hackintosh (i7-4790K 4GHz, 16GB DDR3, GF980Ti) for developing on Xcode (both Swift and Objective-C) about an year, never get any errors. But now I need to use Instruments

相关标签:
3条回答
  • 2021-02-01 09:13

    The signing fix in the most-liked answer unfortunately impedes the execution rights of Instruments, so while it's then visible, the time profiler will not work.

    Fortunately the iBooks thread from the other answer is not over yet, and the suggested (and provided) solution is to use a kernel extension that makes Nvidia drivers appear validated.

    https://github.com/mologie/NVWebDriverLibValFix

    This basically solves the problem at its root and is the next best thing to having Nvidia drivers actually signed by Apple.

    With 10.13 / High Sierra the Web-Driver should work without any hack / modification (it should be removed when updating)

    0 讨论(0)
  • 2021-02-01 09:21

    It's a known problem with the recent nVidia macOS Web Drivers. Not just with XCode Instruments, it appears in iBooks, too when you open a book for read. People have reported this issue on the Apple Support Forums using Web Drivers on a genuine Mac - so it doesn't only affect Hackintosh PC's.

    See this thread: https://www.tonymacx86.com/threads/nvidia-web-driver-ibooks-bug.203229/page-8

    For a temporary fix: Enable your Intel HD4600 graphics in your i7-4790K. Make sure it's enabled in UEFI BIOS, and injected with Clover. See post #72 at the link above. Solved my issue with transparent window on my Hackintosh.

    Another solution is to remove the nVidia graphics card and use Intel HD4600 only, but this way you lose the power of the GTX980Ti of course.

    Update: I recommend Nax's solution, it's better in every aspect. However this codesign command doesn't work for transparent iBooks window. If you re-sign iBooks it will crash on launch.

    0 讨论(0)
  • 2021-02-01 09:26

    EDIT: as @Eike said in his answer, Instruments and other apps facing this issue work out of the box from 10.13 onwards. For 10.12, the NVWebDriverLibValFix kext is a better/less intrusive fix and avoid some permissions issues. This answer should now be considered obsolete.


    Instruments is a code-signed application distributed by Apple. Some of these applications are flagged so they refuse to load libraries that are not signed by Apple. The Nvidia Web Driver is not signed by Apple, so it's not loaded, resulting in the behavior you describe.

    The accepted answer tell you to work around the issue by loading another driver, signed by Apple. While this will certainly work, I prefer to do it the other way around : force Instruments to load the nvidia driver.

    You can re-sign the Instruments binary with the following command:

    sudo codesign -f -s - /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/MacOS/Instruments
    

    It will then load the Nvidia driver and run perfectly well.

    0 讨论(0)
提交回复
热议问题