Wezterm wgpu VRAM memory leak
What Operating System(s) are you seeing this problem on?
Linux Wayland
Which Wayland compositor or X11 Window manager(s) are you using?
Operating System: Arch Linux KDE Plasma Version: 5.27.10 KDE Frameworks Version: 5.114.0 Qt Version: 5.15.12 Kernel Version: 6.7.0-zen3-1-zen (64-bit) Graphics Platform: Wayland Processors: 12 × AMD Ryzen 5 5500U with Radeon Graphics Memory: 5.6 GiB of RAM Graphics Processor: AMD Radeon Graphics Manufacturer: LENOVO Product Name: 82LM System Version: IdeaPad 5 14ALC05
WezTerm version
20240120-211320-b4c5dc74
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
Wezterm keeps on expanding VRAM and GTT (shared memory between CPU and GPU) until it runs out of memory. This happens especially with interactive terminal applications, e.g. htop, nano. After wezterm is closed, the memory is freed properly.
To Reproduce
- Use wgpu as the backend (
config.front_end = "WebGpu"which is the default) - Open htop
- Wait patiently or scroll really fast to update the screen
Configuration
local wezterm = require 'wezterm'
local config = {}
config.color_scheme = 'kanagawabones'
config.hide_tab_bar_if_only_one_tab = true
config.use_ime = true
config.visual_bell = {
fade_in_duration_ms = 75,
fade_out_duration_ms = 75,
target = 'CursorColor',
}
config.warn_about_missing_glyphs = false
config.default_cursor_style = 'SteadyBar'
config.front_end = "WebGpu"
return configExpected Behavior
To have it not explode on my face and OOM everything.
Logs
warning: queue 0x5761ee5c4380 destroyed while proxies still attached:
zwp_primary_selection_offer_v1@4278190086 still attached
wl_data_offer@4278190085 still attached
wl_data_offer@4278190084 still attached
wl_buffer@47 still attached
wl_buffer@48 still attached
wl_shm_pool@50 still attached
wl_buffer@52 still attached
wl_shm_pool@54 still attached
wl_data_offer@4278190081 still attached
xdg_wm_base@22 still attached
wl_surface@21 still attached
wl_data_device@18 still attached
wl_pointer@16 still attached
zwp_text_input_v3@15 still attached
wl_keyboard@14 still attached
zwp_primary_selection_device_v1@13 still attached
zwp_primary_selection_device_manager_v1@3 still attached
wl_data_device@12 still attached
zwp_text_input_manager_v3@11 still attached
wl_output@10 still attached
wl_subcompositor@9 still attached
wl_data_device_manager@8 still attached
wl_seat@7 still attached
wl_shm@6 still attached
zxdg_decoration_manager_v1@5 still attached
wl_compositor@4 still attached
wl_registry@2 still attachedAnything else?
Here is a video of it filling up my RAM.
https://github.com/wez/wezterm/assets/20792268/1cc4b614-c1e6-4484-8f90-e6bea28ef46b
Source: wezterm/wezterm