Sony Xperia S - suddenly can't connect to PC anymore (it was working before) I see there are various threads for Galaxy S3 having this problem, but my phone is Sony Xperia S.

My phone used to connect to PCs fine, but today when I tried connecting to my laptop it wouldn't recognize it. This happens on Windows and on Ubuntu, with the original USB cable, and  with a generic one. The same cables and computers used to work fine with my phone.

Also, the phone does not give any notification that a PC has been connected, i.e. the phone itself doesn't recognize that a PC has been connected. It starts charging, though.

I tried rebooting Android, I also tried enabling USB debugging, but none of it helped.
In the end, it turned out it was working for the original USB cable, while the generic USB cable did not allow data connection, only charging.

For the original cable, the problem disappeared on its own, and I don't know what caused it, or what caused it to disappear.