It doesn't work for me. I have an integrated Intel graphic chipset and an external monitor connected using a DisplayPort cable.
I did set When laptop lid is closed: do nothing, but it ignores this setting and both displays go off.
I could not even switch off the laptop monitor using the Monitor Preferences, both monitors would go off, but using Xrandr works:
This switches off the laptop monitor. But I can not close the lid. Why is the "do nothing" setting ignored?
xrandr --output LVDS1 --off