Fixes
- Fix possible hang when trying to send a brightness command to HDR monitors
- Fix possible crash when updating to macOS Sequoia
- Document
nits
as possible event in thelunar listen
command
nits
as possible event in the lunar listen
commandlunar listen
CLI commandLunar's Shortcuts actions don't seem to appear on macOS 15.1 for some people. There was no change in Lunar's Shortcuts code that caused this, it's a problem that appeared with a macOS update.
I'm still looking for ways to debug this.
nits
reading in the brightness OSD for the MacBook screenNot
conditions in Shortcuts not working correctlylunar displays
CLI faster in specific scenarios-q/--quiet
to lunar displays
to quickly check if specific displays are connected or notignoreDisplaysWithMissingMetadata
setting:defaults write fyi.lunar.Lunar ignoreDisplaysWithMissingMetadata false
Only to be used in cases where:
macOS Sequoia beta 3
lunar displays
CLI39
and 78
)255
for Cinema and Thunderbolt displaysSentryCrashExceptionApplication
by mistake in the CLI outputsyncModeBrightnessKeyPressedExpireSeconds
Showing OSD on target monitors in Sync Mode requires only taking into account the changes that happen within a waiting period after the brightness key press.
That period was previously 0.5 seconds, which was now increased to 1 second and made configurable via the syncModeBrightnessKeyPressedExpireSeconds
hidden setting. Some systems take longer to propagate the brightness change events and this setting should help with that.
IODisplayLocation
optional to avoid DDC not working with some displayslunar displays LG main true
allowAdjustmentsWhileLocked
for who may need itlunar
CLI help textCoreLocation
is timing outlunar toggle-connection
returns immediately after disconnectscreencapture
events when using overlay dimmingnits
output to the lunar listen
CLI commandA rogue application could have exploited the restart logic to gain Accessibility Permissions.
This is a new approach for unlocking the 1600nits of brightness in Apple's XDR displays, developed in collaboration with @waydabber from BetterDisplay.
It has the following key differences from the previous XDR Brightness method:
Downsides:
The system will still adapt the maximum nits of brightness based on the ambient light, so you might get a max of 800 nits in a dark room and 1600 nits in sunlight.
Disabling the system adaptive brightness will turn off this behaviour.
The Change Screen Preset Shortcut now allows you to unlock various functions that are locked by macOS when using reference presets:
The following video shows the difference between simply having Dark Mode on with a low brightness, and having Night Mode on top of that.
If you pay attention to the hand that is scrolling, you'll notice that the flashes of light from the white regions have less effect with Night Mode enabled. In the same way, your eyes will see less of a difference in perceived brightness between the dark background and the bright regions that may appear unexpectedly while scrolling on a web page.
The technique is quite similar to what f.lux does, but with the added benefit of enhancing contrast for readability.
How to activate Night Mode:
lunar night-mode toggle
http
on non-local custom domains/IPs of light sensorsavailable
state is kept up to date
whites
and blacks
sliders to avoid full black/white screensexec
to restart the app invalidates the XPC connections that Shortcuts opens, who knew..Sample Shortcut here: Gamma Preset
Enter
in the text fieldlunar lux --listen
command for automations based on readings from the internal ambient light sensorlunar listen
to react to display connection changesautoRestartOnFailedDDC
and make it opt-in by default
isLG
to avoid not showing LG specific inputsrestartOnCrash
signal handlerlunar listen
CLI command--source-address
to lunar ddc
command for monitors that allow some DDC commands only on the service port (e.g. most newer LG models)The new inputs can also be accessed from macOS Shortcuts or from the CLI using commands like:
lunar displays lg input lgHdmi1
# Newly added inputs:
# lgHdmi1 lgHdmi2 lgHdmi3 lgHdmi4
# lgUsbC1 lgUsbC2 lgUsbC3 lgUsbC4
# lgDisplayPort1 lgDisplayPort2 lgDisplayPort3 lgDisplayPort4
Some LG models respond to the 3
and 4
inputs while others use the 1
and 2
inputs. For example 32UD99 uses USB-C 3
and DisplayPort 3
while 32QN650 uses USB-C 1
and DisplayPort 1
.
500
for Dell Alienware monitorsdisableExternalSensorWhenNoExternalMonitor
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 hangsWatchdog
: 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.local
sensorPort
set by default to 80
sensorPathPrefix
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
settingnil
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.local
MPDisplayMgr
can't lock access to displayslunar lux
CLI commandShift
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 Preferences
esc
to cancel Auto BlackOutEDID
100%
"Control all monitors"
for Function HotkeysCommand
external
display filter for CLIlunar preset "Night Owl"
Options
menu500
nits limit of the new 2021 MacBook Pro and Pro Display XDR
Option
+Shift
Note: Starting from v5.5.0
Lunar will require macOS 11.0+
0.1%
on average when no brightness change occurs0 seconds
2 seconds
lunar 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-cli
Note: 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 1
0x1F
, 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 ddc
Ctrl
-Command
-6
Ctrl
-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 MPDisplay
CGGetDisplayTransferByTable
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 hdmi
lunar displays dell34 contrast
Thread.private
not existing anymoreCFBundleName
TSL2591
library to a known working versionlunar://
URLs for easy access to specific parts of the UI
lunar://settings
lunar://advanced
lunar://hotkeys
lunar://displays
lunar://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