Bug 498946

Summary: notificationmanager crashes plasmashell when it tries creating an invalid window .. HDMI Audio: Powering (Off --> On)
Product: [Plasma] plasmashell Reporter: Tcope <tcope2112>
Component: Audio in generalAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED DUPLICATE    
Severity: crash CC: isma.af, m.kurz, nate
Priority: NOR    
Version First Reported In: 6.2.5   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Tcope 2025-01-21 02:37:02 UTC
SUMMARY
The notificationmanager looks to be crashing plasmashell while trying to prompt on a non existing surface.

Only happens when audio is output through HDMI to the HDMI display.
notificationmanager crashes plasmashell when it tries creating an invalid window

Powering Off / On display crashes plasmashell. missing: icons, wallpaper, taskbar
All existing applications windows are still fuctional and interactive.
plasmashell --replace will successfully reset the desktop.
Does not happen when set to motherboard sound device .
Does not happen when HDMI audio is set to Pro Audio.

This only happens when the HDMI audio is set to Digital Stereo (HDMI)

STEPS TO REPRODUCE
Running plasmashell from terminal. Displaying results from each step.
showing terminal results for each instance

1.  Set audio device to onboard. Power Off/On display.

qt.qpa.wayland: Creating a fake screen in order for Qt not to crash
kde.plasmashell: requesting unexisting screen available rect -1
kde.plasmashell: requesting unexisting screen available rect -1
kde.plasmashell: requesting unexisting screen available rect -1
kde.plasmashell: requesting unexisting screen available rect -1
file:///usr/share/plasma/plasmoids/org.kde.desktopcontainment/contents/ui/FolderItemDelegate.qml:238:17: Unable to assign [undefined] to bool
file:///usr/share/plasma/plasmoids/org.kde.desktopcontainment/contents/ui/FolderItemDelegate.qml:370:21: Unable to assign [undefined] to bool
qt.qpa.wayland: Creating a fake screen in order for Qt not to crash
kf.plasma.quick: Exposed with no visual parent. Window positioning broken.

2.  set audio device to HDMI (Pro Audio). Power Off/On display.

org.kde.pulseaudio: No object for name "alsa_output.pci-0000_0c_00.1.hdmi-stereo"
qt.qpa.wayland: Creating a fake screen in order for Qt not to crash
kde.plasmashell: requesting unexisting screen available rect -1
kde.plasmashell: requesting unexisting screen available rect -1
kde.plasmashell: requesting unexisting screen available rect -1
kde.plasmashell: requesting unexisting screen available rect -1
file:///usr/share/plasma/plasmoids/org.kde.desktopcontainment/contents/ui/FolderItemDelegate.qml:238:17: Unable to assign [undefined] to bool
file:///usr/share/plasma/plasmoids/org.kde.desktopcontainment/contents/ui/FolderItemDelegate.qml:370:21: Unable to assign [undefined] to bool
qt.qpa.wayland: Creating a fake screen in order for Qt not to crash
kf.plasma.quick: Exposed with no visual parent. Window positioning broken.
kf.plasma.quick: Exposed with no visual parent. Window positioning broken.

3.  Set audio device to Digital Stereo (HDMI). Power Off/On display.

qt.qpa.wayland: Creating a fake screen in order for Qt not to crash
kde.plasmashell: requesting unexisting screen available rect -1
kde.plasmashell: requesting unexisting screen available rect -1
kde.plasmashell: requesting unexisting screen available rect -1
kde.plasmashell: requesting unexisting screen available rect -1
file:///usr/share/plasma/plasmoids/org.kde.desktopcontainment/contents/ui/FolderItemDelegate.qml:238:17: Unable to assign [undefined] to bool
file:///usr/share/plasma/plasmoids/org.kde.desktopcontainment/contents/ui/FolderItemDelegate.qml:370:21: Unable to assign [undefined] to bool
qt.qpa.wayland: Creating a fake screen in order for Qt not to crash
kf.plasma.quick: Exposed with no visual parent. Window positioning broken.
kf.plasma.quick: Exposed with no visual parent. Window positioning broken.
org.kde.pulseaudio: No object for name "alsa_output.pci-0000_0c_00.1.hdmi-stereo"
trying to show an empty dialog
xdg_surface#60: error -1: invalid window geometry size (0x0)
The Wayland connection experienced a fatal error: Protocol error
[1]+  Exit 255                plasmashell

4. Doing all this enough times till the notificationmanager errored with.

org.kde.plasma.notificationmanager: Trying to replace notification with id 1313 which doesn't exist, creating a new one. This is an application bug!

OBSERVED RESULT

Results as described consistanct and very repeatable with one exception.
When the notificationmanager produced that error, I am guessing was unable to produce a popup widget or such. In that instance plasmashell did not crash even when audio device was set to Digital Stereo (HDMI).

EXPECTED RESULT
plasmashell to gracefully handle the error

SOFTWARE/OS VERSIONS
Operating System: Artix Linux (OpenRC)
KDE Plasma Version: 6.2.5
KDE Frameworks Version: 6.10.0
Qt Version: 6.8.1
Kernel Version: 6.12.9-artix1-1 (64-bit)
Graphics Platform: Wayland
Processors: 32 × AMD Ryzen 9 5950X 16-Core Processor
Memory: 62.7 GiB of RAM
Graphics Processor: AMD Radeon RX 6700 (Discrete)

Host: X470 AORUS ULTRA GAMING
Display (E60-E3): 4096x2160 @ 60 Hz in 60" [External] (HDMI)
WM Theme: Breeze
Theme: Breeze (Dark) [Qt]
Icons: breeze-dark [Qt]
Font: Noto Sans (10pt) [Qt]
Cursor: breeze (24px)

Audio Out through HDMI to Display (E60-E3)
world/pipewire 1:1.2.7-1
world/kpipewire 6.2.5-1
world/pipewire-pulse 1:1.2.7-1
world/plasma-pa 6.2.5-1
world/wireplumber 0.5.7-1

ADDITIONAL INFORMATION
(No debugging symbols found in plasmashell)
(gdb) exit

I also looked, with no luck, for symbols with pacman and paru..
This is as far as my time will allow. Hope this helps..
Comment 1 Nate Graham 2025-01-21 21:43:41 UTC
Well it definitely shouldn't crash. Unfortunately we do need a backtrace with debug symbols to proceed here, since it's probably hardware-specific.

See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports#Retrieving_a_backtrace_using_coredumpctl
Comment 2 Tcope 2025-01-22 01:12:38 UTC
(In reply to Nate Graham from comment #1)
> Well it definitely shouldn't crash. Unfortunately we do need a backtrace
> with debug symbols to proceed here, since it's probably hardware-specific.
> 
> See
> https://community.kde.org/Guidelines_and_HOWTOs/Debugging/
> How_to_create_useful_crash_reports#Retrieving_a_backtrace_using_coredumpctl

I wish I understood how a notification mangager writing to a non existiing surface due to missing hardware .. is hardware specific..?

I have failed to find the debugging symbols, in spite of extensive searching. I would very much like to provide a backtrace.

The online resource that is suposed to supply symbols aparently doesnt have them.. ie.  
(No debugging symbols found in plasmashell)
(gdb) exit

Please provide symcbols  or a link to symbols or even a package name I can find symbols, and I will be happy to.
Comment 3 Nate Graham 2025-01-23 16:27:35 UTC
It's that I'm unable to reproduce the problem myself, so it seems that there's some detail if your specific hardware setup that allows it to be reproduced at will there.

That said, the actual error message is quite clear:

> trying to show an empty dialog
> xdg_surface#60: error -1: invalid window geometry size (0x0)
> The Wayland connection experienced a fatal error: Protocol error

*** This bug has been marked as a duplicate of bug 493572 ***