klassy
klassy copied to clipboard
KWin segfault with Opaque Titlebar override enabled in Plasma 5.26 beta
Describe the bug
Updated to Plasma 5.26 beta [kde-unstable] on Arch and kwin is crashing when windows are created if Opaque Titlebar
option in Window-Specific Override is enabled, did a rebuild from master, no luck.
To Reproduce
- Upgrade to Plasma 5.26 beta
- Create a Window-Specific Override for an app e.g systemsettings
- Enable the
Opaque Titlebar
option - Save and open a new window of the targeted application
- KWin crashes
Application: KWin (kwin_x11), signal: Segmentation fault
[KCrash Handler]
#4 0x00007f504b2c1fa0 in vtable for __cxxabiv1::__class_type_info () at /usr/lib/libstdc++.so.6
#5 0x00007f504be99b55 in KWin::GLTexture::bind() () at /usr/lib/libkwinglutils.so.14
#6 0x00007f504d923595 in KWin::SceneOpenGL::render(KWin::Item*, int, QRegion const&, KWin::WindowPaintData const&) () at /usr/lib/libkwin.so.5
#7 0x00007f4fec020eac in KWin::LightlyShadersEffect::drawWindow(KWin::EffectWindow*, int, QRegion const&, KWin::WindowPaintData&) (this=0x55605d081d30, w=0x55605c9e8300, mask=2, region=..., data=...) at /home/luis/programs/LightlyShaders/lightlyshaders.cpp:628
#8 0x00007f504d78f464 in KWin::EffectsHandlerImpl::drawWindow(KWin::EffectWindow*, int, QRegion const&, KWin::WindowPaintData&) () at /usr/lib/libkwin.so.5
#9 0x00007f504d78f464 in KWin::EffectsHandlerImpl::drawWindow(KWin::EffectWindow*, int, QRegion const&, KWin::WindowPaintData&) () at /usr/lib/libkwin.so.5
#10 0x00007f504d78f464 in KWin::EffectsHandlerImpl::drawWindow(KWin::EffectWindow*, int, QRegion const&, KWin::WindowPaintData&) () at /usr/lib/libkwin.so.5
#11 0x00007f504bee9a92 in KWin::CrossFadeEffect::drawWindow(KWin::EffectWindow*, int, QRegion const&, KWin::WindowPaintData&) () at /usr/lib/libkwineffects.so.14
#12 0x00007f504d78f464 in KWin::EffectsHandlerImpl::drawWindow(KWin::EffectWindow*, int, QRegion const&, KWin::WindowPaintData&) () at /usr/lib/libkwin.so.5
#13 0x00007f504bee9a92 in KWin::CrossFadeEffect::drawWindow(KWin::EffectWindow*, int, QRegion const&, KWin::WindowPaintData&) () at /usr/lib/libkwineffects.so.14
#14 0x00007f504d7fba6d in KWin::Scene::finalPaintWindow(KWin::EffectWindowImpl*, int, QRegion const&, KWin::WindowPaintData&) () at /usr/lib/libkwin.so.5
#15 0x00007f504d78f3ac in KWin::EffectsHandlerImpl::paintWindow(KWin::EffectWindow*, int, QRegion const&, KWin::WindowPaintData&) () at /usr/lib/libkwin.so.5
#16 0x00007f504d78f3ac in KWin::EffectsHandlerImpl::paintWindow(KWin::EffectWindow*, int, QRegion const&, KWin::WindowPaintData&) () at /usr/lib/libkwin.so.5
#17 0x00007f504d78f3ac in KWin::EffectsHandlerImpl::paintWindow(KWin::EffectWindow*, int, QRegion const&, KWin::WindowPaintData&) () at /usr/lib/libkwin.so.5
#18 0x00007f504bed05e1 in KWin::AnimationEffect::paintWindow(KWin::EffectWindow*, int, QRegion, KWin::WindowPaintData&) () at /usr/lib/libkwineffects.so.14
#19 0x00007f504d78f3ac in KWin::EffectsHandlerImpl::paintWindow(KWin::EffectWindow*, int, QRegion const&, KWin::WindowPaintData&) () at /usr/lib/libkwin.so.5
#20 0x00007f504bed05e1 in KWin::AnimationEffect::paintWindow(KWin::EffectWindow*, int, QRegion, KWin::WindowPaintData&) () at /usr/lib/libkwineffects.so.14
#21 0x00007f504d78f3ac in KWin::EffectsHandlerImpl::paintWindow(KWin::EffectWindow*, int, QRegion const&, KWin::WindowPaintData&) () at /usr/lib/libkwin.so.5
#22 0x00007f504d7fe79e in KWin::Scene::paintWindow(KWin::WindowItem*, int, QRegion const&) () at /usr/lib/libkwin.so.5
#23 0x00007f504d7fea57 in KWin::Scene::paintSimpleScreen(int, QRegion const&) () at /usr/lib/libkwin.so.5
#24 0x00007f4fec01ee29 in KWin::LightlyShadersEffect::paintScreen(int, QRegion const&, KWin::ScreenPaintData&) (this=0x55605d081d30, mask=0, region=..., data=...) at /home/luis/programs/LightlyShaders/lightlyshaders.cpp:424
#25 0x00007f504d78f2fb in KWin::EffectsHandlerImpl::paintScreen(int, QRegion const&, KWin::ScreenPaintData&) () at /usr/lib/libkwin.so.5
#26 0x00007f504d78f2fb in KWin::EffectsHandlerImpl::paintScreen(int, QRegion const&, KWin::ScreenPaintData&) () at /usr/lib/libkwin.so.5
#27 0x00007f504d78f2fb in KWin::EffectsHandlerImpl::paintScreen(int, QRegion const&, KWin::ScreenPaintData&) () at /usr/lib/libkwin.so.5
#28 0x00007f504d78f2fb in KWin::EffectsHandlerImpl::paintScreen(int, QRegion const&, KWin::ScreenPaintData&) () at /usr/lib/libkwin.so.5
#29 0x00007f504d78f2fb in KWin::EffectsHandlerImpl::paintScreen(int, QRegion const&, KWin::ScreenPaintData&) () at /usr/lib/libkwin.so.5
#30 0x00007f504d7fb8d4 in KWin::Scene::paintScreen(QRegion const&) () at /usr/lib/libkwin.so.5
#31 0x00007f504d920fdb in KWin::SceneOpenGL::paint(KWin::RenderTarget*, QRegion const&) () at /usr/lib/libkwin.so.5
#32 0x00007f504d7fd685 in () at /usr/lib/libkwin.so.5
#33 0x00007f504d7502a9 in KWin::Compositor::paintPass(KWin::RenderLayer*, KWin::RenderTarget*, QRegion const&) () at /usr/lib/libkwin.so.5
#34 0x00007f504d754695 in KWin::Compositor::composite(KWin::RenderLoop*) () at /usr/lib/libkwin.so.5
#35 0x00007f504d75499d in KWin::X11Compositor::composite(KWin::RenderLoop*) () at /usr/lib/libkwin.so.5
#36 0x00007f504c31c361 in () at /usr/lib/libQt5Core.so.5
#37 0x00007f504d704637 in KWin::RenderLoop::frameRequested(KWin::RenderLoop*) () at /usr/lib/libkwin.so.5
#38 0x00007f504d7584a8 in KWin::RenderLoopPrivate::dispatch() () at /usr/lib/libkwin.so.5
#39 0x00007f504c31c361 in () at /usr/lib/libQt5Core.so.5
#40 0x00007f504c31e8bf in QTimer::timeout(QTimer::QPrivateSignal) () at /usr/lib/libQt5Core.so.5
#41 0x00007f504c30f4a6 in QObject::event(QEvent*) () at /usr/lib/libQt5Core.so.5
#42 0x00007f504b57ab1c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#43 0x00007f504c2ebb68 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#44 0x00007f504c335d33 in QTimerInfoList::activateTimers() () at /usr/lib/libQt5Core.so.5
#45 0x00007f504c3361e2 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#46 0x00007f5045e996e3 in () at /usr/lib/libQt5XcbQpa.so.5
#47 0x00007f504c2e430c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#48 0x00007f504c2eee39 in QCoreApplication::exec() () at /usr/lib/libQt5Core.so.5
#49 0x000055605b619de0 in ()
#50 0x00007f504adcc290 in () at /usr/lib/libc.so.6
#51 0x00007f504adcc34a in __libc_start_main () at /usr/lib/libc.so.6
#52 0x000055605b61b205 in ()
[Inferior 1 (process 2091668) detached]
System details:
- Operating System: Arch Linux
- KDE Plasma Version: 5.25.90
- KDE Frameworks Version: 5.98.0
- Qt Version: 5.15.6
- Graphics Platform: X11
I have been trying to debug this, but have absolutely no idea what they have changed for the 5.26 beta that is causing this. I am finding the 5.26 beta unstable in general (crashing in general, even if an opaque override isn't set), and notice the backtraces don't even mention Klassy.
Debug help here would be greatly appreciated.
I'm having a crash but on Wayland. The whole screen locks up (for only one display in multi monitor set ups, curiously) and all I can do to solve it is kill kwin process entirely or reboot. Upon checking journalctl, this appeared for me:
Oct 10 14:13:27 lenovoSUSE kwin_wayland[2312]:kwin_wayland_drm: an error occurred while swapping buffers "EGL_BAD_SURFACE"
I'm trying to figure out if there is something on driver side that may be causing it but the trigger comes from Klassy. If I have transparency activated, any window that, at some point, makes it opaque, it makes the session lock up. I did some tests here and it appears the same symptoms of the issue above happen. If I set to opaque in the Window Specific Overrides for any window, when these applications are launched, the error above occurs. However, I noticed the exact same behavior happening when I try launching Inkscape, which didn't have an override.
I'm on openSUSE Tumbleweed with Liquorix Kernel 5.19.14-lqx1-3-liquorix.
I'm having a crash but on Wayland. The whole screen locks up (for only one display in multi monitor set ups, curiously)
I have the same problem since plasma-5.26. I thought it was plasma and filed a bug report.
I'm having a crash but on Wayland. The whole screen locks up (for only one display in multi monitor set ups, curiously)
I have the same problem since plasma-5.26. I thought it was plasma and filed a bug report.
It is also Plasma as there were no problems in 5.25. I can't believe they have released a final 5.26 with whatever this change is! :(
Do you have a link to your bug report?
Yes :
https://bugs.kde.org/show_bug.cgi?id=459814
I think you are right for changes in 5.26. My crashs seems to happen with some gtk applications especially firefox. I changed klassy for breeze , screens problems seems to be solved but other issues remains.
I think I'm having the same freezing issue. I didn't see this bug report, so I created one at bugs.kde.org.
Here's a link to that report, if you're interested, @paulmcauley https://bugs.kde.org/show_bug.cgi?id=460486
I think I'm having the same freezing issue. I didn't see this bug report, so I created one at bugs.kde.org.
Here's a link to that report, if you're interested, @paulmcauley https://bugs.kde.org/show_bug.cgi?id=460486
Could you reopen your bug report? Something has changed in Plasma 5.26 and need to narrow down what it is.
Same issue here using Klassy on wayland.
Seems to happen mostly with Firefox or Thunderbird. It is not 100% reproducible, sometimes it happens right after boot when first launching, sometimes after some time when i try to open a new window.
I am also getting the kwin_wayland_drm: an error occurred while swapping buffers "EGL_BAD_SURFACE"
error like in the 459814 report.
P.S.: This issue might be related to 459778 – Screen occasionally freezes when launching application
Same issue here using Klassy on KDE Wayland. Using the default 'Breeze' decorations doesn't seem to cause the issue.
Randomly happens when opening Sublime Text/Merge and sometimes even just KWrite and Kate, but not necessarily all the time. I can do the Ctrl+Alt+F1-F12 shortcut to reboot it safely but the TTY where Plasma shell is running is completely frozen. Keyboard and mouse inputs still work fine and wakes up the screen when it's about to go to standby.
Also getting kwin_wayland_drm: an error occurred while swapping buffers "EGL_BAD_SURFACE"
on journalctl
when it happens.
I'm on Fedora 36 with zawertun's KDE Plasma COPR running kernel 5.19.16
. Also happens on openSUSE Tumbleweed with Plasma 5.26.0
and kernel 6.0.1
when I tested it. If it helps, I'm running on Intel UHD Graphics.
If it also helps, KWin recently got a feature where applications running in "legacy mode" (or, XWayland) can scale by themselves. The feature is on by default. Haven't tested if this is what causes the issue though as it randomly happens for me.
https://www.phoronix.com/news/Plasma-5.26-Crisper-XWayland
Seems to be a plasma bug. A patch is tested.
https://bugs.kde.org/show_bug.cgi?id=459778
After updating to plasma 5.26.2 ~the crash only happens if window shadows are enabled~
Application: KWin (kwin_x11), signal: Segmentation fault
[KCrash Handler]
#4 0x00007fbf66ffc007 in QRegion::~QRegion() () at /usr/lib/libQt5Gui.so.5
#5 0x00007fbf66f9fc2e in () at /usr/lib/libQt5Gui.so.5
#6 0x00007fbf66fa4e1e in QRasterPaintEngine::~QRasterPaintEngine() () at /usr/lib/libQt5Gui.so.5
#7 0x00007fbf66d85910 in QImageData::~QImageData() () at /usr/lib/libQt5Gui.so.5
#8 0x00007fbf66d867ec in QImage::~QImage() () at /usr/lib/libQt5Gui.so.5
#9 0x00007fbf687857fd in KDecoration2::DecorationShadow::~DecorationShadow() () at /usr/lib/libkdecorations2.so.5
#10 0x00007fbf68284500 in KWin::Shadow::init(KDecoration2::Decoration*) () at /usr/lib/libkwin.so.5
#11 0x00007fbf682bfc73 in KWin::Window::updateShadow() () at /usr/lib/libkwin.so.5
#12 0x00007fbf668bd381 in () at /usr/lib/libQt5Core.so.5
#13 0x00007fbf6877715a in KDecoration2::Decoration::shadowChanged(QSharedPointer<KDecoration2::DecorationShadow> const&) () at /usr/lib/libkdecorations2.so.5
#14 0x00007fbf58293aa1 in Breeze::Decoration::updateShadow(bool, bool, bool) () at /usr/lib/qt/plugins/org.kde.kdecoration2/klassydecoration.so
#15 0x00007fbf668bd381 in () at /usr/lib/libQt5Core.so.5
#16 0x00007fbf666cce47 in QVariantAnimation::valueChanged(QVariant const&) () at /usr/lib/libQt5Core.so.5
#17 0x00007fbf666d35ac in () at /usr/lib/libQt5Core.so.5
#18 0x00007fbf666d0463 in QAbstractAnimation::setCurrentTime(int) () at /usr/lib/libQt5Core.so.5
#19 0x00007fbf666d05cc in () at /usr/lib/libQt5Core.so.5
#20 0x00007fbf666cb9a3 in QUnifiedTimer::updateAnimationTimers(long long) () at /usr/lib/libQt5Core.so.5
#21 0x00007fbf666cee02 in QAnimationDriver::advanceAnimation(long long) () at /usr/lib/libQt5Core.so.5
#22 0x00007fbf668b04c6 in QObject::event(QEvent*) () at /usr/lib/libQt5Core.so.5
#23 0x00007fbf65f78b1c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#24 0x00007fbf6688cb88 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#25 0x00007fbf668d6d53 in QTimerInfoList::activateTimers() () at /usr/lib/libQt5Core.so.5
#26 0x00007fbf668d7202 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#27 0x00007fbf6092e613 in () at /usr/lib/libQt5XcbQpa.so.5
#28 0x00007fbf6688532c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#29 0x00007fbf6688fe59 in QCoreApplication::exec() () at /usr/lib/libQt5Core.so.5
#30 0x000056325f72de4d in ()
#31 0x00007fbf6583c290 in () at /usr/lib/libc.so.6
#32 0x00007fbf6583c34a in __libc_start_main () at /usr/lib/libc.so.6
#33 0x000056325f72f235 in ()
[Inferior 1 (process 396147) detached]
After updating to plasma 5.26.2 the crash only happens if window shadows are enabled
Happens with me even with window shadows disabled.
After updating to plasma 5.26.2 the crash only happens if window shadows are enabled
Happens with me even with window shadows disabled.
You're right, I forgot to update my comment. It didn't happen at first but opening more windows, specially firefox, made it crash again
After updating to plasma 5.26.2 the crash only happens if window shadows are enabled
Happens with me even with window shadows disabled.
for me it happens way less often when animations are disabled.
Just built plasma from source today and cannot reproduce this issue, could someone else try the same?
Edit: this is the configuration I'm using, konsole, firefox and conky are excluded, any other program has a high chance of crashing kwin 5.27.1 (like always at first try) but not when buillt from master, if not completely fixed, at least there seems to be some mitigation
[Common]
ActiveTitlebarOpacity=80
AlwaysShowIconHighlightUsing=AlwaysShowIconHighlightUsingBackground
ApplyOpacityToHeader=false
BackgroundColors=ColorsAccentWithTrafficLights
ButtonShape=ShapeSmallCircle
InactiveTitlebarOpacity=80
ShadowSize=ShadowSmall
TranslucentButtonBackgrounds=false
[Default Windeco Exception 0]
BorderSize=1
Enabled=true
ExceptionProgramNamePattern=kdenlive
ExceptionWindowPropertyPattern=.*Kdenlive
ExceptionWindowPropertyType=1
HideTitleBar=false
Mask=0
OpaqueTitleBar=true
PreventApplyOpacityToHeader=true
[Windeco]
BackgroundOpacity=85
BoldButtonIcons=BoldIconsBold
ButtonSpacingLeft=2
ButtonSpacingRight=2
ButtonStyle=sbeSierra
CornerRadius=5
DrawTitleBarSeparator=false
LockButtonSpacingLeftRight=true
LockTitleBarLeftRightMargins=false
OpaqueMaximizedTitlebars=false
OpaqueTitleBar=false
ThinWindowOutlineCustomColor=#3d4556
ThinWindowOutlineStyle=WindowOutlineCustomColor
TitleAlignment=AlignCenter
TitlebarBottomMargin=1.75
TitlebarLeftMargin=1
TitlebarRightMargin=2
TitlebarTopMargin=1.75
[Windeco Exception 0]
BorderSize=1
Enabled=true
ExceptionProgramNamePattern=
ExceptionWindowPropertyPattern=conky \\(archlinux\\)
ExceptionWindowPropertyType=1
HideTitleBar=true
Mask=0
OpaqueTitleBar=false
PreventApplyOpacityToHeader=false
[Windeco Exception 1]
BorderSize=1
Enabled=true
ExceptionProgramNamePattern=
ExceptionWindowPropertyPattern=^(?!.*(Konsole|conky \\(archlinux\\)|Firefox))
ExceptionWindowPropertyType=1
HideTitleBar=false
Mask=0
OpaqueTitleBar=true
PreventApplyOpacityToHeader=false
I have the segfault too, mostly with Falkon and KeePassXC. Didn't have any issue prior to 5.27
I have this bug with Plasma 5.27.4 on Arch Linux as well. Usually happens when I launch Firefox or KMail. Journalctl reports
kwin_wayland_drm: an error occurred while swapping buffers "EGL_BAD_SURFACE"
After removing nvidia-drm.modeset=1 from GRUB, the issue did not occur again.
After removing nvidia-drm.modeset=1 from GRUB, the issue did not occur again.
Is there something for Intel/AMD as well? I don't use NVIDIA graphics and it happens with me regardless of that.
After removing nvidia-drm.modeset=1 from GRUB, the issue did not occur again.
Is there something for Intel/AMD as well? I don't use NVIDIA graphics and it happens with me regardless of that.
Same here: AMD user that experiences this issue.
Hello all, I have released Klassy version 4.1 with a workaround for this. I have tested it on Plasma 5.27.4. Please try 4.1 and report back on whether this issue is still present or not.
The EGL_BAD_SURFACE is caused by a paletteUpdated signal triggering the shadow to update (particularly on opening application with custom colour schemes). If the shadow tries to update at the same time as the paint() method then the EGL_BAD_SURFACE (and segfault in Plasma 5.26+) occurs.
This workaround abandons the attempt to update the shadow if the paint() method is executing. The workaround is not ideal though, and I think that it might be more elegant to have a solution in kwin.
The workaround worked it seems, before the patch I was able to crash kwin in less than a minute and after 4.1 I am not able to reproduce with the config on https://github.com/paulmcauley/klassy/issues/53#issuecomment-1442080577.
Tested with Intel and NVIDIA gpus
It would seem the workaround is working for me as well. I enabled the Opaque Titlebar override everywhere I could to test and, so far, no crashes.
It seems to work on my end as well. Nice! Thanks!
Workaround also works for mine as well. Plasma 5.27.5 on Fedora 38. Thanks!