#1017613 kwin-x11 session stops working (semi-freeze) every few days

Package:
kwin-x11
Source:
kwin-x11
Description:
KDE window manager, X11 version
Submitter:
Ralf Jung
Date:
2023-06-18 21:45:02 UTC
Severity:
normal
#1017613#5
Date:
2022-08-18 12:47:45 UTC
From:
To:
Dear Maintainer,

The latest update from kwin 4:5.24.5-1+b1 to 4:5.25.4-2 has made KDE very unreliable for me: every other day, the entire session just basically freezes up; I can still move the cursor, but that's about it.
Just before that happens, I usually get a black rectangle in the bottom right corner of the screen, where the Plasma notifications usually appear.
At that point I can still interact with the foreground application, but if I do alt-tab, then the session is doomed and I need to Ctrl-Alt-Backspace, losing all unsaved data.

Also see https://bugs.kde.org/show_bug.cgi?id=457847.

Kind regards,
Ralf

#1017613#10
Date:
2022-08-31 11:05:17 UTC
From:
To:
I got this bug too. But only in my notebook. I have another computer and
kwin-x11 does not freeze. Maybe because my computer uses a nvidia GPU and
my notebook uses an onboard Intel Graphics.

One workaround is open konsole (Ctrl-Alt-T) and restart plasma with this
command:

killall -9 plasmashell && kstart5 plasmashell

When kwin crashes I got these syslog messages:

Aug 31 07:24:57 r2d2 dbus-daemon[776]: [system] Successfully activated
service 'org.kde.powerdevil.backlighthelper'
Aug 31 07:26:15 r2d2 kwin_x11[93502]: OpenGL vendor string:
  Intel
Aug 31 07:26:15 r2d2 kwin_x11[93502]: OpenGL renderer string:
  Mesa Intel(R) HD Graphics 620 (KBL GT2)
Aug 31 07:26:15 r2d2 kwin_x11[93502]: OpenGL version string:
   4.6 (Compatibility Profile) Mesa 22.2.0-rc3
Aug 31 07:26:15 r2d2 kwin_x11[93502]: OpenGL shading language version
string: 4.60
Aug 31 07:26:15 r2d2 kwin_x11[93502]: Driver:
  Intel
Aug 31 07:26:15 r2d2 kwin_x11[93502]: GPU class:
   Kaby Lake
Aug 31 07:26:15 r2d2 kwin_x11[93502]: OpenGL version:
  4.6
Aug 31 07:26:15 r2d2 kwin_x11[93502]: GLSL version:
  4.60
Aug 31 07:26:15 r2d2 kwin_x11[93502]: Mesa version:
  22.2
Aug 31 07:26:15 r2d2 kwin_x11[93502]: X server version:
  1.21.1
Aug 31 07:26:15 r2d2 kwin_x11[93502]: Linux kernel version:
  5.19.5
Aug 31 07:26:15 r2d2 kwin_x11[93502]: Requires strict binding:
   yes
Aug 31 07:26:15 r2d2 kwin_x11[93502]: GLSL shaders:
  yes
Aug 31 07:26:15 r2d2 kwin_x11[93502]: Texture NPOT support:
  yes
Aug 31 07:26:15 r2d2 kwin_x11[93502]: Virtual Machine:
   no





*Aug 31 07:26:16 r2d2 kwin_x11[93502]: XIO:  fatal IO error 0 (Sucesso) on
X server ":0"Aug 31 07:26:16 r2d2 kwin_x11[93502]:       after 3526176
requests (3526176 known processed) with 0 events remaining.Aug 31 07:26:16
r2d2 kwin_x11[93502]: Application::crashHandler() called with signal 11;
recent crashes: 1Aug 31 07:26:16 r2d2 systemd[4872]:
plasma-kwin_x11.service: Main process exited, code=exited,
status=1/FAILUREAug 31 07:26:16 r2d2 systemd[4872]:
plasma-kwin_x11.service: Failed with result 'exit-code'.*

Aug 31 07:26:17 r2d2 systemd[4872]: plasma-kwin_x11.service: Scheduled
restart job, restart counter is at 5.
Aug 31 07:26:17 r2d2 systemd[4872]: Stopped KDE Window Manager.
Aug 31 07:26:17 r2d2 systemd[4872]: Starting KDE Window Manager...
Aug 31 07:26:18 r2d2 systemd[4872]: Started KDE Window Manager.
Aug 31 07:26:19 r2d2 dbus-daemon[4892]: [session uid=1000 pid=4892]
Activating service name='org.kde.KSplash' requested by ':1.699' (uid=1000
pid=154595 comm="/usr/bin/kwin_x11 --replace")
Aug 31 07:26:20 r2d2 kwin_x11[154595]: OpenGL vendor string:
    Intel
Aug 31 07:26:20 r2d2 kwin_x11[154595]: OpenGL renderer string:
    Mesa Intel(R) HD Graphics 620 (KBL GT2)
Aug 31 07:26:20 r2d2 kwin_x11[154595]: OpenGL version string:
   4.6 (Compatibility Profile) Mesa 22.2.0-rc3
Aug 31 07:26:20 r2d2 kwin_x11[154595]: OpenGL shading language version
string: 4.60
Aug 31 07:26:20 r2d2 kwin_x11[154595]: Driver:
    Intel
Aug 31 07:26:20 r2d2 kwin_x11[154595]: GPU class:
   Kaby Lake
Aug 31 07:26:20 r2d2 kwin_x11[154595]: OpenGL version:
    4.6
Aug 31 07:26:20 r2d2 kwin_x11[154595]: GLSL version:
    4.60
Aug 31 07:26:20 r2d2 kwin_x11[154595]: Mesa version:
    22.2
Aug 31 07:26:20 r2d2 kwin_x11[154595]: X server version:
    1.21.1
Aug 31 07:26:20 r2d2 kwin_x11[154595]: Linux kernel version:
    5.19.5
Aug 31 07:26:20 r2d2 kwin_x11[154595]: Requires strict binding:
   yes
Aug 31 07:26:20 r2d2 kwin_x11[154595]: GLSL shaders:
    yes
Aug 31 07:26:20 r2d2 kwin_x11[154595]: Texture NPOT support:
    yes
Aug 31 07:26:20 r2d2 kwin_x11[154595]: Virtual Machine:
   no

Aug 31 07:26:36 r2d2 kwin_x11[154595]: Freeze in OpenGL initialization
detected
Aug 31 07:26:36 r2d2 kwin_x11[154595]: Application::crashHandler() called
with signal 6; recent crashes: 1
Aug 31 07:26:37 r2d2 kwin_x11[154595]: KCrash: crashing...
crashRecursionCounter = 2
Aug 31 07:26:37 r2d2 kwin_x11[154595]: KCrash: Application Name = kwin_x11
path = /usr/bin pid = 154595
Aug 31 07:26:37 r2d2 kwin_x11[154595]: KCrash: Arguments: /usr/bin/kwin_x11
--replace
Aug 31 07:26:37 r2d2 systemd[4872]: plasma-kwin_x11.service: Main process
exited, code=killed, status=6/ABRT
Aug 31 07:26:37 r2d2 systemd[4872]: plasma-kwin_x11.service: Failed with
result 'signal'.
Aug 31 07:26:37 r2d2 systemd[4872]: plasma-kwin_x11.service: Scheduled
restart job, restart counter is at 6.
Aug 31 07:26:37 r2d2 systemd[4872]: Stopped KDE Window Manager.
Aug 31 07:26:37 r2d2 systemd[4872]: Starting KDE Window Manager...
Aug 31 07:26:37 r2d2 systemd[4872]: Started KDE Window Manager.

Maybe it is related with opengl but, even disable composing, I got kwin
random freezing hours later.

#1017613#15
Date:
2023-01-03 16:11:16 UTC
From:
To:
Hi,

That bug was determined to be caused by
https://gitlab.freedesktop.org/mesa/mesa/-/issues/7674.  I *think* (but
haven't confirmed yet as that doesn't seem trivial to do) that that bug
should be fixed in mesa 22.3 which is in bookworm since 2023-01-02 (and
in unstable since 2022-12-01). So if this bug reoccurs for somebody, it
would be good to update the bug report.

I had the same issue as in this report and decided today to investigate.
However, my system updated mesa yesterday, so if my searching is true,
the bug should be gone for me.

I think this bug (and maybe similar bugs) should be reassigned to mesa,
raised in severity and closed... (or just the latter).

Paul

#1017613#20
Date:
2023-01-25 11:09:40 UTC
From:
To:
I think I have this bug. If true, it's still present. I'm on mesa 22.3.3-1. I upgraded this system on the 7th and started having the issue.

My entire desktop freezes. Seconds on the clock stops. My mouse cursor still moves but I can't interact with anything. My music player keeps playing. I can get to a console with ctrl+alt+f5 and it shows very low CPU activity. Nothing in syslog or xsession-errors. I have to restart sddm or something similar.

I think the trigger is when I do an alt+tab switcher activity.

I have a near-identically configured/versioned laptop and don't see the issue there. It's using an internal Intel GPU while my freezing desktop has an AMD RX 570.

#1017613#25
Date:
2023-06-18 21:42:23 UTC
From:
To:
I don't think that mesa upgrade changed anything, I still get the
hang regularly. Restarting plasmashell sorts it out.
Ø dpkg -l | grep mesa
ii  libegl-mesa0:amd64                            23.0.2-1ubuntu1
                            amd64        free implementation of the EGL API
-- Mesa vendor library
ii  libgl1-mesa-dri:amd64                         23.0.2-1ubuntu1
                            amd64        free implementation of the OpenGL
API -- DRI modules
ii  libglapi-mesa:amd64                           23.0.2-1ubuntu1
                            amd64        free implementation of the GL API
-- shared library
ii  libglu1-mesa:amd64                            9.0.2-1.1
                                  amd64        Mesa OpenGL utility library
(GLU)
ii  libglx-mesa0:amd64                            23.0.2-1ubuntu1
                            amd64        free implementation of the OpenGL
API -- GLX vendor library
ii  mesa-utils                                    8.5.0-1
                                    amd64        Miscellaneous Mesa
utilities -- symlinks
ii  mesa-utils-bin:amd64                          8.5.0-1
                                    amd64        Miscellaneous Mesa
utilities -- native applications
ii  mesa-va-drivers:amd64                         23.0.2-1ubuntu1
                            amd64        Mesa VA-API video acceleration
drivers
ii  mesa-vdpau-drivers:amd64                      23.0.2-1ubuntu1
                            amd64        Mesa VDPAU video acceleration
drivers
ii  mesa-vulkan-drivers:amd64                     23.0.2-1ubuntu1
                            amd64        Mesa Vulkan graphics drivers