Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kwin becomes unresponsive, upstream bug? #206868

Open
turion opened this issue Dec 19, 2022 · 10 comments
Open

kwin becomes unresponsive, upstream bug? #206868

turion opened this issue Dec 19, 2022 · 10 comments
Labels

Comments

@turion
Copy link
Contributor

turion commented Dec 19, 2022

When using Alt + Tab often, all windows freeze.

This seems to be a known upstream bug: https://bugs.kde.org/show_bug.cgi?id=457847#c22 Nevertheless I wanted to report here for documentation and to simplify debugging for other people.

A temporary workaround seems to be to restart kwin from a terminal (use Ctrl+Alt+F6 to get there):

systemctl --user restart plasma-kwin_x11

The underlying issue is probably a buggy version of mesa, 22.2. When downgrading mesa with an overlay like this, it should work:

            nixpkgs.overlays = [(self: super: {
              inherit (import nixpkgs-22-05 { inherit system; })
                mesa
              ;
            })];

A new version of mesa will be released before the end of the year, containing the fix. This issue here can be closed when the corresponding version bump has landed in nixpkgs.

@turion turion added 0.kind: bug Something is broken 6.topic: qt/kde labels Dec 19, 2022
@LunNova LunNova mentioned this issue Dec 20, 2022
13 tasks
@vcunat
Copy link
Member

vcunat commented Dec 20, 2022

With mesa-22.2.5 it's still broken? I wouldn't want to switch mesa's major version from 22.2 on stable NixOS 22.11.

@turion
Copy link
Contributor Author

turion commented Dec 20, 2022

With mesa-22.2.5 it's still broken?

As far as I understand yes. Further upstream, they assert that 22.3.0 will contain the fix: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7674#note_1680853

I have to add that I'm not completely convinced yet that this is the whole story of the bug, because I have two Lenovo ThinkPads with nearly identical config, and on one I experience the bug and on the other one, not. This may be because I'm using one of them more, though. Long story short, it would be good if other people on Nixos can confirm they experience this bug on up-to-date nixos-unstable or nixos-22.11 and KDE.

@tobiasBora
Copy link
Contributor

tobiasBora commented Jan 19, 2023

I actually confirm this bug (or maybe a related one, also solved in the 22.3.x branch), since my recent NixOs upgrade my system is really unstable, with maybe one or two crashes a day (often, the applications are still usable, but alt-tab to switch does not work anymore, and I can't change window without killing the windows that are above (typically I try to open a new terminal, then I kill the apps from the terminal, then I kill the terminal…). While it is handy to save work, before restarting the OS, it's really annoying… and I actually nearly experienced work loses as sometimes the input system also stops working.

For reference, here is what I got last time:

$ journalctl -e
…
janv. 19 22:34:28 bestos kwin_x11[4700]: The X11 connection broke: I/O error (code 1)
janv. 19 22:34:28 bestos kwin_x11[4700]: XIO:  fatal IO error 62 (Timer expired) on X server :0
janv. 19 22:34:28 bestos kwin_x11[4700]:       after 10816469 requests (10816469 known processed) with 0 events remaining.
janv. 19 22:34:28 bestos kwin_x11[4700]: Application::crashHandler() called with signal 11; recent crashes: 1
janv. 19 22:34:29 bestos systemd[3516]: plasma-kwin_x11.service: Consumed 35min 28.114s CPU time.
…
$ dmesg # Not sure if the segfault is actually related… for some reason I have seen these segfault for months without any noticeable issues
…
[122631.722703] QDBusConnection[447347]: segfault at 7f32a4687a28 ip 00007f32c03f8c6c sp 00007f32ad70e980 error 4 in libQt5Core.so.5.15.7[7f32c0196000+315000]
[122631.722714] Code: 06 00 00 48 03 6d 10 0f b6 45 00 83 e0 03 83 e8 01 83 f8 01 0f 87 a1 06 00 00 48 8d 45 01 48 89 44 24 10 48 8b 3c 24 48 8b 07 <ff> 10 48 8b 2d c3 e3 19 00 48 8b 74 24 08 48 89 44 24 70 48 8d 94
[122632.182655] QDBusConnection[447528]: segfault at 7f5ad80c5a28 ip 00007f5aedc47c6c sp 00007f5adaf5d980 error 4 in libQt5Core.so.5.15.7[7f5aed9e5000+315000]
[122632.182665] Code: 06 00 00 48 03 6d 10 0f b6 45 00 83 e0 03 83 e8 01 83 f8 01 0f 87 a1 06 00 00 48 8d 45 01 48 89 44 24 10 48 8b 3c 24 48 8b 07 <ff> 10 48 8b 2d c3 e3 19 00 48 8b 74 24 08 48 89 44 24 70 48 8d 94
[125102.633902] QDBusConnection[469004]: segfault at 7f966041ea28 ip 00007f9689a7ec6c sp 00007f9676d94980 error 4 in libQt5Core.so.5.15.7[7f968981c000+315000]
[125102.633911] Code: 06 00 00 48 03 6d 10 0f b6 45 00 83 e0 03 83 e8 01 83 f8 01 0f 87 a1 06 00 00 48 8d 45 01 48 89 44 24 10 48 8b 3c 24 48 8b 07 <ff> 10 48 8b 2d c3 e3 19 00 48 8b 74 24 08 48 89 44 24 70 48 8d 94

The issue I was looking at is https://bugs.kde.org/show_bug.cgi?id=461316 and the fix is merged here https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19972

I checked and the fix is NOT in 22.2.5 (currently in use in NixOs), but is present in all the 22.3.x series (the latest version is 22.3.3 as of today). Would it be possible to upgrade mesa please?

@vcunat @primeos

EDIT Wait… I was actually looking at an older version of nixpkgs, the latest nixpkgs does have 22.3.3 (Nix has such up to date channels ^^'). So I will try to upgrade (again) my recently upgraded system ^^

@turion
Copy link
Contributor Author

turion commented Jan 20, 2023

The fix is in #204125, which was merged into nixos-unstable.

@turion
Copy link
Contributor Author

turion commented Jan 20, 2023

Let's both test whether it works after the fix, and if yes, close the issue.

@tobiasBora
Copy link
Contributor

Yes ! After a day of use I had no issue so far. I don't know however if it needs backport. Technically the problematic commit was 6 months old, and mesa 22.2.4, in use on NixOs 22.11, is like two months old…

@vcunat
Copy link
Member

vcunat commented Jan 20, 2023

I glanced at the commits quickly, and the culprit is reachable from all 22.2.x and doesn't appear reverted on the branch yet. (and it's been declared unmaintained in the meantime) Well, maybe it's possible to simply pick the revert pair that landed in 22.3.x, but I don't know the code-base.

@tobiasBora
Copy link
Contributor

tobiasBora commented Jan 20, 2023 via email

@vcunat
Copy link
Member

vcunat commented Jan 20, 2023

Well, if I knew that it fixes much more users than it breaks...
There are reasons why larger upgrades are generally avoided on stable.

@tobiasBora
Copy link
Contributor

Yeah, make sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants