X

MacBook Air keyboard illumination not working properly

Deleting bad plist files may solve.

CNET staff
4 min read

Some users have reported an issue in which the MacBook Air's ambient light sensor process that automatically illuminates the keyboard seems to not be functioning, or functioning in reverse. For instance, when the computer is put in light conditions the keyboard brightens, and in the dark the keyboard will darken and/or turn off. Sometimes the light sensor will not work at all, or will only work for either the keyboard or display brightness, but not both together.

As described by Apple Discussion forum poster bryantee:

"My keyboard "self-illuminating" system is apparently working on the "reverse" manner....When the light (in my room, dark room) goes off, the screen dims and keyboard backlight goes off. When i turn on the light, the screens brightens up as well as the keyboard..."

This problem seems to have materialized primarily for users who migrated their accounts from another computer or for users who've put their computers to sleep in one lighting condition and then awoken the computer in another lighting condition.

Fixes

Some have found this to be associated with a corrupted .GlobalPreferences.plist preferences file in the user's account. Unfortunately, deleting this file to force its recreation has not helped, but one user on the Apple discussion boards (Zacchaeus) found that copying the file from another account (the root account) and then modifying the ownership of the copied file solved the issue. This has to be done from another account besides the afflicted account, because the .GlobalPreferences.plist file cannot (or should not) be edited from the active account (it's an invisible file, which Mac OS X is attempting to protect from user modification). Here are the steps he took, using the "root" account:

NOTE: "YOUR_USERNAME" in the commands should be changed to your account's short name (the name of your home folder).

  1. Enable the root user in Directory Utility (located in /Applications/Utilities.
  2. Log in as root.
  3. Launch the terminal, located in /Applications/Utilities and enter: cp /Library/Preferences/.GlobalPreferences.plist /Users/YOUR_USERNAME/Library/Preferences/ then press return.
  4. Correct the permissions on the file by entering the following command: chown YOUR_USERNAME:staff /Users/YOUR_USERNAME/Library/Preferences/.GlobalPreferences.plist then pressing return.
  5. Log out of the root user account.
  6. Disable the root user in Directory Utility.
WARNING: Running as the root user means that file security is not operating and any file can be modified without confirmation. This means the computer is very vulnerable to user error so be certain to enter the commands properly. An alternative to using root is to create another administrator account and log into that one. Doing this method will ensure other system files are not vulnerable when the computer is running. When you're logged into the second account, run this set of commands (in this case "YOUR_USERNAME" is the name of the original account, not the new one):
  1. Open the Terminal and enter: sudo cp /Library/Preferences/.GlobalPreferences.plist /Users/YOUR_USERNAME/Library/Preferences/
  2. Enter your password at the prompt.
  3. Then enter: sudo chown YOUR_USERNAME:staff /Users/YOUR_USERNAME/Library/Preferences/.GlobalPreferences.plist
  4. Reboot the computer (or logout and log back in to the primary account).

Regardless of the approach, this command sequence copies the ".GlobalPreferences.plist" file from the /Library/Preferences/ folder to your home library folder, and then changes the owner to be yourself instead of the root (system) so your account can modify the document.

For some users it was not the ".GlobalPreferences.plist" file, but instead was the com.apple.BezelServices.plist file that was the problem. 

You can delete this file by running the following command in the Terminal:

  • rm ~/Library/Preferences/com.apple.BezelServices.plist"

After removing the file, hard rebooting by holding the power button until the computer shut off was how he fixed the problem. While hard rebooting might not be necessary, it was a precaution he took to keep the computer from writing the preferences file back in case it was in memory somewhere.

Testing the Results

Proper keyboard illumination behavior should be as follows: In bright or room lighting the keyboard illumination should be off. As the ambient lighting lessens the keyboard should turn on to its brightest (unless you've manually set the brightness). As the lighting gets darker the keyboard should also dim to prevent glaring. To test the ambient light sensor, follow these steps:

  1. Set the computer to "Illuminate keyboard in low light conditions" in the Keyboard preferences.
  2. Set the computer to "Automatically adjust brightness" in the displays preferences.
  3. Set the keyboard and display brightnesses to their maximum.
  4. Cover the light sensors (holes next to the iSight camera) or move to a dark room.
  5. If everything is working the computer should dim the display and brighten the keyboard.

Feedback? Late-breakers@macfixit.com.

Resources

  • bryantee
  • Late-breakers@macfixit.com
  • More from Late-Breakers