How to disable Clamshell mode in Yosemite? I have my Late 2013 Retina MacBook Pro attached to an external display. I use both displays. At night, when I leave my computer, I want to close the lid to put the Mac to sleep.

Since Lion, there is the famous 'Clamshell mode', which is for a lot of people, but not for me. This causes OS X to switch to single-display mode, using only the external display, if I close it.

Until Mavericks I could prevent this by the famous: sudo nvram boot-args="iog=0x0" kernel parameter, but since Yosemite, this does not work. Is there any solution? I don't want to plug off my computer for the night or put it to sleep by selecting a menu command. Both solutions are really lame.
Unplug or detach the power adapter before you close the lid. "Closed clamshell mode" requires the MacBook to be plugged into an outlet to activate.

I actually discovered this through trial and error but here's proof! :)

http://support.apple.com/en-us/HT201834