wezterm
wezterm copied to clipboard
Wezterm freezes while spawning in a nested X session
What Operating System(s) are you seeing this problem on?
Linux X11
Which Wayland compositor or X11 Window manager(s) are you using?
Compositor: Picom WM: Herbstluftwm
WezTerm version
20240202-180218-aa81a46d
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
Trying to launch Wezterm, whether as a client or with --always-new-process, under a nested X session (e.g. with Xephyr or Xnest) starts a new window in a frozen state.
The following error is displayed when the process is killed:
MESA: error: CreateSwapchainKHR failed with VK_ERROR_OUT_OF_DEVICE_MEMORY
MESA: error: zink: could not create swapchain
lspci -k | grep -A 2 "VGA":
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 530 (rev 06)
Subsystem: Acer Incorporated [ALI] HD Graphics 530
Kernel driver in use: i915
--
01:00.0 VGA compatible controller: NVIDIA Corporation GM204M [GeForce GTX 980M] (rev a1)
Subsystem: Acer Incorporated [ALI] GM204M [GeForce GTX 980M]
Kernel driver in use: nvidia
To Reproduce
Run any variation of the following command:
Xephyr -ac -screen '1920x1080' :3 & sleep 2 && env DISPLAY=:3 sh -c "twm & wezterm -n"
Configuration
no config
Expected Behavior
For wezterm not to be frozen.
You can try the reproduction command with any combination of WM and terminal and it would behave correctly. E.g:
Xephyr -ac -screen '1920x1080' :4 & sleep 2 && env DISPLAY=:4 sh -c "twm & xterm"
Logs
05:36:46.826 ERROR window::os::x11::connection > error fetching window manager name: empty list of windows 05:36:46.827 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.ServiceUnknown: The name is not activatable 05:36:56.938 ERROR wezterm_gui > running message loop: process_queued_xcb: X11 connection is broken: xcb connection error: Connection error, possible I/O error; terminating
Anything else?
This behavior had changed multiple times across versions. At some point, it work perfectly fine, others, it just caused a massive CPU load (process had to be killed manually), currently though, with either the stable or git builds, it just freezes.
Also experiencing this trying to start weston
inside a Xephyr
graphical session in my existing X11 session.
Edit: This does seem to go away if I specify --renderer=pixman
in my weston
command though this is of course not accelerated.
AFAIK neither Xephyr nor Xnest support running accelerated OpenGL applications. The following StackExchange post suggests running through VirtualGL: https://unix.stackexchange.com/questions/633034/xephyr-no-gpu-acceleration
I'm able to run any other GPU accelerated/OpenGL terminal (e.g. kitty, alacritty) under Xephyr, and as mentioned in the report, Wezterm itself used to work just fine, something definitely got broken at some point. Maybe there is a way to switch rendering gracefully?