If you have devices connected with unbalanced audio cables that also have ground pins on their power cables, then you have a ground loop (audio ground and power ground, which are ultimately connected.) Two ground paths between devices is all it takes. Balanced connections are the ultimate solution, but if that isn't practical, then isolating transformers are the next best solution that can promise hum free performance.
The problem can be better or worse depending on a bunch of factors, but balacing, or short of that, transformer isolation are the only guaranteed solutions.
You can still have problems with balanced systems if you have the shield connected at both ends depending on exactly how your gear works internally (as the shield connects the chassis ground of each box together which is often connected to the audio ground in each box, plus your power grounds for each box = ground loop). This wouldn't happen if all gear was designed properly, but reality is as it is.
I have the same problem, this is my second one now the first developed a hardware problem and wouldn't connect after one use, this is the replacement and it has what seems like a ground loop, don't waste your time just get a replacement,it's not your gear or set up, my set up is the same as with the 2i2 I used to have, worked fine, and the old 2i4 worked fine until it broke, I will be sending it back on Monday, phone focusrite and they will tell you to send it back through the supplier.
This is not necessarily true. Depends on exactly what is causing the problem.
Sigh.. ground loops, something I know a lot more about since becoming a technician for a radio station.
Sound System Interconnection: http://www.rane.com/note110.html
Grounding a Shielding Audio Devices: http://www.rane.com/note151.html
Thanks to Rane for their excellent resources on this issue.
"If you are unable to do things correctly (i.e. use fully balanced wiring with shields tied to the chassis at the point of entry, or transformer isolate all unbalanced signals from balanced signals) then there is no guarantee that a hum free interconnect can be achieved, nor is there a definite scheme that will assure noise free operation in all configurations."
"Winning the Wiring Wars
Use balanced connections whenever possible, with the shield bonded to the metal chassis at both ends.
Transformer isolate all unbalanced connections from balanced connections.
Use special cable assemblies when unbalanced lines cannot be transformer isolated.
Any unbalanced cable must be kept under ten feet (three meters) in length. Lengths longer than this will amplify all the nasty side effects of unbalanced circuitry's ground loops.
When all else fails, digitize everything, use fiber optic cable and enter a whole new realm of problems."