Bug 423297

Summary: After upgrading to Plasma 5.19 panel transparency often not working until the Background Contrast effect is toggled off and on again
Product: [Plasma] kwin Reporter: Derek Christ <christ.derek>
Component: effects-variousAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: normal CC: bethock, katyaberezyaka, kde, nate, niccolo.venerandi, plasma-bugs, postix
Priority: VHI Keywords: regression
Version: 5.19.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=426537
https://bugs.kde.org/show_bug.cgi?id=430583
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Before and after disabling and enabling of background contrast

Description Derek Christ 2020-06-20 21:55:16 UTC
After updating to Plasma 5.19 I observed, that my panel transparency was gone. I set the transparency up by following the instructions in the link at the end of this issue.
To get the transparency working I disabled and enabled the background contrast option in workspace effects after every reboot, but this does not work every time.

STEPS TO REPRODUCE
1. Run Plasma 5.19
2. Enable Background contrast in workspace effects
3. Make your panel more transparent using this instruction to make the effect more obvious (link at the end of this issue)
4. Restart your computer.

Observed Result

The panel isn't transparent any more. You need to disable and enable background contrast in the workspace effects but this does not work every time.

Expected Result

The panels should be transparent. 


SOFTWARE/OS VERSIONS

Linux/KDE Plasma: Manjaro, Plasma 5.19
(available in About System)
KDE Plasma Version: 5.19
KDE Frameworks Version: 5.71.0
Qt Version: 5.15.0

Link to instructions:
https://www.reddit.com/r/kde/comments/e4g7me/tip_you_can_just_use_breeze_for_blur_transparency/?utm_medium=android_app&utm_source=share
Comment 1 Nate Graham 2020-06-22 18:00:28 UTC
Out of curiosity are you using a dark theme?
Comment 2 Derek Christ 2020-06-22 18:19:38 UTC
My current settings are:

Global Theme: Breeze-Dark
Plasma Theme: breeze-dark
Colors: Breeze Light

I noticed, that switching the compositing renderer from OpenGL to XRender and back to OpenGL does also fix the problem.
Comment 3 Nate Graham 2020-06-26 02:38:20 UTC
Can reproduce. When using Breeze Dark, Plasma dialogs/popups/etc. are transparent, but the panel is not.

Niccolò, is this something you're aware of?
Comment 4 veggero 2020-06-26 07:09:33 UTC
I can confirm with my (light) theme. I was also a bit annoyed by having to turn contrast effect on and off, but I never got what the issue is. 

I actually see both panels and all dialogs as a much more opaque, but not totally opaque.
Comment 5 Bug Janitor Service 2020-06-30 14:00:18 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/94
Comment 6 David Edmundson 2020-06-30 14:03:19 UTC
Git commit 1b4c725d108b595b85a75aaa2c69721ffb085bef by David Edmundson.
Committed on 30/06/2020 at 13:59.
Pushed by davidedmundson into branch 'master'.

Update clientGeometry for Unmanaged windows

It was udpated when we received a configure event but not in the initial
track.

The symptom of this being missed out was that blur would not be applied
to the window.
Related: bug 423405

M  +1    -0    unmanaged.cpp

https://invent.kde.org/plasma/kwin/commit/1b4c725d108b595b85a75aaa2c69721ffb085bef
Comment 7 David Edmundson 2020-06-30 16:14:16 UTC
Can someone confirm if it's fixed in master or we have something else to fix.

There's one comment here that doesn't match my fix.
Comment 8 Nate Graham 2020-06-30 16:53:58 UTC
Not fixed for me with master KWin from 10 minutes ago. The Breeze Dark plasma theme is still 100% opaque.
Comment 9 veggero 2020-07-21 22:50:25 UTC
It seems like widgets/panel_background.svg is loaded instead of translucent/widgets/panel_background.svg until I toggle contrast effect off and on. Maybe contrast effect detection on startup broke and the wrong svg is thus loaded?
Comment 10 Nate Graham 2020-09-23 02:20:01 UTC
Reminds me of Bug 426537
Comment 11 Nate Graham 2020-10-07 19:06:26 UTC
With the current state of git master everything, this is fixed for me. Can anyone else with an all-git-master KDE confirm?
Comment 12 Derek Christ 2020-10-11 10:45:00 UTC
Created attachment 132270 [details]
Before and after disabling and enabling of background contrast

I can still confirm this bug on everything-master.

While the bottom panel itself is transparent, all other pop-up widgets and notifications still aren't translucent until I disable and enable background contrast in the settings.
Comment 13 Nate Graham 2020-10-11 18:08:54 UTC
Thanks. Moving to KWin then, as it seems like an issue with the Background Contrast effect.
Comment 14 Vlad Zahorodnii 2020-10-12 08:04:10 UTC
Perhaps I don't understand something, but I thought the purpose of the background contrast effect was to make the background behind translucent panels more "opaque"-ish.
Comment 15 Vlad Zahorodnii 2020-10-12 08:05:34 UTC
Still, it's a bit weird that visuals are different before and after re-enabling the effect. Speaking for myself, I followed the instructions in STEPS TO REPRODUCE section, but panels look the same before and after enabling background contrast effect.
Comment 16 veggero 2020-10-12 08:11:08 UTC
Vlad: it works like this: contrast effect makes things more opaque; this means that we can allow the plasma theme to be more transparent. There are two types of background for dialogs and panels: a more opaque one in widgets/... for when contrast effect in off, and a more transparent one in transparent/widgets/... for when contrast effect is on, since it adds more opacity.
Because of this bug, contrast effect is on, but widgets/... svg is loaded instead of transparency/widgets/..., which means that the contrast effect is used on top of the already opaque svg, resulting in a very opaque panel and dialogs.
I will check if this much still reproduces in master for me.
Comment 17 Vlad Zahorodnii 2020-10-12 08:15:11 UTC
(In reply to veggero from comment #16)
> Because of this bug, contrast effect is on, but widgets/... svg is loaded
> instead of transparency/widgets/..., which means that the contrast effect is
> used on top of the already opaque svg, resulting in a very opaque panel and
> dialogs.
Can you get the output of xprop for one of such widgets or panels? You will need to run "sleep <n> && xprop" from terminal. When the cursor shape changes to a cross, click a problematic panel.
Comment 18 veggero 2020-10-13 12:09:25 UTC
Widget:

_NET_WM_DESKTOP(CARDINAL) = 4294967295
WM_STATE(WM_STATE):
                window state: Normal
                icon window: 0x0
_KDE_NET_WM_SHADOW(CARDINAL) = 33554568, 33554570, 33554572, 33554680, 33554680, 33554680, 33554680, 33554680, 6, 6, 1, 1
_NET_WM_ALLOWED_ACTIONS(ATOM) = _NET_WM_ACTION_MOVE, _NET_WM_ACTION_MINIMIZE, _NET_WM_ACTION_CHANGE_DESKTOP, _NET_WM_ACTION_CLOSE
_KDE_NET_WM_ACTIVITIES(STRING) = "00000000-0000-0000-0000-000000000000"
_NET_WM_USER_TIME(CARDINAL) = 132622
WM_TRANSIENT_FOR(WINDOW): window id # 0x2000028
_KDE_SLIDE(_KDE_SLIDE) = 0xffffffff, 0x3
_KDE_NET_WM_BACKGROUND_CONTRAST_REGION(_KDE_NET_WM_BACKGROUND_CONTRAST_REGION) = 0x0, 0x0, 0x1df, 0x1, 0x0, 0x1, 0x1e0, 0x26f, 0x403350ca, 0xbf2d9e20, 0xbf2d9e20, 0x0, 0xc01203e6, 0x3f9968d8, 0xc01203e6, 0x0, 0xbe6bd87c, 0xbe6bd87c, 0x404ffacc, 0x0, 0x3f147ae1, 0x3f147ae2, 0x3f147af0, 0x3f800000
_KDE_NET_WM_BLUR_BEHIND_REGION(CARDINAL) = 0, 0, 479, 1, 0, 1, 480, 623
_NET_WM_STATE(ATOM) = _NET_WM_STATE_FOCUSED, _NET_WM_STATE_ABOVE, _NET_WM_STATE_STAYS_ON_TOP, _NET_WM_STATE_SKIP_TASKBAR, _NET_WM_STATE_SKIP_PAGER, _KDE_NET_WM_STATE_SKIP_SWITCHER
_KDE_NET_WM_DESKTOP_FILE(UTF8_STRING) = "org.kde.plasmashell"
XdndAware(ATOM) = BITMAP
WM_NAME(STRING) = 
_NET_WM_NAME(UTF8_STRING) = "Plasma"
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x2, 0x1, 0x0, 0x0, 0x0
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DIALOG, _KDE_NET_WM_WINDOW_TYPE_OVERRIDE, _NET_WM_WINDOW_TYPE_NORMAL
_XEMBED_INFO(_XEMBED_INFO) = 0x0, 0x1
WM_CLIENT_LEADER(WINDOW): window id # 0x2000015
WM_HINTS(WM_HINTS):
                Client accepts input or input focus: True
                window id # of group leader: 0x2000015
WM_CLIENT_MACHINE(STRING) = "yara"
_NET_WM_PID(CARDINAL) = 1415
_NET_WM_SYNC_REQUEST_COUNTER(CARDINAL) = 33554498
WM_CLASS(STRING) = "plasmashell", "plasmashell"
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW, WM_TAKE_FOCUS, _NET_WM_PING, _NET_WM_SYNC_REQUEST
WM_NORMAL_HINTS(WM_SIZE_HINTS):
                user specified location: 0, 412
                user specified size: 480 by 624
                program specified minimum size: 480 by 624
                program specified maximum size: 480 by 624
                window gravity: Static

Panel:

_NET_WM_STRUT(CARDINAL) = 0, 0, 0, 44
_NET_WM_STRUT_PARTIAL(CARDINAL) = 0, 0, 0, 44, 0, 0, 0, 0, 0, 0, 0, 1919
_KDE_NET_WM_ACTIVITIES(STRING) = "00000000-0000-0000-0000-000000000000"
_NET_WM_ALLOWED_ACTIONS(ATOM) = _NET_WM_ACTION_CHANGE_DESKTOP
WM_STATE(WM_STATE):
                window state: Normal
                icon window: 0x0
_NET_WM_STATE(ATOM) = 
_NET_WM_USER_TIME(CARDINAL) = 18815
_KDE_NET_WM_SHADOW(CARDINAL) = 33554478, 33554511, 33554511, 33554511, 33554511, 33554511, 33554511, 33554511, 6, 1, 1, 1
_KDE_SLIDE(_KDE_SLIDE) = 0xffffffff, 0x3
_NET_WM_DESKTOP(CARDINAL) = 4294967295
_KDE_NET_WM_BACKGROUND_CONTRAST_REGION(_KDE_NET_WM_BACKGROUND_CONTRAST_REGION) = 0x0, 0x0, 0x780, 0x2c, 0x403350ca, 0xbf2d9e20, 0xbf2d9e20, 0x0, 0xc01203e6, 0x3f9968d8, 0xc01203e6, 0x0, 0xbe6bd87c, 0xbe6bd87c, 0x404ffacc, 0x0, 0x3f147ae1, 0x3f147ae2, 0x3f147af0, 0x3f800000
_KDE_NET_WM_BLUR_BEHIND_REGION(CARDINAL) = 0, 0, 1920, 44
_KDE_NET_WM_DESKTOP_FILE(UTF8_STRING) = "org.kde.plasmashell"
XdndAware(ATOM) = BITMAP
_KDE_NET_WM_USER_CREATION_TIME(CARDINAL) = 16350
WM_NAME(STRING) = 
_NET_WM_NAME(UTF8_STRING) = "Plasma"
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x2, 0x1, 0x0, 0x0, 0x0
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DOCK, _KDE_NET_WM_WINDOW_TYPE_OVERRIDE, _NET_WM_WINDOW_TYPE_NORMAL
_XEMBED_INFO(_XEMBED_INFO) = 0x0, 0x1
WM_CLIENT_LEADER(WINDOW): window id # 0x2000015
WM_HINTS(WM_HINTS):
                Client accepts input or input focus: False
                window id # of group leader: 0x2000015
WM_CLIENT_MACHINE(STRING) = "yara"
_NET_WM_PID(CARDINAL) = 1415
_NET_WM_SYNC_REQUEST_COUNTER(CARDINAL) = 33554473
WM_CLASS(STRING) = "plasmashell", "plasmashell"
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW, WM_TAKE_FOCUS, _NET_WM_PING, _NET_WM_SYNC_REQUEST
WM_NORMAL_HINTS(WM_SIZE_HINTS):
                user specified location: 0, 1036
                user specified size: 1920 by 44
                program specified minimum size: 1920 by 44
                program specified maximum size: 1920 by 44
                window gravity: Static
Comment 19 Nate Graham 2020-12-10 15:07:10 UTC
Is this still happening for anyone in Plasma 5.20 or git master? We haven't gotten any duplicate bug reports which makes me feel that it might have gotten fixed.
Comment 20 veggero 2020-12-10 15:17:26 UTC
Can confirm I cannot reproduce anymore
Comment 21 Nate Graham 2020-12-10 15:30:04 UTC
Hooray!
Comment 22 Nate Graham 2021-01-22 21:09:39 UTC
*** Bug 431890 has been marked as a duplicate of this bug. ***
Comment 23 Nate Graham 2021-01-22 21:10:00 UTC
Got a report from someone on Plasma 5.20.5; re-opening.
Comment 24 veggero 2021-01-22 21:13:03 UTC
That looks unrelated
Comment 25 Nate Graham 2021-01-22 21:33:49 UTC
The person is reporting the same issue and the same workaround fixes it.
Comment 26 veggero 2021-01-22 21:35:51 UTC
In that case, the panel is gray instead of white; it this case, it's solid white instead of transparent white. In that case, turning off the effect fixes it, in this case the fix is to turn it off and then on again.
Comment 27 bethock 2021-01-23 09:01:21 UTC
veggero is right. Turning the effect on returns the problem.
Comment 28 Nate Graham 2021-01-25 16:14:41 UTC
Ah ok.