Bug 356653 - When notification appears for first time, it appears twice
Summary: When notification appears for first time, it appears twice
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Notifications (show other bugs)
Version: 5.5.0
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Martin Klapetek
URL:
Keywords:
: 356895 358858 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-12-14 08:23 UTC by opensuse.lietuviu.kalba
Modified: 2016-03-28 04:34 UTC (History)
5 users (show)

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


Attachments
Screen foto (1.50 MB, image/png)
2015-12-14 08:24 UTC, opensuse.lietuviu.kalba
Details
after `kquitapp5 plasmashell && plasmashell`: from checking for package updates (83.95 KB, text/plain)
2015-12-15 06:23 UTC, opensuse.lietuviu.kalba
Details
bustle document (704.76 KB, application/vnd.tcpdump.pcap)
2015-12-15 17:40 UTC, opensuse.lietuviu.kalba
Details
bustle document, pdf version (140.02 KB, application/pdf)
2015-12-15 17:41 UTC, opensuse.lietuviu.kalba
Details
bustle file (736.71 KB, application/vnd.tcpdump.pcap)
2015-12-15 18:03 UTC, opensuse.lietuviu.kalba
Details
bustle pdf (144.49 KB, application/pdf)
2015-12-15 18:04 UTC, opensuse.lietuviu.kalba
Details
bustle file again (97.91 KB, application/vnd.tcpdump.pcap)
2015-12-15 18:35 UTC, opensuse.lietuviu.kalba
Details
Video (1.53 MB, video/webm)
2015-12-15 18:38 UTC, opensuse.lietuviu.kalba
Details

Note You need to log in before you can comment on or make changes to this bug.
Description opensuse.lietuviu.kalba 2015-12-14 08:23:48 UTC
Just started KDE Plasma session shows notifications twice, espeacially if the message of particular type is displayed for first time.

Reproducible: Always
Comment 1 opensuse.lietuviu.kalba 2015-12-14 08:24:13 UTC
Created attachment 96055 [details]
Screen foto
Comment 2 Martin Klapetek 2015-12-14 22:16:12 UTC
Thanks for the report

Can you please start Konsole and run this

kquitapp5 plasmashell && plasmashell

and post the output *after* the two notifications have appeared?

Thanks
Comment 3 opensuse.lietuviu.kalba 2015-12-15 06:23:14 UTC
Created attachment 96076 [details]
after `kquitapp5 plasmashell && plasmashell`: from checking for package updates

Log printed very fast and a lot of lines, I don't know exact moment of appearing, so I attach log since checking for updates.
Comment 4 Martin Klapetek 2015-12-15 17:24:10 UTC
Ok, that's good.

I will need more info however. Can you please install bustle, start bustle,
start the logging, then run the `kquitapp5 plasmashell && plasmashell`
again, after the notifications appeared, stop bustle, save the log and please
attach the log here.

That should be the last info needed.

Thanks
Comment 5 opensuse.lietuviu.kalba 2015-12-15 17:40:17 UTC
Created attachment 96094 [details]
bustle document
Comment 6 opensuse.lietuviu.kalba 2015-12-15 17:41:27 UTC
Created attachment 96095 [details]
bustle document, pdf version
Comment 7 opensuse.lietuviu.kalba 2015-12-15 17:42:23 UTC
info provided as attachments https://bugs.kde.org/attachment.cgi?id=96094 - bustle, https://bugs.kde.org/attachment.cgi?id=96095 - pdf format
Comment 8 Martin Klapetek 2015-12-15 17:52:27 UTC
This one is actually no good.

Can you please verify that after you've started logging,
the two notifications appeared? The log does not have
that
Comment 9 opensuse.lietuviu.kalba 2015-12-15 17:57:11 UTC
Though I stopped recording about second after two notifications appeared...
Comment 10 Martin Klapetek 2015-12-15 17:59:56 UTC
The log has the notifications being closed but it doesn't have them
being opened. Can you maybe try rebooting/logging out-and-in,
run bustle right after start and then wait some more time before
stopping the logging, just wait for the notifications to close, even.
Comment 11 opensuse.lietuviu.kalba 2015-12-15 18:03:46 UTC
Created attachment 96096 [details]
bustle file
Comment 12 opensuse.lietuviu.kalba 2015-12-15 18:04:22 UTC
Created attachment 96097 [details]
bustle pdf
Comment 13 opensuse.lietuviu.kalba 2015-12-15 18:05:02 UTC
I hope https://bugs.kde.org/attachment.cgi?id=96096 and https://bugs.kde.org/attachment.cgi?id=96097 is better
Comment 14 Martin Klapetek 2015-12-15 18:21:35 UTC
This one is the same as before, unfortunately. It recorded
only events of the notification being closed, not being opened.

Btw. you if you log out and in, you don't need to restart plasma,
running bustle and starting logging is all that is needed.

Once again - can you please confirm that the notifications appeared
on screen *while* the bustle log was already recording?

Also, are you able to test patches?

Finally, the pdf attachment is not needed.
Comment 15 opensuse.lietuviu.kalba 2015-12-15 18:27:32 UTC
I confirm that the notifications appeared on screen *while* the bustle log was already recording.
Maybe you are right – I restarted plasma just after started recording – maybe it affects...

I don't want to download KDE sources to my computer and compiling KDE stuff.
I a bit can play in openSUSE Build Service by branching https://build.opensuse.org/project/show/KDE:Frameworks5 package, applaying some patch and waiting for building RPM... But it would be awesome, if you could prepare patched RPM.
Comment 16 opensuse.lietuviu.kalba 2015-12-15 18:35:26 UTC
Created attachment 96099 [details]
bustle file again
Comment 17 opensuse.lietuviu.kalba 2015-12-15 18:38:20 UTC
Created attachment 96100 [details]
Video

This time I filmed my desktop to ensure you, that I recorded before PackageKit showed notifications. This time enven 3 notifications was!
Comment 18 opensuse.lietuviu.kalba 2015-12-15 18:38:55 UTC
Video corresponds latest bustle attachment https://bugs.kde.org/attachment.cgi?id=96099
Comment 19 Martin Klapetek 2015-12-15 19:05:27 UTC
Ah, I understand now. It's (still) not in the bustle log because
the dbus call is within the same process, therefore not going
through dbus at all.

Good effort though, thanks! I think I also know what's going
on with it.

Because this is emitted from a plasmoid (and therefore from
plasmashell process), it bypasses the checks for duplicate
notifications and then does not detect it as a duplicate.

I'll see if I can reproduce a simple case.
Comment 20 David Edmundson 2015-12-21 17:04:27 UTC
356895 is an easy way to reproduce it
Comment 21 David Edmundson 2015-12-21 17:04:38 UTC
*** Bug 356895 has been marked as a duplicate of this bug. ***
Comment 23 Artur O. 2015-12-22 00:43:14 UTC
(In reply to Martin Klapetek from comment #22)
> Multifix at
> 
> https://git.reviewboard.kde.org/r/126459/
> https://git.reviewboard.kde.org/r/126460/
> https://git.reviewboard.kde.org/r/126461/

Read the reviewboard, 
> "The lock-widgets one is I think because of multiscreen, cause
> then you have two containments emitting two same notifications."
Then as I understand its not a duplicate and these won't fix that particular issue?

Best Regards
Comment 24 David Edmundson 2015-12-22 00:48:45 UTC
It will fix it

Plasma will emit two.
However, the notification applet will then squash that into one.
Comment 25 Artur O. 2015-12-22 00:53:40 UTC
(In reply to David Edmundson from comment #24)
> It will fix it
> 
> Plasma will emit two.
> However, the notification applet will then squash that into one.

Oh I see, will try to build with these patches and test. But as a question why would it create only two when I have 3 monitors?

Anyhow, will try and report back and thanks again =)

Best Regards
Comment 26 Martin Klapetek 2015-12-29 20:07:07 UTC
Git commit 30e82248c787ee5224507957b8f2d5fd3e854917 by Martin Klapetek.
Committed on 29/12/2015 at 20:06.
Pushed by mklapetek into branch 'master'.

Add a hint to skip notifications grouping

Plasma currently groups notifications that have the same
notification title or if they are on a "blacklist" (like
media player apps that popup a notification for each song
change), but sometimes the grouping needs to be skipped.
This is for example when user removes two widgets from his
desktop and the "Undo" notification appears, these cannot
be grouped.

This is currently handled rather by a hack in the notifications
server, so introducing this new flag should allow for a clean
and proper solution.

REVIEW: 126459

M  +7    -0    src/knotification.h
M  +4    -0    src/notifybypopup.cpp

http://commits.kde.org/knotifications/30e82248c787ee5224507957b8f2d5fd3e854917
Comment 27 Martin Klapetek 2015-12-29 20:12:37 UTC
Git commit f639996becc2fae284d9c83273856dee510b699d by Martin Klapetek.
Committed on 29/12/2015 at 20:12.
Pushed by mklapetek into branch 'master'.

Use the SkipGrouping flag for the "widget deleted" notification

https://git.reviewboard.kde.org/r/126459/ introduced new
flag that allows to skip the grouping of notifications.

This should fix all bugs caused by checking for appName
being "plasma_workspace" which are all default notifications
from any plasmoid.
REVIEW: 126461

(this also needs to raise the KF5 dep to 5.18 which is
normally done at release time, but in order to use this
now, it needs to be bumped now, otherwise build failures
will ensue)

M  +1    -1    CMakeLists.txt
M  +1    -0    src/plasma/private/applet_p.cpp

http://commits.kde.org/plasma-framework/f639996becc2fae284d9c83273856dee510b699d
Comment 28 Martin Klapetek 2016-01-05 04:51:02 UTC
Please test with plasma-framework 5.19 and knotifications 5.19 and reopen if this is still an issue.
Comment 29 Martin Klapetek 2016-01-05 04:51:46 UTC
Sorry, add plasma-workspace 5.6 to the mix.
Comment 30 opensuse.lietuviu.kalba 2016-02-01 10:35:00 UTC
*** Bug 358858 has been marked as a duplicate of this bug. ***
Comment 31 Artur O. 2016-03-21 03:54:12 UTC
(In reply to Martin Klapetek from comment #29)
> Sorry, add plasma-workspace 5.6 to the mix.

Um has this gotten into main? Im still getting duplacate notifications about unlocked widgets on Arch with (kf5 5.19) and (plasma 5.5.5).
Comment 32 Artur O. 2016-03-28 04:34:38 UTC
(In reply to Artur O. from comment #31)
> (In reply to Martin Klapetek from comment #29)
> > Sorry, add plasma-workspace 5.6 to the mix.
> 
> Um has this gotten into main? Im still getting duplacate notifications about
> unlocked widgets on Arch with (kf5 5.19) and (plasma 5.5.5).

After Arch updated to Plasma 5.6 and QT 5.6 the issue is resolved for me.