-
Clearly the other stuff you trying to connect is creating a ground loop, when you connect to the laptop ground loop is lifted.
I had similar... when listening to radio or play acoustic guitar (all connected to same amp) perfect clean sound, as soon as I connect the turntable I would get massive hum sound - that was a very good indication the turntable was creating a ground loop. Turntable was creating a ground loop cause the amp was grounded and phono connector was 'carrying' that ground to turntable. Turntable used a 3 pin plug and was also grounding the phono stage to the plug internally. Solution just removed the internal ground connection from the turntable plug (to the phono stage) and now it's crystal clear sound.
-
You need to lift the ground on whatever you're plugging it into the wall with, so either use a usb wall plug with a plastic ground pin or crack it open and disconnect the ground wire. Easiest way to do this is with an extension lead without a molded plug. Unscrew the plug head and disconnect the ground wire from the pin.
your USB port on your laptop won't be connected to earth which means when you power it via USB you're effectively lifting the ground. This means that your connection to earth will be via your powered sub (I'm assuming that's grounded).
It could be that your sockets that you're using are earthed to different points. Try plugging everything into one extension lead which is plugged into one socket. If that gets rid of your ground hum then it's likely that the issue is with your sockets.