I have a Lenovo laptop charger dating from 2013. It produces coil whine (not very loud, cannot be heard from a sitting position) when the laptop is powered off or in stand by but not when it is unplugged from the laptop. I have read the very informative answers in a previous thread, including this part:
"Most modern AC adapters are switched-mode power supplies. The internal switching frequency of an SMPS is typically low when unloaded and increases with load up to a certain point depending on the design. The no-load frequency is often low enough to be within the human hearing range. In addition, in low or no-load situations, the PWM used to regulate voltage at the inverter stage will be at a low duty cycle creating a "spikey" output profile which is more prone to causing vibration in coils, and the transformer itself will tend to vibrate as well (see Daniel R Hick's answer below for more details). Together, these can lead to audible noise especially in cheaper units which fail to suppress this noise. (...) Ultimately, a whining noise isn't necessarily a sign of trouble in cheaper wall chargers when little or no power is being drawn from them. However, a computer PSU or laptop charger that generates coil noise especially when under load may be defective and you may want to consider replacing it."
But since the charger in question does not make noise when unloaded/unplugged I wonder if the same conclusion about possible defectiveness can hold?