Skip to content

Slow shell start on niri #8236

@kosayoda

Description

@kosayoda

Describe the bug
I seem to be running into the same issue as described in #7540, but with niri instead of labwc.

To Reproduce
Steps to reproduce the behavior:

  1. Run niri with kitty: niri -- kitty.
  2. The shell does not appear for 250ms after the terminal window appears.

Environment details

$ niri --version
niri 25.01
kitty 0.39.0 created by Kovid Goyal
Linux quack 6.12.9-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 10 Jan 2025 00:39:41 +0000 x86_64
S{PRETTY_NAME} 6.12.9-arch1-1 (/dev/tty)

DISTRIB_ID="Arch"
DISTRIB_RELEASE="rolling"
DISTRIB_DESCRIPTION="Arch Linux"
Running under: Wayland (niri 25.01 (unknown commit)) missing: single_pixel_buffer
OpenGL: '4.6 (Core Profile) Mesa 24.3.3-arch1.2' Detected version: 4.6
Frozen: False
Fonts:
  medium: NotoSansMono-Regular: /usr/share/fonts/noto/NotoSansMono-Regular.ttf:0
          Features: ()
    bold: NotoSansMono-Bold: /usr/share/fonts/noto/NotoSansMono-Bold.ttf:0
          Features: ()
  italic: NotoSansMono-Regular: /usr/share/fonts/noto/NotoSansMono-Regular.ttf:0
          Features: ()
      bi: NotoSansMono-Bold: /usr/share/fonts/noto/NotoSansMono-Bold.ttf:0
          Features: ()
Paths:
  kitty: /usr/bin/kitty
  base dir: /usr/lib/kitty
  extensions dir: /usr/lib/kitty/kitty
  system shell: /usr/bin/fish
System color scheme: no_preference. Applied color theme type: none

Config options different from defaults:

Important environment variables seen by the kitty process:
	PATH                                /usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/lib/rustup/bin
	LANG                                en_US.UTF-8
	EDITOR                              nvim
	SHELL                               /usr/bin/fish
	GLFW_IM_MODULE                      ibus
	DISPLAY                             :0
	WAYLAND_DISPLAY                     wayland-1
	USER                                kosa
	XCURSOR_SIZE                        24
	XDG_VTNR                            1
	XDG_SEAT                            seat0
	XDG_SESSION_TYPE                    wayland
	XDG_DATA_HOME                       /home/kosa/.local/share
	LC_ALL                              en_US.UTF-8
	XDG_STATE_HOME                      /home/kosa/.local/state
	XDG_RUNTIME_DIR                     /run/user/1000
	XDG_CONFIG_HOME                     /home/kosa/.config
	XDG_SESSION_CLASS                   user
	XDG_CURRENT_DESKTOP                 niri
	XDG_SESSION_ID                      1
	XDG_CACHE_HOME                      /home/kosa/.cache

Additional context

  1. This only happens when the output scale is set to 1.0 in the niri configuration, the shell starts instantly if any other scale is used.
  2. I reached out to the maintainers of niri, with the following response (that I don't understand fully):

well yeah niri doesn't send preferred integer scale for scale = 1

the wayland protocol says:

Before receiving this event the preferred buffer scale for this surface is 1.

so niri doesn't send it because it is already 1 by default

so this sounds indeed like kitty trying to work around buggy compositors

i don't think it's an easy fix in smithay either because smithay doesn't have a good point to send preferred buffer scale = 1. It can't tell when the compositor hasn't set it yet and is going to or isn't going to

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions