You are not logged in.

#1 2022-07-03 19:50:08

mdcclxv
Member
Registered: 2022-04-26
Posts: 207

[SOVED] [PARTIALLY] System sounds only getting played if I insist

Hi there,

So I have this weird issue: system sounds, like the one assigned to message boxes, do not get played immediately. It's like this:
1. system boots up
2. the 1st and sometimes the 2nd message box (whichever) do not play the system sound at all (with one ugly exception, read on)
3. any subsequent message box that pops soon enough after step 2 plays the sound
4. a couple a minutes pass without any message box
5. repeat with step 2


The exception: what's worse, every now & then the first system sound produces very loud crackles.

And this happens not only for message boxes, but for anything involving system sounds.
Any other sound (movies, music, browser) plays without any issues.

It  has been going like this from the very first moment after installing Arch.

Any ideas?

Thanks in advance.

Last edited by mdcclxv (2022-07-24 21:25:25)

Offline

#2 2022-07-03 21:33:58

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,533

Re: [SOVED] [PARTIALLY] System sounds only getting played if I insist

Offline

#3 2022-07-03 22:36:49

mdcclxv
Member
Registered: 2022-04-26
Posts: 207

Re: [SOVED] [PARTIALLY] System sounds only getting played if I insist

seth wrote:

Commented out module-suspend-on-idle line and rebooted. Same behavior, nothing has changed sad
If it was some sort of power saving, shouldn't I experience issues with all the audio, including coming from media players?

Offline

#4 2022-07-04 06:25:48

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,533

Re: [SOVED] [PARTIALLY] System sounds only getting played if I insist

Do the dialog boxes exhibit this behavior *while* you're playing other audio?

Offline

#5 2022-07-04 11:09:14

mdcclxv
Member
Registered: 2022-04-26
Posts: 207

Re: [SOVED] [PARTIALLY] System sounds only getting played if I insist

seth wrote:

Do the dialog boxes exhibit this behavior *while* you're playing other audio?

No, that's happening regardless.

Offline

#6 2022-07-04 11:31:28

mdcclxv
Member
Registered: 2022-04-26
Posts: 207

Re: [SOVED] [PARTIALLY] System sounds only getting played if I insist

Apparently commenting module-suspend-on-idle has solved the crackle issue. Haven't got one crackle today. Big step forward smile

Offline

#7 2022-07-04 12:59:07

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,533

Re: [SOVED] [PARTIALLY] System sounds only getting played if I insist

mdcclxv wrote:
seth wrote:

Do the dialog boxes exhibit this behavior *while* you're playing other audio?

No, that's happening regardless.

https://www.merriam-webster.com/dictionary/exhibit
"Do the dialog boxes show this behavior *while* you're playing other audio?"
And I assume the answer would be "yes"?

Offline

#8 2022-07-04 13:33:28

mdcclxv
Member
Registered: 2022-04-26
Posts: 207

Re: [SOVED] [PARTIALLY] System sounds only getting played if I insist

"Do the dialog boxes show this behavior *while* you're playing other audio?"
And I assume the answer would be "yes"?

Oh, now I get the actual question. Yes, it does happen also while playing other audio.

Offline

#9 2022-07-04 13:41:31

mdcclxv
Member
Registered: 2022-04-26
Posts: 207

Re: [SOVED] [PARTIALLY] System sounds only getting played if I insist

Don't know if this is related in any way with may issue: pavucontrol shows no device for system sounds, as it shows for other media, see the screenshot attached.

pavucontrol

Offline

#10 2022-07-04 13:42:59

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,533

Re: [SOVED] [PARTIALLY] System sounds only getting played if I insist

Ok, what kind of message box in particular?
System notifications or dialogs from a specific (set of) client(s)?
Eg. this one here

notify-send foo

If it's a system notification, the notification server will be relevant (if it's not dunst, it'll likely be provided by whatever your desktop environment is)

Offline

#11 2022-07-04 14:12:15

mdcclxv
Member
Registered: 2022-04-26
Posts: 207

Re: [SOVED] [PARTIALLY] System sounds only getting played if I insist

seth wrote:

Ok, what kind of message box in particular?
System notifications or dialogs from a specific (set of) client(s)?
Eg. this one here

notify-send foo

If it's a system notification, the notification server will be relevant (if it's not dunst, it'll likely be provided by whatever your desktop environment is)

I'm on KDE Plasma 5.25.2.

Here are the apps that I'm using on a daily basis and have this issue, in order of personal importance:
1. Thunderbird, on new email notification
2. Audible notification enabled for Caps-Lock under KDE's Modifier Keys
3. KDE's Audible bell enabled, when the shell needs to play a sound (for auto-complete, for example; using Konsole)
4. Dolphin, on file delete confirmation message box
5. Microsoft Edge, notifications while in Google Meet


notify-send foo

only shows a popup, no sound at all, no matter how many times I issue it.

Last edited by mdcclxv (2022-07-04 14:24:45)

Offline

#12 2022-07-04 15:25:34

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,533

Re: [SOVED] [PARTIALLY] System sounds only getting played if I insist

Do you have the same thunderbird problem when using https://wiki.archlinux.org/title/Thunde … ifications ?
Sounds like a problem exclusive to the KDE event notifcation daemons, this thing here https://unix.stackexchange.com/question … n-plasma-5

Offline

#13 2022-07-04 16:57:39

mdcclxv
Member
Registered: 2022-04-26
Posts: 207

Re: [SOVED] [PARTIALLY] System sounds only getting played if I insist

seth wrote:

Do you have the same thunderbird problem when using https://wiki.archlinux.org/title/Thunde … ifications ?
Sounds like a problem exclusive to the KDE event notifcation daemons, this thing here https://unix.stackexchange.com/question … n-plasma-5

I checked Thunderbird's config editor, the mail.biff.use_system_alert setting is on true (never meddled with it) and I already have libnotify installed.
If I go to Thunderbird's General settings, where I can pick the new email notification sound, there is a Play button. I have to click that button 2 or 3 times until the sound actually plays.

As for he second link, not sure I get it, I'm not trying to disable system sounds, I'm trying to make them work smile  That volume slider works fine for me. Mute also works.

Offline

#14 2022-07-04 17:10:33

mdcclxv
Member
Registered: 2022-04-26
Posts: 207

Re: [SOVED] [PARTIALLY] System sounds only getting played if I insist

I noticed one thing while clicking that Play button in Thunderbird's settings: on the second click I could hear the end of the notification sound in crescendo volume. So it got me thinking: is there by any chance a setting hidden in some config file that makes the system sounds play in crescendo volume so the first one getting played is actually being played at zero volume?

Offline

#15 2022-07-05 07:42:14

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,533

Offline

#16 2022-07-05 11:02:57

mdcclxv
Member
Registered: 2022-04-26
Posts: 207

Re: [SOVED] [PARTIALLY] System sounds only getting played if I insist


Tried running that from cli, this is what I got:

sudo amixer -c 1 sset "Auto-Mute Mode" Disabled
amixer: Unable to find simple control 'Auto-Mute Mode',0

alsamixer doesn't show any "Auto-Mute Mode" device. In fact shows almost nothing sad
alsamixer

aplay ouput:

~: aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
card 0: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
card 1: HDMI [HDA ATI HDMI], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: HDMI [HDA ATI HDMI], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: HDMI [HDA ATI HDMI], device 8: HDMI 2 [U32R59x]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 1: HDMI [HDA ATI HDMI], device 9: HDMI 3 [HS160PC]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: HDMI [HDA ATI HDMI], device 10: HDMI 4 [HDMI 4]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: Generic [HD-Audio Generic], device 0: ALC1220 Analog [ALC1220 Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 2: Generic [HD-Audio Generic], device 1: ALC1220 Digital [ALC1220 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Last edited by mdcclxv (2022-07-05 11:04:34)

Offline

#17 2022-07-05 11:18:37

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,266

Re: [SOVED] [PARTIALLY] System sounds only getting played if I insist

The card you'd want to look at is the card 2 so alsamixer/amixer commands should be invoked with -c2, so

amixer -c2 #For the general list of available controls
amixer -c2 sset "Auto-Mute Mode" Disabled

if such a control would be present. However Auto-Mute is normally simply for determining whether the speaker should still get sound with a headphone jack plugged in or not and will likely have little to no bearing on your issue with the system sounds.

System sounds are always a bit of a pain point because they are usually too small to properly fill playback buffers. iirc there was at least a pipewire bug not unlike what you are describing which should have however been fixed and by newer version and since you're using pulse that shouldn't inherently be relevant either.

power_saving issues could still be relevant though and there are drivers with bugs there, so to test in that direction try adding /etc/modprobe.d/disableHDAPowerSave.conf

options snd-hda-intel power_save=0

and rebooting.

FWIW does simulating system sounds lead to the same issues? e.g. if you are using thunderbird that will likely fall to canberra for these kind of beeps so try

canberra-gtk-play -i message

which should get you the message "plop". Does that exhibit the same issues?

Offline

#18 2022-07-05 13:52:45

mdcclxv
Member
Registered: 2022-04-26
Posts: 207

Re: [SOVED] [PARTIALLY] System sounds only getting played if I insist

@V1del: thanks for the elaborate answer. Couple of issues though, before trying anything.

1. Card no 1 is correct, because that's where my speakers are plugged in (device #9, HDMI3) and it's set as fallback. Card no 2 has the headphones.

2. About snd-hda-intel: does it have anything to do with any Intel hardware? Because I have none. Pure AMD platform here. I reckon it could be just referring to some Intel compatible stuff, that's why I'm asking.

As for running "canberra-gtk-play -i message", same behavior, only the second one actually played. I'll wait for an answer to point 2 and then retry.

Offline

#19 2022-07-05 14:19:43

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,533

Re: [SOVED] [PARTIALLY] System sounds only getting played if I insist

@V1del also nb

mdcclxv wrote:

Yes, it does happen also while playing other audio.

@mdcclxv,

lsmod | grep snd

Does all the audio go over card #1 or only the system sounds (while you're playing music on #2 over the HPs)?
What if you make card #2 the default device (to cut out the HDMI part for a test)?

Offline

#20 2022-07-05 16:18:22

mdcclxv
Member
Registered: 2022-04-26
Posts: 207

Re: [SOVED] [PARTIALLY] System sounds only getting played if I insist

Does all the audio go over card #1 or only the system sounds (while you're playing music on #2 over the HPs)?

Except Google Meet, everything goes through this, as it is the fallback device. That includes media players, browser etc.


What if you make card #2 the default device (to cut out the HDMI part for a test)?

Now that is a damn simple test that did not cross my mind. Will try and get back. Thanks!!!

Last edited by mdcclxv (2022-07-05 16:20:55)

Offline

#21 2022-07-06 11:50:14

mdcclxv
Member
Registered: 2022-04-26
Posts: 207

Re: [SOVED] [PARTIALLY] System sounds only getting played if I insist

What if you make card #2 the default device (to cut out the HDMI part for a test)?

Genius smile  System sounds play perfectly, that is, on the very first attempt, via the integrated sound card. Even more, if I switch the fallback device back to HDMI, they play with a huge delay, I have to reboot the system in order to have them playing like before, with a delay of only 1-2 attempts.

Media plays just fine via HDMI. So I suppose it boils down to the playback buffers V1del was talking about. While the obvious solution is to switch the speakers with the headphones and use the HDMI as media output, I would very much like to keep the current layout (due to physical routing of cables) and fix the HDMI output.

Can I configure the playback buffers to be very small, but just for HDMI sound device?

Offline

#22 2022-07-06 13:41:16

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,266

Re: [SOVED] [PARTIALLY] System sounds only getting played if I insist

I wonder whether canberra actually uses pulses sample cache and if that isn't warm yet the first sound fails to play and/or it's a bug in canberra that it just uploads to the sample cache and does not trigger actual playback of the sample if it isn't yet present... which would however bite itself with the normal analog card working (... unless, you did completely reboot again before testing with the analog card so that it's a valid "first try" again, right?)

Does e.g.

PULSE_LATENCY_MSEC=30 canberra-gtk-play -i message
#for the fun of it to check whether it's some internal canberra detail with the pulse backend
CANBERRA_DRIVER=alsa  canberra-gtk-play -i message

make a difference. If my current theory is correct the first one should still fail for the first attempt and work fine for further ones and the second one should actually work (... granted you have a proper pulseaudio-alsa setup)

FWIW if my though process is correct you should be able to "force" the faulty behavior by restarting pulse ( systemctl --user restart pulseaudio ) an/ or playing with the sample cache e.g.

pacmd list-samples
pacmd play-sample
pacmd remove-sample-name

before and after a canberra playback attempt

Last edited by V1del (2022-07-06 14:56:10)

Offline

#23 2022-07-06 15:07:35

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,533

Re: [SOVED] [PARTIALLY] System sounds only getting played if I insist

Since his default environment is KDE, it's probably not canberra specific.
If this wasn't a problem also while the output is busy (during media playback over HDMI) I'd opt for snd-hda-codec-*hdmi.enable_silent_stream=true …

Offline

#24 2022-07-06 15:40:20

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,266

Re: [SOVED] [PARTIALLY] System sounds only getting played if I insist

Knotifications also uses canberra AFAICS: https://archlinux.org/packages/extra/x8 … fications/ though not on my system to effectively verify, linked sonames don't contain phonon which would be the other alternative.

Last edited by V1del (2022-07-06 15:40:51)

Offline

#25 2022-07-10 20:56:01

mdcclxv
Member
Registered: 2022-04-26
Posts: 207

Re: [SOVED] [PARTIALLY] System sounds only getting played if I insist

Sorry for the late answer, had to take an unexpected trip and just got home, it's really late here. I will try tomorrow and get back with news. Thanks smile

Offline

Board footer

Powered by FluxBB