system sounds coming from thunderbolt display, all else through headphones

Solution 1:

Under "Sound Effects" tab, change "Play sound effects through:"

Instead of automatically changing this option, when I plug in headphones this setting remains unchanged.

enter image description here