Bug 1768135 - Firefox is really slow on Wayland
Summary: Firefox is really slow on Wayland
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: firefox
Version: 31
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Gecko Maintainer
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: ffwayland
TreeView+ depends on / blocked
 
Reported: 2019-11-02 20:10 UTC by zareami10
Modified: 2020-11-24 16:29 UTC (History)
15 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-24 16:29:32 UTC
Type: Bug


Attachments (Terms of Use)
Firefox support log (16.94 KB, text/plain)
2019-11-02 20:10 UTC, zareami10
no flags Details

Description zareami10 2019-11-02 20:10:44 UTC
Created attachment 1631991 [details]
Firefox support log

*This bug is created upon a request on Fedora Mag.

Firefox seems much slower on Wayland than X whether ran natively or through Xwayland. (this stands for the Nightly version too, in addition to the package provided by fedora)

The lags/stutters are pretty noticeable when scrolling or when there are CSS animations. This has gotten a lot more visible (somewhat unusable) with the new kinetic scrolling. Also on websites such as Pinterest you can noticeably see that images are rendered as white when scrolling at speed. 

I have Webrender enabled here, but turning it off doesn't make the situation any better.

(also probably not related but Wayland is generally pretty slow for me, and keeps getting slower each version, in contrast with people people noticing huge improvements, so not sure if this is something about my particular hardware. another note is that Firefox on Wayland was pretty smooth at the early stages for me, back when enabling acceleration would cause it to crash, so not sure if a regression)

Hardware: i7-4720HQ, running Firfox on my GTX 960m via Primusrun is also pretty slow)

The support page log is attached.

Comment 1 Martin Stransky 2019-11-04 17:10:21 UTC
Thanks for reporting this, we'll look at it.

Comment 2 Martin Stransky 2019-11-05 10:16:59 UTC
I think https://bugzilla.mozilla.org/show_bug.cgi?id=1583732 can make a difference for you as it brings better back buffer management. Please try latest nightly but *without* webrender/gl compositor. Also do you see extensive CPU usage or you see the slowness/lags while CPU usage is low? In that case it may be https://bugzilla.mozilla.org/show_bug.cgi?id=1542808

Comment 3 zareami10 2019-11-05 16:57:24 UTC
I tested the latest Nightly with force-disabling Webrender and having "layers.acceleration" off and it was really slow. But I indeed noticed more CPU usage compared to X when scrolling even on very simple pages like "about:support".

Comment 4 Jan Vlug 2020-03-18 19:02:36 UTC
I am using Firefox on Wayland with two displays. One display is scaled to 150%, the other 100%. When I have Firefox on the 150% display it is extremely slow when 'scrolling' trough the media of a Twitter account. When Firefox is on the 100% screen it is way faster.
I use Firefox full screen.

Comment 5 Martin Stransky 2020-03-18 21:03:21 UTC
Can you try to use 200% scale instead of 150%? I guess the experimental partial scrolling feature may be the factor here.
Thanks.

Comment 6 Martin Stransky 2020-03-18 21:05:26 UTC
Also can you try to enable WebRender? Set gfx.webrender.all to true & gfx.webrender.enabled to true at about:config and restart browser.

Comment 7 Simon Shields 2020-04-02 12:54:45 UTC
I can reproduce this issue. I have a 4K monitor scaled at 120%, and a 1080p monitor scaled at 100%.

Changing to the monitor to 200% scale fixes the scrolling lag.
Enabling webrender (at 120% scale) also fixes the lag, but windows on my 1080p screen don't render properly (the window content takes up about 1/4 of the screen, but  the window border behaves as expected). That seems like it would be a separate issue, though.

Comment 8 makal 2020-04-02 17:17:31 UTC
I think there's a problem with GPU acceleration in Firefox in Fedora... I have an AMD GPU (RX 580) with free drivers... Firefox with Wayland doesn't run with GPU acceleration enabled. When i enable, Firefox automatically run with XWayland, no way to have HW acceleration with Wayland.

Comment 9 Martin Stransky 2020-04-03 08:26:32 UTC
(In reply to makal from comment #8)
> I think there's a problem with GPU acceleration in Firefox in Fedora... I
> have an AMD GPU (RX 580) with free drivers... Firefox with Wayland doesn't
> run with GPU acceleration enabled. When i enable, Firefox automatically run
> with XWayland, no way to have HW acceleration with Wayland.

That's very strange. I have RX 570 and that works very well with HW acceleration enabled with free drivers. But I don't use experimental partial scalling, just 200% scale.

Comment 10 makal 2020-04-03 10:31:57 UTC
(In reply to Martin Stransky from comment #9)
> (In reply to makal from comment #8)
> > I think there's a problem with GPU acceleration in Firefox in Fedora... I
> > have an AMD GPU (RX 580) with free drivers... Firefox with Wayland doesn't
> > run with GPU acceleration enabled. When i enable, Firefox automatically run
> > with XWayland, no way to have HW acceleration with Wayland.
> 
> That's very strange. I have RX 570 and that works very well with HW
> acceleration enabled with free drivers. But I don't use experimental partial
> scalling, just 200% scale.

I can enable HW acceleration and it works well, but in x11 mode, not in Wayland.

Enabling like this :
 - gfx.webrender.all to true
 - layers.acceleration.force-enabled to true

Even i run with "MOZ_ENABLE_WAYLAND=1 firefox", Firefox stays in x11 mode (shown in about:support)

Comment 11 Ben Cotton 2020-11-03 15:43:21 UTC
This message is a reminder that Fedora 31 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 31 on 2020-11-24.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '31'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 31 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 12 Ben Cotton 2020-11-24 16:29:32 UTC
Fedora 31 changed to end-of-life (EOL) status on 2020-11-24. Fedora 31 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


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