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

Wezterm slow startup time and noticeable resize after window was spawned #6254

Open
h3xOo opened this issue Oct 9, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@h3xOo
Copy link

h3xOo commented Oct 9, 2024

What Operating System(s) are you seeing this problem on?

Linux Wayland

Which Wayland compositor or X11 Window manager(s) are you using?

River

WezTerm version

wezterm 20240922-151228-2b76c63b

Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?

No, and I'll explain why below

Describe the bug

Firstly, when I spawn wezterm, there's noticeable resize happening. Here's log from river

info(wlroots): [wayland] error in client communication (pid 1396)
error(text_input): client requested to enable text input without focus, ignoring request
error(text_input): inactive text input tried to commit an update, client bug?
error(xdg_shell): client with app-id 'org.wezfurlong.wezterm' is buggy and initiated size change while tiled or fullscreen, shame on it
error(text_input): inactive text input tried to commit an update, client bug?

Secondly, there's lag when spawning new instances of wezterm (like ~1/1.5 seconds). Here's comparison between my current terminal emulator (first) and wezterm (second) [and you can see resize happening when spawning wezterm].

wezterm.mp4

I don't know if it's related, but I downgraded mesa and vulkan-mesa-layers to1:24.1.6, because newer versions leak a lot of file descriptors.

To Reproduce

No response

Configuration

-- Pull in the wezterm API
local wezterm = require "wezterm"

-- This table will hold the configuration.
local config = {}

-- In newer versions of wezterm, use the config_builder which will
-- help provide clearer error messages
if wezterm.config_builder then
        config = wezterm.config_builder()
end

config.font = wezterm.font "JetBrainsMono NF"
config.font_size = 13
config.enable_tab_bar = true
config.window_close_confirmation = "NeverPrompt"

config.color_scheme = "Gruvbox dark, soft (base16)"

config.window_padding = {
        left = 4,
        right = 0,
        top = 4,
        bottom = 2,
}

local gpus = wezterm.gui.enumerate_gpus()

config.front_end = "WebGpu"
config.webgpu_preferred_adapter = gpus[2]

config.disable_default_key_bindings = true

config.keys = {
        {
                key = "r",
                mods = "CTRL|SHIFT",
                action = wezterm.action.Search { CaseSensitiveString = "" }
        },
        {
                key = "o",
                mods = "CTRL|SHIFT",
                action = wezterm.action.OpenLinkAtMouseCursor,
        },
        {
                key = "q",
                mods = "CTRL|SHIFT",
                action = wezterm.action.CloseCurrentTab { confirm = false }
        },
        {
                key = "k",
                mods = "CTRL",
                action = wezterm.action.ScrollByPage(-0.5),
        },
        {
                key = "j",
                mods = "CTRL",
                action = wezterm.action.ScrollByPage(0.5),
        },
        {
                key = "k",
                mods = "CTRL|SHIFT",
                action = wezterm.action.ScrollByLine(-1),
        },
        {
                key = "j",
                mods = "CTRL|SHIFT",
                action = wezterm.action.ScrollByLine(1),
        },
        {
                key = "c",
                mods = "CTRL|SHIFT",
                action = wezterm.action.CopyTo "ClipboardAndPrimarySelection",
        },
        {
                key = "v",
                mods = "CTRL|SHIFT",
                action = wezterm.action.PasteFrom "Clipboard",
        },
        {
                key = "p",
                mods = "CTRL",
                action = wezterm.action.ActivateCommandPalette,
        },
        {
                key = "L",
                mods = "CTRL",
                action = wezterm.action.ShowDebugOverlay
        },
}

config.use_fancy_tab_bar = false
config.hide_tab_bar_if_only_one_tab = true
-- config.tab_bar_at_bottom = true
config.tab_max_width = 100

config.default_gui_startup_args = { "start", "--cwd", "." }

wezterm.on("gui-startup", function()
        local tab, pane, window = wezterm.mux.spawn_window {}
        window:gui_window():maximize()
end)

config.hide_mouse_cursor_when_typing = true
config.scrollback_lines = 4096

-- and finally, return the configuration to wezterm
return config

Expected Behavior

No response

Logs

Here's file, since log is pretty big. Ran with

WEZTERM_LOG=debug wezterm >wezterm.log 2>&1

wezterm.log

Anything else?

No response

@h3xOo h3xOo added the bug Something isn't working label Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant