Skip to main content
Question

SOLVED: Set True Tone, Auto Brightness, and Brightness Level (Display Settings)

  • January 30, 2024
  • 28 replies
  • 308 views

Show first post

28 replies

Forum|alt.badge.img+6
  • Contributor
  • August 2, 2024

unfortunately no.  this mac is running in our jamf sandbox testing server that literally has nothing on it.


Try wiping the test computer and starting over?  I deployed the setting this way to over 300 computers and its working for us.


Forum|alt.badge.img+4
  • Contributor
  • February 24, 2025

Thanks Kacey3 for sharing your script! I had been looking for a solution for years (well... since the creation of True Tone). I have rewritten it incorporating all the suggestions and simplified it to my liking. Based on my testing, no reboot or opening of System Settings is required, thanks to PlistBuddy Add and killall cfprefsd.

 

#!/bin/sh # Written by Kacey Close # Created: January 30, 2024 # Modified: February 24, 2025 # Set your desired settings here trueTone="0" # Possible values : 0 or 1 autoBright="false" # Possible values : true or false brightLevel="" # Between 1 and 600 (values derived from a MacBook Pro 14' M4) # Fetch Current User currentUser=$(stat -f %Su /dev/console) # Fetch GUID of Current User userID=$(dscl . -read /Users/$currentUser/ GeneratedUID | awk -F': ' '{print $2}') # Shortcut the PlistBuddy command for convnience. plistPal="/usr/libexec/PlistBuddy" # Define the Configuration File locations. configRoot="/private/var/root/Library/Preferences/com.apple.CoreBrightness.plist" # Fetch ID of Primary Display displayID=$($plistPal -c "Print :DisplayPreferences:" "$configRoot" | grep "= Dict" | grep -v AutoBrightnessCurve | awk '{print $1}') ### MAIN SCRIPT ### # Set options in the root Plist [[ ! -z "$trueTone" ]] && { $plistPal -c "Add :CBUser-$userID:CBColorAdaptationEnabled bool $trueTone" "$configRoot"; } [[ ! -z "$trueTone" ]] && { $plistPal -c "Set :CBUser-$userID:CBColorAdaptationEnabled $trueTone" "$configRoot"; } [[ ! -z "$autoBright" ]] && { $plistPal -c "Add :DisplayPreferences:$displayID:AutoBrightnessEnable bool $autoBright" "$configRoot"; } [[ ! -z "$autoBright" ]] && { $plistPal -c "Set :DisplayPreferences:$displayID:AutoBrightnessEnable $autoBright" "$configRoot"; } [[ ! -z "$brightLevel" ]] && { $plistPal -c "Add :DisplayPreferences:$displayID:BrightnessLevelNits string $brightLevel" "$configRoot"; } [[ ! -z "$brightLevel" ]] && { $plistPal -c "Set :DisplayPreferences:$displayID:BrightnessLevelNits $brightLevel" "$configRoot"; } killall corebrightnessd killall cfprefsd exit 0

 

 


Forum|alt.badge.img+9
  • Author
  • Contributor
  • March 3, 2025

Thanks Kacey3 for sharing your script! I had been looking for a solution for years (well... since the creation of True Tone). I have rewritten it incorporating all the suggestions and simplified it to my liking. Based on my testing, no reboot or opening of System Settings is required, thanks to PlistBuddy Add and killall cfprefsd.

 

#!/bin/sh # Written by Kacey Close # Created: January 30, 2024 # Modified: February 24, 2025 # Set your desired settings here trueTone="0" # Possible values : 0 or 1 autoBright="false" # Possible values : true or false brightLevel="" # Between 1 and 600 (values derived from a MacBook Pro 14' M4) # Fetch Current User currentUser=$(stat -f %Su /dev/console) # Fetch GUID of Current User userID=$(dscl . -read /Users/$currentUser/ GeneratedUID | awk -F': ' '{print $2}') # Shortcut the PlistBuddy command for convnience. plistPal="/usr/libexec/PlistBuddy" # Define the Configuration File locations. configRoot="/private/var/root/Library/Preferences/com.apple.CoreBrightness.plist" # Fetch ID of Primary Display displayID=$($plistPal -c "Print :DisplayPreferences:" "$configRoot" | grep "= Dict" | grep -v AutoBrightnessCurve | awk '{print $1}') ### MAIN SCRIPT ### # Set options in the root Plist [[ ! -z "$trueTone" ]] && { $plistPal -c "Add :CBUser-$userID:CBColorAdaptationEnabled bool $trueTone" "$configRoot"; } [[ ! -z "$trueTone" ]] && { $plistPal -c "Set :CBUser-$userID:CBColorAdaptationEnabled $trueTone" "$configRoot"; } [[ ! -z "$autoBright" ]] && { $plistPal -c "Add :DisplayPreferences:$displayID:AutoBrightnessEnable bool $autoBright" "$configRoot"; } [[ ! -z "$autoBright" ]] && { $plistPal -c "Set :DisplayPreferences:$displayID:AutoBrightnessEnable $autoBright" "$configRoot"; } [[ ! -z "$brightLevel" ]] && { $plistPal -c "Add :DisplayPreferences:$displayID:BrightnessLevelNits string $brightLevel" "$configRoot"; } [[ ! -z "$brightLevel" ]] && { $plistPal -c "Set :DisplayPreferences:$displayID:BrightnessLevelNits $brightLevel" "$configRoot"; } killall corebrightnessd killall cfprefsd exit 0

 

 


Thanks for keeping this script alive! I had mothballed it, so it's great to see it still being modified and used, today!