Skip to content

High CPU use when focus is on kitty window under Wayland #5105

@tristpinsm

Description

@tristpinsm

I've noticed that when a kitty window is focused, the CPU used by the gnome-shell and ibus-daemon processes shoots up to over 100%. It goes back down when the focus moves to any other window. This only happens with kitty as far as I can tell, and it goes away if I set linux_display_server x11 in kitty.conf.

To Reproduce
Steps to reproduce the behavior:

  1. Set the focus to a kitty window under Wayland.
  2. Watch the CPU use of gnome-shell and ibus-daemon go up in top.

Environment details

kitty 0.25.0 created by Kovid Goyal
Linux tristXPS 5.17.7-arch1-1 #1 SMP PREEMPT Thu, 12 May 2022 18:55:54 +0000 x86_64
Arch Linux 5.17.7-arch1-1 (/dev/tty)

DISTRIB_ID="Arch"
DISTRIB_RELEASE="rolling"
DISTRIB_DESCRIPTION="Arch Linux"
Running under: Wayland
Frozen: False
Paths:
  kitty: /usr/bin/kitty
  base dir: /usr/lib/kitty
  extensions dir: /usr/lib/kitty/kitty
  system shell: /bin/zsh
Loaded config files:
  /home/tristan/.config/kitty/kitty.conf

Config options different from defaults:
font_family          Inconsolata Regular
font_size            12.0
shell_integration    frozenset({'no-cursor'})
Added shortcuts:
	shift+page_up → scroll_page_up
	shift+page_down → scroll_page_down
Colors:
	background           #485867   
	color0               #485867   
	color1               #b38686   
	color10              #87b386   
	color11              #aab386   
	color12              #868cb3   
	color13              #b386b2   
	color14              #86b3b3   
	color15              #e3efef   
	color16              #d8bba2   
	color17              #b39f9f   
	color18              #5a6d7a   
	color19              #6d828e   
	color2               #87b386   
	color20              #98afb5   
	color21              #c9dbdc   
	color3               #aab386   
	color4               #868cb3   
	color5               #b386b2   
	color6               #86b3b3   
	color7               #b0c5c8   
	color8               #8299a1   
	color9               #b38686   
	cursor               #c9dbdc   
	foreground           #b0c5c8   
	selection_background #c9dbdc   
	selection_foreground #485867   

Important environment variables seen by the kitty process:
	PATH                                /usr/local/bin:/usr/bin:/var/lib/snapd/snap/bin:/usr/local/sbin:/var/lib/flatpak/exports/bin:/opt/fv:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
	LANG                                en_CA.UTF-8
	SHELL                               /bin/zsh
	DISPLAY                             :0
	WAYLAND_DISPLAY                     wayland-0
	USER                                tristan
	XDG_MENU_PREFIX                     gnome-
	XDG_SESSION_DESKTOP                 gnome
	XDG_SESSION_TYPE                    wayland
	XDG_CURRENT_DESKTOP                 GNOME
	XDG_SESSION_CLASS                   user
	XDG_RUNTIME_DIR                     /run/user/1000
	XDG_DATA_DIRS                       /home/tristan/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop

Additional context
The problem persists with kitty --config NONE.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions