https://labs.parabola.nu/https://labs.parabola.nu/favicon.ico?15367742552019-02-18T01:29:45ZParabola Issue TrackerPackages - Bug #2180: alsa chirping buggy noise with external plug headphones and speakershttps://labs.parabola.nu/issues/2180?journal_id=113872019-02-18T01:29:45Zfreemor
<ul></ul><p>I can see from the information you provided that you are using the Extreme kernel. This is most likely where the problem lies. The Exterme kernels patches require much more hands on tuning after install. If you have not done such tuning the lack of it is most likely the cause of your problem.</p>
<p>Unfortunately I'm not versed enough in the extreme kernel to talk you through the necessary adjustments. One of the other devs may be.</p>
<p>As a debugging measure I'd suggest trying with the regular kernel or the regular LTS kernel and see how ALSA behaves. If fine with those then my suspicions are almost certainly confirmed.</p> Packages - Bug #2180: alsa chirping buggy noise with external plug headphones and speakershttps://labs.parabola.nu/issues/2180?journal_id=113882019-02-18T01:35:11Zfreemor
<ul></ul><p>You may also wish to paste the output of:<br /><pre>
lsmod | grep snd
lspci | grep -i audio
aplay -l
cat /proc/asound/cards
cat /proc.asound/modules
</pre></p>
<p>As this will give a much better idea of what you are dealing with sound card wise.</p> Packages - Bug #2180: alsa chirping buggy noise with external plug headphones and speakershttps://labs.parabola.nu/issues/2180?journal_id=113912019-02-18T05:19:19Zbill-auger
<ul></ul><p>one thing i can add off-hand is that you would not need any kernel hacks to change ALSA settings programatically - JACK and it's front-ends expose hooks to run scripts on start and shutdown</p>
<p>the command to mute speakers on JACK start would look something like this:<br /><pre>
amixer -c 1 sset 'Speaker,0' '0%'
</pre></p>
<p>and the command to un-mute speakers on JACK shutdown would look something like this:<br /><pre>
amixer -c 1 sset 'Speaker,0' '100%'
</pre></p> Packages - Bug #2180: alsa chirping buggy noise with external plug headphones and speakershttps://labs.parabola.nu/issues/2180?journal_id=113922019-02-18T05:47:38Znona
<ul></ul><p>Thank you for all this. I think that I need to clarify something:</p>
<p>- When I said jack, I meant the physical device :) . I think that JACK is actually installed, but I don't think that it's running (`ps aux | grep jack` returns nothing)<br />- This issue happens with linux-libre and -lts-xtreme (I couldn't boot -lts last time I tried--months ago).</p>
<p>About my question on muting the Speaker: where would I set that command to set 0% volume on Speaker when the headphones are connected? (if not using pulseaudio nor JACK).</p>
<p>I don't consider this to be very urgent or anything, by the way.</p>
<p>Regarding the extra information:</p>
<pre>
lsmod | grep snd
snd_hda_codec_realtek 73728 1
snd_hda_codec_generic 69632 1 snd_hda_codec_realtek
snd_hda_codec_hdmi 49152 1
snd_hda_intel 32768 5
snd_hda_codec 106496 4 snd_hda_intel,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_codec_realtek
snd_hda_core 65536 5 snd_hda_intel,snd_hda_codec,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_codec_realtek
snd_hwdep 16384 1 snd_hda_codec
snd_pcm 90112 5 snd_hda_intel,snd_hda_codec,snd_hda_core,snd_hda_codec_hdmi
snd_timer 28672 2 snd_pcm
snd 77824 16 snd_hda_intel,snd_hwdep,snd_hda_codec,snd_timer,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_codec_realtek,snd_pcm
soundcore 16384 1 snd
lspci | grep -i audio
03:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Device 15de
03:00.6 Audio device: Advanced Micro Devices, Inc. [AMD] Device 15e3
aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: Generic [HD-Audio Generic], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Generic_1 [HD-Audio Generic], device 0: ALC295 Analog [ALC295 Analog]
Subdevices: 0/1
Subdevice #0: subdevice #0
cat /proc/asound/cards
0 [Generic ]: HDA-Intel - HD-Audio Generic
HD-Audio Generic at 0xfe088000 irq 54
1 [Generic_1 ]: HDA-Intel - HD-Audio Generic
HD-Audio Generic at 0xfe080000 irq 55
cat /proc.asound/modules
cat: /proc.asound/modules: No such file or directory
cat /proc/asound/modules
0 snd_hda_intel
1 snd_hda_intel
</pre> Packages - Bug #2180: alsa chirping buggy noise with external plug headphones and speakershttps://labs.parabola.nu/issues/2180?journal_id=113932019-02-18T06:58:07Zbill-auger
<ul></ul><p>ok i misunderstood about JACK; but the `amixer` command would be the same - 'Speaker' and 'Headphones' are usually different "pins" - you can see them all with `alsamixer`</p>
<p>if all you are asking about is if the speakers should go mute when you plug headphones into the physical headphone jack, that is normally handled automatically by the kernel module, and there is often a "pin" for that switch you can also find in `alsamixer` (named something like "auto-mute", "auto-sense", or "jack-sensor") - this is only true f the sound card actually supports that feature - it is not always the case - and for desktops, sometimes it will work only for the jack on the front of the computer or the one on the rear</p>
<p>for now the first thing to do is see how the LTS kernel behaves - if that does not work, then i would try it with a different distro - if that does not work, then the people to ask for help would be the ALSA devs</p> Packages - Bug #2180: alsa chirping buggy noise with external plug headphones and speakershttps://labs.parabola.nu/issues/2180?journal_id=113942019-02-18T07:06:43Zbill-auger
<ul></ul><p>nona wrote:</p>
<blockquote>
<p>8. To hear the interference, start increasing the level of the internal Speaker little by little. The noise should appear at around 55% (or earlier, if you set the Master higher).</p>
</blockquote>
<p>FWIW, that description would be consistent with feeedback from a microphone</p> Packages - Bug #2180: alsa chirping buggy noise with external plug headphones and speakershttps://labs.parabola.nu/issues/2180?journal_id=113952019-02-18T08:31:48Znona
<ul></ul><p>bill-auger wrote:</p>
<blockquote>
<p>ok i misunderstood about JACK;</p>
</blockquote>
<p>No worries</p>
<blockquote>
<p>but the `amixer` command would be the same - 'Speaker' and 'Headphones' are usually different "pins" - you can see them all with `alsamixer`</p>
</blockquote>
<p>Yep, I got that much (that's how I debugged). Thanks.</p>
<blockquote>
<p>if all you are asking about is if the speakers should go mute when you plug headphones into the physical headphone jack, that is normally handled automatically by the kernel module, and there is often a "pin" for that switch you can also find in `alsamixer` (named something like "auto-mute", "auto-sense", or "jack-sensor") - this is only true f the sound card actually supports that feature - it is not always the case - and for desktops, sometimes it will work only for the jack on the front of the computer or the one on the rear</p>
</blockquote>
<p>Oh! But I have that and it does not make a difference (enabled or disabled, it's the same). That's why I wanted to know if there was a way to execute the command that you posted via a edev rule (or something).</p>
<blockquote>
<p>for now the first thing to do is see how the LTS kernel behaves - if that does not work, then i would try it with a different distro - if that does not work, then the people to ask for help would be the ALSA devs</p>
</blockquote>
<p>I will try with Trisquel and report back.</p>
<p>By the way, my linux-libre is broken as of 4.20.10-gnu-1 (amdgpu is missing; will create a bug report--this one is actually important), but this same behaviour used to happen with previous versions of linux-libre.</p> Packages - Bug #2180: alsa chirping buggy noise with external plug headphones and speakershttps://labs.parabola.nu/issues/2180?journal_id=113962019-02-18T08:37:16Znona
<ul></ul><p>bill-auger wrote:</p>
<blockquote>
<p>nona wrote:</p>
<blockquote>
<p>8. To hear the interference, start increasing the level of the internal Speaker little by little. The noise should appear at around 55% (or earlier, if you set the Master higher).</p>
</blockquote>
<p>FWIW, that description would be consistent with feeedback from a microphone</p>
</blockquote>
<p>Yep, that's what I thought, but they are all at level 0 (Mic Boost, Capture, Digital, Internal Mic Boost; no way to mute), and if I have the headphones on, there should not be a way for feedback, right? My headphones do not have a microphone either. As I said, the issue happens with both the speakers and headphones.</p>
<p>I am inclined to think that this has to do with core ALSA, because similar behaviour shows up in Arch, Ubuntu, Debian, Fedora... forums.</p> Packages - Bug #2180: alsa chirping buggy noise with external plug headphones and speakershttps://labs.parabola.nu/issues/2180?journal_id=113992019-02-18T13:46:33Zfreemor
<ul></ul><p>Form the above I can see that you have 2 sound devices both snd_hda_intel devices.</p>
<p>This means that you will most likely have to set Index values in /etc/modules.d/asla-base.conf (or similar) to ensure that the one you prefer is always the default. With multiple sound devices the order they are detected can change from boot to boot and this change which is the "default" card.</p>
<p>More Details here:</p>
<p><a class="external" href="https://alsa.opensrc.org/MultipleCards">https://alsa.opensrc.org/MultipleCards</a></p>
<p>Also as they are both snd_hda_intel you MIGHT have to manually have to specify the model= option while loading the modules. Some machines (Notably Dell machines) wire up their sound chips odly and thus need the model= specifier to get things to work right. You can see a list of all the model= options here:</p>
<p><a class="external" href="http://git.alsa-project.org/?p=alsa-kernel.git;a=blob;f=Documentation/sound/alsa/HD-Audio-Models.txt;hb=HEAD">http://git.alsa-project.org/?p=alsa-kernel.git;a=blob;f=Documentation/sound/alsa/HD-Audio-Models.txt;hb=HEAD</a></p> Packages - Bug #2180: alsa chirping buggy noise with external plug headphones and speakershttps://labs.parabola.nu/issues/2180?journal_id=114062019-02-18T21:08:30Znona
<ul></ul>Hey! This worked!:
<ol>
<li>Create a /etc/modprobe.d/alsa.conf</li>
<li>Add<br /><pre>
options snd-hda-intel model=alc295-hp-x360
</pre><br /><a class="external" href="https://wiki.archlinux.org/index.php/Advanced_Linux_Sound_Architecture/Troubleshooting#Crackling_sound_through_mini-jack_(headphones_connector)">https://wiki.archlinux.org/index.php/Advanced_Linux_Sound_Architecture/Troubleshooting#Crackling_sound_through_mini-jack_(headphones_connector)</a><br /><a class="external" href="https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/Documentation/sound/hd-audio/models.rst">https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/Documentation/sound/hd-audio/models.rst</a></li>
<li>Reboot</li>
</ol>
<p>So far, pristine sound. Thanks!</p> Packages - Bug #2180: alsa chirping buggy noise with external plug headphones and speakershttps://labs.parabola.nu/issues/2180?journal_id=114072019-02-18T21:16:29Zbill-auger
<ul><li><strong>Status</strong> changed from <i>unconfirmed</i> to <i>not-a-bug</i></li></ul> Packages - Bug #2180: alsa chirping buggy noise with external plug headphones and speakershttps://labs.parabola.nu/issues/2180?journal_id=132792019-11-05T07:41:54Znona
<ul></ul><p>The issue has been back for a while. Sorry for the delay on reporting. I still have <pre>model=alc295-hp-x360</pre> mentioned above. I run linux-libre, I will try with linux-libre-lts</p> Packages - Bug #2180: alsa chirping buggy noise with external plug headphones and speakershttps://labs.parabola.nu/issues/2180?journal_id=132802019-11-05T12:58:43Zfreemor
<ul></ul><p>What you are describing sounds like either electrical interference from the Mobo or Cliping/over modulation</p>
<p>Problem a.) electrical interference is due to poor circuit design that laaows noise from the MoBo to leak into the <br />audio channels usually seem at high amplifications (volumes to max). Try setting the PCM and headphone volumes to only about 3/4s or 75%<br />then raise the master.</p>
<p>Over modulation is a different problem again caused by over amplification. With this problem you are taking a sound that was recoded at a laoud volume and then trying to amplify it beyond the limits of the hardware.<br />This causes "cliping" (the tops and bottoms of higher amplitude sections of the signal are lost (if you looked at the output in an oscilliscope it'd look like someone clipped them off) causing distortion. Or <br />over modulation which is just where the wave form gets mangled because of overdriving the amplifier/speakers.</p>
<p>This too is usually helped by not setting the PCM/etc to 100%</p>
<p>Are you using amplified speakers. A common reason I have seen for people having this problem is using unamplified speakers on a system that was designed for amplified (powered) external speakers. Because the output <br />from the soundcard expects to be run to amplified speakers it is too quiet when played on non amplified ones causing people to overdrive their sound cards amps.</p>
<p>fun fact: in days long gone computer without soundcards were programmed to run the cpu through timed loops <br />so that an AM radio placed next to it would pick up the electrical noise from the MoBo ans make music (really squeaky music)<br />but when you didn't have a sound card it was still very cool.</p>
<p>A recording of the interference will help to Dx whether it is cuircit noise, clipping/Overmodulation, <br />Or some other problem like sample recorded at a nonstandard sample rate (don't get me started on all the problem<br />with "HiRes" FLACs) etc.</p> Packages - Bug #2180: alsa chirping buggy noise with external plug headphones and speakershttps://labs.parabola.nu/issues/2180?journal_id=132872019-11-07T08:27:15Znona
<ul></ul><p>Oh, that is very interesting. I did the 75 % volume on the headphones and the PCM. It has worked so far. One point less for the HP envy X360 (of the many that I have recorded; read: don't buy this crap).</p> Packages - Bug #2180: alsa chirping buggy noise with external plug headphones and speakershttps://labs.parabola.nu/issues/2180?journal_id=132892019-11-07T10:52:46Zbill-auger
<ul></ul><p>i cant say for sure if this is your problem; but often when ALSA<br />has the wrong settings for your sound card, you can specify a<br />'model' in /etc/modprobe.d/alsa-base.conf</p> Packages - Bug #2180: alsa chirping buggy noise with external plug headphones and speakershttps://labs.parabola.nu/issues/2180?journal_id=132982019-11-08T09:45:12Znona
<ul></ul><p>nona wrote:</p>
<blockquote>
<p>Oh, that is very interesting. I did the 75 % volume on the headphones and the PCM. It has worked so far..</p>
</blockquote>
<p>And it no longer works.<br /><pre>
$ uname -a
Linux localhost 5.3.8-gnu-1 #1 SMP PREEMPT @1572742724 x86_64 GNU/Linux
</pre></p>
<p>bill-ager wrote:</p>
<blockquote>
<p>i cant say for sure if this is your problem; but often when ALSA<br />has the wrong settings for your sound card, you can specify a<br />'model' in /etc/modprobe.d/alsa-base.conf</p>
</blockquote>
<p>I also have this in my modprobe.d/alsa.conf<br /><pre>
options snd-hda-intel model=alc295-hp-x360
</pre></p>
<p>I think that I will go over:<br />- <a class="external" href="https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/Documentation/sound/hd-audio/models.rst">https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/Documentation/sound/hd-audio/models.rst</a><br />- <a class="external" href="https://wiki.archlinux.org/index.php/Advanced_Linux_Sound_Architecture/Troubleshooting#Crackling_sound_through_mini-jack_(headphones_connector)">https://wiki.archlinux.org/index.php/Advanced_Linux_Sound_Architecture/Troubleshooting#Crackling_sound_through_mini-jack_(headphones_connector)</a></p>
<p>And these may help too:<br />- <a class="external" href="https://docs.slackware.com/howtos:hardware:audio_and_snd-hda-intel">https://docs.slackware.com/howtos:hardware:audio_and_snd-hda-intel</a></p> Packages - Bug #2180: alsa chirping buggy noise with external plug headphones and speakershttps://labs.parabola.nu/issues/2180?journal_id=133152019-11-11T17:36:32Znona
<ul></ul><p>I have this in /etc/modprobe.d/alsa.conf, and the sound seems to be quite good now:<br /><pre>
options snd-hda-intel model=alc295-hp-x360,hp-mute-led-mic3
</pre></p>
<p>I wish this helps someone.</p> Packages - Bug #2180: alsa chirping buggy noise with external plug headphones and speakershttps://labs.parabola.nu/issues/2180?journal_id=133582019-11-16T19:33:07Zbill-auger
<ul></ul><p>oh that is good news - it can be tricky finding the right set of<br />params for some sound cards</p> Packages - Bug #2180: alsa chirping buggy noise with external plug headphones and speakershttps://labs.parabola.nu/issues/2180?journal_id=138232020-02-15T20:49:58Znona
<ul></ul><p>I know that I keep coming back to this. I found something new:</p>
<ol>
<li>Turn on computer</li>
<li>start mocp</li>
<li>hibernate</li>
<li>turn on computer without headphones</li>
<li>plug-in headphones --> <strong>no issues</strong></li>
<li>hibernate</li>
<li>plug-in headphones</li>
<li>turn on computer with headphones --> <strong>chirping</strong></li>
<li>un-plug headphones</li>
<li>hibernate</li>
<li>turn on computer without headphones</li>
<li>plug-in headphones --> <strong>no issues</strong></li>
</ol>
<p>Super weird! :S . <br />4.19.101-gnu-1-lts openrc</p>