Find file
b718bf2 Nov 28, 2016
179 lines (139 sloc) 12.8 KB

General FAQ:

  • Do I need Shiki?
    If you have Intel Ivy CPU or newer, iTunes DRM playback does not work for you, and your GPU works with HDCP, you may try it.
    Sometimes it might help even improperly configured or problematic Sandy CPUs.

  • How to disable Shiki?
    Add -shikioff argument to boot-args. It will also not load when -x or -s are set.

  • How to turn debug printing on in DEBUG builds of Shiki?
    Add -shikidbg argument to boot-args.

  • What OS X/macOS version does this work with?
    It is meant to work with 10.9 and newer. However, it is recommended to use 10.10 or newer.
    Note that Shiki needs a relatively recent version of iTunes, e.g. 12.3.3 or newer.
    If you have issues booting Shiki on 10.10 and newer you could try adding -shikislow or -shikifast argument to boot-args.

  • How do I load Shiki?
    You are supposed to load it early when your system boots. It is recommended to use bootloader kext injection.
    kextload is known not to work and /S/L/E or /L/E might fail.

  • Is it dangerous to use?
    Any instrument can be dangerous in improper hands. Shiki is stable at this point but it is still considered to be somewhat experimental.

  • Does Shiki modify files on my disk?
    Recent versions of Shiki affect nothing on your disk, however, certain I/O commands will report files as modified when Shiki is loaded due to the specifics of API hooks.

  • Do I need to alter System Integrity Protection (rootless) settings?
    No, they are irrelevant.

  • How do I check if my system is configured correctly before trying the kext?
    There is a ticklist to check against for all sorts of configurations. See configuration checklist section.

  • Why am I supposed to properly configure VDA before using Shiki?
    You may theoretically not do this but the consequences will be unspecified.

  • Which GPUs this solution is known to glitch with?

    • Azul GPUs (e.g. HD 4400, HD 4600) when used with a connector-full platform-id without a discrete GPU fail to play HD videos due to not working HDCP playback. The issue is unrelated to Shiki, and happens regardless of iTunes and QuickTime.
  • Is my computer banned?
    If you are able to view the trailers but bought movies do not play even after computer authorisation your NIC MAC might be banned. Sometimes it is possible to log out and reauthorise your computer after a short while. Otherwise you must change your LAN MAC address. Check System configuration FAQ for libHookMac usage details. If it helps you consider flashing your ethernet card with a different MAC (or using other ways to change it).

  • Is Shiki opensource?
    Not completely at this moment. Certain parts like tools or kernel patcher are.

  • How can I download a DRM protected trailer for a local test?
    Enable coremedia tracing: defaults write cfbyteflume_trace 1
    Afterwards you will see a trailer URL in if you filter the output by 'iTunes' keyword.
    ... <<< CFByteFlume >>> FigCFHTTPCheckCacheValidator: Comparing dictUrl = http://.....m4v, url = http://......m4v
    Paste it into your browser, and you will be able to download the trailer file (example).

  • DRM playback starts to produce garbled frames after a while, why does it happen?
    From the tests it happens to be a bug in Apple DRM decoder, and the issue supposedly exists on Apple hardware as well.
    Normally this does not happen anywhere but 1080p movies with a large bitrate. Try rebooting your PC, resetting DRM configuration as prescribed in the FAQ, checking your CPU power management.

  • Can I play HTML5 Netflix videos with Shiki?
    No, you cannot since Netflix limited their 1080p content for very few mac models even excluding most Mac Pros.

  • Can I use Shiki to apply other changes?
    It may be possible and can be discussed.

System configuration FAQ:

  • How can I check that hardware video decoding works?
    Run an existing build of VDADecoderChecker (or compile yourself) and check its output:
    GVA info: Successfully connected to the Intel plugin, offline Gen75
    Hardware acceleration is fully supported

  • How can I check that IMEI/IGPU device is present in IOReg?
    Run ioreg | grep IMEI in Terminal and make sure something alike is printed:
    | | +-o IMEI@16 <class IOPCIDevice, id 0x100000209, registered, matched, active, busy 0 (6 ms), retain 11>

  • How can I check my platform-id?
    Run ioreg -l | grep platform-id in Terminal and make sure something alike is printed:
    | | | | "AAPL,ig-platform-id" = <04001204>
    04 00 12 04 is the current platform-id.

  • How can I enable AppleGVA debugging?
    defaults write gvaDebug -boolean yes
    defaults write enableSyslog -boolean yes

  • How can I enable FP debugging?
    defaults write fp_trace 2

  • How can I set hardware video decoder preferences (might be needed for some ATI and old NVIDIA cards)?
    Run one of the following lines:
    defaults write forceNV -boolean yes — forces NVIDIA decoder
    defaults write forceATI -boolean yes — forces ATI decoder
    defaults write forceIntel -boolean yes — forces Intel decoder
    defaults write forceSWDecoder -boolean yes — forces software decoder
    defaults write hardwareVideoDecoder disable — disables hardware decoder
    defaults write hardwareVideoDecoder force — forces hardware decoder
    Please note that this preference is not needed in most cases, and its improper usage will break CL and VDA decoding.

  • How do I reset my DRM configuration (may be needed to fix the crashes)?
    Run the following commands in terminal:
    defaults delete
    defaults delete
    sudo rm -rf /Users/Shared/SC\ Info
    sudo defaults delete
    sudo defaults delete
    Afterwards make sure AppleGVA sigature is valid (the command should output nothing):
    codesign --no-strict --verify /System/Library/PrivateFrameworks/AppleGVA.framework
    If it is not, restore AppleGVA.framework from a newly installed system with the correct permissions.
    Reboot twice.

  • How can I change my NIC MAC address via libHookMac.dylib?

    • Disable SIP (System Integrity Protection);
    • Run in Terminal (specifying your own random MAC):
      DYLD_INSERT_LIBRARIES=/full/path/to/libHookMac.dylib MAC=00:11:22:33:44:55 /Applications/;
    • You will see a corresponding print if the address was changed.
  • How can I check that my dyld shared cache is ok?
    Run the following commands and compare their output:
    DYLD_PREBIND_DEBUG=1 "/Applications/QuickTime Player"
    If their output differs quite a bit (the one without DYLD_SHARED_CACHE_DONT_VALIDATE=1 prints a lot of paths), then your shared cache is corrupted.
    To fix it up disable Shiki, reboot, and run sudo update_dyld_shared_cache -force command in Terminal.

  • Which mac models support hardware acceleration?
    To check that read /System/Library/PrivateFrameworks/AppleGVA.framework/Info.plist, if your mac model or board id is present there, then this model does support hardware video decoding acceleration. You are to select a closest configuration to the one you own. For example, iMac13,1 uses an IGPU/discrete GPU combo whereas iMac13,3 only has an IGPU. If you use a model meant to work with a discrete GPU without a graphical card installed VDA will not work and you are likely to get an error from VDADecoderChecker. To correct this either choose an accurate model or edit the forceOfflineRenderer property in the Info.plist, it will need to be set to NO.

  • How can I inject IOVARendererID/IOVARendererSubID in certain NVIDIA GPUs?
    NVIDIA drivers do not properly add these values necessary for VDA decoding for Maxwell GPUs in their Web drivers. You could add them with a plist-only kext. The correct values for VP4 GPUs are:
    IOVARendererID → <08 00 04 01>
    IOVARendererSubID → <03 00 00 00>
    VP3 ones want a different IOVARendererID → <04 00 04 01>.
    Thanks to igork for noticing it.

  • I cannot get VDA decoder work with my AMD GPU, what could I try?
    Prioritising Intel and using connector-full platform-id (e.g. <03 00 66 01> for HD 4000, <03 00 22 0D> for HD 4600) seems to help with certain AMD GPUs (e.g. HD 7750).

  • I get hardware accelerated decoding working on my AMD with forced ATI decoder but DRM decoding still does not work, what is up?
    Certain AMD GPUs, e. g. HD 7750, do support hardware accelerated video decoding but fail to decode DRM video. The cause is unknown. Use Shiki normally.

  • What is BoardHash tool for?
    BoardHash tool can generate mac board id hashes similar to the ones present in CoreAUC.framework (_PsZXJ2EK7ifxrtgc function).
    For example, Mac-F221BEC8 (MacPro5,1) stands for 5f571162ce99350785007863627a096bfa11c81b.
    It seems to have hashes of the macs with special HDCP permissions. E. g. it is known that MacPro5,1 model makes HD movies work on HD 4000 regardless of decoder state.

  • How can I disable PAVP/HDCP on Intel Azul (HD 4400, HD 4600) GPUs?
    You need to isolate IntelAccelerator::PAVPCommandCallback in AppleIntelHD5000Graphics, because a virtual call to SafeForceWake in this function causes a deadlock. On 10.11.6 and 10.12 you could replace <48 89 8b a8 00 00 00> by <90 90 90 90 90 90 90> in AppleIntelFramebufferAzul. Even though this does fix certain freezes you will still have other issues. For example, hardware video decoding may not work after wakeup. More details can be found on Applelife.

Configuration checklist

  • Non-Shiki based solution if you have:

    • AMD with working DRM VDA (e.g. HD 7870, HD 6670, HD 7970);
    • NVIDIA with working DRM VDA (supposedly 2xx series and some others).

    This solution is not well explored but it is known to work for some people. Shiki.kext installation is not needed.

    • IGPU device is enabled, set to preferred in BIOS, and present with a connector-full AAPL,ig-platform-id prop (e.g. <03 00 66 01>) or removed and disabled completely without a trace in IOReg (e. g. via D2EN register);
    • Hardware video decoder preferences are forced to ATI or NVIDIA depending on the GPU installed;
    • VDADecoderChecker confirms VDA decoder working with VP3 (NVIDIA) or AMD decoders;
    • Mac model set to the one supporting hardware acceleration.
  • Shiki-based solution for non-freezing Intel and/or any discrete GPU:

    • IGPU device is enabled, and present with a connector-less AAPL,ig-platform-id prop (e.g. <04 00 12 04>, <07 00 62 01>), use connector-full framebuffers in solo mode;
    • Discrete GPU is properly configured with IOVARendererID present in IOReg;
    • VDADecoderChecker confirms Intel Offline (Online) VDA decoder working;
    • IMEI device is present in IOReg;
    • No override preferences are used;
    • Mac model set to the one supporting hardware acceleration.
  • Shiki-based solution for Intel Azul (HD4000, HD4400) without a discrete GPU:

    • IGPU device is enabled, and present with a connector-full AAPL,ig-platform-id prop (e.g. <03 00 22 0d>, <00 00 16 0a>), it is reported that renaming IGPU to GFX0 or to an arbitrary name reduces freeze chance;
    • GPU driver or framebuffer are patched to disable PAVP/HDCP;
    • Hardware video decoder is disabled by a defaults option (video playback will fail after wakeup otherwise);
    • IMEI device is present in IOReg;
    • Mac model set to the one supporting hardware acceleration.
  • Shiki-based solution for an unsupported CPU (e.g. Haswell Celeron E):
    Hardware video decoding acceleration does not work with these CPUs and to boot you need to fake your CPUID.
    Disable IGPU completely or rename it to some random name (e.g. IGFX) and install Shiki, it should work for you. It is not fully explored what preferences are needed but it is known that disabled hardware acceleration by AppleGVA plist editing/MacPro5,1 model setting helps to view HD movies sometimes.

Thanks to: 07151129, Andrey1970, Сашко666, chrome, family1232009, garcon, iDark Soul, igork, m-dudarev, Mieze, Quadie, savvas, tatur_sn, and certain others.