echo "blacklist pcspkr" | sudo tee /etc/modprobe.d/nobeep.conf
With some laptops, when you put it to sleep, it makes a crackling, popping, distorted sound.
It can also happen in other situations
Something that can help is to blacklist the pcspkr
module. Run the following command to do so:
echo "blacklist pcspkr" | sudo tee /etc/modprobe.d/nobeep.conf