MacOS – Change main desktop to external screen after sleep mode

displaymacbook promacossleep-wake

I have connected an external screen to my MBP. If I close the MBP the main desktop is switched to the external screen like I want. If the notebook goes in sleep mode and I wake it up with my wireless Apple keyboard than I cannot see a window. The problem is that the login screen after the wake up is on the MBP and not on the external screen. Launching mission control or similar doesn't work when you are logged of. What can I do that my main desktop stays on the external screen?

The only "solution" I came up with is that I open the MBP and close it again. Than I have the login screen on my external monitor. But that is not an ideal solution … I'm using Lion (10.9.1).

Best Answer

You can change your default display to the external monitor by setting a boot argument. Note that this will disable the internal display of your machine. It is described as the opposite of clamshell mode, but this isn't quite accurate, since this works when the clam is closed as well:

sudo nvram boot-args="iog=0x0"

To clear the boot argument, either reset the NVRAM or execute the following. The former will clear all NVRAM contents, the latter will only clear the boot arguments variable:

sudo nvram -d boot-args