This problem has been bugging me for ages and I can\'t seem to fix it or fully localize the source of the problem (although at times I can force it by allowing the phone to Stan
I was just tinkering around at home with some development, and started noticing this behavior for the first time. After reading through the suggestions (USB plugs in particular), I got to thinking that the USB cable I had at hand is pretty wimpy looking, so I grabbed the cable I normally use for work (it's a larger diameter, dunno what that means internally), and since then everything has been working fine.
So for anyone landing here with these troubles, you might also check to make sure it isn't the USB cable.