Bug 465488 - No app name in the Battery and Brightness inhibition notification
Summary: No app name in the Battery and Brightness inhibition notification
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Power and Battery widget (show other bugs)
Version: 5.26.5
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Cimbali
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-08 18:57 UTC by Cimbali
Modified: 2023-02-16 17:37 UTC (History)
4 users (show)

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


Attachments
Screenshot of incorrect display (27.98 KB, image/png)
2023-02-08 18:57 UTC, Cimbali
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Cimbali 2023-02-08 18:57:35 UTC
Created attachment 156083 [details]
Screenshot of incorrect display

SUMMARY

When the Screensaver is inhibited without app name, no fall back is provided by the batterymonitor applet.

STEPS TO REPRODUCE
1. Call `org.freedesktop.impl.portal.Inhibit` on the DBus with an empty string for name

Note that this happens when e.g. xdg-desktop-portal fails to lookup the application id of an application that is calling `org.freedesktop.portal.Inhibit`. This should happen less often after https://github.com/flatpak/xdg-desktop-portal/issues/963 is fixed but may still happen.

OBSERVED RESULT

The applet shows the notification “ is currently blocking sleep and screen locking (reason)“ (see attached screenshot).

EXPECTED RESULT

The applet should replace the missing application name in the notification, e.g. with “An application” which would display the following notification message:
“An application is currently blocking sleep and screen locking (reason)“


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: OpenSUSE Tumbleweed (rolling release ; current version id on my system is 20230130)
(available in About System)
KDE Plasma Version: 5.26.5
KDE Frameworks Version: 5.102.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION

I’
Comment 1 Nate Graham 2023-02-12 17:01:02 UTC
Will be fixed by https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2597.
Comment 2 Nate Graham 2023-02-16 17:37:44 UTC
Git commit dfcade1ce446e3684a7d4a2033305d36ed0d09bf by Nate Graham, on behalf of Cimbali.
Committed on 16/02/2023 at 17:37.
Pushed by ngraham into branch 'master'.

applets/batterymonitor: fix display for missing application name

Sometimes the application name is missing, and this commit adds placeholder text
to handle that case.
FIXED-IN: 6.0

M  +23   -7    applets/batterymonitor/package/contents/ui/PowerManagementItem.qml

https://invent.kde.org/plasma/plasma-workspace/commit/dfcade1ce446e3684a7d4a2033305d36ed0d09bf