@lexbailey If the cable has a resistor or emarker chip in it, the fact that there's a cable plugged in can be detected. It is then also possible to detect whether there's a device on the other end.
Creative use of this information allows high fuckery to be commited.