Two years ago I reported how iTunes would launch itself on my iMac. After tons of research trying to find the cause, I think I found it.
To recap what was happening, iTunes would launch by itself and (about half the time) start playing music. I thought there was an issue with the Logitech mouse I was using at the time (because any time I would touch the wireless dongle on the back USB port, iTunes would launch), but that didn’t seem to be the case because plugging in the normal Mighty Mouse did not solve the issue.
I continued to troubleshoot and do my normal testing and found that touching any of the plugged in devices to any of the USB ports could trigger it. If I shut down the computer and changes which ports the different devices plugged into, the problem would go away temporarily. Eventually, iTunes would launch by itself again. One of the most ominious times iTunes launched by itself was one Halloween while I was not at home. I came home to find Slither, a song about vampires by KC rapper Tech N9ne playing. Weird, huh?
For the past 6-9 months the problem went away so I assumed an Apple update fixed the issue at some point. Then, I installed Mountain Lion and after a few weeks the problem presented itself again. This time, I noticed that the problem only reoccured when I was troubleshooting another issue in which I was constantly moving my Mac to access the USB ports in the back. I started searching again. That’s when I found this thread on a Mac forum.
This problem is related to the microswitch located at the very bottom inside the speaker jack. Whenever you get this problem, make sure your speaker cable is fully inserted into the speaker jack. Even the slightest depress on the microswitch can create interference, causing itunes to start and random songs to start playing.
This made sense when I thought back on all the times the problem arose. Every time I would move my Mac to access the USB ports, I would move it in a way in which the speaker plug could have come lose from the jack, even if just a little bit. The tug on the speaker cord as I moved my jack made sense because the cable was taught enough to create the disconnect. After placing my Mac back where it should be and making sure the plug was in firm, I haven’t had the issue reappear. It looks like I have finally found the cause. Hopefully the countless other users experiencing this issue can use this information to help them rid themselves of this annoying problem.