tmux -CC causing latency with remote VMs
What Operating System(s) are you seeing this problem on?
Windows
Which Wayland compositor or X11 Window manager(s) are you using?
No response
WezTerm version
20250309-153701-12b971ac
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
Thanks for this long awaited feature. It is really helpful. One quick feedback, the keyboard typing when connected with tmux -CC in ssh'ed remote server, seems really slow. The delay between each key press and then event happening is quite long. Tested with both wezterm ssh and normal ssh from powershell, opened on wezterm. Using the latest nightly for Windows 11. ❯ wezterm -V wezterm 20250309-153701-12b971ac remote server tmux ❯ tmux -V tmux 2.7 centos8
Same is happening with tmux latest tmux next-3.6
To Reproduce
From Windows 11 wezterm ssh to remote Linux / FreeBSD14 VM. Then use tmux -CC, to create a new control mode tmux session. Then when typing there is a visible latency. Specially visible when trying to close vim with esc + q .
Configuration
local wezterm = require 'wezterm'
return { -- Appearance settings font = wezterm.font('JetBrains Mono'), font_size = 12.0, color_scheme = 'Dracula', -- Change as needed window_background_opacity = 0.9,
-- Window settings window_decorations = 'RESIZE', initial_rows = 30, initial_cols = 100,
front_end = 'WebGpu', webgpu_preferred_adapter = nil, -- Let WezTerm decide
-- Performance optimizations enable_wayland = false, -- Windows uses DirectWrite/DirectX
-- Keybindings keys = { {key='c', mods='CTRL|SHIFT', action=wezterm.action.CopyTo 'Clipboard'}, {key='v', mods='CTRL|SHIFT', action=wezterm.action.PasteFrom 'Clipboard'}, {key='t', mods='CTRL|SHIFT', action=wezterm.action.SpawnTab 'CurrentPaneDomain'}, {key='w', mods='CTRL|SHIFT', action=wezterm.action.CloseCurrentTab {confirm=true}}, {key='LeftArrow', mods='ALT', action=wezterm.action.ActivateTabRelative(-1)}, {key='RightArrow', mods='ALT', action=wezterm.action.ActivateTabRelative(1)}, }, }
remote tmux, is showing this behavior even without any tmux config.
Expected Behavior
The latency is much less when using tmux in normal mode from wezterm in the same VMs.
Logs
normal_tmux.txt tmux_control.txt
In case of control mode log after pwd, when enter is pressed:
16:30:17.164 DEBUG wezterm_gui::termwindow > RawKeyEvent(RawKeyEvent { key: Physical(Return), modifiers: NONE, leds: NUM_LOCK, phys_code: Some(Return), raw_code: 13, scan_code: 28, repeat_count: 1, key_is_down: true, handled: Handled(false)
16:30:18.019 DEBUG wezterm_term::terminalstate::performer > perform PrintString("/datadrive")
Time difference is approx 900ms
Where as for normal tmux : 16:28:34.150 DEBUG wezterm_gui::termwindow > RawKeyEvent(RawKeyEvent { key: Physical(Return), modifiers: NONE, leds: NUM_LOCK, phys_code: Some(Return), raw_code: 13, scan_code: 28, repeat_count: 1, key_is_down: false, handled: Handled(false) })
16:28:34.371 DEBUG wezterm_term::terminalstate::performer > perform PrintString("/datadrive")
Time difference 220ms.
Anything else?
No response
Source: wezterm/wezterm