Closed jchv closed 5 months ago
Disable fcitx5 or set wayland_enable_ime no in kitty.conf.
Thanks for the quick response! Yep, it was the fcitx5 issue. Sorry!
I do use IME with Kitty sometimes so I opted to apply your workaround patch and it is working great. Hopefully other users might find this issue via search and not have to open another issue.
On the off chance there are other NixOS users arriving here by search, you can cherry-pick the IME fix early like this:
{ pkgs, ... }:
{
config = {
nixpkgs.overlays = [
(final: prev: {
kitty = prev.kitty.overrideAttrs (prevAttrs: {
patches = (prevAttrs.patches or [ ]) ++ [
(pkgs.fetchpatch {
name = "fcitx-workaround.diff";
url = "https://github.com/kovidgoyal/kitty/commit/aecf07bcbaa74507526d3f700954842176fef4f2.diff";
hash = "sha256-6m4D/xX5dx0v6rhzIyTlkQyCRb2Ik2Ek3q0BrL3saTw=";
})
];
});
})
];
};
}
Describe the bug This is a relatively new bug I'm hitting on NixOS unstable with kitty 0.34.1 under Sway 1.9. Basically, in some circumstances, Kitty will begin using a lot of CPU, spinning parsing keymaps. "Some circumstances" mainly surrounds behavior when tabbing in and out of Kitty or starting another instance of it. I've not really narrowed down how or why. Even within a single instance, I can trigger the high CPU usage by creating a new window with Ctrl+Shift+Enter. What's even more strange is that I can stop the high CPU usage by going to another workspace, opening another Kitty instance, and exiting it. This will stop the other Kitty instances from spinning!
When looking in perf top, I can see that it is spinning inside of
_xkbcommon_parse
primarily. I don't have debug symbols right now (sorry) but if I attach with gdb and reproduce the issue, I get the following stack trace:To Reproduce Steps to reproduce the behavior:
Screenshots N/A
Environment details
Additional context I am able to reproduce the problem with
kitty --config NONE
. I've been using Sway 1.9 with Kitty for quite some time and very pleased, so I doubt it is related to that. The most recent update in NixOS that is likely to be somehow related is libxkbcommon: 1.5.0 -> 1.7.0.I have reproduced this on two different machines (with similar NixOS configurations.)
I will continue to try to debug this, but I hope maybe someone will have an idea of what might be wrong based on the evidence I've gathered.