Closed Bug 1700798 Opened 4 years ago Closed 2 years ago

[sway] Menus and alt-text flicker

Categories

(Core :: Widget: Gtk, defect, P2)

Firefox 87
defect

Tracking

()

RESOLVED DUPLICATE of bug 1791856

People

(Reporter: mozilla, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(5 files)

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

Steps to reproduce:

Using firefox native wayland (MOZ_ENABLE_WAYLAND=1), on sway 1.5.1, on archlinux.

Using a blank, clean profile, I first closed and opened firefox completely, then right clicked or opened any other kind of menu.

Actual results:

The menus flicker, flashing visible and not-visible on every buffer update.

The same happens for alt-text, right click menus, and every other type of menu I can find.

Expected results:

No flickering should be observed.

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

Component: Untriaged → Widget: Gtk
Product: Firefox → Core

Similar setup on NixOS Unstable. I see flickering on the primary burger menu, addon popovers on the toolbar, form elements, like the select box popover. It also affects rendering, when a submenu is selected in the burger menu, as can be seen in the attached screencast.

https://shells.darmstadt.ccc.de/~hexa/mozbz-1700798.mp4

  • sway 1.5.1
  • wlroots 0.12.0
  • Firefox 87.0 (native wayland)

Can confirm this issue on Intel i915 (Intel 8th gen) and amdgpu (AMD Radeon RX5700).

This issues started appearing on the 87.0 release, it was not visible on 86.0.1.

Hello I have tried to reproduce this issue using Firefox 89.0a1 on Ubuntu 20 but unfortunately I wasn't able to reproduce it.
Could you please answer the following questions in order to further investigate this issue:

  1. Does this issue happen with a new profile? Here is a link on how to create a new profile: https://support.mozilla.org/en-US/kb/profile-manager-create-remove-switch-firefox-profiles
  2. Are you using add-ons? If so could you please list them?
  3. Does this issue occur in the latest nightly version of firefox? Here is a link from where you can download it: https://www.mozilla.org/en-US/firefox/channel/desktop/
    4. Could you please provide more detailed steps on how to reproduce the issue?
Flags: needinfo?(mozilla)

Does this issue happen with a new profile? Here is a link on how to create a new profile: https://support.mozilla.org/en-US/kb/profile-manager-create-remove-switch-firefox-profiles

Yes, my video was created in an entirely new profile on Firefox 87.0.

Are you using add-ons? If so could you please list them?

None in the new profile.

Does this issue occur in the latest nightly version of firefox?

TODO, but did you try this on sway 1.5.1 with wlroots 0.12.0 or any other desktop system. I've asked colleagues and it only seems to break on sway.

Flags: needinfo?(mozilla)

Ditto what Martin Weinelt said

Tested against the latest available source tarball (88.0b8) and the flickering is still visible.

Can confirm the bug in Fedora 33 as well:

~> dnf list installed | grep -E '(sway\.|wlroots|firefox)'
firefox.x86_64                              87.0-2.fc33                       @updates
sway.x86_64                                 1.5-3.fc33                        @updates
wlroots.x86_64                              0.11.0-2.fc33                     @fedora
~> lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 630 (rev 04)

Also tested in safe mode and in a new profile, and the flickering is still there. Started when I updated from 86.0-7.fc33.

Feel free to ping me if you need any additional info.

Can you guys please try mutter to reproduce it? Just run it as nested compositor, no need to install gnome for it:

$mutter --nested --wayland &
$MOZ_ENABLE_WAYLAND=1 WAYLAND_DISPLAY=wayland-1 firefox

Thanks.

Flags: needinfo?(mozilla)

I can't reproduce in mutter, only sway 1.6.

Flags: needinfo?(mozilla)

Can't reproduce anymore with Firefox 88.0.1, sway 1.6 and my usual profile.

Can't reproduce on Fedora 34:

~> dnf list installed | grep -E '(sway\.|wlroots|firefox)'
firefox.x86_64                              88.0.1-1.fc34                     @updates
sway.x86_64                                 1.6-1.fc34                        @updates
wlroots.x86_64                              0.13.0-1.fc34                     @updates

I can reproduce still with 88.0.1, sway 1.6, on a clean profile.

I can reproduce this on Gnome also.

yay -Q firefox gnome-desktop
firefox 91.0.2-1
gnome-desktop 1:40.4-1

I believe this started after updating to 91.

I do have MOZ_ENABLE_WAYLAND=1 in my env, and when i remove it, problem disappears.

Can it be dupe of Bug 1708709 i.e. font scale factor is set?

Yes, i have font scale set to 1.6, and when i set it to 1, problem disappears.

I think this can be closed now. I can not reproduce it with firefox 95

Stephanie, do you still have issue?

Flags: needinfo?(mozilla)

I can confirm this bug is present in thunderbird for me too.

My system is :
Manjaro
Gnome 41.2
Wayland enabled
No display scaling
Occur on 2160x1440 AND 1920x1080 screen resolution

and I can confirm that starting thunderbird by using MOZ_ENABLE_WAYLAND=1 thunderbird command solves the issue.

(In reply to Laong from comment #17)

I can confirm this bug is present in thunderbird for me too.

My system is :
Manjaro
Gnome 41.2
Wayland enabled
No display scaling
Occur on 2160x1440 AND 1920x1080 screen resolution

and I can confirm that starting thunderbird by using MOZ_ENABLE_WAYLAND=1 thunderbird command solves the issue.

Sorry, I've made a mistake : starting thunderbird by using MOZ_ENABLE_WAYLAND=1 thunderbird command DOES NOT solves the issue.
but starting thunderbird by using MOZ_ENABLE_WAYLAND=1 WAYLAND_DISPLAY=wayland-1 thunderbird command DOES solves it.

I am using FF 102 with Sway and I still observe flickering or crashes when opening the context menu. However,

I am using FF 102 with Sway and I still observe flickering or crashes when opening the context menu. However, it seems that this almost always occur then the menu height is more than half the screen height and when the mouse position is close to the center. Simply speaking, that happens when FF cannot place the menu above nor below the mouse pointer.

Tall context menus can be obtained on image links. Adding a few add-on or increasing the UI font size with layout.css.devPixelsPerPx can also help.

For now, my workaround is to set widget.gtk.native-context-menus=true

Correction: Setting widget.gtk.native-context-menus is not a good solution. That prevents flickering for context menus but most of the entries have no effect. This is broken.

Redirect a needinfo that is pending on an inactive user to the triage owner.
:stransky, since the bug has high priority and recent activity, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(mozilla) → needinfo?(stransky)
Summary: [wayland] Menus and alt-text flicker → [sway] Menus and alt-text flicker

For me the problem is mostly solved since 103 or 104 when FF started adding some scroll buttons to tall menus. I can still trigger flickering after changing layout.css.devPixelsPerPx to a value above 1.0 but this is less common that before.

Thunderbird 102 is also fine for me with the same scroll buttons on tall menus.

For me it still flickers, making the right click menus unusable. Firefox Nightly 106.0a1 (2022-09-13) (64-bit).

As soon as I start moving my mouse, the menus disappear. When the mouse stops, the menus are visible.

The problem does not exist on the stable Firefox 104.0.1.

             .',;::::;,'.                ivan@fedora 
         .';:cccccccccccc:;,.            ----------- 
      .;cccccccccccccccccccccc;.         OS: Fedora Linux 36 (Workstation Edition) x86_64 
    .:cccccccccccccccccccccccccc:.       Host: ROG Zephyrus G14 GA401QM_GA401QM 1.0 
  .;ccccccccccccc;.:dddl:.;ccccccc;.     Kernel: 5.19.8-300.fc36.x86_64 
 .:ccccccccccccc;OWMKOOXMWd;ccccccc:.    Uptime: 1 hour, 1 min 
.:ccccccccccccc;KMMc;cc;xMMc:ccccccc:.   Packages: 2034 (rpm), 11 (flatpak) 
,cccccccccccccc;MMM.;cc;;WW::cccccccc,   Shell: zsh 5.8.1 
:cccccccccccccc;MMM.;cccccccccccccccc:   Resolution: 3840x2160 
:ccccccc;oxOOOo;MMM0OOk.;cccccccccccc:   DE: GNOME 42.4 
cccccc:0MMKxdd:;MMMkddc.;cccccccccccc;   WM: Mutter 
ccccc:XM0';cccc;MMM.;cccccccccccccccc'   WM Theme: Adwaita 
ccccc;MMo;ccccc;MMW.;ccccccccccccccc;    Theme: Adwaita [GTK2/3] 
ccccc;0MNc.ccc.xMMd:ccccccccccccccc;     Icons: Adwaita [GTK2/3] 
cccccc;dNMWXXXWM0::cccccccccccccc:,      Terminal: gnome-terminal 
cccccccc;.:odl:.;cccccccccccccc:,.       CPU: AMD Ryzen 9 5900HS with Radeon Graphics (16) @ 4.680GHz 
:cccccccccccccccccccccccccccc:'.         GPU: AMD ATI 04:00.0 Cezanne 
.:cccccccccccccccccccccc:;,..            Memory: 8623MiB / 39530MiB 
  '::cccccccccccccc::;,.

Redirect a needinfo that is pending on an inactive user to the triage owner.
:stransky, since the bug has high priority and recent activity, could you please find another way to get the information or close the bug as INCOMPLETE if it is not actionable?

For more information, please visit auto_nag documentation.

Flags: needinfo?(mozilla) → needinfo?(stransky)

I can confirm, that Firefox 105.0.1 still has this issue.

Is there any info i can provide to help solving this issue?

My environment:

OS: ArchLinux
DE: Gnome (with wayland)

Flags: needinfo?(stransky) → needinfo?(serg.partizan)

I mean please test in case you didn't change layout.css.devPixelsPerPx value.

Yes, this version still has flickering issue.

mozregression --launch 106
 0:01.32 INFO: Using date 2022-09-19 for release 106
 0:03.06 INFO: Using local file: /tmp/mozilla-builds/2022-09-19--mozilla-central--firefox-107.0a1.en-US.linux-x86_64.tar.bz2
 0:03.06 INFO: Running mozilla-central build for 2022-09-19
 0:11.72 INFO: Launching /tmp/tmp8e7dwer3/firefox/firefox
 0:11.72 INFO: Application command: /tmp/tmp8e7dwer3/firefox/firefox -profile /tmp/tmprfgxkmz2.mozrunner
 0:11.73 INFO: application_buildid: 20220919155806
 0:11.73 INFO: application_changeset: c8469510d1da54853ae2e018ea8d89dae14b8446
 0:11.73 INFO: application_name: Firefox
 0:11.73 INFO: application_repository: https://hg.mozilla.org/mozilla-central
 0:11.73 INFO: application_version: 107.0a1
Flags: needinfo?(serg.partizan)

And yes, i haven't changed devPixelsPerPx.

(In reply to Serhii Tereshchenko from comment #32)

And yes, i haven't changed devPixelsPerPx.

Thanks, please attach your about:support page.

Flags: needinfo?(serg.partizan)
Attached file about-support
Flags: needinfo?(serg.partizan)

Can you test latest nightly please?

Same for me. Still flickers.

107.0a1 (2022-09-26) (64-bit)

https://fedoraproject.org/wiki/How_to_debug_Firefox_problems#Testing_Mozilla_binaries

MOZ_ENABLE_WAYLAND=0 ./firefox -ProfileManager -no-remote
MOZ_ENABLE_WAYLAND=1 ./firefox -ProfileManager -no-remote

It works fine with MOZ_ENABLE_WAYLAND=0, but still flickers with MOZ_ENABLE_WAYLAND=1.

Attached file about-support.txt
Attached file about-support.txt

Sorry, I have initially attached the about:support contents from my stable Firefox installation.

"Display0": "3840x2160@60Hz scales:1.000000|1.500000"

Looks like you use frame buffer scale feature, i.e. you have set 150% scale factor....is that correct?

Attached image image.png

I don't use framebuffer scaling, but i use font scaling set to 1.6 in gnome tweak tools.

Looks like you use frame buffer scale feature, i.e. you have set 150% scale factor....is that correct?

Ah, yes. That's correct. I have set a system-wide fonts scaling factor of 140% via Gnome Tweaks. Though I think Firefox treats it as 150% (there's no difference seen on web pages when I switch between 140% and 150% -- only in Firefox UI, like tab titles and menus).

Just tried resetting it back to 100% -- the flickering immediately disappears (even without restarting Firefox).

However, I cannot keep it at 100%, as everything will be too small on my 4K screen.

On my laptop i use 1.3 font scale factor, and i see 1920x1080@60Hz scales:1.000000|1.250000 this scaling in about:support.

There is no flickering.

But Serhii, I can see in the attached file that you're using the stable Firefox v104 on your laptop. Which doesn't have this problem.

Oh, yes. I forgot to update firefox.

After update to 105 - i can reproduce bug on laptop.
It also reproducible with nightly.

What's strange however, sometimes, when i open context menu at the corners of the page, it works fine. 90% of the time i can see flickering, but sometimes i don't.

What's strange however, sometimes, when i open context menu at the corners of the page, it works fine. 90% of the time i can see flickering, but sometimes i don't.

I confirm this. I have the same behavior.

If I do the right mouse button click close enough to the right or to the bottom edge of a web page (so the context menu opens UP or LEFT to the clicked point) -- there is no flickering.

Bug 1791856 covers this behavior on KDE/Gnome. Not sure if Sway has a different error here or if Bug 1791856 fixes it too. (This bug is originally about Sway compositor).

As a workaround you can set widget.wayland.use-move-to-rect to false at about:config.

Yes! This worked! Thanks Martin! ✨

Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Resolution: --- → DUPLICATE

(In reply to Ivan Voskoboinyk from comment #48)

As a workaround you can set widget.wayland.use-move-to-rect to false at about:config.

Yes! This worked! Thanks Martin! ✨

This worked for me as well. Using sway 1.7, wlroots 0.15.1, firefox 105.0.1

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: