How can I stop my screen from dimming while it's plugged in?

Every once in a while my screen dims, I don't want that to happen. Just now it did it while I was moving the mouse.


Under displays in system preferences there is a checkbox (along with a brightness slider) to enable/disable automatic brightness.


It's true that the Ambient Light Sensor causes this problem in many cases. But I want to present an alternative answer.

If your power adapter is plugged into a wall socket or a power strip and the connection is loose, the computer will switch between Battery mode and Power Adapter mode. Since many of us have different power settings for Battery vs. Power Adapter mode, this will cause the screen to randomly dim and undim.

The fix is simple.

Snapshot of MacBook Energy Saver preferences window


Go to System Preferences » Energy Saver

If you never want your display to dim and then turn off, set Display Sleep for Never. You can also deselect Automatically reduce brightness before display goes to sleep if you want.

enter image description here