I have a set of speakers that have to work nearly the high end of their volume range (maximum volume). When the jack is connected to a powered-on laptop then everything is fine, no buzzing sound regardless if the laptop is playing music or not. However when I shut down the laptop, the speakers start to emit a buzzing sound. This doesn't happen if I lower the volume. I can also hear the buzzing if I remove the jack from the laptop and turn up the volume.
What is the cause of this and how can I stop the buzzing sound?