wezterm
wezterm copied to clipboard
High CPU usage and laggy on Fedora 40
What Operating System(s) are you seeing this problem on?
Linux X11
Which Wayland compositor or X11 Window manager(s) are you using?
awesomewm
WezTerm version
wezterm 20240203-110809-5046fc22
Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?
Yes, and I updated the version box above to show the version of the nightly that I tried
Describe the bug
I see a higher CPU usage on Fedora 40 and it becomes laggy when there's a lot of terminal output.
To Reproduce
- Fedora 40
- AwesomeWM
- execute
journalctland hold down key - Output stuttering
Configuration
local wezterm = require "wezterm";
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.mouse_bindings = {
{ event = { Up = { streak = 1, button = "Left" } }, mods = "NONE", action = wezterm.action.Nop },
{ event = { Up = { streak = 1, button = "Left" } }, mods = "CTRL", action = "OpenLinkAtMouseCursor" }
}
config.freetype_load_flags = "DEFAULT"
config.disable_default_key_bindings = true
config.keys = {
{ key = "L", mods = "CTRL", action = wezterm.action.ShowDebugOverlay },
{ key = "w", mods = "CTRL", action = wezterm.action { CloseCurrentPane = { confirm = false } } },
{ key = "t", mods = "CTRL", action = wezterm.action { SpawnTab = "CurrentPaneDomain" } },
{
key = "t",
mods = "CTRL|SHIFT",
action = wezterm.action_callback(
function( win, pane )
local tab, window = pane:move_to_new_tab()
tab:activate()
end
)
},
{ key = "n", mods = "CTRL", action = "SpawnWindow" },
{
key = "n",
mods = "CTRL|SHIFT",
action = wezterm.action_callback(
function( win, pane )
pane:move_to_new_window()
-- tab:activate()
end
)
},
{ key = "p", mods = "CTRL|SHIFT", action = "ShowLauncher" },
{ key = "d", mods = "CTRL", action = wezterm.action.SplitVertical },
{ key = "o", mods = "CTRL", action = wezterm.action.ActivatePaneDirection "Next" },
{ key = "g", mods = "CTRL", action = wezterm.action.ActivateTabRelativeNoWrap( -1 ) },
{ key = "h", mods = "CTRL", action = wezterm.action.ActivateTabRelativeNoWrap( 1 ) },
{ key = "o", mods = "CTRL|SHIFT", action = wezterm.action.ActivatePaneDirection "Prev" },
{ key = "e", mods = "CTRL", action = wezterm.action.SplitHorizontal },
{ key = "c", mods = "CTRL|SHIFT", action = wezterm.action.CopyTo "Clipboard" },
-- { key = "c", mods = "CTRL|SHIFT", action = wezterm.action.CopyTo "PrimarySelection" },
{ key = "v", mods = "CTRL|SHIFT", action = wezterm.action.PasteFrom "Clipboard" },
-- { key = "v", mods = "CTRL|SHIFT", action = wezterm.action.PasteFrom "PrimarySelection" },
{ key = "f", mods = "CTRL|SHIFT", action = wezterm.action { Search = { CaseSensitiveString = "" } } },
-- {
-- key = "C",
-- mods = "CTRL",
-- action = wezterm.action.Multiple { CopyTo = "ClipboardAndPrimarySelection" }
-- },
{ key = "V", mods = "CTRL", action = wezterm.action.PasteFrom "Clipboard" }
}
-- config.use_fancy_tab_bar = false
config.tab_bar_at_bottom = true
config.use_fancy_tab_bar = false
config.window_frame = {
font = wezterm.font { family = "Hack Nerd Font", weight = "Regular" },
font_size = 10.0,
active_titlebar_bg = "#16161e",
inactive_titlebar_bg = "#16161e"
}
config.window_padding = { left = 10, right = 10, top = 10, bottom = 10 }
config.color_scheme = "Catppuccin Mocha"
config.font = wezterm.font { family = "Hack Nerd Font", weight = "Regular" }
config.font_size = 10.0
return config
Expected Behavior
Wezterm should consume less CPU and be much smoother
Logs
Debug Overlay
wezterm version: 20240203-110809-5046fc22 x86_64-unknown-linux-gnu
Window Environment: X11 awesome
Lua Version: Lua 5.4
OpenGL: AMD Radeon RX 6700 XT (radeonsi, navi22, LLVM 18.1.1, DRM 3.57, 6.8.7-300.fc40.x86_64) 4.6 (Compatibility Profile) Mesa 24.0.6
Enter lua statements or expressions and hit Enter.
Press ESC or CTRL-D to exit
11:27:49.532 WARN window::os::x11::connection > Unable to resolve appearance using xdg-desktop-portal: get_appearance.read_setting: Reading xdg-portal org.freedesktop.appearance color-scheme: org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.Settings” on object at path /org/freedesktop/portal/desktop
11:40:50.663 ERROR wezterm_mux_server_impl::local > writing pdu data buffer: Broken pipe (os error 32)
11:41:18.233 ERROR wezterm_mux_server_impl::local > writing pdu data buffer: Broken pipe (os error 32)
14:27:28.967 ERROR wezterm_mux_server_impl::local > writing pdu data buffer: Broken pipe (os error 32)
16:31:49.084 ERROR wezterm_mux_server_impl::local > writing pdu data buffer: Broken pipe (os error 32)
16:32:15.647 ERROR wezterm_mux_server_impl::local > writing pdu data buffer: Broken pipe (os error 32)
16:32:36.479 ERROR wezterm_mux_server_impl::local > writing pdu data buffer: Broken pipe (os error 32)
Anything else?
No response
Hi @ad-on-is, could you please format your config as a codeblock, also the log output, this would help readability.
Done... I'd suggest to update the template, if that's possible, since I copy&pasted the code into the corresponding fields.
Additional info... I just found this happens, when I have one window running btop, and another window running neovim.
Steps to reproduce
- Open one window and run btop (with graph symbol braille)
- Open another window and open a larger file in neovim
- Scroll through the file in neovim
- Result: laggy