The late 2013 iMac is a great piece of hardware – one of it key innovations is the thunderbolt connector. When paired with a MacBook Pro (I have the Retina model) the iMac can be set to act as an external monitor (secondary monitor) for the MBP. This is known as ‘Target Display Mode” or TDM and is discussed in ample detail in this post.
There is however a software issue which prevented the user from toggling the iMac in and out of TDM mode. While the standard recommendation is to trigger a CMD+F2 on the iMac – in my case this was only working when turning on the mode and not when turning it off (disabling TDM on the iMac).
Frustrated by this I researched a few blogs – yet to no avail. Here’s the solution for those desperate to toggle their iMac both on as well as off.
OS X has a (sensible) security setting which forces the user to enter the default user password when the iMac sleeps or when the screen saver begins. This setting is found in System Preferences > Security & Privacy. For whatever reason when the iMac switches to TDM mode, OS X considers this to be a ‘sleep’ operation and thus locks the underlying OS. As a result of this, the keyboard function to toggle TDM off (CMD+F2) is unavailable to the user.
To change this, simply alter the entry in System Preferences > Security & Privacy, from “immediately” to any value which is longer than that. Consider “1 hr” as a base option. Of course keep in mind that this will alter the security settings of your machine so keep an eye on that.