Wrong app titles in GTK app notifications

In the past few months or so, notifications from certain GTK-based apps like Pamac Manager and the new matray app look like they’re from “Plasma Workspace” instead of their respective apps.

Screenshot_20210607_161735

Clicking on the Configure button next to the Close button opens notification settings for Plasma Workspace with the generic Notification type highlighted.

In addition, matray does not appear in the Notifications settings window, but Pamac Manager is on the list.

Initially, I thought it was only an issue with matray, but @moson couldn’t reproduce the behavior above, so clearly I think something doesn’t look right with my setup. My best guesses are either I’m missing a package that makes GTK notifications appear properly in Plasma or config files for managing notifications are not updating properly, but regardless I need help to fix this annoyance.

I just realized I forgot to check journalctl for error messages when I started this thread, and sure enough it did log something each time matray sends a notification:

xdg-desktop-portal-kde[1975]: kf.notifications: Could not notify  "notification" by taskbar, notification has no associated widget

It gets duplicated for each and every time the app sends a notification. As I said in the initial post, it’s not consistent among all GTK apps — for example, notifications from Firefox (another app which probably uses GTK and xdg-desktop-portal) appear with its own icon and name as expected consistently.

I tried pamac reinstall libnotify lib32-libnotify xdg-desktop-portal xdg-desktop-portal-kde and I still get the same behavior. I even searched for the error message with DuckDuckGo and Google (for fallback) and I get no helpful results. At least I’ve narrowed down the culprit, but I remain at a loss here.

I was able to reproduce this on my new ThinkPad laptop when I was trying out Planner from the AUR, so I decided to test matray’s notifications on that system, and as I expected, the app title used in the notifications was “Plasma Workspace,” exactly like in the initial post.

Manjaro was installed on my laptop when I got it on August 7 using a 21.0.4 Ornara minimal ISO image, and I recently added GTK_USE_PORTAL=1 to ~/.xprofile in both machines.

Right before I started up matray on my laptop, I added QT_LOGGING_RULES='xdp*.debug=true' to /etc/environment, so when it spammed notifications at the next login, I got this in my journal logs:

Journal logs
Aug 21 18:06:26 pbngpc3 dbus-daemon[1098]: [session uid=1000 pid=1098] Activating service name='org.freedesktop.impl.portal.desktop.kde' requested by ':1.53' (uid=1000 pid=12811 comm="/usr/lib/xdg-desktop-portal ")
Aug 21 18:06:27 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde: Desktop portal registered successfully
Aug 21 18:06:27 pbngpc3 xdg-desktop-por[12811]: A backend call failed: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such method 'CreateMonitor' in interface 'org.freedesktop.impl.portal.Inhibit' at object path '/org/freedesktop/portal/desktop' (signature 'ooss')
Aug 21 18:06:27 pbngpc3 xdg-desktop-por[12811]: Failed to close session implementation: GDBus.Error:org.freedesktop.DBus.Error.UnknownObject: No such object path '/org/freedesktop/portal/desktop/session/1_252/gtk243442594'
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification: AddNotification called with parameters:
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification:     app_id:  ""
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification:     id:  "e4c8fc11741592b74cd7f0a461219513"
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification:     notification:  QMap(("body", QVariant(QString, "[Testing Update] 2021-07-11 - Cinnamon, Linux513, Gnome 40.3, KDE-Git"))("default-action", QVariant(QString, "app.open-article-forum.manjaro.org-topic-73203"))("icon", QVariant(QDBusArgument, ))("priority", QVariant(QString, "normal"))("title", QVariant(QString, "Manjaro news")))
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification: AddNotification called with parameters:
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification:     app_id:  ""
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification:     id:  "a73c747fb0faa7c98110588e61219513"
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification:     notification:  QMap(("body", QVariant(QString, "[Testing Update] 2021-07-17 - Kernels, Breath2, Cinnamon, Kodi, Firefox, KDE-Git"))("default-action", QVariant(QString, "app.open-article-forum.manjaro.org-topic-74231"))("icon", QVariant(QDBusArgument, ))("priority", QVariant(QString, "normal"))("title", QVariant(QString, "Manjaro news")))
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification: AddNotification called with parameters:
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification:     app_id:  ""
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification:     id:  "9c5727ec3b84ff58aa63227d61219513"
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification:     notification:  QMap(("body", QVariant(QString, "[Testing Update] 2021-07-19 - Mesa, Breath2 Themes, AMDVLK, KDE-Git"))("default-action", QVariant(QString, "app.open-article-forum.manjaro.org-topic-74422"))("icon", QVariant(QDBusArgument, ))("priority", QVariant(QString, "normal"))("title", QVariant(QString, "Manjaro news")))
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification: AddNotification called with parameters:
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification:     app_id:  ""
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification:     id:  "126fc89fbd80c744482f19b361219513"
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification:     notification:  QMap(("body", QVariant(QString, "[Testing Update] 2021-07-12 - Xorg-Server downgrade, Kernels, Systemd 249, KDE Frameworks 5.84.0"))("default-action", QVariant(QString, "app.open-article-forum.manjaro.org-topic-73288"))("icon", QVariant(QDBusArgument, ))("priority", QVariant(QString, "normal"))("title", QVariant(QString, "Manjaro news")))
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification: AddNotification called with parameters:
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification:     app_id:  ""
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification:     id:  "cabc6854abf9f74237e3586061219513"
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification:     notification:  QMap(("body", QVariant(QString, "[Testing Update] 2021-07-21 - Nvidia, Kernels, Wine, Virtualbox, Pipewire, Systemd"))("default-action", QVariant(QString, "app.open-article-forum.manjaro.org-topic-74720"))("icon", QVariant(QDBusArgument, ))("priority", QVariant(QString, "normal"))("title", QVariant(QString, "Manjaro news")))
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification: AddNotification called with parameters:
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification:     app_id:  ""
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification:     id:  "3f08f4bde985fe3abcbe926561219513"
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification:     notification:  QMap(("body", QVariant(QString, "Manjaro 21.1 Pahvo Release is near"))("default-action", QVariant(QString, "app.open-article-forum.manjaro.org-topic-75919"))("icon", QVariant(QDBusArgument, ))("priority", QVariant(QString, "normal"))("title", QVariant(QString, "Manjaro news")))
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification: AddNotification called with parameters:
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification:     app_id:  ""
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification:     id:  "e9730cd9154a46dfce5a003661219513"
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification:     notification:  QMap(("body", QVariant(QString, "[Testing Update] 2021-07-27 - Kernels, Systemd, Firefox, LibreOffice"))("default-action", QVariant(QString, "app.open-article-forum.manjaro.org-topic-75584"))("icon", QVariant(QDBusArgument, ))("priority", QVariant(QString, "normal"))("title", QVariant(QString, "Manjaro news")))
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification: AddNotification called with parameters:
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification:     app_id:  ""
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification:     id:  "00c723edcdd54c27ebefb7ee61219513"
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification:     notification:  QMap(("body", QVariant(QString, "[Testing Update] 2021-07-29 - Kernels, Virtualbox, Plasma, Pulseaudio, Xorg-Server"))("default-action", QVariant(QString, "app.open-article-forum.manjaro.org-topic-75986"))("icon", QVariant(QDBusArgument, ))("priority", QVariant(QString, "normal"))("title", QVariant(QString, "Manjaro news")))
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification: AddNotification called with parameters:
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification:     app_id:  ""
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification:     id:  "00e3fc9986ff12c3fd9d4ce461219513"
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification:     notification:  QMap(("body", QVariant(QString, "[Downtime] manjaro.org; ping.manjaro.org"))("default-action", QVariant(QString, "app.open-article-forum.manjaro.org-topic-76064"))("icon", QVariant(QDBusArgument, ))("priority", QVariant(QString, "normal"))("title", QVariant(QString, "Manjaro news")))
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification: AddNotification called with parameters:
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification:     app_id:  ""
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification:     id:  "ae29c4b87d93d42b251fc64461219513"
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification:     notification:  QMap(("body", QVariant(QString, "[Testing Update] 2021-08-03 - Kernels, Xorg-Server, Pipewire, Mesa"))("default-action", QVariant(QString, "app.open-article-forum.manjaro.org-topic-76697"))("icon", QVariant(QDBusArgument, ))("priority", QVariant(QString, "normal"))("title", QVariant(QString, "Manjaro news")))
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification: AddNotification called with parameters:
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification:     app_id:  ""
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification:     id:  "6cb7a243455b7cc64aaaa97c61219513"
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification:     notification:  QMap(("body", QVariant(QString, "[Testing Update] 2021-08-06 - Kernels, Pipewire, KDE-git, Python"))("default-action", QVariant(QString, "app.open-article-forum.manjaro.org-topic-77102"))("icon", QVariant(QDBusArgument, ))("priority", QVariant(QString, "normal"))("title", QVariant(QString, "Manjaro news")))
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification: AddNotification called with parameters:
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification:     app_id:  ""
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification:     id:  "455189e79bfc6da66a26ca1761219513"
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification:     notification:  QMap(("body", QVariant(QString, "[Testing Update] 2021-08-13 - Kernels, Mate 1.26.0, Thunderbird, Firefox, AMDVLK, Nvidia"))("default-action", QVariant(QString, "app.open-article-forum.manjaro.org-topic-78127"))("icon", QVariant(QDBusArgument, ))("priority", QVariant(QString, "normal"))("title", QVariant(QString, "Manjaro news")))
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification: AddNotification called with parameters:
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification:     app_id:  ""
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification:     id:  "90acc0e0b7ed72a0ff2b807361219513"
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification:     notification:  QMap(("body", QVariant(QString, "[Testing Update] 2021-08-16 - Kernels, KDE Frameworks, KDE Gear, Wine, KDE-git, Python"))("default-action", QVariant(QString, "app.open-article-forum.manjaro.org-topic-78540"))("icon", QVariant(QDBusArgument, ))("priority", QVariant(QString, "normal"))("title", QVariant(QString, "Manjaro news")))
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification: AddNotification called with parameters:
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification:     app_id:  ""
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification:     id:  "a6490d38e59848e03efefede61219513"
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification:     notification:  QMap(("body", QVariant(QString, "Manjaro 21.1.0 Pahvo released!"))("default-action", QVariant(QString, "app.open-article-forum.manjaro.org-topic-78663"))("icon", QVariant(QDBusArgument, ))("priority", QVariant(QString, "normal"))("title", QVariant(QString, "Manjaro news")))
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification: AddNotification called with parameters:
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification:     app_id:  ""
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification:     id:  "923fbaa2e71429667a83164a61219513"
Aug 21 18:06:43 pbngpc3 xdg-desktop-portal-kde[31672]: xdp-kde-notification:     notification:  QMap(("body", QVariant(QString, "[Testing Update] 2021-08-19 - Kernels, Cutefish 0.4, Firefox, NetworkManager, Gnome, Pamac"))("default-action", QVariant(QString, "app.open-article-forum.manjaro.org-topic-78986"))("icon", QVariant(QDBusArgument, ))("priority", QVariant(QString, "normal"))("title", QVariant(QString, "Manjaro news")))

Quite interestingly, there were no errors when Planner sent reminder notifications but still had that “Plasma Workspace” app title in them:

Aug 21 17:49:00 pbngpc3 dbus-daemon[1098]: [session uid=1000 pid=1098] Activating service name='org.freedesktop.impl.portal.desktop.kde' requested by ':1.53' (uid=1000 pid=12811 comm="/usr/lib/xdg-desktop-portal ")
Aug 21 17:49:00 pbngpc3 xdg-desktop-portal-kde[28716]: xdp-kde: Desktop portal registered successfully
Aug 21 17:49:00 pbngpc3 xdg-desktop-portal-kde[28716]: xdp-kde-notification: AddNotification called with parameters:
Aug 21 17:49:00 pbngpc3 xdg-desktop-portal-kde[28716]: xdp-kde-notification:     app_id:  ""
Aug 21 17:49:00 pbngpc3 xdg-desktop-portal-kde[28716]: xdp-kde-notification:     id:  "55-1666193935"
Aug 21 17:49:00 pbngpc3 xdg-desktop-portal-kde[28716]: xdp-kde-notification:     notification:  QMap(("body", QVariant(QString, "Adding new tasks"))("default-action", QVariant(QString, "app.show-item"))("default-action-target", QVariant(qlonglong, 4420592180))("icon", QVariant(QDBusArgument, ))("priority", QVariant(QString, "urgent"))("title", QVariant(QString, "🚀️ Getting Started")))

At least I know that app_id values are missing in each of those offending notifications. So @moson, can you please find out if you get similar results with matray in your virutal machines?

I think this annoying bug is following me around through different Manjaro KDE installations, so does anyone here have a solution for this before I open a new ticket in the KDE bug tracker?