Improvements
- Add
disableExternalSensorWhenNoExternalMonitorhidden setting - Disable the new Disconnect API when DisplayLink is running
Fixes
- Fix the Force Sleep when lid is closed functionality
disableExternalSensorWhenNoExternalMonitor hidden settinglunar listen CLI command for getting realtime brightness/contrast/volume changeshideOSD setting forces Lunar to not show any OSD whatsoeverOverlay Dimming not working anymoreBy combining hardware and software dimming at specific thresholds, Lunar can help people sensitive to PWM flickering.
The below video shows how you can use the Halide iOS app to find the lowest brightness where flickering starts to appear.
For 2021 Apple Silicon MacBooks, adjust the Min Brightness to 38 in Display Settings to get advantage of this.
Lunar will then use Sub-zero Dimming below that value, which keeps the LED voltage steady while blocking light using the LCD.

For external monitors and other screens, play with the Min Brightness setting until you find the threshold under which PWM flicker becomes noticeable.
Then set the minimum brightness to the lowest value that doesn't cause flicker.
sidecar option to lunar toggle-connection CLI commandSub-zero Dimming being overridden by the system adaptive brightnessSub-zero Dimming

This makes Clock Mode override any manual adjustments done by the user.
It also makes it re-apply the brightness of the previous schedule after standby/wake or after a screen reconnection.
This makes Clock Mode respect manual adjustments done by the user.
Brightness will always transition to the next schedule starting from the user adjusted brightness.
Also if the system wakes within 30 minutes of a passed schedule, the brightness of that previous schedule is re-applied

Control+Click on the menubar icon to see the menu
Right Click or Two Finger Trackpad Click also works50% after wakejitterAfterWake setting since it's no longer neededWatchdog: restart Lunar when it hangs

Watchdog: restart Lunar when it crashes

UUID of the connected screen
(Apple Silicon only)
Lunar can now read the real brightness value in nits from Apple displays and sync it more accurately to other monitors.
Most external monitors don't provide a way to read their min and max nits limits, so they start with a default range of 30-350 nits. Those limits can be adjusted from the Lunar interface:

Sync Mode can now be used on all setups, even on those where there's no Apple display to sync from.
An All Displays slider will show up which will control the brightness and contrast of all screens in sync. Brightness keys will also control this special slider by default.
Any manual adjustment done to other monitors will be learnt and used by the All Displays slider.
The adaptive algorithm is now faster and more efficient, with an almost instantly responsive auto-learning curve. This is thanks to using better researched math formulas and new data structures tailored to brightness syncing.
The native brightness OSD will now show up on all monitors instead of only on the source display.
Polling is not used anymore, relying completely on a brightness change event based system, for less battery and CPU usage.
(Apple Silicon only)
Lunar can now read ambient light lux values from sensors of Apple displays like:
DIY ambient light sensors will now connect faster to Lunar, and keep a more stable connection between standby/wake states.
The sensor can also be configured more flexibly using the defaults command on the Mac where Lunar is running. This is especially helpful for when the lunarsensor server.
There are three settings that affect where Lunar looks for the sensor:
sensorHostname set by default to lunarsensor.localsensorPort set by default to 80sensorPathPrefix set by default to /For example, if you would like to have Lunar listen for sensor events at homeassistant.local:8123/lunar/events you would run the following commands:
defaults write fyi.lunar.Lunar sensorHostname homeassistant.local
defaults write fyi.lunar.Lunar sensorPort 8123
defaults write fyi.lunar.Lunar sensorPathPrefix /lunar
Sensor Mode now starts with a better researched and tested curve that converts the ambient light to real nits for each display.
On Apple Silicon, the estimated nits limits from Sync Mode will also be taken into account to compute an accurate brightness value for each display.
On Apple Silicon devices running macOS Ventura, BlackOut now uses a new API that can disconnect the screen completely.
The power button will show the action that it will do based on the modifier keys that are pressed:
When a screen is disconnected, it will appear at the bottom of the Lunar menu, with an option to enable the Auto Disconnect feature.
This will ensure the display stays disconnected between standby/wake and lid open/close cycles.
For the MacBook built-in screen, this also enables the previous Auto BlackOut feature which disconnects the MacBook screen when a monitor is connected, and turns it back on when all monitors are disconnected.

If you ever wanted to use a keyboard shortcut for connecting a Sidecar device, Lunar now supports that.
There's a new action in Apple Shortcuts that can connect a specific Sidecar iPad, and the Connection actions have been updated to support the most recently used Sidecar:

BlackOut can also natively disconnect/reconnect Sidecar devices on Apple Silicon.
Support for brightness/volume control using DDC has been stabilised for the integrated HDMI port of the M1 and M2 chips.
The previous logic was also improved to avoid possible flickering and speed up DDC port matching.
Some settings have been regrouped, and some are now hidden if they aren't relevant to the hardware in use.
It's also possible now to use the Reset button from the Options menu to:
- Reset All Settings by Option-clicking
- Reset display-specific Settings by Command-clicking
Lunar is now using the native unified logging architecture on macOS.
Logs can now be viewed in Console.app or in the terminal with the following command:
log stream --level debug --source --style compact --predicate 'subsystem == "fyi.lunar.Lunar" AND category == "default"'
There is no log file on disk anymore, logs can be collected on demand when they're needed to avoid excessive disk writes.
Both Thunderbolt/DP and HDMI connections on M2 Pro/Max should support DDC in this version.
You'll notice two new actions in macOS Shortcuts: Disconnect screen and Reconnect screen.

This new method can really disconnect and power off the screen just like closing the MacBook lid or disconnecting a cable would do, freeing up the GPU resources.
You retain the ability to use the MacBook keyboard/trackpad/webcam as usual, and disconnected external monitors usually keep the ability to charge the laptop.
These are the effort of reverse engineering the MacBook's clamshell mode which you can read about in this article
I'm planning to integrate them into BlackOut eventually but there's a lot more testing I have to do first.

adaptiveSubzero display property that allows disabling using Sub-zero Dimming range automatically in adaptive algorithmsadaptiveSubzero setting
nil EDID UUID in DCP service (fixes "Non-responsive DDC" on some setups)Full support for using Sub-zero dimming automatically inside adaptive modes like Sync/Sensor/Location.
The Auto-learning algorithm can now learn Sub-zero brightness values and apply them in the future based on the current ambient light or sun position.
for Sub-zero dimming, XDR Brightness and Contrast adjustments


defaults write fyi.lunar.Lunar sensorHostname mysensor.localMPDisplayMgr can't lock access to displays
lunar lux CLI command
Shift while pressing volume keys to invert behaviourOption+Shift now uses 1% step for Subzero and XDRT811xIO controllerlunar facelight CLI commandINFO loggingdelayDDCAfterWake settingHUD window level for the rounded corners mask windowEsc keydisplays CLI commandSome clarifications are needed after the last change:
Improve readability in direct sunlight when using XDR Brightness.
The contrast slider allows adjusting the pixel value formula for the brightest/darkest areas, to get even more contrast out of the miniLED display.
Developed in collaboration with the creator of BetterDummy, using a more native approach to provide:
Allow zero brightness is offI'm removing the 1-year of updates restriction and will give everyone unlimited free updates for Lunar 5.
Lunar will move to a major-version upgrade licensing model, where you will only have to pay for a new license if a new major version is launched (e.g. Lunar 6).
If that ever happens, you will also be able to use your previous license as a coupon to get a substantial discount if you previously bought Lunar.
System Preferencesesc to cancel Auto BlackOutEDID100%"Control all monitors" for Function HotkeysCommandexternal display filter for CLIlunar preset "Night Owl"Options menu500 nits limit of the new 2021 MacBook Pro and Pro Display XDR
Option+ShiftNote: Starting from v5.5.0 Lunar will require macOS 11.0+
0.1% on average when no brightness change occurs0 seconds2 secondslunar blackout command to CLIlunar gamma --restore-color-sync command for resetting to system default color settingsddcutil-server for Raspberry Pi OS 64-bitThe lunar command can now control the running Lunar app directly instead of spawning a new instance.
If the Lunar app is not running, the CLI will automatically use the old method of running the command directly.
--remote forces the lunar command to never spawn a new instance and fail if there's no Lunar app already running--host configures the hostname where to send the command
--key configures the API key for authenticating the lunar command against the Lunar app server
--new-instance forces the lunar command to always run the command locally and spawn a new instance even if there's a Lunar app already runningAdded BlackOut without mirroring on holding Shift.
.appOnly so that the system doesn't remember the BlackOut mirroring state after Lunar is quit/Applications/Lunar.app/Contents/MacOS/Lunar install-cliNote: if you have a monitor connected to the HDMI port of the MacBook, disable DDC manually
checkSlowWrite for DDC which could wrongly mark smooth transitions as unsupporteddefaults write fyi.lunar.Lunar jitterAfterWake 10x1F, x1F or 1Fh it is parsed as hex--hex will always parse values as hexIt seems that some MacBooks don't support brightness change event notifications which causes the manual adjustments to not be reflected in the system brightnesss curve. In this update we try to detect if a MacBook is missing that support and instead of controlling its brightness, we forward the brightness key events to the system and let it do the brightness changing. Using the sliders for changing the built-in brightness will still have the reverting problem though, because we can't forward those events to the system.
lunar ddcCtrl-Command-6Ctrl-Command-Option-6 will allow you to turn off the monitor completely (just like pressing its physical power button) if the monitor supports that functionstationary to fix it0.08 on brightness 0 to retain visibility256 values might fix thisrecursive locking crash because of using NSScreen inside MPDisplayCGGetDisplayTransferByTable is buggy on Intel and crashes the app on some systemsCtrl+Cmd+6 to activate it and turn off the display where the cursor isF14/F15 keys and the Brightness keys can send special key codeslunar displays ultrafine input hdmilunar displays dell34 contrastThread.private not existing anymoreCFBundleNameTSL2591 library to a known working versionlunar:// URLs for easy access to specific parts of the UI
lunar://settingslunar://advancedlunar://hotkeyslunar://displayslunar://displays/:number (e.g. lunar://displays/3 for third display)IsLidClosed flag has been setdefault.profraw on every run of the CLIx button0.00 on some systemsCGSServiceForDisplayNumber APIHead over to the front page for more details.
Non-responsive DDC messageNon-responsive DDC messageStart at Login functionality