What you are hearing are probably the coils of the CPU power converter, when the CPU switches between powersaving modes, so in order to get rid of the sound you have to disable the powersaving modes, which will have a negative impact on power draw.
In order to do this, you have to add the kernel cmdline option cpuidle_sysfs_switch
to your bootloader configuration. Then you can disable modes by writing a 1
to the disable
files in /sys/devices/system/cpu/cpu0/cpuidle/stateX/
.
First change to root by running sudo -i
, then disable states with, for example, echo 1 >/sys/devices/system/cpu/cpu0/cpuidle/state3/disable
.
You'll have to try which powerstates you have to disable. Once you have figured it out, you can make the changes permanent by adding the command lines to /etc/rc.local
, before the last line, which by default is exit 0
.
The official documentation can be found here.