Bug 435862

Summary: Blur effect not working in Plasma 5.21.90
Product: [Plasma] kwin Reporter: Paul McAuley <kde>
Component: effects-variousAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: ryu.ketsueki
Priority: NOR    
Version: 5.21.90   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Screenshot showing how blur is not working on the titlebar

Description Paul McAuley 2021-04-18 03:04:33 UTC
If I try to use a build of kwin from the git master, or from the Neon Unstable version, the blur effect is no longer working. Windows using 3rd-party decoration plugins which have transparency available just show as transparent, without any blur.

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.21.80
KDE Frameworks Version: 5.82.0
Qt Version: 5.15.2
Kernel Version: 5.4.0-72-generic (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-7700HQ CPU @ 2.80GHz
Memory: 31.2 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 630

This works fine in the 5.21.4 release, but I would like blur on the git master to be functional as I am trying to see if I can make some changes to attempt to fix bug 395725 .
Comment 1 ryu.ketsueki 2021-04-18 14:43:01 UTC
I'm also having this bug on KDE Unstable Repos for openSUSE. I tested many decorations that do enable blur on their json, more specifically Lightly and ClassikStyles. Both have no blur in the unstable builds.
Comment 2 Paul McAuley 2021-05-15 18:52:25 UTC
Just got 5.21.90 on OpenSUSE and now blur is not working for window decorations for this branch.
Comment 3 Vlad Zahorodnii 2021-05-15 19:32:22 UTC
Those are binary window decoration. Does this issue affect also aurorae decorations? Can you also post the output of `qdbus org.kde.KWin /KWin supportInformation` please?
Comment 4 Paul McAuley 2021-05-15 20:04:58 UTC
(In reply to Vlad Zahorodnii from comment #3)
> Those are binary window decoration. Does this issue affect also aurorae
> decorations? Can you also post the output of `qdbus org.kde.KWin /KWin
> supportInformation` please?

Just tried, and yes it also affects aurorae decorations. Here is output when a transparent aurorae decoration is selected:

~> qdbus org.kde.KWin /KWin supportInformation
KWin Support Information:
The following information should be used when requesting support on e.g. https://forum.kde.org.
It provides information about the currently running instance, which options are used,
what OpenGL driver and which effects are running.
Please post the information provided underneath this introductory text to a paste bin service
like https://paste.kde.org instead of pasting into support threads.

==========================

Version
=======
KWin version: 5.21.90
Qt Version: 5.15.2
Qt compile version: 5.15.2
XCB compile version: 1.13

Operation Mode: X11 only

Build Options
=============
KWIN_BUILD_DECORATIONS: yes
KWIN_BUILD_TABBOX: yes
KWIN_BUILD_ACTIVITIES: yes
HAVE_DRM: yes
HAVE_GBM: yes
HAVE_EGL_STREAMS: yes
HAVE_X11_XCB: yes
HAVE_EPOXY_GLX: yes
HAVE_WAYLAND_EGL: yes

X11
===
Vendor: The X.Org Foundation
Vendor Release: 12003000
Protocol Version/Revision: 11/0
SHAPE: yes; Version: 0x11
RANDR: yes; Version: 0x14
DAMAGE: yes; Version: 0x11
Composite: yes; Version: 0x4
RENDER: yes; Version: 0xb
XFIXES: yes; Version: 0x50
SYNC: yes; Version: 0x31
GLX: yes; Version: 0x0

Decoration
==========
Plugin: org.kde.kwin.aurorae
Theme: __aurorae__svg__Freeze
Plugin recommends border size: No
Blur: 1
onAllDesktopsAvailable: false
alphaChannelSupported: true
closeOnDoubleClickOnMenu: false
decorationButtonsLeft: 0, 9, 7
decorationButtonsRight: 6, 3, 4, 5
borderSize: 3
gridUnit: 24
font: Noto Sans,10,-1,0,50,0,0,0,0,0
smallSpacing: 6
largeSpacing: 24

Platform
==========
Name: KWin::X11StandalonePlatform

Cursor
======
themeName: breeze_cursors
themeSize: 48

Options
=======
focusPolicy: 0
xwaylandCrashPolicy: 
xwaylandMaxCrashCount: 3
nextFocusPrefersMouse: false
clickRaise: true
autoRaise: false
autoRaiseInterval: 0
delayFocusInterval: 0
shadeHover: false
shadeHoverInterval: 250
separateScreenFocus: false
placement: 4
focusPolicyIsReasonable: true
borderSnapZone: 10
windowSnapZone: 10
centerSnapZone: 0
snapOnlyWhenOverlapping: false
rollOverDesktops: true
focusStealingPreventionLevel: 1
operationTitlebarDblClick: 5000
operationMaxButtonLeftClick: 5000
operationMaxButtonMiddleClick: 5015
operationMaxButtonRightClick: 5014
commandActiveTitlebar1: 0
commandActiveTitlebar2: 28
commandActiveTitlebar3: 2
commandInactiveTitlebar1: 4
commandInactiveTitlebar2: 28
commandInactiveTitlebar3: 2
commandWindow1: 7
commandWindow2: 8
commandWindow3: 8
commandWindowWheel: 28
commandAll1: 10
commandAll2: 3
commandAll3: 14
keyCmdAllModKey: 16777250
showGeometryTip: false
condensedTitle: false
electricBorderMaximize: true
electricBorderTiling: true
electricBorderCornerRatio: 0.25
borderlessMaximizedWindows: false
killPingTimeout: 5000
hideUtilityWindowsForInactive: true
compositingMode: 1
useCompositing: true
hiddenPreviews: 1
glSmoothScale: 2
xrenderSmoothScale: false
glStrictBinding: true
glStrictBindingFollowsDriver: true
glCoreProfile: true
glPreferBufferSwap: 101
glPlatformInterface: 1
windowsBlockCompositing: true
latencyPolicy: 
renderTimeEstimator: 

Screen Edges
============
desktopSwitching: false
desktopSwitchingMovingClients: false
cursorPushBackDistance: 1x1
timeThreshold: 150
reActivateThreshold: 350
actionTopLeft: 0
actionTop: 0
actionTopRight: 0
actionRight: 0
actionBottomRight: 0
actionBottom: 0
actionBottomLeft: 0
actionLeft: 0

Screens
=======
Multi-Head: no
Active screen follows mouse:  yes
Number of Screens: 1

Screen 0:
---------
Name: eDP-1
Geometry: 0,0,3840x2160
Scale: 1
Refresh Rate: 59.996

Compositing
===========
Compositing is active
Compositing Type: OpenGL
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 630 (Kaby Lake GT2) 
OpenGL version string: 4.6 (Core Profile) Mesa 19.3.4
OpenGL platform interface: GLX
OpenGL shading language version string: 4.60
Driver: Intel
GPU class: Unknown
OpenGL version: 4.6
GLSL version: 4.60
Mesa version: 19.3.4
X server version: 1.20.3
Linux kernel version: 5.3.18
Direct rendering: Requires strict binding: yes
GLSL shaders:  yes
Texture NPOT support:  yes
Virtual Machine:  no
OpenGL 2 Shaders are used

Loaded Effects:
---------------
kwin4_effect_fullscreen
kwin4_effect_windowaperture
zoom
kwin4_effect_translucency
kwin4_effect_squash
kwin4_effect_sessionquit
kwin4_effect_morphingpopups
kwin4_effect_maximize
kwin4_effect_logout
kwin4_effect_login
kwin4_effect_frozenapp
kwin4_effect_fadingpopups
kwin4_effect_fade
kwin4_effect_dialogparent
slidingpopups
slide
screenshot
desktopgrid
coverswitch
colorpicker
presentwindows
highlightwindow
blur
contrast
startupfeedback
screenedge
kscreen

Currently Active Effects:
-------------------------
blur
contrast

Effect Settings:
----------------
kwin4_effect_fullscreen:
pluginId: kwin4_effect_fullscreen
isActiveFullScreenEffect: false

kwin4_effect_windowaperture:
pluginId: kwin4_effect_windowaperture
isActiveFullScreenEffect: false

zoom:
zoomFactor: 1.2
mousePointer: 0
mouseTracking: 0
focusTrackingEnabled: false
textCaretTrackingEnabled: false
focusDelay: 350
moveFactor: 20
targetZoom: 1

kwin4_effect_translucency:
pluginId: kwin4_effect_translucency
isActiveFullScreenEffect: false

kwin4_effect_squash:
pluginId: kwin4_effect_squash
isActiveFullScreenEffect: false

kwin4_effect_sessionquit:
pluginId: kwin4_effect_sessionquit
isActiveFullScreenEffect: false

kwin4_effect_morphingpopups:
pluginId: kwin4_effect_morphingpopups
isActiveFullScreenEffect: false

kwin4_effect_maximize:
pluginId: kwin4_effect_maximize
isActiveFullScreenEffect: false

kwin4_effect_logout:
pluginId: kwin4_effect_logout
isActiveFullScreenEffect: false

kwin4_effect_login:
pluginId: kwin4_effect_login
isActiveFullScreenEffect: false

kwin4_effect_frozenapp:
pluginId: kwin4_effect_frozenapp
isActiveFullScreenEffect: false

kwin4_effect_fadingpopups:
pluginId: kwin4_effect_fadingpopups
isActiveFullScreenEffect: false

kwin4_effect_fade:
pluginId: kwin4_effect_fade
isActiveFullScreenEffect: false

kwin4_effect_dialogparent:
pluginId: kwin4_effect_dialogparent
isActiveFullScreenEffect: false

slidingpopups:
slideInDuration: 150
slideOutDuration: 250

slide:
duration: 500
horizontalGap: 45
verticalGap: 20
slideDocks: false
slideBackground: true

screenshot:

desktopgrid:
zoomDuration: 300
border: 10
desktopNameAlignment: 0
layoutMode: 0
customLayoutRows: 2
usePresentWindows: true

coverswitch:
animationDuration: 200
animateSwitch: true
animateStart: true
animateStop: true
reflection: true
windowTitle: true
zPosition: 900
primaryTabBox: false
secondaryTabBox: false

colorpicker:

presentwindows:
layoutMode: 0
showCaptions: true
showIcons: true
doNotCloseWindows: false
ignoreMinimized: false
accuracy: 20
fillGaps: true
fadeDuration: 150
showPanel: true
leftButtonWindow: 1
rightButtonWindow: 2
middleButtonWindow: 0
leftButtonDesktop: 2
middleButtonDesktop: 0
rightButtonDesktop: 0

highlightwindow:

blur:

contrast:

startupfeedback:
type: 1

screenedge:

kscreen:


Loaded Plugins:
---------------
kwin5_plugin_krunner
kwin5_plugin_nightcolor

Available Plugins:
------------------
kwin5_plugin_colord
kwin5_plugin_krunner
kwin5_plugin_nightcolor




Operating System: openSUSE Leap 15.2
KDE Plasma Version: 5.21.90
KDE Frameworks Version: 5.82.0
Qt Version: 5.15.2
Kernel Version: 5.3.18-lp152.75-preempt (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-7700HQ CPU @ 2.80GHz
Memory: 31.2 GiB of RAM
Graphics Processor: Mesa DRI Intel® HD Graphics 630
Comment 5 Bug Janitor Service 2021-05-18 05:54:51 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/1004
Comment 6 Vlad Zahorodnii 2021-05-18 12:28:53 UTC
Git commit 2d9e2f0c701fbd57ab6b6584106b54124f52bdaf by Vlad Zahorodnii.
Committed on 18/05/2021 at 12:28.
Pushed by vladz into branch 'master'.

effects: Fix EffectWindow::shape() for X11 windows

With the introduction of scene items, the Scene::Window::bufferShape()
method was removed as it makes no sense on wayland - a window may have
several sub-surfaces, so a single region to indicate the shape of the
window won't work.

SurfaceItem::shape() returns the shape of a surface. On Wayland, it
corresponds to the rect of the wl_surface. On X11, it corresponds to the
client window rect inside the frame window, or custom shape region if
the client has set one.

On the other hand, EffectWindow::shape() wants a completely different
thing. If the window is decorated, it needs to return the rect of the
decoration. Otherwise it has to return the shape region if there's one.

In the future, the EffectWindow::shape() function must be removed as it
doesn't fit the item based design. The main reason why we have it at
all is because the x server doesn't support translucency, setting a
shape region is a (hacky) way to work around that limitation, xeyes is
a notable example.
Related: bug 437138

M  +9    -2    src/effects.cpp

https://invent.kde.org/plasma/kwin/commit/2d9e2f0c701fbd57ab6b6584106b54124f52bdaf
Comment 7 Vlad Zahorodnii 2021-05-18 12:29:23 UTC
Git commit a177061b51179129c769456e1af204fb66a2b83d by Vlad Zahorodnii.
Committed on 18/05/2021 at 12:29.
Pushed by vladz into branch 'Plasma/5.22'.

effects: Fix EffectWindow::shape() for X11 windows

With the introduction of scene items, the Scene::Window::bufferShape()
method was removed as it makes no sense on wayland - a window may have
several sub-surfaces, so a single region to indicate the shape of the
window won't work.

SurfaceItem::shape() returns the shape of a surface. On Wayland, it
corresponds to the rect of the wl_surface. On X11, it corresponds to the
client window rect inside the frame window, or custom shape region if
the client has set one.

On the other hand, EffectWindow::shape() wants a completely different
thing. If the window is decorated, it needs to return the rect of the
decoration. Otherwise it has to return the shape region if there's one.

In the future, the EffectWindow::shape() function must be removed as it
doesn't fit the item based design. The main reason why we have it at
all is because the x server doesn't support translucency, setting a
shape region is a (hacky) way to work around that limitation, xeyes is
a notable example.
Related: bug 437138


(cherry picked from commit 2d9e2f0c701fbd57ab6b6584106b54124f52bdaf)

M  +9    -2    src/effects.cpp

https://invent.kde.org/plasma/kwin/commit/a177061b51179129c769456e1af204fb66a2b83d
Comment 8 ryu.ketsueki 2021-05-25 01:24:28 UTC
Created attachment 138761 [details]
Screenshot showing how blur is not working on the titlebar

Issue still exist on Plasma 5.21.90, coming from KDE repos for openSUSE Tumbleweed (not the Unstable repos). I just updated from 5.21.5. See attachment for screenshot
Comment 9 Vlad Zahorodnii 2021-05-25 12:19:34 UTC
> Issue still exist on Plasma 5.21.90, coming from KDE repos for openSUSE
> Tumbleweed (not the Unstable repos).

Judging by https://build.opensuse.org/package/revisions/KDE:Frameworks5/kwin5, 5.21.90 packages were built 10 days ago. The fix landed a few days after that.