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

High CPU usage and laggy on Fedora 40 #5357

Open
ad-on-is opened this issue Apr 30, 2024 · 2 comments
Open

High CPU usage and laggy on Fedora 40 #5357

ad-on-is opened this issue Apr 30, 2024 · 2 comments
Labels
bug Something isn't working X11

Comments

@ad-on-is
Copy link

ad-on-is commented Apr 30, 2024

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 journalctl and 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

@ad-on-is ad-on-is added the bug Something isn't working label Apr 30, 2024
@rwese
Copy link

rwese commented May 2, 2024

Hi @ad-on-is, could you please format your config as a codeblock, also the log output, this would help readability.

@ad-on-is
Copy link
Author

ad-on-is commented May 2, 2024

Done... I'd suggest to update the template, if that's possible, since I copy&pasted the code into the corresponding fields.

@wez wez added the X11 label May 5, 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 X11
Projects
None yet
Development

No branches or pull requests

3 participants