Sound crackling with connected speakers

AMD Framework 13, October 2023 Variant

Situation:
connected speakers via 3.5mm cable, tested two sets of cables.
KDE Neon, Kernel 6.11, Plasma 6.3.3, 32gig RAM, 7640u

Movement of the mouse makes different sounds over the connection. Its actually not the movement itself but the change on the screen, scrolling in a browser makes more and a different sound.

One can distinctively hear what kind of movement the mouse did.

As I fail to actually describe the phenomena properly, here a video, might be a bit quiet.

It also happens when I connect the speakers over an USB-C adapter. And also when I connect the USB-C dongle via USB A

edit The actual question, this is annoying, as its constantly there when browsing around and the music usually got not so loud parts. Is t here something I can do?

edit 2 a powered USB Hub did not change anything

So that sounds like the classic problem with onboard DACs, where they aren’t properly shielded from other electrical noise in the system.

However:

Makes it more confusing, because it sounds like the digital to analogue conversion would no longer happen in the laptop itself?

If I’m understanding correctly this I think starts to get into weird “electricity is magic” territory. Have you tried this with the laptop not plugged into anything? Do you also hear it over the internal speakers?

I think starts to get into weird “electricity is magic” territory.

I have feared that answer when I had the same effect with the USB-C DAC on a powered hub..I mean, the thing is as disconnected and far away from the actual laptops as it gets.

Have you tried this with the laptop not plugged into anything?

Yes, the internal Speakers seem to not have the problem. I also have not noticed it with bluetooth headphones, although, those just might not be loud enough. I dont have a bluetooth to 3.5mm adapter to test that direction


Could it be that the presence of the laptop itself 50 cm away from at least one speaker does some interference? Like old 2G phones? I noticed the same effect with a mobile speaker connected via 3.5mm cable.

The only hard fact I have for now is that movement on the screen has an audible effect. I assume its something gpu/APU related.

edit I moved the laptop around and even unplugged one speaker. Maybe its interference over the active cable that acts as antenna..but..its not coiled or anything. I am at a loss here. I mean, what can I even do for more diagnostics? Analise the electromagnetic spectrum? Get a wave-meter-thingy (spectroscope?) out to measure the signal on the wire?

edit 2 this whole thing annoyed me enough that I got behind the desk and checked all the wiring. The speakers had an extension cord running. When plugged in without the extension cord in the audio interface there is no audible interference stuff going. So this is better for this set of speakers. As I have heard the same effect with mobile, battery powered speakers connected with a shorter cable I think its really the unshielded wire picking something up..at least this is my current guess. No clue if this is something with my particular framework composition (SSD, RAM + CPU).

Hi,
This is sometimes caused by incorrect ALSA sound mixer control settings.
Sometimes a reboot will cure the problem.
Other times, you will need to try to reset the ALSA mixer controls to defaults.
Summary of cause:
The sound chip can select a number of different physical inputs to record mic sounds from.
Normally this would be the “mic” or “line in”, but this can also be other inputs, that may or may not be connected to anything, and thus capture sounds related to computer operations.
Much like you see here, the sound changes as the mouse moved around the page and the page moved.

It also does not help that some sound chips can take the mic input and send it straight to the speakers, but the control for that is sometimes hidden, so there is not obvious way to turn it off.
Thus my suggestion to reboot might help.
I have a FW16, and not a FW13, so I cannot help easily.
if you post the output of “amixer -c0 contents” and “amixer -c1 contents” I might be able to help identify which setting needs adjustment.

So, a reboot will definitely not do anything as I noticed this…err. phenomena, for quite a while

amixer -c0 contents

numid=1,iface=CARD,name=‘HDMI/DP,pcm=3 Jack’
; type=BOOLEAN,access=r-------,values=1
: values=on
numid=7,iface=CARD,name=‘HDMI/DP,pcm=7 Jack’
; type=BOOLEAN,access=r-------,values=1
: values=off
numid=13,iface=CARD,name=‘HDMI/DP,pcm=8 Jack’
; type=BOOLEAN,access=r-------,values=1
: values=on
numid=2,iface=MIXER,name=‘IEC958 Playback Con Mask’
; type=IEC958,access=r-------,values=1
: values=[AES0=0x0f AES1=0xff AES2=0x00 AES3=0x00]
numid=8,iface=MIXER,name=‘IEC958 Playback Con Mask’,index=1
; type=IEC958,access=r-------,values=1
: values=[AES0=0x0f AES1=0xff AES2=0x00 AES3=0x00]
numid=14,iface=MIXER,name=‘IEC958 Playback Con Mask’,index=2
; type=IEC958,access=r-------,values=1
: values=[AES0=0x0f AES1=0xff AES2=0x00 AES3=0x00]
numid=3,iface=MIXER,name=‘IEC958 Playback Pro Mask’
; type=IEC958,access=r-------,values=1
: values=[AES0=0x0f AES1=0x00 AES2=0x00 AES3=0x00]
numid=9,iface=MIXER,name=‘IEC958 Playback Pro Mask’,index=1
; type=IEC958,access=r-------,values=1
: values=[AES0=0x0f AES1=0x00 AES2=0x00 AES3=0x00]
numid=15,iface=MIXER,name=‘IEC958 Playback Pro Mask’,index=2
; type=IEC958,access=r-------,values=1
: values=[AES0=0x0f AES1=0x00 AES2=0x00 AES3=0x00]
numid=4,iface=MIXER,name=‘IEC958 Playback Default’
; type=IEC958,access=rw------,values=1
: values=[AES0=0x04 AES1=0x82 AES2=0x00 AES3=0x02]
numid=10,iface=MIXER,name=‘IEC958 Playback Default’,index=1
; type=IEC958,access=rw------,values=1
: values=[AES0=0x04 AES1=0x00 AES2=0x00 AES3=0x00]
numid=16,iface=MIXER,name=‘IEC958 Playback Default’,index=2
; type=IEC958,access=rw------,values=1
: values=[AES0=0x04 AES1=0x00 AES2=0x00 AES3=0x00]
numid=5,iface=MIXER,name=‘IEC958 Playback Switch’
; type=BOOLEAN,access=rw------,values=1
: values=on
numid=11,iface=MIXER,name=‘IEC958 Playback Switch’,index=1
; type=BOOLEAN,access=rw------,values=1
: values=on
numid=17,iface=MIXER,name=‘IEC958 Playback Switch’,index=2
; type=BOOLEAN,access=rw------,values=1
: values=on
numid=6,iface=PCM,name=‘ELD’,device=3
; type=BYTES,access=r–v----,values=36
: values=0x10,0x00,0x08,0x00,0x6b,0x14,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0xae,0xfc,0x65,0x4c,0x45,0x4e,0x20,0x4c,0x32,0x37,0x71,0x2d,0x33,0x30,0x09,0x07,0x07,0x00,0x00
numid=19,iface=PCM,name=‘Playback Channel Map’,device=3
; type=INTEGER,access=rw-v-R–,values=8,min=0,max=36,step=0
: values=0,0,0,0,0,0,0,0
| container
| chmap-variable=FL,FR
numid=12,iface=PCM,name=‘ELD’,device=7
; type=BYTES,access=r–v----,values=0
: values=
numid=20,iface=PCM,name=‘Playback Channel Map’,device=7
; type=INTEGER,access=rw-v-R–,values=8,min=0,max=36,step=0
: values=0,0,0,0,0,0,0,0
| container
| chmap-variable=FL,FR
numid=18,iface=PCM,name=‘ELD’,device=8
; type=BYTES,access=r–v----,values=36
: values=0x10,0x00,0x08,0x00,0x6a,0x14,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0xe3,0x02,0x27,0x51,0x32,0x37,0x47,0x32,0x47,0x33,0x52,0x33,0x42,0x09,0x07,0x07,0x00,0x00,0x00
numid=21,iface=PCM,name=‘Playback Channel Map’,device=8
; type=INTEGER,access=rw-v-R–,values=8,min=0,max=36,step=0
: values=0,0,0,0,0,0,0,0
| container
| chmap-variable=FL,FR

amixer -c1 contents

numid=15,iface=CARD,name=‘Headphone Jack’
; type=BOOLEAN,access=r-------,values=1
: values=off
numid=13,iface=CARD,name=‘Headset Mic Phantom Jack’
; type=BOOLEAN,access=r-------,values=1
: values=on
numid=14,iface=CARD,name=‘Internal Mic Phantom Jack’
; type=BOOLEAN,access=r-------,values=1
: values=on
numid=16,iface=CARD,name=‘Speaker Phantom Jack’
; type=BOOLEAN,access=r-------,values=1
: values=on
numid=12,iface=MIXER,name=‘Master Playback Switch’
; type=BOOLEAN,access=rw------,values=1
: values=on
numid=11,iface=MIXER,name=‘Master Playback Volume’
; type=INTEGER,access=rw—R–,values=1,min=0,max=87,step=0
: values=52
| dBscale-min=-65.25dB,step=0.75dB,mute=0
numid=2,iface=MIXER,name=‘Headphone Playback Switch’
; type=BOOLEAN,access=rw------,values=2
: values=off,off
numid=1,iface=MIXER,name=‘Headphone Playback Volume’
; type=INTEGER,access=rw—R–,values=2,min=0,max=87,step=0
: values=0,0
| dBscale-min=-65.25dB,step=0.75dB,mute=0
numid=19,iface=MIXER,name=‘PCM Playback Volume’
; type=INTEGER,access=rw—RW-,values=2,min=0,max=255,step=0
: values=254,254
| dBscale-min=-51.00dB,step=0.20dB,mute=0
numid=6,iface=MIXER,name=‘Capture Source’
; type=ENUMERATED,access=rw------,values=1,items=2
; Item #0 ‘Headset Mic’
; Item #1 ‘Internal Mic’
: values=1
numid=8,iface=MIXER,name=‘Capture Switch’
; type=BOOLEAN,access=rw------,values=2
: values=on,on
numid=7,iface=MIXER,name=‘Capture Volume’
; type=INTEGER,access=rw—R–,values=2,min=0,max=63,step=0
: values=63,63
| dBscale-min=-17.25dB,step=0.75dB,mute=0
numid=5,iface=MIXER,name=‘Auto-Mute Mode’
; type=ENUMERATED,access=rw------,values=1,items=2
; Item #0 ‘Disabled’
; Item #1 ‘Enabled’
: values=0
numid=20,iface=MIXER,name=‘Digital Capture Volume’
; type=INTEGER,access=rw—RW-,values=2,min=0,max=120,step=0
: values=60,60
| dBscale-min=-30.00dB,step=0.50dB,mute=0
numid=9,iface=MIXER,name=‘Headset Mic Boost Volume’
; type=INTEGER,access=rw—R–,values=2,min=0,max=3,step=0
: values=0,0
| dBscale-min=0.00dB,step=10.00dB,mute=0
numid=10,iface=MIXER,name=‘Internal Mic Boost Volume’
; type=INTEGER,access=rw—R–,values=2,min=0,max=3,step=0
: values=3,3
| dBscale-min=0.00dB,step=10.00dB,mute=0
numid=4,iface=MIXER,name=‘Speaker Playback Switch’
; type=BOOLEAN,access=rw------,values=2
: values=on,on
numid=3,iface=MIXER,name=‘Speaker Playback Volume’
; type=INTEGER,access=rw—R–,values=2,min=0,max=87,step=0
: values=87,87
| dBscale-min=-65.25dB,step=0.75dB,mute=0
numid=18,iface=PCM,name=‘Capture Channel Map’
; type=INTEGER,access=r–v-R–,values=2,min=0,max=36,step=0
: values=0,0
| container
| chmap-fixed=FL,FR
numid=17,iface=PCM,name=‘Playback Channel Map’
; type=INTEGER,access=r–v-R–,values=2,min=0,max=36,step=0
: values=0,0
| container
| chmap-fixed=FL,FR

this list seems to be a bit longer than it should be. I fear most of this is the connected, aforementioned audio interface. A Focusrite Scarlett 2i2 2nd generation. It also got the interference when used with the long cable.

It also does not help that some sound chips can take the mic input and send it straight to the speakers, but the control for that is sometimes hidden, so there is not obvious way to turn it off.

I don’t know enough about the inner workings of linux sound settings to actively dispute things, but as for now, it seems to be something that a 3meter cable picks up that may or not may be a shielding issue. The laptop sound port and the USB-C dongle (its the white apple thing, apparently the best bang for the buck cheapo USB-C DAC) are both mic+speaker combination ports, but the headphone port on my audio interface is only speaker/headphone jack. So the culprint really seems to be the cable that picks up signals from the laptop. If I had more time, this sounds like an interesting case of Tempest (codename) - Wikipedia stuff..but maybe also not. I know barely enough to know that I don’t know enough.

Anyway, I appreciate your time in any case.

Hi,

I think you describe this as happening even without the USB audio device connected.
So, disconnect the USB audio device. Then, in a terminal window, do:
“alsamixer -c1 -Va”
This will display a number of sliders.
Use the left/right arrow keys to move between them, and the up/down to adjust the levels up/down. Also the “space” key toggles mute switches.
Go to any mixers that mention “Capture” or “Mic” and mute and turn them down to their minimum values.
Hopefully one of them will cure your problem with the speakers.
Let me know which mixer control fixes the problem for you.

Summary: There are two channels.

  1. Capture - for recording sound
  2. Playback - for playing back sound.
  3. Feedback controls - that feedback the capture directly to the playback.
    It is the control for (3) that you are looking for. Set that to mute or lowest level, and it should cure your problems. Unfortunately, the feedback controls are not labeled as such, so it is trial and error to find them.

Interesting thing this alsamixer menu, never seen that before. Always fascinating what tui tools exist build in. Anyway, this changed nothing. I played around with all settings. There is certainly no feedback loop as far as I can see, It would also make no sense that graphical movement induce sound if there would been a device that captures itself