The mac pro had every single cable removed except for the power cable and speaker out cable when I did the battery test using the UPS, and the speakers were also plugged in through the UPS. Therefore, it couldn't have come through the power lines / outlets at that point. I do have carpeting in pretty much the entire apartment though, so when I get home I will be sure to test the rubber mat solution and see if that isolates the mac pro from whatever is popping. I would love to use the optical output instead in general, but I dont have any external audio processors in my computer room. All of that is in the home theater room with my receiver, and I don't particularly want to buy an external audio solution as the sound quality is completely fine with me so long as I can kill the pops from the exhaust fan.
To test this (totally isolate the earth ground), you only plug the computer, monitor, and computer speakers to the UPS (make sure you use the protected outlets, as some models have pass through outlets = wall AC, usually with some surge suppression). Then flip the bathroom fan on and off, and see what happens.
Then put the computer speakers on the wall, and try the fan again (UPS's are noisy devices as well, and that may be getting through the speakers input wire).
For normal use however, get the speakers off of the UPS, as it's an uneccesary drain on the batteries (computer, monitor, router, ISP modem only - critical components only). Printers, computer speakers, ... place on the surge protected outlets only, to a separate surge suppressor, or even directly to the wall (good idea to use a surge suppressor for all your computer's components, but not needed to function). Just keep the non-critical gear off of the inverter (extends battery powered run time so you can safely shut the system down).
As mentioned, you don't need to use rubber mats under the computer with carpet.
You still haven't answered a couple of important questions though;
- Are there CCFL bulbs on the same switch as the vent fan in the bathroom (the startup current for these bulbs is high, and can cause arcing in the switch)?
- Is the computer on the same circuit as the bathroom fan (relevant when everything's plugged back the way it shoud be)?
You may be able to try a couple of tricks mentioned in the last few posts, but if they don't work or aren't possible, and you can't live with the noise, then you're going to have to spend some money to isolate the audio output to the speakers (go optical).
You could try a shielded audio cable on the chance that it is RFI affecting the line-in to your speaker amp.
I've the impression the speakers are self powered computer speakers (simple, inexpensive units <i.e. 2.1 configuration> with a 3.5mm mini-jack input that gets power off of a wall wort), and the mini jack input wire is soldered to the amplifier board inside one of the units.
If this is not the case, we need the details (brand, P/N, input method, and where is it getting power).
What do you mean by "the speakers were also plugged in through the UPS"?
I've never heard of speakers going through a UPS. ??? That might be an "issue" if the UPS is somehow disturbing the signal on those wires. Me thinks this is something you should change as a test.
What you described sounds like a problem with RFI/EMI pickup on the speaker wires themselves. Also, carpet is a fine isolator unless it's wet/damp/really-dirty.
Besides the issue with the speaker wires going through the UPS (???) the next thing you should try (after the chicken swing) is to twist the speaker wires. Twist the wires so that there is ~1 turn per inch. Twisted wires will help minimize noise pickup. If that doesn't work you may have to shield the speaker wires.
Also, that fan might be getting ready to burn your place down. ???
What type of output on the MP is driving the speakers?
It definitely seems to be RFI/EMI (assuming the system was truly isolated from earth ground), and I'm not sure of the computer speaker's connections either. These small details are important (directed at the OP).