Ground differences are the number one reason for hum in AV . The difference occurs any time you connect two devices that have a separate ground point, which usually means there is a faulty outlet or surge protector. If the hum is persisting then somewhere you are providing another path to ground between your pc and the receiver. Disconnect everything from the pc except the power, mouse, keyboard, optical cable . Make sure to disconnect all video cables as well from the pc. The hum should be gone. Now start plugging in one connector at a time. Be CAREFUL doing this as sometimes you can get a spark when the two grounds meet for the first time. I would use a meter set to AC to find the culprit measuring between the ground on the pc case and my receiver, tv, etc.
I suspect that replacing the audio cable with optical didn't work because you are still connecting two different grounds. Probably through the video cable to the tv, through the tv ground out to a receiver ground. It will continue through everything that has connected grounds until you isolate the problem.
If you use a meter there should be less than 100mv difference between the case of the pc and any other exposed metal on a tv, receiver, dvd, etc. If there is more than that, then the connection between the device and the receptacle ground is bad.