Blog Archives

A problem that’s been bugging me since at least Mountain Lion is that sometimes when I connect my external monitor to my Macbook Pro, the display resolution is incorrect. The problem is pretty annoying as it often occurs on wake if the MBP goes to sleep even when the external monitor hasn’t been disconnected.

There are a number of solutions to this problem, and I’ve used them all. Some are less irritating than others, but in this post I’ll give you a run down of the options.

1. The old fridge magnet trickAs I often use a tiny magnet to put my MBP display to sleep while keeping the lid open, normally putting the magnet on and then taking it off again will cause the displays to reset. But this method is annoying both because I’m often connecting to external monitors away from home and because I often misplace that tiny magnet! The other problem with this method is it doesn’t always work… 😦

2. Put the external monitor to sleep with a Hot CornerGo into System Preferences > Mission Control, and set one of the Hot Corners to ‘Put Display to Sleep’ (not ‘Start Screen Saver’). When your mac wakes up and the monitor is in the wrong resolution, move the cursor to the Hot Corner, wait a couple of seconds, and move the cursor back to the centre of the screen.

3. Activate ‘Detect Displays’Ok, two ways to do this. The manual way is that you open System Preferences, hold down the ‘option’ key and hit the ‘Detect Displays’ button at the bottom of the window. Note that you won’t see this button unless you’re holding down the ‘option’ key. After the display resets properly, quit System Preferences. My main beef with this method is it’s totally disruptive to my workflow, so much in fact that it makes me angry every time I use it!

Fortunately, you can lower the inconvenience with the second way, which is an AppleScript that does the same thing automagically.

Update Jan 2015:
Partly in response to this problem, I’ve written an app called DisplayDroid which detects when a monitor is connected or disconnected and automatically runs a script in response. The script below is built into DisplayDroid as one of the presets that you can choose!Find out more about DisplayDroid…

You might want to save this in your scripts menu or make it into a Dock-able app for convenience. Don’t forget you’ll need to allow the AppleScript editor permission to use Assistive Devices.

4. A free screen utility
Unhappy with a GUI scripting solution, I started researching how to change the displays in Cocoa or from the BASH command line so that I could avoid the overhead of System Preferences popping open and closed, which is an ugly solution at best. I didn’t get far in my research before I found that someone else had already beaten me to the punch, and had even offered the code up for free. Y’gotta love the heroes of the programming community! Download the free RDM.app, which lets you change the screen resolution on any of your monitors from the status bar on your desktop. Move it from your Downloads folder into your /Applications folder. I’ve even got it in my login items for maximum convenience!

Although the app is probably slightly slower than the Hot Corner solution when I’m at home, I like it because I regularly connect my mac to all sorts of other monitors and projectors and the mac doesn’t always choose the best display. The RDM.app lets you slide through the available options much more efficiently than the System Preferences panel, too. Big respect to Paul Griffin at http://www.phoenix-dev.com for this!

5. Trash old prefs
No matter how well or otherwise any of these techniques work, the question remains: why is the resolution setting being forgotten in the first place? I haven’t nailed this down as a cert yet, but ever since I did this to solve a different problem, my monitor’s been behaving itself, too.

1. Go to

Hard Disk/Library/Preferences/System Configuration

Now make sure you’re at the right place because there’s another ‘System Configuration’ folder at /Library/System Configuration, and you definitely don’t want to be messing with that one. Also, this is the Library folder at the root of your hard disk and NOT your user account library (i.e, the path is /Library, not ~/Library). Check that path. Here it is again

Hard Disk/Library/Preferences/System Configuration

2. OK, click on that folder, and copy it over to your Desktop. Now go back and delete it from /Library/Preferences (or hold down ‘option’ while you drag to do a ‘move’. I prefer the first way; it’s safer, if slower).

3. Restart and test.

Hopefully, if you’ve been venting at the ears like me over the external display problem, one or more of these options will help lower the frustration!

If you see a screen with a progress bar (something like the shot above), your Mac is starting up in Safe Mode. This shouldn’t happen unless the user intentionally wants to do so for troubleshooting purposes. However, if you find that your Mac is defaulting to Safe Mode when you try to start up normally, try the following tips.

1. Stuck Shift key
Check that the Shift key is not accidentally being pressed down or stuck. If you suspect the keyboard may be faulty, plug in a different keyboard.

2. Use Terminal to reset boot-args
Allow the machine to finish booting into Safe Mode, then open Terminal (Applications/Utilities/Terminal.app) and copy this command into the Terminal window:

sudo nvram boot-args=""

press ‘return’ on your keyboard. Enter an Admin password (type carefully as it will not be echoed to the screen) and restart the Mac.

3. Do a PRAM reset.
In this case, a PRAM reset effectively does the same as No.2 above. However, if No.2 didn’t work, it’s worth trying this way of doing it in case for some reason the boot memory failed to hold the preference setting. You can also do this step instead of Step 2 if you are not comfortable with using the Terminal.

The PRAM reset is done like this:

1. Power down the machine.

2. Locate the following keys on your keyboard in preparation for Step 4:

command–option–P–R

3. Press the ‘power on’ button.

4. Immediately – and before the grey screen appears – hold down ‘command-option-P-R’ all together.

5. Keep them held down until you’ve heard the start-up chime twice. After you release them you should hear it again, and hopefully your Mac will boot up as it should normally.