Bug 461782 - Something to do with windows management crashed or froze, system went totally berserk, forced me to reboot
Summary: Something to do with windows management crashed or froze, system went totally...
Status: REPORTED
Alias: None
Product: kwin
Classification: Plasma
Component: core (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR major
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-13 17:55 UTC by php4fan
Modified: 2023-05-04 19:36 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description php4fan 2022-11-13 17:55:38 UTC
SUMMARY

I was using Chrome when suddenly , Chrome's windows seemed to disappear (but I think it just went to the background, see below), and the rest of the system behaved as follows:

- the window on the foreground was now Kate, it seemed to be either maximized, or sized to occupy almost the whole screen, but it had no title bar nor borders
- Neither Kate nor the task manager at the bottom of the screen seemed to respond to left-button clicks
- Alt+Tab didn't work, so I couldn't switch focus to any other of the applications that were running
- at the top of the screen, in the narrow horizontal strip above Kate's window, where its title bar was supposed to be, I could see the desktop behind, both the background picture and the icons, and it responded to click-and-drag
- when hovering the mouse over icons in the task manager, they would react to mouse-over, getting slightly highlighted, but (left) clicking did nothing
- the "minimize all windows" shift+super+D shortcut did nothing
- Chrome's icon in the task manager still was highlighted as running, and when hovering it, the small window thumbnail-sized preview would show up
- it took me a while to realize, but RIGHT-click on Task Manager icons did work, so I could do the following:
- right-clicked on Chrome's icon and did "New window": this opened a new Chrome window which had a disproportionately thick, fully black border around it (like almost as thick as the height of the Task Manager!!), with rounded corners, and still had no window title bar and no proper window borders
- I did the same with KCalc and this one also lacked the title bar and proper borders, but it did not have the ridiculous super-thick rounded black border

Because of all this the whole system was completely unusable and I was unable to recover control of it, so I had to reboot, losing all my unsaved work, fortunately not a lot.


It looks to me like some very specific window-related component crashed or stopped responding, but I don't know which one.
- I don't think it was plasmashell (or at least it didn't simply crash), because I could still see the desktop behind the windows
- I don't think it was Xorg in its entirety, or I would have been logged out

I have no idea if it's actually kwin, I just tried to guess.

There was no high CPU consumption while this was happening (nor just before it did).

 


SOFTWARE/OS VERSIONS
Operating System: Manjaro Linux
KDE Plasma Version: 5.26.2
KDE Frameworks Version: 5.99.0
Qt Version: 5.15.6
Kernel Version: 6.0.6-1-MANJARO (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-1065G7 CPU @ 1.30GHz
Memory: 7.3 GiB of RAM
Graphics Processor: Mesa Intel® Iris® Plus Graphics
Manufacturer: LENOVO
Product Name: 81WE
System Version: IdeaPad 3 15IIL05
ADDITIONAL INFORMATION
Comment 1 php4fan 2022-11-17 09:58:33 UTC
Something somewhat similar but not quite identical happened a few minutes ago.

The task manager stopped responding completely to mouse events.
Unlike in the initial report, not only would it not respond to left clicks, but also right clicks and mouse-over (icons wouldn't "shine" when moving the mouse cursor over).

There was also a notification baloon on the bottom right of the screen which (A) contained garbage, (B) wouldn't vanish and (C) did not have any window borders or close button. Leftovers were visible of the notification it initially contained, from Thunderbird, but it was all mangled.

Applications were initially functioning properly. I could switch between them with Alt+Tab.
The Shift+Super+D shortcut to minimize all windows was not working though.

Then after a while things got worse. I was using Gimp (in order to edit a screenshot that I intended to attach to this report). Then I opened a tool in Gimp, one of those that open in a separate small window, and at that instant, Gimp's  main window disappeared, or minimized, or went to the background, anway was no longer visible (but the small window with the tool was). 
Now alt+Tab no longer worked either.

Additionally, when I opened a virtual terminal with Ctrl+Alt+F2, it was responding sluggishly to keyboard.
At this point I had to hard-reset with the laptop's On/Off button.

Until recently, I was suffering from this:
https://forum.manjaro.org/t/entire-system-randomly-becomes-unstable-windows-flicker-and-sometimes-stop-responding/125241

I never reported that bug to KDE because I always assumed it belonged to something else at a much lower level (kernel, CPU drivers or something like that). I've been recently told in another thread that that is "definitely not" a kernel bug and that it is certainly in KDE. I don't know.
Anyway, a reply to that thread suggested that I try adding the parameter ahci.mobile_lpm_policy=1 to my kernel configuration in Grup, and so I did.
Since then, instead of the symptoms described in that report, I have started experiencing the issues described in this one.
That may be a coincidence, they could be two separate unrelated issues, but it's suspicious.
Comment 2 php4fan 2022-11-21 14:34:29 UTC
The exact same as in my last comment happened again. Well just the first part up to and not including "then after a while things got worse".

I did ctrl+Alt+f2, from there I killed plasmashell, then back to Ctrl+Alt+F1, and from a terminal I restarted plasmashell with "kstart5 plasmashell". This restored normal behavior without having to reboot (but note that I wasn't able to do the same in other cases).

Why plasmashell isn't restarted automatically when it crashes or is killed, is beyond me.

Now that I see that restarting plasmashell restores normal behavior, I'm wondering if the issue is actually in plasmashell, and whether it is a variation of #447717 (although with somewhat different symptoms).
Comment 3 php4fan 2022-12-11 15:43:47 UTC
*** I NEED URGENT HELP ***

This has happened to me many more times and now once again I am in this situation again. 

I have Kate and Gimp open with TONS of unsaved work.
I can't manage to give them focus so that I can save my work before rebooting.
If I reboot now I'll lose a lot of unsaved, unrecoverable valuable work.

All I need is a workaround to give focus to an application while the windows manager or whatever is unresponsive.

I have been able to grab a Chrome tab to get here and write this, because the portion of Chrome with the tabs was luckily visible, but nether Kate nor Gimp are at the moment, and Alt+Tab doesn't work
Comment 4 Nate Graham 2022-12-11 15:47:22 UTC Comment hidden (spam)
Comment 5 php4fan 2022-12-11 15:52:32 UTC Comment hidden (spam)
Comment 6 Nate Graham 2022-12-11 16:13:58 UTC
Alt+F2 to show KRunner, then restart KWin by typing `kwin_x11 --replace`?
Comment 7 Fushan Wen 2022-12-11 16:34:50 UTC Comment hidden (spam)
Comment 8 php4fan 2022-12-11 17:30:21 UTC
> Alt+F2 to show KRunner, then restart KWin by typing `kwin_x11 --replace`?

Wow thank you! This saved my life, and now I have a workaround for when this crap happens (which is about once a day), so I can resume working without losing all my unsaved work and having to reboot.

Is this related to #447717?
Comment 9 php4fan 2022-12-11 17:31:56 UTC Comment hidden (spam)
Comment 10 Nate Graham 2022-12-11 17:32:31 UTC Comment hidden (spam)
Comment 11 php4fan 2022-12-11 17:46:36 UTC
> I am already on Plasma 5.26.4.

Actually, I installed a bunch of updates a few hours ago and haven't rebooted since. 

So I don't know if MAYBE it could be the case that:
- before the updates I was running a previous version of Plasma
- now Plasma 5.26.4 has been installed and shows up in "About this system"
- but I'm still running 5.26.4 (or I was when it crashed crash) since I didn't reboot after installing the upgrade.

Either that, or the workaround isn't working.

> I don't think so, since that bug [447717] only affects Wayland.

Does it though?
I reported 461600 and it got marked as duplicate of 447717. The symptoms in that occasion matched pretty well what's described in 447717.


P.S my previous comment and your reply got incorrectly marked as spam
Comment 12 php4fan 2022-12-14 18:29:51 UTC
This happened to me twice a few hours apart.

The second time, after I relaunched kwin with the workaround in comment 6, it crashed again and again after a few seconds like 3 or 4 times. Then plasmashell also crashed, and I relaunched with "kstart5 plasmashell" from a terminal
Comment 13 Ievgen Vovk 2022-12-23 09:32:35 UTC
I believe I'm experiencing the same issue: after a while kwin crashes (window decorations disappear) and one has to restart it (`kwin_x11 --replace`); then it repeats again.

After the crash, there are these messages in the terminal:

```
kwin_core: XCB error: 3 (BadWindow), sequence: 41305, resource id: 144759611, major code: 129 (SHAPE), minor code: 6 (Input)
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 41306, resource id: 144759611, major code: 2 (ChangeWindowAttributes), minor code: 0
The X11 connection broke: I/O error (code 1)
X connection to :0 broken (explicit kill or server shutdown).
file:///usr/share/kwin/outline/plasma/outline.qml:14: TypeError: Cannot read property 'longDuration' of null
```

The XCB errors are numerous, but the X11 connection error appears only at the end.

Am experiencing this in Ubuntu 22.10 (X11 session), which includes
- KDE Plasma Version: 5.26.4
- KDE Frameworks Version: 5.100.0
- Qt Version: 5.15.6
- Kernel Version: 5.19.0-26-generic (64-bit)

KWin reports my system as:
OpenGL vendor string:                   Intel
OpenGL renderer string:                 Mesa Intel(R) Xe Graphics (TGL GT2)
OpenGL version string:                  4.6 (Compatibility Profile) Mesa 22.2.1
OpenGL shading language version string: 4.60
Driver:                                             Intel
GPU class:                                      Tiger Lake
OpenGL version:                           4.6
GLSL version:                                 4.60
Mesa version:                                 22.2.1
X server version:                            1.21.1
Linux kernel version:                     5.19
Requires strict binding:                 yes
GLSL shaders:                                 yes
Texture NPOT support:                  yes
Virtual Machine:                             no

Hope this helps to isolate and solve the issue...
Comment 14 php4fan 2023-01-20 19:52:30 UTC Comment hidden (spam)
Comment 15 php4fan 2023-01-20 19:54:32 UTC Comment hidden (spam)