Fix for iPod Touch/iPhone restarting after powering off
On the weekend, my iPod touch developed a problem where it would always restart again automatically after it was powered off. Basically, the iPod would always reboot instead of shutting down. Indicatively, the problem does not appear if the iPod touch is shutdown whilst attached to my Dension car dock and others have reported it does not appear if the iPod is docked to a 4th gen iPod dock for PCs (even if the dock is not plugged into a PC).
After eliminating software as the likely culprit, I tracked down the problem to a dirty dock connector.
The dock connector on the iPod has many pins, some of them are control pins. The resistance between the some control pins and ground is read by the iPod and is used to determine the type of device that is connected (dock, serial accessory, etc). I figured some contamination between the pins and the case were causing a faulty reading causing the iPod to think it was connected to an accessory which required it to turn on when it is connected.
Apparently there was some kind of contamination between the pins and ground (which I imagine, also includes the casing). The contamination did not stop the iPod from functioning like normal except for the shutdown problem. Cleaning the dock connector with a dry cotton bud did not help, but a cotton bud, well soaked in isopropyl alcohol removed the contamination and has permanently fixed the problem.
Don't use anything to clean the connector except for isopropyl alcohol. Other solvents (including water) can leave residues and/or salts behind which could make it worse. You can buy isopropyl alcohol from electronics suppliers, paint dealers and chemists.