Bug 430218 - warning dialogues that play sound are very slow to appear
Summary: warning dialogues that play sound are very slow to appear
Status: REPORTED
Alias: None
Product: frameworks-knotifications
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-10 13:59 UTC by davidblunkett
Modified: 2023-11-10 07:59 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description davidblunkett 2020-12-10 13:59:04 UTC
KDE warning dialogues - such as "confirm close" are very slow to appear taking 4-5 seconds to complete.

Actually what happens is the frame/border appears instantly and then the main pane takes 4-5 seconds to paint and for the alert sound to tring.

Everything else seems snappy and works as you'd expect. All menus and other dialogues are instant.  

I did vaguely think it might be waiting for the sound to play? The only other observation is that Elisa's sound output is similarly non-instant and stuttery when starting for the first time.

Kubuntu 20.04
KDE plasma 5.18.5
FRameworks 5.680
QT 5.12.8
Comment 1 Nate Graham 2020-12-10 17:16:03 UTC
Odd. How's your CPU usage? Is anything taking up an unusually large amount? Does the affected system use a hard drive or an SSD?
Comment 2 davidblunkett 2020-12-11 12:32:25 UTC
Just tested this: unloaded system 32Gb ram, 16Gb RAM free, SSD system disk, 8 cores all idling, cpu load<5%.  Same problem as described above, no change.  Repeated trials, no noticeable spike in CPU, no noticeable spike in wait states, no process doing anything that can be seen above the noise. Conclusion: not CPU bound or IO bound.
Comment 3 Nate Graham 2020-12-11 14:08:24 UTC
How odd.

I have no idea how to triage this. :(

Christoph, what do you think?
Comment 4 Christoph Feck 2020-12-11 15:07:40 UTC
Try disabling message box notification sounds to verify the delay is caused by the Linux sound mess^Wsystem.
Comment 5 Nate Graham 2021-02-07 15:49:11 UTC
An interesting idea. Can you try that?
Comment 6 davidblunkett 2021-02-11 22:35:39 UTC
Ok I tried this and I think this is the answer but it took me an age to find the controls that allows me to disable the sounds.

system settings:notifications:application settings:plasma workspace:warning message and uncheck the sound.  No sound = instant dialogue.  Sound = random few second delay after the title bar is drawn.

So sound seems to be the problem. FWIW "Elisa" also hesitates and stutters when resuming play (but amarok is seamless).
Comment 7 Nate Graham 2021-02-12 15:25:25 UTC
That's an interesting and relevant-seeming observation.

No idea whether this could be our fault, or caused by something underneath us, though.
Comment 8 Wen-Wei Kao 2023-11-10 07:59:38 UTC
Bumping this as I noticed the problem too, with no sound card available, but only in a specific state where I resumed and for some reason, the sound card wasn't available.

In that state, when I open Konsole within Konsole (or Kate, prorably happens with other apps that confirms closing) and try closing while executing a command, Konsole hangs for about 30 seconds and shows the close dialog, and the console that spawned it shows the following error:

```
kf.notifications: Failed to play sound with canberra: IO error
```

By the way, manually killing pipewire (results in `kf.notifications: Failed to play sound with canberra: Invalid state`) or killing pipewire, wireplumber and pipewire-pulse (results in `kf.notifications: Failed to play sound with canberra: Not available`) doesn't hang the confirm dialog, only the IO error variant does.

Hope that helps!

-- ltlnx