Dim Display like Real Mac when Idle… Kinda

April 10th, 2009

Apple / Mac, Miscellaneous

cinema-display-128x128Okay… Let me preface this by saying that this is COMPLETELY unnecessary, poorly coded, and really only an exercise to make my Hack more Mac-like — even though I’m not sure I’m going to keep it.  Just the same, I figure I’d share it so all of you out there might try it, potentially improve its performance, make something more “real” than what this thing is, blah, blah, blah. . .

What is it?! Real MacBooks determine (by Energy Saver preferences, of course) dim the display when there is no activity on the machine. Depending on what Power Management kexts/bundles you have loaded, you might even see ‘Automatically reduce the display brightness before display sleep’. Too bad this doesn’t work on Hackbooks. Well, this is what this AppleScript package does enable on your Hack.

I’ve included the script itself, so others can play with it (needs to be compiled as a ‘Application’/’Application Bundle’ with ‘Stay Open’ selected), the compiled app itself, with icon, and the ‘Screen Dimmer’ screen saver that is necessary to make it all work. You DO NOT have to select the ‘Screen Dimmer’ screen saver as your default screen saver; the script only calls it to reduce the screen brightness after 30 seconds of system inactivity.

To use:

  • Unzip Package
  • Install ‘Screen Dimmer‘ screen saver (Freeware scrren saver credited to K. Anoshkin)
  • Execute ‘Dim Display’ app (The app will execute without a dock icon in the background)
  • Wait 30 seconds

Again, it’s rough, kind of dumb, and uses way too much CPU after it first executes (~.05-1%). But, hey, it does simulate the real thing fairly well, so… it’s a start. No need to douse me in flames!

Hope some might find it fun to play with and some might help to improve on it, so we have something even closer to the real thing.

You can download it here: Screen Dimmer

About Richard

Richard is a professional web developer and business consultant. He opened his first web hosting company at the age of 13 out of his bedroom on an ISDN connection and hasn't looked back since. Richard currently resides in sunny Florida.

View all posts by Richard

19 Responses to “Dim Display like Real Mac when Idle… Kinda”

  1. rizal

    hi Richard, Download link for Dim Display.zip is not available…please add more link.
    Thanks

  2. Thomas

    I just used the BootCD to boot my Hard Drive because of Chameleon issues (caused by my own ignorance) and it booted properly along with the dsdt.aml I included in the BootCD. This is a major step becuase we now have dsdt.aml loading.

  3. Richard

    I hope we get a fix so we can use software (utilities, etc.) that require you to use a “boot disc” such as Drive Genius. This will keep us running smoother and faster just like our real Macs.

  4. Thomas

    This is true. Take for example our ability to boot Mac discs. Fortunately there may be a fix for this so I’m working on it.

  5. Richard

    At the end of the day, there are still many Mac-specific programs that, even with us running Mac OS X, just won’t work right and I’m sure ScreenShade is one of them. If it doesn’t work on a “PC” it’s probably not going to work on our HackBook because the hardware is PC regardless of what software (Mac) we put on it.

  6. Thomas

    If the software doesn’t automatically dim the screen then what is the benefit of this over Fn + Down to dim the display.

  7. Cristian

    Dave,
    There is a software on the Apple website which dims the display like a real mac.
    It’s ScreenShade. I tried it and is really good. The main problem: it does not automatically dim your screen on PC .

  8. Wolfer

    Got the timing on this “project” about perfect now — in regards to when it is triggered by the machine’s idle state. Also, I finally optimized the ‘proof-of-concept code’ and got the script to only use ~.02% of the CPU now (across multiple launches) — while running in the background. Yey! (You can monitor its usage by looking for the ‘Dim Display’ process in ‘Activity Monitor’.)

    If anyone wants the new script/code, let me know… Although I doubt many of you even attempted to run this thing, much less keep it, much less even download it. But, if you did put it on your machine and left it, I’d be REAL curious if you like it; I guess requests for the new sscript will validate this for me, huh?

    ANYHOW…

    With the new code’s timing and CPU usage improvements, I’m keeping it on the machine permanently. It now triggers at 1.5 mins. of idle time now, doesn’t interfere with your selected screen saver kickin’ in, and does have some actual benefit… It dims the display enough for your active work on the screen to be made semi-private (hard to see). And, with the latest version of the Screen Dimmer screen saver – http://www.anoshkin.net/software/screen-dimmer – you can set the opacity and fade duration to make things look real “pretty,” or “pretty” to your liking at least. Even though it does “dim,” it’s just a Quartz Composer overlay on your desktop, so save power it does not, but hey, it looks like it does, it makes the 1525 even more Mac-like and ain’t that damn well good enough?!

  9. Cristian

    A real breakthrough would be if someone will succeed to get “automatically adjust brightness as ambient light changes” as found in Display option in a real Mac.
    I have tested Inspiron 1525 vs MacBook Unibody 2.0 Ghz and although the later seems to respond a little bit faster I got the same Geekbench score 2700.
    So, Inspiron 1525 with help of Richard , Dave , Gbonilla and all of you really does a good job :)

  10. Dave Wolf

    @Thomas, stepping is locked in the CPU — per what clocks it can actually step between. You can use some tool, maybe Superhai’s command line tool to have the CPU return what stepping options it supports.

    I hear ya on your theory, but there is some bottom threshold to stepping (generally 800mHz for us). Intel would need to make the change to support something lower otherwise. They did… It’s called the Atom. Thing draws next to nothing! — and there’s dual-core versions available now. Sweet CPUs.

  11. Thomas

    Although this is completely unrelated to this topic, it would be cool if we could change the minimum CPU when auto throttling to a value below 800mhz. If we could hack the BIOS for this then battery life would be even longer when only one or so applications was open and not all that CPU power was needed.

  12. Dave Wolf

    @Richard. Yeah, I have the same set-up — dim on battery, max brightness on AC. Works well. And, as you said, all is adjustable in either mode with the Fn key and arrows.

    Just wanted to make sure we were talking about the same thing and that you didn’t have something cooler workin’ for ya when idle — that is, other than a screen saver kickin’ in or the display turning off/sleeping at whatever preset time.

    ‘Presh.

  13. Richard

    Dave,

    Dim when the power source isn’t AC (when I pull the plug) using the Fn key to set it. There is no animation in the dim, just goes to whatever brightness setting you have set and that’s the BIOS doing all the work — not the OS which is why it works on Mac OS X.

  14. Dave Wolf

    Actually, I’m DIGGIN’ AppleScript. . . outside of this stupid project even. Pretty amazing stuff you can do with this high-level language!

  15. Dave Wolf

    Thomas, go ahead and download and change the link to a local upload on the site. Just didn’t think of it yesterday in my flurry of typin’.

    Got to run for now…

    ‘Presh.

  16. Dave Wolf

    @Richard. You got your BIOS dim to dim using time vs. power source? Or, you just talking of the dim when pulling the AC on the thing? I expect you’re speaking of the latter.

    And, told you this was totally unnecessary! (g) It was just an exercise for me to see how much I might emulate the real Mac’s dim. And hey, 1% of the CPU ain’t all that bad considering only an hour of work went into it! ;-) That’s why I need someone smart to script up something better for me! Also, one that’s self-contained so as to not have to fire off a screen saver module.

    This was my first dive into AppleScript. Amazing what can be done with Apple’s scripting language!

  17. Richard

    This is neat, but I’m afraid I’ll be sticking with the default BIOS dim (which doesn’t fade or do anything fancy) until this, or a different application comes to light that doesn’t use excessive resources.

    Unfortunately, getting a real MacBook Pro uses excessive resources on my wallet.

  18. Thomas

    Wolfer, I suggest that instead of having the mediafire link you upload the file to the site and then put a link to that because unlike diamonds, links are not forever (I know, corny but to so true).