wez / wezterm

A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust
https://wezfurlong.org/wezterm/
Other
16.58k stars 742 forks source link

Mouse freezes, skips, and stutters over the wezterm window, recovers as soon as it leaves. #5366

Open ilar opened 4 months ago

ilar commented 4 months ago

What Operating System(s) are you seeing this problem on?

Linux Wayland

Which Wayland compositor or X11 Window manager(s) are you using?

Ubuntu Mutter

WezTerm version

20240429-102818-0184e88e

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

Whenever my mouse enters the boundaries of the wezterm window, it immediately either freezes or starts stuttering and I see a 40-70% cpu increase on whatever core wezterm is running on. Wezterm also starts getting very slow- any freezes or stutters the mouse displays also corrosponds to a hiccup in wezterm's responsiveness.

As soon as i stop moving the mouse, or move the mouse outside the exact boundary of the wezterm window, this stops.

To Reproduce

Open wezterm, move mouse inside the wezterm window.

Configuration

no config

Expected Behavior

Mouse to move smoothly and like normal when located over a wezterm window.

Logs

Debug Overlay wezterm version: 20240429-102818-0184e88e x86_64-unknown-linux-gnu Window Environment: Wayland Lua Version: Lua 5.4 OpenGL: AMD Radeon RX 6800 XT (navi21, LLVM 15.0.7, DRM 3.54, 6.5.0-28-generic) 4.6 (Compatibility Profile) Mesa 23.2.1-1ubuntu3.1 Enter lua statements or expressions and hit Enter. Press ESC or CTRL-D to exit

(no other logs)

Anything else?

No response

ilar commented 4 months ago

This must have been something in the OS interacting with with wezterm, because I apt-get update/upgraded and the issue instantly cleared, without even restarting.

Weird.

ilar commented 4 months ago

Nevermind, it came back as soon as I locked my computer and unlocked it. Looks like rebooting fixes it until I lock my screen, or if libmesa gets updated by apt.

PaulGrandperrin commented 2 months ago

I also have this issue.

NixOS 24.05, Gnome wayland 46.2, Mesa 24.0.7, wezterm 20240203-110809-5046fc22.

It doesn't always happen right when I first start wezterm but it seems that when it happens it doesn't go away.

Whenever the mouse goes over the wezterm window AND moves:

The issue doesn't happen when the mouse is not moved, only when it moves, and the stutter seems to get worse with how much and how fast the mouse moves.

PaulGrandperrin commented 2 months ago

One important note, I'm using a 1000Hz mouse.

Reducing the polling rate to 125Hz (the minimum) "solves" the issue: Gnome-shell shoots up to 80-90% CPU usage and no stuttering happens.

Setting to 250Hz makes gnome-shell hit 100% and the desktop starts to stutter.

500Hz, more stuttering.

1000Hz, very heavy stuttering.

My screens are 60FPS.