Bug 381130

Summary: Notifications are sometimes misplaced in the left upper corner
Product: [Plasma] plasmashell Reporter: Ghost <redredemption>
Component: NotificationsAssignee: Kai Uwe Broulik <kde>
Status: RESOLVED FIXED    
Severity: normal CC: agurenko, asturm, azarilh, bberberov+kde, bugseforuns, chgonzalezg, daniel.mcguire351, dominik232, f1u77y, fabian, flateric, huwie, jakub.gocol, jlp, julioelpoeta, kde, keplicz, kishore96, luca, mklapetek, n.schnelle, nate, nishant.elkunchwar, notmart, pepko94, personaldesignertechie, pranav.sharma.ama, serhiy.int, s_chriscollins, tromzy
Priority: NOR    
Version: 5.10.1   
Target Milestone: 1.0   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Screenshot documenting the bug

Description Ghost 2017-06-12 13:47:26 UTC
Created attachment 106060 [details]
Screenshot documenting the bug

The newest update for KDE Plasma extra packages [5.35.0-1] brought a new bug that causes some notifications to be misplaced in the *very* upper left corner for a very short while. (It was difficult to take a screenshot of it..)
A while before a notification expires, it instantly re-appears back on the right upper corner (as defined in the notification settings).

Despite I run Plasma on X11, this bug may be a duplicate of that one: https://bugs.kde.org/show_bug.cgi?id=377970
Comment 1 Andreas Sturmlechner 2017-06-12 19:25:01 UTC
This is something I noticed as well upgrading from Frameworks 5.34 to 5.35.
Comment 2 Pranav Sharma 2017-06-13 22:24:07 UTC
I am on KDE neon, x11, and I am getting this bug as well. Some times the notification is in the correct position, but then the next ones are in the top left corner. Only observed after kde frameworks 5.35.
Comment 3 Andreas Sturmlechner 2017-06-13 22:30:56 UTC
In addition to top left, btw, I also get them on the bottom left edge. :D
Comment 4 Kai Uwe Broulik 2017-06-14 05:34:21 UTC
Also seen this but suspected a local change I made. Meh. KRunner is also more often misplaced than it used to be.
Comment 5 Nishant Elkunchwar 2017-06-14 11:59:11 UTC
Facing this issue as well since updating to KDE frameworks 5.35. I am on KDE neon user edition (non-LTS).
Comment 6 tromzy 2017-06-19 14:26:02 UTC
I can confirm thib bug since Frameworks 5.35 too. I happens on both X11 and Wayland.
Comment 7 Christoph Feck 2017-06-20 01:01:30 UTC
Sometimes, krunner appears at (0, 0) instead of centered.
Comment 8 Patrick Silva 2017-06-24 19:15:12 UTC
I can confirm this bug on Arch, plasma 5.10.2, qt 5.9.
Sometimes notification from dolphin about finished copy/move files appears on top left corner.
Comment 9 Dominik Klementowski 2017-06-25 10:00:27 UTC
(In reply to Kai Uwe Broulik from comment #4)
> Also seen this but suspected a local change I made. Meh. KRunner is also
> more often misplaced than it used to be.

Yeah, also seen KRunner stick to left-upper corner.
Comment 10 Kai Uwe Broulik 2017-06-30 08:08:03 UTC
*** Bug 381780 has been marked as a duplicate of this bug. ***
Comment 11 Julio J. 2017-07-04 14:34:06 UTC
I can confirm, I'm also on 5.35 and notifications and krunner seem to go randomly on the top left corner.
Comment 12 David Edmundson 2017-07-07 07:48:17 UTC
Can people please retest when frameworks 5.36 comes out.
Comment 13 Saurav Sengupta 2017-07-07 23:05:27 UTC
Tested with what is probably a pre-release of Frameworks 5.36 on Kubuntu 17.10, along with Plasma 5.10.3 and Applications 17.04.2. The notifications appear in the bottom-right as expected, and as yet have not appeared on the top-left.
Comment 14 Andreas Sturmlechner 2017-07-08 09:51:04 UTC
Just got another notification in the bottom-left. It took a while for this to happen, so the situation may have been improved, but not totally solved.
Comment 15 Patrick Silva 2017-07-08 17:29:47 UTC
I can confirm notification on left bottom, Arch running frameworks 5.36.
Comment 16 personaldesignertechie 2017-07-08 18:04:51 UTC
I can confirm that this also occurs on KDE 5.8.7 with KDE Frameworks 5.35.0
Comment 17 personaldesignertechie 2017-07-08 18:09:41 UTC
*** Bug 382131 has been marked as a duplicate of this bug. ***
Comment 18 personaldesignertechie 2017-07-08 18:21:17 UTC
I was running the User LTS version of KDE Neon.
Comment 19 personaldesignertechie 2017-07-09 01:44:18 UTC
I know it's a minor bug, but isn't an LTS suppose to NOT have any glaring bugs.
Comment 20 Kishore Gopalakrishnan 2017-07-10 05:14:10 UTC
I can confirm that this still occurs on Arch Linux with frameworks version 5.36. While the situation seems to be slightly improved from 5.35, the problem still occurs. The frequency of occurrence of the problem seems to increase when multiple notifications are displayed. Notifications sometimes appear on the top-right instead of the bottom left.
Comment 21 Kishore Gopalakrishnan 2017-07-10 05:15:13 UTC
(In reply to kishore96 from comment #20)
> I can confirm that this still occurs on Arch Linux with frameworks version
> 5.36. While the situation seems to be slightly improved from 5.35, the
> problem still occurs. The frequency of occurrence of the problem seems to
> increase when multiple notifications are displayed. Notifications sometimes
> appear on the top-right instead of the bottom left.

Correction: Notifications sometimes appear on top-left instead of bottom-right
Comment 22 Dominik Klementowski 2017-07-10 17:03:35 UTC
Just got some upgrades on Arch - local/plasma-framework 5.36.0-1
Still notifications are broken.
Comment 23 Pranav Sharma 2017-07-10 17:09:24 UTC
I haven't tried this since I don't get that many notifications at the moment, but could someone try to "force" the notification location? Click the arrow to open the "status and notifications" pane, then right click the "notification" entry. Then select "notification settings", and then set the custom location to the bottom right. Does that have an impact?
Comment 24 Pranav Sharma 2017-07-10 17:12:29 UTC
By spamming "notify-test", it seems to work. Could someone please give this a try?
Comment 25 Bogdan 2017-07-10 17:21:14 UTC
(In reply to Pranav Sharma from comment #24)
> By spamming "notify-test", it seems to work. Could someone please give this
> a try?

Did you mean `notify-send`? I've tested this right now with Plasma 5.10.3 and KF5 5.35.0 and got no result.
Comment 26 Dominik Klementowski 2017-07-10 17:23:51 UTC
I tried this already - It behaves pretty much the same. 
Some notification goes to position you define, some of them to left-upper corner.

It looks like something is sometimes failing to count proper screen position (X,Y) and uses (0,0) instead.
Comment 27 Pranav Sharma 2017-07-10 17:25:59 UTC
(In reply to bogdan from comment #25)
> (In reply to Pranav Sharma from comment #24)
> > By spamming "notify-test", it seems to work. Could someone please give this
> > a try?
> 
> Did you mean `notify-send`? I've tested this right now with Plasma 5.10.3
> and KF5 5.35.0 and got no result.

Yes, my bad, I used notify-send. It's so strange how inconsistently this bug appears. I don't know if more people should try that setting, or if it just doesn't work.
Comment 28 Saurav Sengupta 2017-07-10 17:44:09 UTC
I should mention that I tested with 5.36 on Kubuntu 17.10 as a sort of "fresh install" by upgrading from 5.35 to 5.36 BEFORE logging in to KDE for the first time. I don't get many notifications, but the ones I got were all in the bottom-right, including those that would always appear in the top-left with 5.35. Are people testing this with 5.36 upgraded from 5.35 which was already being used for KDE sessions, or 5.36 being used the first time onwards on a fresh installation? Perhaps someone could test with a new user account in the former case?
Comment 29 Dominik Klementowski 2017-07-10 17:59:31 UTC
You might be right. I just tested with new user account and wasn't able to reproduce in like 10 tries, while I can reproduce pretty easy on my primary account. My desktop was installed more than half year ago when I bought new laptop. So I upgraded since 5.8.x.
Comment 30 Saurav Sengupta 2017-07-10 19:06:34 UTC
Perhaps 5.36 works correctly with new user accounts, especially if you can replicate the exact circumstance(s) in which you get misplaced notifications in old accounts. In that case, it would be a matter of figuring out what old configuration is causing the problem to remain.
Comment 31 petrk 2017-07-11 03:34:09 UTC
Nope, I've tried with new account named "test". Notifications are still being misplaced.

Plasma 5.10.3 KF 5.36 Qt 5.9.1
Arch
Comment 32 petrk 2017-07-11 14:16:01 UTC
Also, it seems to be partially fixed. Misplacing occurs only when I'm spamming notify-send.
Comment 33 Dominik Klementowski 2017-07-11 14:51:44 UTC
I might be wrong about this 'clean session' thing, because I did not test this well.

I don't feel like it's improved at all. Today I seen some Spotify, Whatsapp or KMail notifications in top left corner.
Comment 34 personaldesignertechie 2017-07-11 21:48:08 UTC
If they truly fixed the bug, it SHOULDN'T require resetting configuration files at all, it should just fix itself.
Comment 35 Christoph Feck 2017-07-12 12:28:57 UTC
*** Bug 382121 has been marked as a duplicate of this bug. ***
Comment 36 Fabian Vogt 2017-07-15 09:35:33 UTC
As plasma-framework 5.34 works, I tried some reverts on top of v5.35.0 and it looks like reverting fd2e850156ac7aa9c9dc2cf46652b2a1f1fc3a07 ("recreate plasmashellsurf on exposed, destoy on hidden") fixes it.

Adding author of the patch to CC.
Comment 37 Marco Martin 2017-07-15 11:58:19 UTC
that one is necessary for wayland, even tough expose event is probably still not the exact right moment to do it, may need more thinking.
also, the misplacing on xcb seems to happen on qt 5.8 onwards (may be necessary some xcb calls to directly move the window there)
Comment 38 Huw 2017-07-15 23:10:20 UTC
(In reply to Pranav Sharma from comment #23)
> I haven't tried this since I don't get that many notifications at the
> moment, but could someone try to "force" the notification location? Click
> the arrow to open the "status and notifications" pane, then right click the
> "notification" entry. Then select "notification settings", and then set the
> custom location to the bottom right. Does that have an impact?

I have tried this and it doesn't seem to have had any effect.
Comment 39 David Edmundson 2017-07-19 01:29:17 UTC
Can someone try https://phabricator.kde.org/D6776
Comment 40 Kishore Gopalakrishnan 2017-07-19 05:04:03 UTC
(In reply to David Edmundson from comment #39)
> Can someone try https://phabricator.kde.org/D6776

Applying that patch seems to have fixed the issue. I have been spamming notify-send, but haven't been able to observe the issue again.
Comment 41 Boian Berberov 2017-07-19 10:20:28 UTC
Just want to confirm I am seeing this in openSUSE Tumbleweed too.  It may be happening more often when I'm running GTK applications, like Firefox.  I'll pay closer attention and report.

Version: plasma5-workspace 5.10.3-1.2
Comment 42 Dominik Klementowski 2017-07-19 11:58:05 UTC
>It may be happening more often when I'm running GTK applications, like Firefox.

I don't think this matters. I have KMail notification misplaced pretty often.
Comment 43 petrk 2017-07-19 12:44:02 UTC
(In reply to David Edmundson from comment #39)
> Can someone try https://phabricator.kde.org/D6776

This patch has resolved notification misplacement completely for me. Spamming notify-send is not causing issues.
Comment 44 David Edmundson 2017-07-19 13:31:21 UTC
Thanks guys, it'll be in the next frameworks release.
Comment 45 Pranav Sharma 2017-07-19 13:42:59 UTC
Funny how such an annoying bug is solved with a simple check. Patch seems to work. Thank you so much for fixing this issue. <3
Comment 46 David Edmundson 2017-07-19 14:23:06 UTC
Git commit a0e5bb3ea70ddc2bd52a8c69b84980249cc4aba7 by David Edmundson.
Committed on 19/07/2017 at 14:22.
Pushed by davidedmundson into branch 'master'.

Don't perform wayland specific fixes when on X

Summary:
fd2e850156ac7aa9c9dc2cf46652b2a1f1fc3a07 introduces some behaviour
changes that affect X even though they should be only Wayland related.

Reviewers: #plasma

Subscribers: graesslin, plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D6776

M  +1    -1    src/plasmaquick/dialog.cpp

https://commits.kde.org/plasma-framework/a0e5bb3ea70ddc2bd52a8c69b84980249cc4aba7
Comment 47 David Edmundson 2017-07-22 06:41:53 UTC
*** Bug 382340 has been marked as a duplicate of this bug. ***
Comment 48 personaldesignertechie 2017-07-24 21:56:26 UTC
Finally a bug fix, that solves fox X
Comment 49 Dominik Klementowski 2017-07-24 22:05:37 UTC
On Arch now with Plasma 5.10.4 packages this is not happening for me anymore. Finally!
Comment 50 Pranav Sharma 2017-07-25 19:45:24 UTC
I thought the fix would be in a frameworks update rather than a plasma update.
Comment 51 Andreas Sturmlechner 2017-07-25 19:49:01 UTC
(In reply to Pranav Sharma from comment #50)
> I thought the fix would be in a frameworks update rather than a plasma
> update.

That doesn't stop distributions from patching frameworks in advance.