Severe keyboard input lag/pauses on Mutter 46.0, X11, NVIDIA
Affected version
OS: Linux system 6.8.1-2-MANJARO SMP PREEMPT_DYNAMIC Sat Mar 23 04:58:30 UTC 2024 x86_64 GNU/Linux
Mutter: 46.0
Present in XOrg: Yes
Present in Wayland: No
Graphics: NVIDIA 550.67
Bug summary
Please note that this bug appears to be intermittent. See 'Evolution of issue' for current details.
As of Mutter 46.0, I have noticed significant keyboard input lag, with characters appearing with a variable delay on the order of hundreds of milliseconds (in some cases a second or more), or sometimes not appearing until another key has been pressed, as if stacked up. There is no perceptible delay with most keystrokes, however every now and then a pause will occur. This makes it very difficult to type.
The following case is illustrative:
- Type command requiring privilege elevation in terminal.
- Hit 'enter'.
- Nothing happens.
- Hit 'enter' again.
- A prompt asking me which superuser I would like to authenticate as—and an error that I have not selected a valid user—is printed.
This example indicates that keystrokes are being received and processed, but the relevant output is not being rendered in a timely fashion. Whilst this case is merely annoying, it could be hazardous if a prompt with a destructive default is hidden in this way.
Due to deficiencies regarding Electron applications on Wayland with NVIDIA, Wayland is not an option, however I note that the specific problem I describe is not present under Wayland.
This problem was noted in Tilix, Vivaldi, and Obsidian. However, it was also noted that no such input lag occurs in Gnome Console version 46.0 or Nautilus. This suggests that GTK4 applications may be unaffected.
Subsequent observations
I note that repositioning the text entry caret with a mouse click has a noticeable lag of up to a second in the text entry box I am presently using in Vivaldi (a Chromium-derived browser).
Mouse movement and responsiveness is otherwise fluid.
Evolution of issue
Since filing this issue, I have noticed the following:
- Vivaldi (web browser, based on Chromium) is intermittently affected.
- Obsidian (based on Electron) is intermittently affected.
Additional information
Steps to reproduce
Run Tilix or another affected program under Mutter 46.0 on XOrg with NVIDIA drivers.
What happened
The foregoing bug description.
What did you expect to happen
Responsive text input with no perceptible lag, as per GNOME 45.
Relevant logs, screenshots, screencasts etc.
Nil.
Mitigations
Don't run affected software. Wezterm partially replaces Tilix functionality.