Wayland multi-monitor bug: Chromium/Electron windows jitter when maximized on an external monitor positioned to the left

Hi,

I want to report a GNOME/Mutter bug that I have been able to reproduce very consistently, and I also found a local workaround/fix
for it.

Summary

On GNOME Shell 50.1 under Wayland, some Chromium/Electron-based apps jitter continuously when maximized on an external monitor.

This happens only when the external monitor is positioned to the left of the internal display.

If I move the same monitor to the right, top, or bottom, the problem disappears immediately.

Affected applications

I have confirmed this with:

  • Visual Studio Code
  • Google Chrome / Chromium

Observed behavior

  • The window jitters continuously while maximized

  • Non-maximized windows are fine

  • True fullscreen is fine

  • The issue only happens on the external monitor

  • The internal laptop display does not show this issue

    At first I suspected shell extensions, because extensions like Hide Top Bar would also visibly “jump” together with the window. But
    after disabling extensions, the problem still remained. Extensions only made the symptom more obvious.

Reproduction condition

The strongest and most important condition I found is this:

  • external monitor on the left: issue reproduces

  • external monitor on the right/top/bottom: issue disappears

    I also tested a few other things that did not solve it:

  • disabling GNOME Shell extensions

  • disabling xwayland-native-scaling

  • changing refresh rate

  • changing VS Code title bar style

  • changing monitor alignment/offset while keeping the external monitor on the left

    So this does not seem to be an extension bug or a simple display alignment issue.

Environment

  • GNOME Shell: 50.1
  • Session: Wayland
  • Internal display: 3072x1920, scale 2
  • External display: 1920x1080, scale 1

Log evidence

While the problem happens, GNOME Shell logs messages like:

  Window ... size 1921x1081 exceeds allowed maximum size 1920x1080

This looks like a repeated size negotiation failure by 1 pixel on the external 1920x1080 monitor.

That also matches the actual behavior very well:

  • the client seems to request 1921x1081
  • Mutter only allows 1920x1080
  • the window keeps oscillating between the two states
  • visually this appears as continuous maximized-window jitter

My current understanding

My conclusion is that this is very likely a Mutter/Wayland maximize constraint bug that is triggered by:

  • multi-monitor setup

  • external monitor placed on the left

  • Chromium/Electron-style maximized windows

    In other words, it seems related to how window constraints are handled in this layout, rather than a shell extension problem.

Local fix I tested

I built Mutter locally and added a small fix in:

src/wayland/meta-window-wayland.c

Specifically in:

meta_window_wayland_move_resize_internal()

My local patch does this:

  • only in the Wayland path

  • only for non-floating window states

  • if the client-submitted size exceeds the constrained size

  • clamp the final width/height back to the constrained rectangle instead of continuing with the oversized dimensions

    After installing that local Mutter build, the problem is gone on my machine, including the “external monitor on the left” layout.

    So at least locally, clamping the final size to the constrained rectangle prevents the 1-pixel oscillation.

Why I am posting here

I am unfortunately blocked on GitLab login at the moment, so I cannot file a proper issue/MR there right now.

I am posting here in case:

  • this is already known to Mutter maintainers

  • someone can point me to the correct upstream issue

  • someone wants me to provide the exact patch/diff

  • someone can confirm whether this is the right area of the code

    If useful, I can also provide:

  • the exact patch

  • journalctl excerpts

  • my monitors.xml

  • a screen recording