Bug 382340 - Notifications are often as 1px vertical line
Summary: Notifications are often as 1px vertical line
Status: CLOSED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Notifications (show other bugs)
Version: 5.10.3
Platform: Kubuntu Linux
: NOR normal
Target Milestone: 1.0
Assignee: Kai Uwe Broulik
URL:
Keywords:
: 382415 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-07-14 13:01 UTC by Petr Nehez
Modified: 2017-09-20 10:15 UTC (History)
12 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
vertical_line (69.12 KB, image/png)
2017-07-14 13:01 UTC, Petr Nehez
Details
Screenshot of notifications under plasma-workspace-5.10.3 (50.25 KB, image/png)
2017-07-14 15:11 UTC, James Lee
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Nehez 2017-07-14 13:01:29 UTC
Created attachment 106620 [details]
vertical_line

I have Kubuntu 17.04 with KDE backports and after upgrading framework from 5.35 to 5.36 desktop notifications become as 1px vertical line quite often.

The position for notifications is set to top-center.
See the attached image "vertical_line".
Comment 1 James Lee 2017-07-14 15:11:34 UTC
Created attachment 106628 [details]
Screenshot of notifications under plasma-workspace-5.10.3

I am seeing the same behavior since upgrading from 5.10.2 to 5.10.3 on my Gentoo system.  All notifications appear as one pixel vertical lines.
Comment 2 vehi.mv 2017-07-15 09:29:03 UTC
I am allso having the same problem. After the upgrade of framework to 5.36
My notifications are yust a verical line.

I tried notify-send and kdialog --passivepopup (all other kdialog message vindows work fine.), and both have the same result a vertical line like on screenshot above.
Comment 3 ftumpt 2017-07-15 11:05:44 UTC
I can confirm this bug as well. It started happening for me after upgrade to frameworks 5.36.
I'm using Arch Linux with KDE framework 5.36 and plasma 5.10.3.
Notifications are totally unusable.
Comment 4 vehi.mv 2017-07-16 15:24:25 UTC
At first I was allso sure, that it is a problem with framework 5.36. Then I upgraded my other PC which now allso has framework 5.36 and notifications are woking.
So now I have no idea what is causng the problem. 

PC1 Arch linux Plasma 5.10.3 framework 5.36 -> notifications are not working
PC2 Antergos Plasma 5.10.3 framework 5.36 -> notifications are working
Comment 5 Antonio Rojas 2017-07-16 23:08:32 UTC
*** Bug 382415 has been marked as a duplicate of this bug. ***
Comment 6 Petr Nehez 2017-07-17 06:59:13 UTC
If there are multiple notifications to be shown at the same time, only the first item is messed up as 1px line, the other notifications are fine (dimensions & position).
Comment 7 ftumpt 2017-07-17 07:23:09 UTC
@Petr Nehez: This is not the case for me. Every notification is shown as a 1px vertical line for me. When I log in, I always get 3 notifications and can just see 3 vertical lines on top of each other.
Comment 8 Antonio Orefice 2017-07-18 07:45:37 UTC
Affected as well.
I narrowed down the problem to the library: libKF5PlasmaQuick.so.5.36.0
swapping just that with libKF5PlasmaQuick.so.5.35.0 (and related symlinks of course) makes notifications happy again.
Comment 9 ftumpt 2017-07-18 09:27:42 UTC
I can confirm that downgrading libKF5PlasmaQuick.so.5.36.0 to libKF5PlasmaQuick.so.5.35.0 (as suggested by Antonio Orefice) fixes this issue. It seems that this library is the source of this bug.
Comment 10 xmakerenx 2017-07-18 16:14:15 UTC
also having the same problem...

the following error message shows in journalctl after plasmashell tried to show the notification

plasmashell[708]: trying to show an empty dialog

also I use archlinux on both my pc and my laptop and the problem only happen  in the pc 
the only difference between them is that the pc uses radeon(r600) drivers and has 3 monitors while the laptop uses intel drivers and has only one screen
Comment 11 Antonio Orefice 2017-07-19 13:22:58 UTC
Ok then, notifications are working again for me.
I've a dual head setup, and since i read that someone with a single monitor has not that problem, i tried to switch off one monitor by using kscreen.
Nothing was fixed, so i tried to turn off the other monitor, nothing fixed.
So i turned on both again and to my surprise one of the monitors showed a dafault plasma desktop, not the one i customized.
Grr plasma, grrr (the same thing happens on a fresh archlinux installation on the laptop, when i turn on the hdmi output, the plasmashell desktop reverts to a default one, but this is *maybe* another issue).

Anyway, i clicked "default" and my previously configured plasma desktop were back.
The only problem is that widgets were inverted from one monitor to the other, but HEY, notifications are working!
I moved widgets to the other monitors and i'm fine.
Comment 12 xmakerenx 2017-07-19 14:46:32 UTC
 Antonio Orefice idea didn't fix it for me by I found a workaround

I tried to make a new user and the notifications worked but my 3 screens were set in  the wrong positions so I reordered them to their right places and logout , when I logged back in the notifications were broken again...

so after playing around with it a bit more , I found that if I put my 3 screens in the place plasma putted them when I created the new user logout and than login the notifications will work even if I change their positions but if I login when they are not set to the "defaults" positions the notifications will be broken
by default it seems plasma order them dvi-hdmi-displayport
while I usually have them hdmi-displayport-dvi

to conclude it seems when plasma load if the screens are not ordered in set way the notifications will break but if set by the right order they will work even if changing them afterwards
Comment 13 vehi.mv 2017-07-21 18:16:51 UTC
I was making every possible permutations of my 3 monitors on Arch an no success to get notifications working. Then I made a fresh install of Antergos and notifications started working until I changed monitor layouts to my desired positions. So it looks like multiple monitors cause notifications not to work. As far as I discovered if primary monitor is not on the first left position, notifications do not work. Can anyone else confirm that?
Comment 14 David Edmundson 2017-07-22 06:41:53 UTC

*** This bug has been marked as a duplicate of bug 381130 ***
Comment 15 xmakerenx 2017-07-22 07:47:35 UTC
this doesn't seem to be a duplicate of bug 381130 as archlinux has back-ported that fix and for me the issue still persist after updating.

and it does seem that workaround is to simple have the primary screen as the most left one.
Comment 16 Petr Nehez 2017-07-23 07:02:42 UTC
I have only laptop which is used with 2 different monitors but always exclusively with 1 plugged in and I always have only 1 screen active (while a monitor is plugged in laptop's screen is off). 

But it seems a fix is on the way...
Comment 17 ftumpt 2017-07-23 08:58:21 UTC
@Petr Nehez:
Where did you get the information that the fix is on it's way?
As written by xmakerenx, fix for bug 381130 (this bug was marked as its duplicate) has been back-ported to arch linux and it didn't fix the issues that are described in this bug.
Comment 18 Petr Nehez 2017-07-24 05:33:52 UTC
@ftumpt 
Yeah, you are right, I was too fast and have not read bug 381130 carefully. 381130 is a completely different issue, it is about misplaced notifications but this bug is about 1px wide notifications.
Comment 19 Petr Nehez 2017-08-01 07:27:07 UTC
Is there anything more we can help on this issue?
It is quite annoying while seeing this type of notifications...

If there is a logging option I can enable it so that this issue can be analyzed more deeply.
Comment 20 xmakerenx 2017-08-01 12:07:09 UTC
I did some digging around trying to see what commit caused this issue.
I found out that this commit https://cgit.kde.org/plasma-framework.git/commit/?id=eab4aa9909a62cce9b32555ed28d142569fb467f started the issue.

and specially the removal of following lines from src/plasmaquick/dialog.cpp:
-    if (d->mainItem) {
-        d->syncToMainItemSize();
-    }
-
-    if (d->mainItemLayout) {
-        d->updateLayoutParameters();
-    }

from the function  void Dialog::componentComplete()
re-adding the following lines :
+    if (d->mainItem) {
+        d->syncToMainItemSize();
+    }
seems to resolve the issue

not really sure how this relate to what primary screen is set...(maybe some other issue makes those lines necessary ?)
but after re-adding those lines Notifications are no longer 1px vertical line regardless of what is the primary screen.
Comment 21 Christoph Feck 2017-08-02 10:36:10 UTC
Thanks for the investigation. Could you add the patch to https://phabricator.kde.org/differential/diff/create/ for code review?
Comment 22 Mykola Krachkovsky 2017-08-02 16:25:34 UTC
For my case when laptop uses only built-in display, notifications are shown fine. When laptop is started with external display notifications are 1px width. External display is to the right of built-in, external display is primary, panel is on the right side of primary screen.
Comment 23 Marco Martin 2017-08-07 14:06:21 UTC
Git commit 0c27df529d80e0449cfdc6352ad46c904f38c634 by Marco Martin.
Committed on 07/08/2017 at 14:06.
Pushed by mart into branch 'master'.

ignore spurious resize events to empty sizes

Summary:
on multiscreen systems, the notification dialog gets resized to 0x0
right after componentcomplete by someone else (either kwin, notification
 applet  or Qt code) causing 382340, resizing a window to a null size is not correct anyways
and should never happen.
with this, all other resize events are correct and notifications are ok on multiscreen
systems

Test Plan:
system with primary monitor and panel in the external monitor
at the right of a panel, notifications are fine

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: davidedmundson, broulik, plasma-devel, #frameworks

Tags: #plasma, #frameworks

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

M  +10   -0    src/plasmaquick/dialog.cpp

https://commits.kde.org/plasma-framework/0c27df529d80e0449cfdc6352ad46c904f38c634
Comment 24 Petr Nehez 2017-08-25 22:15:19 UTC
I am on 5.10.5 and 5.37 and this issue is still happening on my system.
It's just happened for the very first notification after restart of the system.
Should this issue be fixed now?
Comment 25 Daniel Simushkin 2017-08-28 05:47:19 UTC
5.10.5, two monitors - issue is still here.

For example spectacle's notification is shown as a 1px white vertical line.
Comment 26 Petr Nehez 2017-08-28 05:49:22 UTC
I do not know if it matters but my vertical line has black color.
Comment 27 Antonio Rojas 2017-08-28 06:11:53 UTC
The fix is not in 5.37, it will be in 5.38
Comment 28 Petr Nehez 2017-09-20 07:03:23 UTC
I can confirm this issue is not happening anymore in 5.38.
Comment 29 Mykola Krachkovsky 2017-09-20 10:15:29 UTC
I can confirm too. Notifications in 5.38 are fine. Thanks!