Bug 481736

Summary: On X11, Notifications pop up in the middle of the screen after being away from pc for a while
Product: [Plasma] plasmashell Reporter: Knut Eirik <knuteirikj>
Component: NotificationsAssignee: Plasma Bugs List <plasma-bugs>
Status: CONFIRMED ---    
Severity: normal CC: albertobonalumi00, ancoron.luciferis, Chris, cjbottaro, damien.szczyt, dougshaw77, dustintownsend25, ezzefmw9, godlike64, goingtosleepzzz, gwarser, isi.floss, jacob, kde-bugs, kde, kde, kdedev, leecifer, mailinglist, nate, nurali258, pepko94, prettyvanilla, squider, steve_v, stonework3800, szotsaki, tgnff242, till.seifert, u.ra604, unlovable_fridge356, ve4grm, viktor.balogh45, ville.aakko, vozdeckyl, zmeyski, zvova7890
Priority: NOR Keywords: qt6, regression
Version: master   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=484875
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: This image shows where every notification shows up
Notification position
notification settings w/ the notification popup in wrong position
Old notification before sleep.
Old notification after sleep.
New notification.

Description Knut Eirik 2024-02-23 20:46:01 UTC
Created attachment 166046 [details]
This image shows where every notification shows up

SUMMARY
After leaving the computer idling and then later logging back in from the lock screen, all the notifications will pop up in the middle of the screen as can be seen in the attached screenshot. 
I'm running KDE6. 
Using an LG 4k OLED TV 
Please let me know if you need any additional information.



SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.93.0
KDE Frameworks Version: 5.249.0
Qt Version: 6.7.0
Comment 1 Doug 2024-02-24 06:38:34 UTC
Cannot reproduce, they are showing up near System Tray as expected.

Operating System: KDE neon Testing Edition
KDE Plasma Version: 6.0.0
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.5.0-21-generic (64-bit)
Graphics Platform: Wayland
Graphics Processor: AMD Radeon Pro WX 3200 Series
Comment 2 Jurica Vukadin 2024-02-24 10:35:58 UTC
Created attachment 166054 [details]
Notification position

I am seeing the same on RC2 even without idle, regardless of the system settings config.
Comment 3 Nate Graham 2024-02-26 20:58:18 UTC
Interestingly, that's not the exact middle, it's the bottom middle, where OSDs go. So it seems like something is positioning the notifications as if they're OSDs (not notifications or windows).
Comment 4 Nate Graham 2024-02-29 17:23:43 UTC
Are folks who could reproduce this issue in the past still able to do so with the final 6.0 release?
Comment 5 Jurica Vukadin 2024-02-29 17:32:34 UTC
(In reply to Nate Graham from comment #4)
> Are folks who could reproduce this issue in the past still able to do so
> with the final 6.0 release?

Yep, and it does seem to have something to do with DPMS. I just reproduced it with:
$ xset dpms force off
$ notify-send test
Comment 6 Knut Eirik 2024-02-29 17:38:48 UTC
(In reply to Nate Graham from comment #4)
> Are folks who could reproduce this issue in the past still able to do so
> with the final 6.0 release?

It still happens after coming back from lockscreen after idling for a while.
Comment 7 Nate Graham 2024-03-01 02:47:29 UTC
Thanks. Does it happen on Wayland too, or only on X11?
Comment 8 Jurica Vukadin 2024-03-01 08:47:16 UTC
Seems to be X11-only in my case.
Comment 9 Nate Graham 2024-03-03 00:56:45 UTC
Is everyone else who's affected seeing the same thing?
Comment 10 Knut Eirik 2024-03-03 10:38:23 UTC
Could not reproduce the bug on wayland, only on x11.
Comment 11 Jacob 2024-03-10 02:37:09 UTC
Created attachment 166841 [details]
notification settings w/ the notification popup in wrong position

I am also having this issue ever since upgrading to 6.0.1. I upgraded from 5.27.10 right into 6.0.1 on Arch. I did not have any testing or beta packages of Plasma 6 installed.

Prior to Plasma 6, notifications were always right next to the system tray, bottom right side of the screen.

No matter what notification position setting I choose, I always get the center / middle-bottom notification popup position.

Attached screenshot showing send-notify, notification settings and the notification popup together.

Xorg 21.1.11
Plasma 6.0.1
Comment 12 duha.bugs 2024-03-11 18:09:34 UTC
*** Bug 483261 has been marked as a duplicate of this bug. ***
Comment 13 zvova7890 2024-03-13 00:47:05 UTC
Knut Eirik, yes, it is X11 only.
Comment 14 Nate Graham 2024-03-13 21:27:29 UTC
*** Bug 483430 has been marked as a duplicate of this bug. ***
Comment 15 Fushan Wen 2024-03-15 14:31:13 UTC
https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/4063 will also fix it.
Comment 16 Fushan Wen 2024-03-19 08:58:56 UTC
Git commit 6d543aca43858f707b32e1e08c39bfd7b3ffaf8e by Fushan Wen.
Committed on 19/03/2024 at 08:41.
Pushed by fusionfuture into branch 'master'.

shell: emit screenGeometryChanged when panel is ready

When screenGeometryChanged is emitted in `handleScreenOrderChanged`,
only desktops are ready. Panels are still in the waiting list and do not
have a associated containment, so those containments do not have a valid
id for screen, which is required to get a valid screen geometry.
Related: bug 482339
FIXED-IN: 6.0.3

M  +1    -0    shell/shellcorona.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/6d543aca43858f707b32e1e08c39bfd7b3ffaf8e
Comment 17 Fushan Wen 2024-03-19 09:23:38 UTC
Git commit bd226094ccb3d143538553ec31add3133b9a5f34 by Fushan Wen.
Committed on 19/03/2024 at 09:11.
Pushed by fusionfuture into branch 'Plasma/6.0'.

shell: emit screenGeometryChanged when panel is ready

When screenGeometryChanged is emitted in `handleScreenOrderChanged`,
only desktops are ready. Panels are still in the waiting list and do not
have a associated containment, so those containments do not have a valid
id for screen, which is required to get a valid screen geometry.
Related: bug 482339
FIXED-IN: 6.0.3


(cherry picked from commit 6d543aca43858f707b32e1e08c39bfd7b3ffaf8e)

M  +1    -0    shell/shellcorona.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/bd226094ccb3d143538553ec31add3133b9a5f34
Comment 18 Jurica Vukadin 2024-03-30 18:58:38 UTC
Still seeing this with Arch 6.0.3 packages.
Comment 19 Fushan Wen 2024-03-31 03:03:47 UTC
(In reply to Jurica Vukadin from comment #18)
> Still seeing this with Arch 6.0.3 packages.

Do new notifications also pop up in the wrong position, or only existing notifications?
Comment 20 Jurica Vukadin 2024-03-31 15:41:10 UTC
I ran this:
notify-send -t $((60 * 1000)) "old notification"
sleep 5
spectacle -bfn
xset dpms force off
sleep 30
xset dpms force on
sleep 5
spectacle -bfn

"old notification" was in the correct position before going to sleep. It moved slightly up after waking. I then did a notify-send "new notification" and that showed up the mid-low-center.
Comment 21 Jurica Vukadin 2024-03-31 15:42:05 UTC
Created attachment 167988 [details]
Old notification before sleep.
Comment 22 Jurica Vukadin 2024-03-31 15:42:21 UTC
Created attachment 167989 [details]
Old notification after sleep.
Comment 23 Jurica Vukadin 2024-03-31 15:42:31 UTC
Created attachment 167990 [details]
New notification.
Comment 24 Knut Eirik 2024-04-01 14:28:03 UTC
bug still present for me on 6.0.3
Comment 25 Fushan Wen 2024-04-02 11:40:30 UTC
Cannot reproduce. I'd suggest debugging it yourself as it might only happen on specific hardware
Comment 26 zmeyski@gmail.com 2024-04-02 14:01:27 UTC
(In reply to Fushan Wen from comment #25)
> Cannot reproduce. I'd suggest debugging it yourself as it might only happen
> on specific hardware

It's not fixed, notifications still appear slightly below the center of the screen on 6.0.3
Care to provide any hints on how to debug ourselves?
Comment 27 retired 2024-04-04 15:09:51 UTC
Still affected.
6.0.3 Nvidia
Comment 28 Ancoron 2024-04-09 23:26:05 UTC
I am also affected by this issue (have to use X11 until Wayland supports full session restore and some other apps solve their compatibility with Wayland).

However, I have 2 different machines with pretty much identical system/software setup and only on one of them the issue occurs:

Machine A → Main User → BAD
Machine A → Secondary User → GOOD
Machine B → Main User → GOOD

So I suspect that this issue has to to with some leftover config from Plasma 5 which are only present for some users.

Both machine setups where previously running Plasma 5 and have been upgraded.

System info for Machine A:

Operating System: Arch Linux 
KDE Plasma Version: 6.0.3
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.3
Kernel Version: 6.8.4-arch1-1 (64-bit)
Graphics Platform: X11
Processors: 16 × AMD Ryzen 7 5700G with Radeon Graphics
Memory: 58.7 GiB of RAM
Graphics Processor: AMD Radeon Graphics
Comment 29 Ancoron 2024-04-10 21:28:34 UTC
Now this is weird, after a full system upgrade + reboot and some about 2-3 sleeps, the notification still where in it's correct place.

Then I ran the test:

notify-send -t $((60 * 1000)) "Test notification"; sleep 5; spectacle -bfn; xset dpms force off; sleep 30; xset dpms force on; sleep 5; spectacle -bfn

...which showed the notification after "xset dpms force on" only offset a bit (upwards).

But then all following notifications again came back in the middle/center of my screen.

If I remember correctly, then what I did for sleep just today was to first turn the monitor off and then press the sleep button. Usually I did tend to first put my machine to sleep and then turn the monitor off, which may be an indicator of the code path into play for this bug?

But now after running the test, even a sleep after monitor off doesn't fix it, so have to reboot again.
Comment 30 Graham Poole 2024-04-15 03:59:48 UTC
I have this same issue. It is fine after a reboot, and then appears after the computer has been on for a while.
I'm not a dev, but can happily provide info and run tests if it is useful.

Operating System: openSUSE Tumbleweed 20240412
KDE Plasma Version: 6.0.3
KDE Frameworks Version: 6.0.0
Qt Version: 6.7.0
Kernel Version: 6.8.5-1-default (64-bit)
Graphics Platform: X11
Processors: 12 × AMD Ryzen 5 5600X 6-Core Processor
Memory: 15.6 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 3060/PCIe/SSE2
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: B550 AORUS PRO AC
Comment 31 DT 2024-04-19 20:17:43 UTC
Unfortunately, I am still having the same problem on 6.0.4. In my case, it appears related to the display turning off, rather than the system as a whole going to sleep (which I have disabled). I can reproduce the issue by running 'xset dpms force off', thereby turning the display off, then waking the display. To test the issue, I send a test notification with "notify-send" before and after turning off the display.

I also tried to create a new user to see if perhaps it was some leftover Plasma 5 configuration that was causing the issue (per Ancoron's comment), but I could immediately reproduce the issue on the new user as well.

Operating System: Arch Linux
KDE Plasma Version: 6.0.4
KDE Frameworks Version: 6.1.0
Qt Version: 6.7.0
Kernel Version: 6.8.7-zen1-1-zen (64-bit)
Graphics Platform: X11
Processors: 12 × AMD Ryzen 5 7600X 6-Core Processor
Memory: 30.5 GiB of RAM
Graphics Processor: AMD Radeon RX 7900 XT
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: B650 AORUS ELITE AX
Comment 32 Till Seifert 2024-04-22 13:00:50 UTC
also affected with 6.0.4.
i can fix it by adjusting the height of my panel by 1px. 
then current *and* future notification appear at the correct place.
Comment 33 Knut Eirik 2024-04-22 16:59:25 UTC
(In reply to Till Seifert from comment #32)
> also affected with 6.0.4.
> i can fix it by adjusting the height of my panel by 1px. 
> then current *and* future notification appear at the correct place.

Can also confirm that the notification goes to the correct position after resizing. 
It goes back to the wrong position after coming back from the lock screen.
Comment 34 Christopher J. Bottaro 2024-05-03 07:25:28 UTC
I have the same problem as everyone else. 6.0.4, Nvidia, X11, turning off monitor seems to trigger the problem.
Comment 35 Nate Graham 2024-05-05 20:28:47 UTC
*** Bug 486635 has been marked as a duplicate of this bug. ***
Comment 36 Bug Janitor Service 2024-05-08 10:27:49 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/libplasma/-/merge_requests/1118
Comment 37 ezzefmw9 2024-05-08 17:57:46 UTC
I've had this bug on EndeavourOS since updating to Plasma 6. By coincidence what fixed this for me is applying a fix for another bug I also had: https://bugs.kde.org/show_bug.cgi?id=484323

The solution for some people there has been to disable Kscreen2 found at:

Settings -> System -> Session -> Background Services

I tried this myself and now that bug is fixed, although I did have to reboot after disabling Kscreen2 as my monitor (actually a HDMI connected TV) remained blank the next day after I'd turned it off for the night. Logging out and back in was not enough.

As a byproduct of that fix, my notifications are now always showing in the correct location. It's been more than three days since I disabled Kscreen2 (without rebooting) and both bugs are gone for me. This includes several times of switching the screen on and off which is about where I'd start seeing it before, after locking and switching the screen off overnight.

It would be interesting to see if this would apply to anyone else's situation. The downside is that disabling Kscreen2 might not be an option for those with multiple monitors from what I understand.

Nobody else seems to have noticed this so I've just created this account literally for reporting this as a possible fix for others.
Comment 38 Christopher J. Bottaro 2024-05-08 18:36:48 UTC
(In reply to ezzefmw9 from comment #37)
> I've had this bug on EndeavourOS since updating to Plasma 6. By coincidence
> what fixed this for me is applying a fix for another bug I also had:
> https://bugs.kde.org/show_bug.cgi?id=484323
> 
> The solution for some people there has been to disable Kscreen2 found at:

Thanks so much for this workaround! It's been working for me even after a few monitor turn offs. I only have one monitor, so disabling kscreen2 doesn't seem like it will be an issue. Thanks again!
Comment 39 Nate Graham 2024-05-08 19:50:56 UTC
Please remember to re-enable KScreen once this bug is fixed, or else any multimonitor setup you try to use will be badly broken.
Comment 40 Knut Eirik 2024-05-08 19:59:15 UTC
(In reply to ezzefmw9 from comment #37)
> The solution for some people there has been to disable Kscreen2 found at:
Thanks this fixed the annoying issue.
Comment 41 Ancoron 2024-05-09 16:51:06 UTC
(In reply to ezzefmw9 from comment #37)
> what fixed this for me is applying a fix for another bug I also had:
> https://bugs.kde.org/show_bug.cgi?id=484323
> 
> The solution for some people there has been to disable Kscreen2 found at:
> 
> Settings -> System -> Session -> Background Services

You are my savior as well! Thanx a lot!
Comment 42 albertobonalumi00 2024-06-02 21:33:35 UTC
(In reply to ezzefmw9 from comment #37)
> I've had this bug on EndeavourOS since updating to Plasma 6. By coincidence
> what fixed this for me is applying a fix for another bug I also had:
> https://bugs.kde.org/show_bug.cgi?id=484323
> 
> The solution for some people there has been to disable Kscreen2 found at:
> 
> Settings -> System -> Session -> Background Services
> 
> I tried this myself and now that bug is fixed, although I did have to reboot
> after disabling Kscreen2 as my monitor (actually a HDMI connected TV)
> remained blank the next day after I'd turned it off for the night. Logging
> out and back in was not enough.
> 
> As a byproduct of that fix, my notifications are now always showing in the
> correct location. It's been more than three days since I disabled Kscreen2
> (without rebooting) and both bugs are gone for me. This includes several
> times of switching the screen on and off which is about where I'd start
> seeing it before, after locking and switching the screen off overnight.
> 
> It would be interesting to see if this would apply to anyone else's
> situation. The downside is that disabling Kscreen2 might not be an option
> for those with multiple monitors from what I understand.
> 
> Nobody else seems to have noticed this so I've just created this account
> literally for reporting this as a possible fix for others.

Thanks. I literally created an account just to check if this bug was tracked, it was driving me crazy. I was reproducing it on a fresh Nobara KDE (x11) install, NVIDIA 3070.
Comment 43 zvova7890 2024-06-02 21:44:10 UTC
I'm not experience this issue anymore since some version(probably after mentioned fixes was landed). So maybe albertobonalumi00 have some specific case
Comment 44 retired 2024-06-06 20:53:48 UTC
Well, it just happened. I had kscreen service disabled for a few weeks and re-enabled it yesterday.

Operating System: Arch Linux 
KDE Plasma Version: 6.0.5
KDE Frameworks Version: 6.2.0
Qt Version: 6.7.1
Kernel Version: 6.8.11-273-tkg-eevdf (64-bit)
Graphics Platform: X11
Processors: 16 × AMD Ryzen 7 7800X3D 8-Core Processor
Memory: 93.4 GiB of RAM
Graphics Processor: AMD Radeon Graphics
Comment 45 user12 2024-06-06 21:12:08 UTC
should this bug be marked Product: KScreen rather than plasmashell?   I can confirm this bug still exists on Manjaro KDE, latest updates applied.
Comment 46 Christopher J. Bottaro 2024-06-14 16:47:31 UTC
I've been on Wayland since the beta Nvidia drivers came out, but I had to switch back to X11 recently due to some weird screen flickering that started happening. And guess what came back, notifications in the middle of the screen! I'm on 6.3.0.
Comment 47 nurali 2024-06-24 08:12:50 UTC
Same here on Plasma 6.10 on X session
Comment 48 lman 2024-06-25 08:11:43 UTC
The same happens for me every time I turn off and on the monitor (X11 session). 
Steps to reproduce:
* power on or restart the pc and login to desktop
* run any task that shows notification - it is show in the right bottom corner of the screen
* turn off the monitor
* turn onn the monitor
* run any task that shows notification - it is now shown close to the center of the screen

SOFTWARE/OS VERSIONS
System: KDE Neon User Edition
KDE Plasma Version: 6.1.0
KDE Frameworks Version:  6.3.0
Qt Version: 6.7.0
Session: X11
Comment 49 lman 2024-06-27 06:45:32 UTC
Workaround when it happens for me is to call in terminal
killall plasmashell && plasmashell&
Comment 50 retired 2024-06-27 20:36:18 UTC
Settings page for managing services appears to be hidden, probably because of this bug. That's not how we do things in opensource I knew for the last 20 years.
I will not argue about intentions of KDE contributor who pushed that change, you can still access the applet it via "kcmshell6 kded" from terminal.
Comment 51 Damien Szczyt 2024-07-11 13:43:56 UTC
same here on plasma 6.1.2 on X11 with amd gpu
Comment 52 nurali 2024-07-20 03:39:51 UTC
Is this fixed in 6.1.3? I masked all plasma and qt applications with keywords (on Gentoo) beacause of three annoying bugs,using plasma 5.27.11 on ~amd64 branch right now, one of them is fiexed, left this and "black screen on screen-locking with X11 and amdgpu"
Plasma 6 is beautiful, hoping update to 'BUGLESS' Plasma 6 soon, LOL....
Comment 53 godlike 2024-08-13 16:37:11 UTC
This bug is still present on 6.1.4. It seems to get triggered every time the screen shuts off (I haven't tested shutting it off manually as I have the power saving feature for that). Adding the notification widget on the panel, or resizing the panel only fixes it until the next time the screen shuts off and comes back on (not to mention that there's a 50/50 chance that trying to edit the panel crashes plasma - still comes back and usually the bug goes away then too, of course until the next time the screen shuts off).

Disabling kscreen is not really a solution if you are using the "Turn off screen" feature, as then the screen does not turn back on and you have to either switch to a tty and kill the X11 session or reboot the system.
Comment 54 godlike 2024-08-19 08:18:32 UTC
Further update: setting the notification popups location in system settings to be fixed, instead of  "Near notification icon" does not fix this either. The popup reverts to appearing in the lower middle of the screen after the monitor turns off and back on again.
Comment 55 retired 2024-09-06 15:02:07 UTC
This is still a thing on Plasma 6.1.2. I am not touching Wayland anytime soon, so I simply moved to a X11 DE that doesn't introduce major regressions every couple years.

Operating System: Arch Linux 
KDE Plasma Version: 6.1.4
KDE Frameworks Version: 6.5.0
Qt Version: 6.7.2
Kernel Version: 6.10.8-273-tkg-bore (64-bit)
Graphics Platform: X11
Processors: 16 × AMD Ryzen 7 7800X3D 8-Core Processor
Memory: 93.9 GiB of RAM
Graphics Processor: AMD Radeon RX 7800 XT
Comment 56 Steve Vialle 2024-09-29 08:00:50 UTC
*** Bug 493812 has been marked as a duplicate of this bug. ***
Comment 57 Steve Vialle 2024-09-29 08:05:01 UTC
Still present in plasma 6.1.5.
Echoing above comment WRT wayland and regressions every major plasma release.
Comment 58 Fushan Wen 2024-10-05 02:41:01 UTC
Git commit e568e18e192def09f60d9d626d55a455eaf71d19 by Fushan Wen, on behalf of David Edmundson.
Committed on 05/10/2024 at 02:39.
Pushed by fusionfuture into branch 'master'.

containment: emit screen geometry change correctly

A containment reports the screen geometry. A containment has a
lastScreen member which is the index of the screen it should be on.

We used to track changes to the screen before a containment was assigned
to a screen, except the screen geometry got removed in
a0b8bb2a7bfa153b6e5923de019ac8b50f1be395.

reactToScreenChanged is called whenever Containment::screen changes this
is where a containment is bound to an physical screen. It's a better
hook for announcing geometry changes rather than having consumers make
this assumption.

M  +8    -4    src/plasma/containment.cpp
M  +0    -3    src/plasmaquick/plasmoid/plasmoiditem.cpp

https://invent.kde.org/plasma/libplasma/-/commit/e568e18e192def09f60d9d626d55a455eaf71d19
Comment 59 Bug Janitor Service 2024-10-05 02:50:46 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/libplasma/-/merge_requests/1208
Comment 60 Fushan Wen 2024-10-05 02:52:59 UTC
Git commit 0d3dac98d6f0b0077d225d84868f42fbb5813fa7 by Fushan Wen.
Committed on 05/10/2024 at 02:50.
Pushed by fusionfuture into branch 'Plasma/6.2'.

containment: emit screen geometry change correctly

A containment reports the screen geometry. A containment has a
lastScreen member which is the index of the screen it should be on.

We used to track changes to the screen before a containment was assigned
to a screen, except the screen geometry got removed in
a0b8bb2a7bfa153b6e5923de019ac8b50f1be395.

reactToScreenChanged is called whenever Containment::screen changes this
is where a containment is bound to an physical screen. It's a better
hook for announcing geometry changes rather than having consumers make
this assumption.


(cherry picked from commit e568e18e192def09f60d9d626d55a455eaf71d19)

Co-authored-by: David Edmundson <kde@davidedmundson.co.uk>

M  +8    -4    src/plasma/containment.cpp
M  +0    -3    src/plasmaquick/plasmoid/plasmoiditem.cpp

https://invent.kde.org/plasma/libplasma/-/commit/0d3dac98d6f0b0077d225d84868f42fbb5813fa7