Bug 502217

Summary: OSD does not show when pressing the keybind
Product: [Plasma] KScreen Reporter: Julian Pollak <bugs.kde.org.crop588>
Component: OSD and Plasma appletAssignee: kscreen-bugs-null <kscreen-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: bugs.kde.org.crop588, kurobac, mclean.brian.c, nate
Priority: NOR    
Version First Reported In: 6.3.4   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Julian Pollak 2025-03-30 21:53:19 UTC
***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports

Please remove this comment after reading and before submitting - thanks!
***

SUMMARY
Since updating to Qt 6.8.3 (this being the culprit is a guess), pressing the keybind (`Meta+P` or `Display` by default) doesn't show the OSD anymore.

STEPS TO REPRODUCE
1. Press "Switch Display" keybind

OBSERVED RESULT
No OSD is showing up. Can still use system tray applet or widget on desktop

EXPECTED RESULT
OSD shows

SOFTWARE/OS VERSIONS
KDE Plasma Version: 6.3.3
KDE Frameworks Version: 6.12.0
Qt Version: 6.8.3

ADDITIONAL INFORMATION
It's hard for me to pinpoint the exact origin of the problem. But all of my devices with vastly different hardware are affected. Also, I have updated all of them to the newest versions of Qt and Plasma available in Arch's repos. I think I need some help to uncover more about this issue. I am not familiar with debugging KDE.
Comment 1 brian 2025-03-30 22:48:09 UTC
I'm also seeing the same issue. I can see some failures in logs when I hit meta+P:

journalctl -b 0 | grep -i kscreen
...
Mar 30 17:41:41 cachyos-x8664 systemd[1007]: app-org.kde.kscreen@9ff89f74de47403a9855c7cb72345a60.service: Main process exited, code=exited, status=1/FAILURE
Mar 30 17:41:41 cachyos-x8664 systemd[1007]: app-org.kde.kscreen@9ff89f74de47403a9855c7cb72345a60.service: Failed with result 'exit-code'.
Mar 30 17:42:47 cachyos-x8664 systemd[1007]: app-org.kde.kscreen@99e6efe48a434fe5b0240a61359806e0.service: Main process exited, code=exited, status=1/FAILURE
Mar 30 17:42:47 cachyos-x8664 systemd[1007]: app-org.kde.kscreen@99e6efe48a434fe5b0240a61359806e0.service: Failed with result 'exit-code'.
Comment 2 Nate Graham 2025-03-31 20:16:40 UTC
That seems bad. It sounds like a KScreen process is crashing. Can you get a backtrace of it?

See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports#Retrieving_a_backtrace_using_coredumpctl for docs on this.
Comment 3 Julian Pollak 2025-03-31 22:44:05 UTC
So I tried to create a coredump for kscreen by pressing the keybind. This gets me these lines with journalctl -b 0 | grep kscreen:

Mar 31 21:39:29 ppocket-msi dbus-broker-launch[861]: Service file '/usr/share//dbus-1/services/org.kde.kscreen.service' is not named after the D-Bus name 'org.kde.KScreen'.
Mar 31 21:39:38 ppocket-msi dbus-broker-launch[1061]: Service file '/usr/share//dbus-1/services/org.kde.kscreen.service' is not named after the D-Bus name 'org.kde.KScreen'.
Apr 01 00:11:47 ppocket-msi systemd[983]: app-org.kde.kscreen@62afff6826db4c5fb8099df9cd5559ed.service: Main process exited, code=exited, status=1/FAILURE
Apr 01 00:11:47 ppocket-msi systemd[983]: app-org.kde.kscreen@62afff6826db4c5fb8099df9cd5559ed.service: Failed with result 'exit-code'.

21:39 is when the machine booted, 00:11 is when I pressed the keybind.

But this doesn't result in any coredumps I can see with coredumpctl. I am a software developer but I am not at all familiar with D-BUS.

I tried attaching to kscreen_osd_service. But that doesn't show me anything at all.
I tried running org.kde.kscreen with gdb-attached plasmawindowed as described in the docs. But that one isn't the problem, it works fine.

Is there a way to invoke the OSD with a command instead of D-BUS?
Comment 4 brian 2025-04-01 01:31:50 UTC
Same thing for me. coredumpctl reports no coredumps found after I hit the keybind.
Comment 5 Julian Pollak 2025-04-02 21:57:23 UTC
I just updated to 6.3.4

Still same behaviour: Messages in journal but no coredumps.
Comment 6 Julian Pollak 2025-04-02 22:31:23 UTC
I just tested some more and what I can add is that the messages in the journal aren't showing up immediately but after a delay.

The delay is almost exactly 25 seconds every time.

During the time after the keybind is pressed and the moment the messages are posted, I can see the dbus-send process (ps -ax | grep kscreen):

  3369 ?        Ss     0:00 /usr/bin/dbus-send --type=method_call --print-reply --dest=org.kde.kscreen.osdService /org/kde/kscreen/osdService org.kde.kscreen.osdService showActionSelector

This seems to be haning and waiting for the timeout. That might explain why we don't see any crashes because nothing actually crashes. It's just a timeout we're reaching.
Comment 7 Julian Pollak 2025-04-02 22:43:15 UTC
Looking at the messages around the failure of kscreen OSD shows this:

Apr 03 00:40:13 ppocket-msi systemd[986]: app-org.kde.kscreen@b99843d02a0b4c0a8db56cfdcd39c370.service: Failed with result 'exit-code'.
Apr 03 00:40:13 ppocket-msi systemd[986]: app-org.kde.kscreen@b99843d02a0b4c0a8db56cfdcd39c370.service: Main process exited, code=exited, status=1/FAILURE
Apr 03 00:40:13 ppocket-msi dbus-send[4139]: Error org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Apr 03 00:39:48 ppocket-msi systemd[986]: Started Display Configuration.

That's exactly the 25 second delay I measured by hand before.
Comment 8 Nate Graham 2025-04-03 19:17:42 UTC
Apr 03 00:40:13 ppocket-msi dbus-send[4139]: Error org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

This means DBus on your system is fairly broken. I'd recommend contacting distro-specific forums or resources about it. Good luck!
Comment 9 Julian Pollak 2025-04-17 21:09:58 UTC
I just scrolled through the commits. This wasn't a D-BUS problem..

https://bugs.kde.org/show_bug.cgi?id=502486

Fixed in https://github.com/KDE/kscreen/commit/50de20ad885c2e74fc8781ad6952656385afb4fe
Comment 10 Julian Pollak 2025-04-17 21:11:30 UTC

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