Plasma Settings Sound test

The test buton in the sound settings is very helpful.

We all know that pipewire (or wireplumber) has some wake up time after being suspended. The test sounds are reasonably short. Sound migst seem broken as when clicking a speaker to test the sound nothing might be heard as pipewire needs time to wake up.

I see a couple of solutions

  1. as the user probably wants to test after making a change pre-wakeup pipewire
  2. enter a short delay to the test sounds to make sure that when sounds plays it can actually be heard
  3. make the user aware of the problem or even give some visual indication that pipewire ist suspended.

i would be against any kind for automatic delay as it would make the UX frustrating when you click on something and nothing happens.

better would be for wire_______ and co to figure out their issues and for them to work as they are expected to work… if that means checking in with each other to make sure sound is actually going out, than that’s what they need to do.

1 Like

I’m trying to understand…

  1. True statement.
  2. Not a (universally) True statement: noticing the time it takes for Pipewire/wireplumber to ā€˜wake up’ after suspend is not a universal experience, most people don’t notice any delay at all - so the ā€˜issue’ is likely due to your situation, not inherent.

Additionally, you state that (as you stated in your ā€˜Solution’ ) you are deliberately trying to click the ā€˜test’ button immediately on resume ā€˜as the user probably wants to test after making a change pre-wakeup pipewire’.

Well no, if YOU are making changes to your pre-wakeup pipewire, then you are definitely an edge case, not covered by the guarantee.

Notably:

  1. Everyone knows that suspend is fast, but I would suspect most folks know it is not ā€˜instantaneous’ and that there is likely a very slight (almost imperceptable) delay… for example, after suspending, I must wait a short while before hearing a ā€˜click’ (likely the PSU coming fully online) and seeing video as the screen wakes up… I do also hear (as I have an external amplifier) a slight ā€˜bump’ in the speakers.

My experience is that I actually hear the audio come online before my screen wakes up (HDTV over HDMI)…

However, the ultimate solution is simply to give your machine a second to wake up, not to build in extra delays (which themselves cannot be activated on a suspended machine, they would simply make it longer for the machine to resume).

Also, the statement ā€˜as the user probably wants to test after making a change pre-wakeup pipewire’ is rather confusing in itself… you changed something in pipewire, then you need to suspend and resume, and immediately test it on resume?

Why?

If you’re testing balancing power saving settings with a fast reliable wake-up or something like that… well then the failure for sound to emerge immediately on clicking is all the information you need.

More to the point - what is the actual problem here?

I find the solution rather telling:
`Solution 1: as the user probably wants to test after making a change pre-wakeup pipewire’.

Well, that’s not a solution - and if that’s the issue, then the solution is extremely simple… be aware that resuming from suspend is not likely to be completed in less than a few hundred milliseconds - to expect this is unreasonable.

Let us know if there’s any delay for you.

I just talk about useability here.

Usecase:

  • I’m hapily using my computer and don’t need sound for a while.
  • Now I want sound and I want to check if my speakers are on or my headphones or my AVR
  • I go to Settings sound and click test and click one of the speakers
  • I hear nothing. What could be wrong​:scream:

What actualy happend is that PIpewire went to sleep and didn“t wake up in time to play a sound. WIth no visible clue. Yes I know I can click again and it probably will play a sound. But I will be already on hand and knees to check if the cat has again dislodged the cables.

The solution: Visiable clue, wake up pipewire before I even had a chance to test or a smal hint that sound might not play immediately. Or all of the above.

why not just go to the speaker icon in the system tray and see which sink the sound will be going to.

from this view i know the sound will be coming from the speakers, but if the middle item was selected i would know it will be going to my headphones plugged into the front panel.

Ah, ok - I was thinking about suspending the machine, not the audio suspending… that’s why I was talking about resume from suspend.

The fix for your issue is to change, or disable, the WirePlumber configuration to adjust the ā€˜suspend’ timeout. If you adjust to zero, then it disables suspend entirely.

You need to edit the WirePlumber Lua configuration file - and it is better to edit a copy in your own configuration directory so that updates will not overwrite any changes.

  • First, copy the following instructions and save them to a markdown file for later reference:
  1. kate ~/.config/wireplumber/main.lua.d/50-alsa-config.lua

  2. Search for apply_properties { and edit like this:

apply_properties = {
    ["session.suspend-timeout-seconds"] = 0,   -- Disable suspend
    ["node.pause-on-idle"] = false,            -- Prevent pausing on idle
},

Setting 0 disables the timeout. Setting ["node.pause-on-idle"] to false can also help with resume delays according to a post I found on Lemmy: https://old.lemmy.ca/post/34443128

When you’re ready, you can restart:

systemctl --user restart pipewire wireplumber

You could also log out, or go the whole hog and reboot.

If it doesn’t work, then remove the edits:

rm ~/.config/wireplumber/main.lua.d/50-alsa-config.lua

I’ve been using distros with PipeWire for years and I don’t think I’ve ever encountered this. Is it the result of some kind of power saving tweak you or your distro has applied?

I think you need to dig into the issue and its root cause first.

1 Like
Apr 03 08:34:31 ws-study systemd[2061]: Started drkonqi-coredump-launcher@0-1-2732_2733-1000.service - Launch DrKonqi for a systemd-coredump crash (PID 2732/UID 1000).
Apr 03 08:34:31 ws-study drkonqi-coredump-launcher[3543]: Unable to find file for pid 21442 expected at "kcrash-metadata/vivaldi-bin.7f319b1e5754498c9a9fffe557cad472.21442.ini"
Apr 03 08:34:31 ws-study systemd[2061]: Started drkonqi-coredump-launcher@1-2-2732_2733-1000.service - Launch DrKonqi for a systemd-coredump crash (PID 2732/UID 1000).
Apr 03 08:34:31 ws-study drkonqi-coredump-launcher[3544]: Unable to find file for pid 69592 expected at "kcrash-metadata/vivaldi-bin.7f319b1e5754498c9a9fffe557cad472.69592.ini"
Apr 03 08:34:31 ws-study systemd[2061]: Started drkonqi-coredump-launcher@2-3-2732_2733-1000.service - Launch DrKonqi for a systemd-coredump crash (PID 2732/UID 1000).
Apr 03 08:34:32 ws-study systemd[2061]: Started drkonqi-coredump-launcher@3-4097-2732_2733-1000.service - Launch DrKonqi for a systemd-coredump crash (PID 2732/UID 1000).
Apr 03 08:34:32 ws-study drkonqi-coredump-launcher[3547]: Unable to find file for pid 2294 expected at "kcrash-metadata/kwin_wayland.7f319b1e5754498c9a9fffe557cad472.2294.ini"
Apr 03 08:34:32 ws-study systemd[2061]: Started drkonqi-coredump-launcher@4-8193-2732_2733-1000.service - Launch DrKonqi for a systemd-coredump crash (PID 2732/UID 1000).
Apr 03 08:34:32 ws-study drkonqi-coredump-launcher[3550]: Unable to find file for pid 42432 expected at "kcrash-metadata/DesktopEditors.7f319b1e5754498c9a9fffe557cad472.42432.ini"
Apr 03 08:34:32 ws-study systemd[2061]: Started drkonqi-coredump-launcher@5-8194-2732_2733-1000.service - Launch DrKonqi for a systemd-coredump crash (PID 2732/UID 1000).
Apr 03 08:34:32 ws-study drkonqi-coredump-launcher[3553]: Unable to find file for pid 57468 expected at "kcrash-metadata/thunderbird.7f319b1e5754498c9a9fffe557cad472.57468.ini"
Apr 03 08:34:32 ws-study drkonqi-coredump-launcher[3556]: Unable to find file for pid 66383 expected at "kcrash-metadata/vivaldi-bin.13ed1285305b41408446dfdc90bbe55a.66383.ini"
Apr 03 08:34:32 ws-study systemd[2061]: Started drkonqi-coredump-launcher@6-12289-2732_2733-1000.service - Launch DrKonqi for a systemd-coredump crash (PID 2732/UID 1000).
Apr 03 08:34:32 ws-study drkonqi-coredump-launcher[3559]: Unable to find file for pid 56262 expected at "kcrash-metadata/vivaldi-bin.821fd8f56072470191eb89ac458c4784.56262.ini"
Apr 03 08:34:32 ws-study systemd[2061]: Started drkonqi-coredump-launcher@7-12290-2732_2733-1000.service - Launch DrKonqi for a systemd-coredump crash (PID 2732/UID 1000).
Apr 03 08:34:32 ws-study drkonqi-coredump-launcher[3562]: Unable to find file for pid 21742 expected at "kcrash-metadata/vivaldi-bin.8264018aef2f4a0391122d86235895f5.21742.ini"
Apr 03 08:34:32 ws-study systemd[2061]: Started drkonqi-coredump-launcher@8-12291-2732_2733-1000.service - Launch DrKonqi for a systemd-coredump crash (PID 2732/UID 1000).
Apr 03 08:34:32 ws-study drkonqi-coredump-launcher[3565]: Unable to find file for pid 4072 expected at "kcrash-metadata/vivaldi-bin.64734c7e35f84cd6aeeaaee683f5002b.4072.ini"
Apr 03 08:34:32 ws-study systemd[2061]: Started drkonqi-coredump-launcher@9-16385-2732_2733-1000.service - Launch DrKonqi for a systemd-coredump crash (PID 2732/UID 1000).
Apr 03 08:34:32 ws-study drkonqi-coredump-launcher[3568]: Unable to find file for pid 8359 expected at "kcrash-metadata/vivaldi-bin.86b5e3d64f3749b5b3928f0073006a70.8359.ini"
Apr 03 08:34:32 ws-study systemd[2061]: Started drkonqi-coredump-launcher@10-16386-2732_2733-1000.service - Launch DrKonqi for a systemd-coredump crash (PID 2732/UID 1000).
Apr 03 08:34:32 ws-study drkonqi-coredump-launcher[3571]: Unable to find file for pid 32110 expected at "kcrash-metadata/DesktopEditors.79bde57bc65741f58f5a56268c7583e8.32110.ini"

Root cause is Pipewire

kate ~/.config/wireplumber/main.lua.d/50-alsa-config.lua

wireplumber after version 0.4.x doesn’t use lua configuration files any more. Wireplumber 0.5+ uses Json ā€œconfā€ files

REF: Migrating configuration from 0.4 — WirePlumber 0.5.14 documentation

The new path would be something like:

~/.config/wireplumber/wireplumber.conf.d/50-alsa-config.conf

but with the json code there, see that freedesktop.org for samples