2

I am running an Ubuntu 22.04 on my laptop. I like using Firefox. It is installed by default as a snap package. I am using an additional monitor within my setup with the same resolution as the laptop's display.

When I am using Firefox in a maximized window the window will break at some point in time. With breaking I mean that hovering over links, text editors, menu items, or anything else will not result in a visible response of the cursor for example (but no tooltips as well). It is like there is an invisible pane above everything. Clicking works immediately and the browser reacts appropriately. All of this applies also to the buttons of the window itself (menu bar, closing, maximizing...).

When trying to drag the window, at first it seems like it is stuck but dragging far enough will result in the window being "detached"/"unmaximized". I can now drag it as usual, but the window itself will keep its original "spacing/res". Please have a look at the picture.

dragged and then dropped browser window

Dragging a single or multiple tabs to a new or not broken window works and the window is fine.

The problem seems to occur faster when using two monitors, but it also occurs when using one monitor. After a long time it will happen to non-maximized windows as well. This only applies to windows from Firefox.

I am not sure if it is a problem with Firefox or with GNOME.

karel
  • 114,770
Mot
  • 21
  • 1
  • I have the same issue with GNOME on Arch Linux. I use the Flatpak version of Firefox on Wayland. It is incredibly annoying. I have 2 4K monitors, the issue happens regardless of the scale factor I put them at. I have had this issue for a long time now. – Jeroen Aug 21 '23 at 10:50
  • Related bug report (that was closed due to inactivity): https://bugzilla.mozilla.org/show_bug.cgi?id=1790527 – Jeroen Aug 21 '23 at 10:55
  • This might be related: https://askubuntu.com/questions/1468861/firefox-display-glitches-then-freezes-when-resizing-on-ubuntu-22-04 – Jeroen Aug 21 '23 at 10:58

2 Answers2

0

I encountered the same issue with Firefox installed via Flatpak on my Arch Linux system. I was able to resolve the problem by configuring Firefox to run natively on Wayland instead of XWayland.

Diagnosing the Problem

First, let's ascertain whether Firefox is running under XWayland:

  1. Open Firefox and in the address bar, type about:support and press Enter.
  2. Scroll down until you find the 'Window Protocol' section.
  3. If it shows xwayland, it means you are running Firefox over XWayland. On the other hand, if it displays wayland, you are running it natively on Wayland.

Solution for Flatpak Users

While I use the Flatpak version of Firefox (as opposed to your Snap version), the underlying cause might be similar. Here's how I addressed it using the Flatpak version:

  1. I installed and opened the 'Flatseal' application – a permissions manager for Flatpak applications.
  2. Inside Flatseal, I located the Firefox application settings.
  3. I disabled X11 support for Firefox.

A screenshot of the Flatseal configuration options.

After making this change and restarting Firefox, the 'Window Protocol' option in about:support showed wayland, confirming that Firefox was now running natively on Wayland. Additionally, the described issue disappeared.

Note: You might need to search for a similar setting or method if you're using the Snap version of Firefox.

Jeroen
  • 443
  • 3
  • 10
  • 25
0

I have exactly the same symptoms but i'm on snap firefox so @Jeroen's solution didn't work for me.

However I found that you can also enable native wayland support with the env variable (worked for my snap firefox)

$ MOZ_ENABLE_WAYLAND=1 firefox