It first I thought that this was the old story about the dog barking just before the phone rang.
Let's get to troubleshooting:
a] Turn everything off.
b] Unplug all the sub wires.
c] Plug in the sub AC cord & turn only it on. Does it hum?
d] If yes then make a shorting RCA plug by taking an old & cheap RCA interconnect, cutting it to about 6 inch length, strip off some insulation and twist the center and shield together.
e] Turn-off the sub, insert the shorting plug and re-power the sub. Does it hum?
f] If yes, send the sub out for repair.