Skip to content
Dynamically unlock the Night Shift for all Macs
C++ C Objective-C
Branch: master
Clone or download
Latest commit 30c1449 Oct 15, 2017
Type Name Latest commit message Commit time
Failed to load latest commit information.
NightShiftUnlocker.xcodeproj Fix a typo. Oct 15, 2017
NightShiftUnlocker Fix a typo. Oct 15, 2017
LICENSE Initial commit May 20, 2017 Update the README file. Oct 14, 2017



A Lilu plugin that unlocks the Night Shift function for all Macs.
You don't have to manually modify and codesign the CoreBrightness binary any longer.


NightShiftUnlocker requires macOS Sierra 10.12.4 or later and Lilu 1.2.0 or later.


Disable the System Integrity Protection.
Download the latest version of Lilu and NightShiftUnlocker.
Install the kexts to /Library/Extensions/ using your favourite kext installer (e.g. KCPM Utility Pro, Kext Utility, etc.) or command line. Repair the file permissions and rebuild the kernel cache.


Feel free to report any bugs or ask questions.

How to compile

All Lilu related headers and library can be found at the latest DEBUG version of Lilu. I use Xcode 8.3.3 on macOS High Sierra 10.13. If you choose Xcode 9 to compile NSU, please replace memcpy() with lmemcpy().

Background Info

Apple introduced the Night Shift function as of macOS 10.12.4.
Night Shift is provided by a private system framework named CoreBrightness. It uses a global function CBU_IsNightShiftSupported() and an array of supported Mac models to check whether the running machine supports Night Shift.
Instead of modifying the minimum version of supported Mac models, I make this function always return true.

Update Logs

2.2 @ 2017.10.13

  • Support Lilu 1.2.0.
  • Support macOS High Sierra 10.13 (17A405).
  • NightShiftUnlocker will no longer be loaded in Recovery mode.
  • This is an "experimental" release as Apple slightly adds more functionalities to CoreBrightness.framework, a new patch may be required. Please report any issue ASAP.

2.1 @ 2017.06.29

  • Fix an issue that Night Shift panel may not show up in the System Preference >> Display.

2.0 @ 2017.06.28

  • Dynamically generate binary patches. (Thanks to vit9696's new APIs)
  • Supports the latest macOS High Sierra.
  • Supports Clover's kext injection.
Known issue in this version

Night Shift panel may not show up in the System Preference >> Display on some machines. I have already noticed this issue, and I am still working on this.

1.0 @ 2017.05.20

  • Initial release.


NightShiftUnlocker is licensed under BSD 3-Clause.


NightShiftUnlocker is brought to you by FireWolf. Enjoy : )


苹果在 macOS Sierra 10.12.4 中带来了 Night Shift 功能,但是有机型限制。
NightShiftUnlocker 是一个为全系列 Mac 动态解锁此功能的插件。 用户安装后无需手动修改二进制里的最低机型以及重新签名等操作,并且也不会受到系统更新导致覆盖原来文件的限制。


NightShiftUnlocker 需要 macOS 10.12.4 以及以上的系统,并需要 Lilu 1.2.0 版本。


请先关闭 SIP 系统完整性保护功能
LiluNightShiftUnlocker 仓库的发布页面下载最新版本的内核扩展
用命令行或者驱动安装工具(KCPM Utility Pro, Kext Utility 等)将两个内核扩展安装到 /Library/Extensions/. 修复权限,重建缓存,重新启动机器。


请使用 Github Issue 功能来反馈BUG或者提问题。


NightShiftUnlocker 项目所使用的 Lilu 头文件和 API 均可以在 DEBUG 版本的 Lilu 里找到。 我当前的编译环境是 Xcode 8.3.3 + macOS High Sierra 10.13,如果使用 Xcode 9 编译的话,请将 memcpy 换成 lmemcpy。


Night Shift 作为 10.12.4 的新功能由系统私有框架 CoreBrightness.framework 来提供。
苹果使用一个全局函数 CBU_IsNightShiftSupported() 和一个定义好的机型数组来判断当前机型是否支持此功能。
所以我们可以直接让这个函数永远返回 true 来达到让任意 SMBIOS 支持 Night Shift 功能。


2.2 @ 2017.10.13

  • 支持 Lilu 1.2.0 版本。
  • 支持 macOS High Sierra 10.13 (17A405)。
  • 在 Recovery 恢复环境中,Night Shift Unlocker 不会再自动加载了。
  • 本次更新属于实验性更新。苹果在 10.13 正式版里为 CoreBrightness.framework 增加了一些功能,补丁可能需要更新下。请反馈你在使用过程中发现的任何问题。

2.1 @ 2017.06.29

  • 修复 Night Shift 面板在系统偏好设置里不显示的问题

2.0 @ 2017.06.28

  • 动态生成二进制补丁 (感谢 vit9696 开发的新API)
  • 支持最新的 macOS High Sierra
  • 支持 Clover 的驱动注入功能

在某些机器上,Night Shift 面板可能不会在『系统偏好设置 >> 显示』里面显示。 我已经注意到这个问题,正在尝试解决中...

1.0 @ 2017.05.20

  • 初始版本


NightShiftUnlocker 使用 BSD 3-Clause 许可


NightShiftUnlocker 的实现离不开 vit9696Lilu 内核扩展

NightShiftUnlocker 由 FireWolf 为您提供,ENJOY : )

You can’t perform that action at this time.