- I am an amlet, and I am a windfall :(
- Hi, amlet * applause *In general, without long introductions - a short history of solving the problem of the appearance of clicks, when nothing is playing, taking into account the
wind , that I am a Windows visitor who wants and tries to switch to Linux. Maybe someone will come in handy. And here also the community
throws rotten tomatoes to tell something: you look and I will become smarter;)
I started my journey with Ubuntu.
Wait - it's too early to throw Well, because to me this world is known only from
fairy tales of articles, as on Linux everything is rosy and healthy, but the instinct of self-preservation does not allow falling into tin of the Gentoo or Slackware type.
')
So, I put on my brand-new, but obviously outdated, Samsung NP350U2B (yes, I also sold Samsung) Ubuntu latest version, and began to live and live, but wonder, wait for everything to become zashis, everything will go away, world peace, and golden rain will fall from the sky ... Yes, Ubunt has given me some goodies compared to the same Windows 7, which is right there on this laptop - the most noticeable to the eye: this is a smaller number of brakes - but happiness, as you know in trifles (Steve, hello): one annoying thing came to light, which, under the hot hand, was also terribly beaten out ...
So, a brief description of the problem: when there is no sound in the headphones, clicks start, although it should be just quiet.
UPD: Here is a solution that is not fully understood. The final solution to the problem at the end of the post.
A feature of the problem was that if you turn on the video (for example, vlc) and pause - there were no clicks. I “solved” the problem with such a nasty hack for several months. Periodic search for a more constructive solution to the problem constantly led to similar
advice , which unfortunately
did not really work at all :(
And then I sat down on Saturday evening to listen to the radio, and since the issue was non-gikovsky, I decided to increase my local geekiness from nothing to do and finally to solve this problem. I threw the call into the chat (well, there were geeks right there, it seemed like they gathered!). One friend responded - Sergey K., who pointed to the file:
/ sys / module / snd_hda_intel / parameters / power_save
and that it is necessary to change 1 to 0. We talked, he confirmed my suspicions that it was somehow connected with saving the battery, etc. He also said something about the fact that after rebooting the value in this file will return to normal, therefore I wrote some tricky script that during the download each time edits this file.
Well, I'm not so smart. And this is not exactly the way I expected. Although many thanks to him for the tip. It was this file that became the starting point of my googling and information search in man, in order to find the solution to the problem. And here it is a cherished swallow, which led to a final solution to the problem:
PowerManagement / ReducedPowerAfter reading diagonally (the skill acquired during the accelerated reading of license agreements on Windows), my attention was drawn to the path:
/usr/lib/pm-utils/power.d/
looked in:
$ ls /usr/lib/pm-utils/power.d/
95hdparm-apm
anacron
disable_wol
intel-audio-powersave
laptop-mode
pci_devices
pcie_aspm
sata_alpm
sched-powersave
usb_bluetooth
wireless
xfs_buffer
And what is this
intel-audio-powersave ?
$ vim /usr/lib/pm-utils/power.d/intel-audio-powersave
Listing (not very big):
#! / bin / sh
# Allow the audio driver to sleep
# once the driver has been inactive for a second.
# This hook should be used with the h97 codecs.
INTEL_AUDIO_POWERSAVE = $ {INTEL_AUDIO_POWERSAVE: -true}
help () {
cat << EOF
- $ 0: Intel Audio powersave parameters.
This hook has 1 tuneable parameter.
INTEL_AUDIO_POWERSAVE = controls whether to save power on battery.
Defaults to true.
EOF
}
audio_powersave () {
["$ INTEL_AUDIO_POWERSAVE" = "true"] || exit $ NA
for dev in / sys / module / snd_ *; do
[-w "$ dev / parameters / power_save"] || continue
printf "Setting power savings for% s to% d ..." "$ {dev ## * /}" "$ 1"
echo $ 1> "$ dev / parameters / power_save" && echo Done. || echo Failed.
done
}
case $ 1 in
true) audio_powersave 1 ;;
false) audio_powersave 0 ;;
help) help ;;
*) exit $ NA
esac
exit 0
After a little deliberation and pretending to be an eye, the method of scientific poking
was enjoyed and it was decided to fix the line as a result:
INTEL_AUDIO_POWERSAVE = $ {INTEL_AUDIO_POWERSAVE: -true}
on
INTEL_AUDIO_POWERSAVE = $ {INTEL_AUDIO_POWERSAVE: -false}
Then restart, wait for the end of the download and ... lo and behold: clicks do not seem to be heard! And what do we have in the above-mentioned file from Sergey K .:
$ cat / sys / module / snd_hda_intel / parameters / power_save
0
Joy, fun and total orgy from the exorbitant joy and own coolness is attached :)
UPD: I achieved what I achieved. The first tomato was in the apple. On a
tip from Manitou you need to do:
$ echo "INTEL_AUDIO_POWERSAVE = false"> /etc/pm/config.d/snd_hda_intel
after reboot:
$ cat / sys / module / snd_hda_intel / parameters / power_save
0