I've been digging around in the kernel code repo for days, but I just can't find this anywhere.
I want to disable/enable/detect the state of the ambient-light sensor based screen dimming that many of the higher end Mac laptops have. This is the dimming that is activated by the "Automatically Adjust Brightness" checkbox in the Display control panel.
Note that I'm NOT talking about the halfdim setting that causes the screen to dramatically dim right before it sleeps. I'm talking about the setting that dims the screen in dark rooms and brightens it in light rooms, which is different.
If anybody can even point me in the right direction I'd be greatfull. I assume it's handled somewhere in IOKit, probably either IOGraphics where screen brightness is handled, or somewhere in IOKit/pwr_mgt, but I just can't find it.
Thanks
Edit: I know you can kind of do this this by addressing System Preferences with AppleScript. I'm looking for the real way, if it exists.
Posting this as it might help someone who like me had already disabled the ambient light sensing but still found their computer was dimming when waking from sleep. Turns out I also needed uncheck the box to "Slightly dim the display while on battery power"
System Preferences > Battery > Slightly dim the display while on battery power
See the image below:
This isn't an API, per sé.. but there are many ways to control launchd
via an API.
sudo launchctl stop com.apple.AmbientDisplayAgent
sudo launchctl remove com.apple.AmbientDisplayAgent
Ta Da!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With