Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Disable display dimming via the command line System
I have one of those 24" iMacs that hums loudly whenever the display is any dimmer than max. Luckily I like maximum brightness, but I've always had to set Energy Saver to never turn off my display because the dimming creates a loud hum. I have, however, found the solution. Go to Terminal and type this command (and enter your password when prompted):
sudo pmset -a halfdim 0
The halfdim mode is now disabled, and your display(s) will simply turn off at the interval designated in Energy Saver without ever dimming. Now I can stop leaving my display on permanently and get a bit more life from it.

[robg adds: We've run a number of hints on using pmset in the past, but the halfdim setting hasn't been covered before.]
    •    
  • Currently 3.20 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (5 votes cast)
 
[23,280 views]  

Disable display dimming via the command line | 19 comments | Create New Account
Click here to return to the 'Disable display dimming via the command line' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Disable display dimming via the command line
Authored by: caswell on Feb 21, '07 07:41:35AM

There's an easier way, no?

From the Energy Saver control panel, click Options and uncheck "Automatically reduce the brightness of the display before display sleep"

Works on my iBook, should also on an iMac.



[ Reply to This | # ]
Disable display dimming via the command line
Authored by: quangtonthat on Feb 22, '07 12:16:28AM

Dimming the display is one of the most irritating features of the mac. I wonder who came up with this idea in the first place.

Unchecking the "Automatically reduce the brightness of the display before display sleep" in the Energy Saver never worked for my PowerBook until I did Archive and Install a couple of days ago. By magic, it works perfectly now.



[ Reply to This | # ]
Disable display dimming via the command line
Authored by: allenhuffman on Feb 21, '07 07:51:47AM

Is there a way to shut off the backlighting completely, like on the PowerBooks, without having it time out? My iMac Core 2 Duo (and the G5 before it) undims all the time through the night and pops up the login window for some unknown reason, and even with the screen dimmed all the way using F14 and timeout set to one minute, this is still annoying. I'd like a way to F14 all the way to "off" like you can do on a PowerBook.

Anyone?

---
-- OS-9 Al



[ Reply to This | # ]
Disable display dimming via the command line
Authored by: caswell on Feb 21, '07 09:12:14AM
Disable display dimming via the command line
Authored by: ken22 on Feb 21, '07 11:09:35AM

If you set the halfdim in Terminal it will not survive a restart. A tip I picked up on the web solved the problem. Create an Applescript, save it as an application and make it a login item. Works great.
The script is do shell script "sudo pmset halfdim 0"



[ Reply to This | # ]
Disable display dimming via the command line
Authored by: RobertBen on Feb 22, '07 04:17:08AM

Can anybody explain to a script newbie what should be in this script exactly?

When I just paste 'sudo pmset halfdim 0' in a new document in Script Editor and try to save it as an Application I get the following:

"Syntax Error
A identifier can't go after this identifier."
(the typo is Apple's, not mine ;-)

So do I need to ad something to make this a functioning shell script?



[ Reply to This | # ]
Disable display dimming via the command line
Authored by: MacChelsea on Feb 22, '07 10:20:39AM
I've just created an AppleScript app as mentioned but with a twist to include the password. The line of Applescript is this:
do shell script "pmset halfdim 0" password "yourpassword" with administrator privileges
Replace yourpassword with your password, and of course your account needs to have administrator privileges.

---
MacChelsea

[ Reply to This | # ]

Disable display dimming via the command line
Authored by: RobertBen on Feb 23, '07 10:12:23AM

Thanks, that made the script executable, so one step further...

But now I get the message: 'pmset' must be run as root...

So do I have to enable root just to get this working?



[ Reply to This | # ]
Disable display dimming via the command line
Authored by: MacChelsea on Feb 23, '07 07:22:57PM

No, you don't. "sudo" in the original script or "with administrator privileges" in mine will make your commands act as if they're issued by "root".

---
MacChelsea



[ Reply to This | # ]
Disable display dimming via the command line
Authored by: RobertBen on Feb 25, '07 12:40:52AM

Thanks MacChelsea, that did the trick.

I didnt' get that I had to literally copy all you wrote incuding the 'with administrator privileges' (at first I understood that this was just a comment from your side, not a part of the script).

Now that I added the 'with administrator privileges' at the end of the script all is fine, thanks for all of your patience with this scripting newbie!



[ Reply to This | # ]
Disable display dimming via the command line
Authored by: tojo1 on Feb 23, '07 01:17:15AM

I have used the half dim setting in the terminal contained in the OP for many months and it has survived:
logout/login
restart
shutdown/restart.

Maybe I am just lucky [about time!].

HTH
TiPB 867 10.4.7



[ Reply to This | # ]
Disable display dimming via the command line
Authored by: lokon1979 on Feb 21, '07 11:15:12AM

may be you should call apple to fix the "hums" problem, to ensure this little problem don't develop into real serious one after the warranty is expired?



[ Reply to This | # ]
Disable display dimming via the command line
Authored by: k88dad on Feb 21, '07 04:02:02PM

I can confirm that the Energy Saver option does NOT prevent half dim on my Intel iMac. I'll try the login script method.



[ Reply to This | # ]
Disable display dimming via the command line
Authored by: Joe@MacOSXhints on Feb 21, '07 05:42:12PM
How can I enable the halfdim again after I disabled it? Thank you.

[ Reply to This | # ]
Disable display dimming via the command line
Authored by: Anonymous on Feb 21, '07 07:41:31PM

I would presume the answer to your question is "sudo pmset -a halfdim 1", if it follows standard protocol.



[ Reply to This | # ]
Disable display dimming via the command line
Authored by: eriqthegeek on Feb 21, '07 07:54:08PM
I believe you can re-enable it by specifying a non-zero number in place of 0, in which case I believe it will do the "half dim" thing after that number of minutes. Also, I too can attest that the "simple" approach of using the preferences pane is great in theory - but it is a known issue that changing the preferences setting does NOT work on Intel based macs. See this Apple writeup. I also can attest to this personally. ;) Also, their suggested solution did not work for me.

I have been living with this annoyance -- my laptop screen was dimming after about a minute of inactivity no matter what I set this to in preferences, but thankfully this command line fixed that problem for me.

[ Reply to This | # ]

Disable display dimming via the command line
Authored by: Serj on Feb 22, '07 05:10:43PM

Above all, a computer that cost more than three thousands dollars shouldn't do that noise. No one seems to know exactly what's causing that humming and Apple doesn't seem in a hurry to comment on that. I have a iMac 24. Very annoying sometimes.



[ Reply to This | # ]
halfdim reboot
Authored by: bloodnok on Mar 05, '07 12:17:32PM

here's an extra annoyance for fans of humming displays: when you reboot your imac, the halfdim setting is forgotten. also, my imac totally ignores the system preferences setting - only this command line string appears to work.



[ Reply to This | # ]
halfdim reboot
Authored by: bloodnok on Mar 09, '07 06:29:01AM

i rebooted again (to apply the latest airport patches) and the halfdim setting was definitely lost. just confirming this wasn't pilot error.



[ Reply to This | # ]