Open Bug 2069480 Opened 2 months ago Updated 1 month ago

Firefox text field input is jumping back and forth in wayland mode.

Categories

(Core :: Widget: Gtk, defect)

Firefox 155
defect

Tracking

()

UNCONFIRMED

People

(Reporter: priit, Unassigned, NeedInfo)

References

(Blocks 1 open bug)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:155.0) Gecko/20100101 Firefox/155.0

Steps to reproduce:

Installed firefox 154. And then later upgraded to FF 155 and the problem remains. Used any of the text fields in any of the webpages and also sidebar AI thing text field (CTRL-ALT-X) and everywhere inside firefox.

Problem went away, when I started firefox with MOZ_ENABLE_WAYLAND=0 firefox.

Actual results:

typing causes the cursor to jump back and forth randomly while typing. it doesn't delete the text or anything in the end result, just visually glitching the entire time while typing. it's like while you type, then something is occasionally doing very fast "undo" and then "redo" to your last couple of keypresses.

Expected results:

no text and cursor position glitching while typing.

The Bugbug bot thinks this bug should belong to the 'Core::Widget: Gtk' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Widget: Gtk
Product: Firefox → Core
Severity: -- → S3

Second independent confirmation of this issue, with system-level measurements ruling out
compositor and system stalls (not the same as ruling out a rendering bug - see the
limitations note in that section), and an A/B backend test.

Environment

Firefox 155.0.1 at first occurrence; still reproducible on 156.0 (Wayland backend)
OS openSUSE Tumbleweed 20260912, kernel 7.2.4-1-default (later 7.2.6-1-default)
Desktop KDE Plasma 6.7.5 / KWin 6.7.5, Wayland session, DRM backend
GPU AMD Radeon RX 6750 XT, amdgpu + Mesa 26.2.2 (later 26.2.3)
CPU AMD Ryzen 7 5800X3D
Displays 1920x1080@60Hz and 1920x1080@143.6Hz, both at scale 1

Symptom

While typing into a text form field on a web page, the last typed character is briefly
removed from the field and then re-added a moment later. Nothing is lost - the final text
is correct - but the field visibly rewinds and replays the last keystroke. This is the
same behaviour the initial report describes as a very fast "undo" followed by "redo" of
the last keypress.

Seen in: text form fields on web pages; also observed in Firefox's own
address bar, matching the initial report's "everywhere inside firefox"
Frequency: intermittent; observed at 2026-09-17 05:08:20 and 2026-09-17 07:59:00
local time. No reliable reproduction steps found so far.

A/B backend test

To test the MOZ_ENABLE_WAYLAND=0 workaround I ran the same profile on both backends in
alternating stretches of normal use for eight days (2026-09-17 to 2026-09-25). My daily
routine was: start the native Wayland build, use it normally, and as soon as the glitch
appeared, quit and relaunch with MOZ_ENABLE_WAYLAND=0 (X11/XWayland) for the rest of
the session.

The pattern was consistent every day of the test:

  • native Wayland backend: the glitch recurred while typing, every day;
  • X11/XWayland backend: not a single occurrence, despite getting most of the
    typing time.

The first two occurrences were on Firefox 155.0.1; the pattern continued unchanged after
the update to 156.0 (installed 2026-09-22), so it is still present in the current
release on Wayland.

Because the glitch is intermittent and I have no on-demand reproduction, the X11 result
is an absence of recurrence rather than a proven impossibility - but the repeated
day-by-day contrast on the same machine, same profile and same workload makes the
backend the one consistent variable.

Not a compositor or system stall

Because the glitch is intermittent I instrumented the machine rather than the browser:

  • a probe pinging KWin's main loop over D-Bus (org.freedesktop.DBus.Peer.Ping) at
    10 Hz - on Plasma Wayland, keyboard and pointer events are dispatched by that thread,
    so a stall there is the obvious suspect for delayed typing;
  • a watch on the probe's own scheduling delay, which detects whole-machine freezes;
  • system context (PSI pressure, load average, D-state processes) recorded whenever
    either of those spiked.

Over ~1,640 one-minute windows (~27 hours of coverage, roughly 970,000 samples at 10 Hz)
there were zero stall events of any kind. KWin's main thread never took more than 2.9 ms
to answer anywhere in the run, and at both times the glitch was observed it answered in
<= 0.6 ms, with the probe itself never descheduled for more than ~13 ms.

The mouse cursor does not stutter at these moments either, and the characters do end up
committed - so the key events are being delivered normally.

What this does and does not show:

  • It rules out KWin being busy, and it rules out the machine being stalled in any way.
  • It does NOT rule out a rendering-correctness bug - in Firefox or in the compositor -
    where an out-of-date frame is presented for a moment. That would look exactly like what
    I see: committed, drawn, briefly gone, drawn again.
  • The probe samples at 10 Hz, so it reliably catches stalls of roughly 100 ms or longer;
    a very short stall could fall between two samples.

So this narrows it to "not a stall, not the input path, not the OS" and points at the
Wayland-specific widget/text-input path, but the measurements are evidence of
elimination, not of identification.

Analysis

The fact that this disappears with the X11/XWayland backend in both reports suggests the
Wayland-specific widget/text-input path rather than anything in web content - if that is
correct, no amount of page or extension debugging on the reporter side would affect it.
The address-bar occurrence (the initial reporter saw it in the AI sidebar and elsewhere
in the UI as well) additionally rules out page scripts or web content as the trigger.

Please use mozregression to find the broken commit:
https://fedoraproject.org/wiki/How_to_debug_Firefox_problems#Use_Mozregression_tool
Thanks.

Blocks: wayland
Flags: needinfo?(priit)
You need to log in before you can comment on or make changes to this bug.