Results 1 to 7 of 7

Thread: WebGL performance degraded in Firefox, works well under Chromium

  1. #1
    Join Date
    Jan 2009
    Location
    Romania, Bucharest
    Posts
    887

    Default WebGL performance degraded in Firefox, works well under Chromium

    I recently decided to play around with Mozilla Hubs and see how the project developed. Amazing stuff by the way... if anyone's into virtual worlds (like Second Life) I recommend giving it a try.

    It helped me discover a strange issue: Under Firefox my WebGL performance is horrible, I can only reach 40 FPS usually even less. Under Chromium however, I constantly get the full 144 FPS supported by my 144 Hz monitor. Something is HEAVILY degrading my WebGL performance under Firefox, but that something doesn't seem to affect Chromium at all... since FF is my main browser I'd really like to figure out what it is and how to fix it. I already looked at the problem with a Hubs developer on their Discord server last week, but they couldn't find an answer based on the data they suggested I provide which they said appears in order. What do you suggest I look for?

    The general info: My OS is openSUSE Tumbleweed x64 KDE, Firefox is installed from its system packages so it's always the latest version available. I have an AMD card so I'm using the amdgpu module, once more the one preinstalled by the distro (no custom drivers). Here's the output of my about:support page from Firefox: https://pastebin.com/qV62xsQ6
    openSUSE Tumbleweed x64, KDE Framework 5

  2. #2
    Join Date
    Jan 2017
    Location
    Nürnberg, Germany
    Posts
    279

    Default Re: WebGL performance degraded in Firefox, works well under Chromium

    Looking through the Firefox info texts, this obviously stands out:
    Code:
    HW_COMPOSITING:
    blocked by env: Acceleration blocked by platform
    OPENGL_COMPOSITING:
    unavailable by default: Hardware compositing is disabled
    GPU_PROCESS:
    unavailable by env: Hardware compositing is unavailable.
    WEBRENDER:
    opt-in by default: WebRender is an opt-in feature
    WEBRENDER_QUALIFIED:
    blocked-release-channel-amd by env: Release channel and AMD
    WEBRENDER_COMPOSITOR:
    disabled by default: Disabled by default
    WEBGPU:
    disabled by default: Disabled by default
    I have an Nvidia GTX 1050, and my Firefox reports roughly the same as yours: although everything seems to perform flawlessly with Steam, SeaMonkey 2.53.1, Leap 15.0 and the Nvidia 390.132 drivers I'm using.

    I usually just quickly check the page http://madebyevan.com/webgl-water/ with my installed browsers (SeaMonkey, Firefox, Chromium) and leave it at that. Having watched images load slowly, line by line, through 9600baud modem connections for years since 1994, I just don't expect marvels of performance or throughput from my web browser. But even I have noticed that Chromium just animates Google-Maps 3D landscapes and street views far better than Firefox or SeaMonkey. (I install Chromium just for Google Maps, and for testing pages.)

    I'd love to get to the bottom of this, though. From line 172 of your info dump…
    Code:
    WebGL 1 Driver Renderer: X.Org -- AMD Radeon (TM) R9 390 Series (HAWAII, DRM 3.36.0, 5.6.2-1-default, LLVM 9.0.1)
    … it seems clear that Firefox detects the Radeon driver correctly (as my Firefox detects the Nvidia driver). So what happens then? Web browsers have become such complicated systems.

  3. #3
    Join Date
    Sep 2013
    Location
    Norfolk, UK
    Posts
    1,572

    Default Re: WebGL performance degraded in Firefox, works well under Chromium

    See the section titled "Still No Default WebRender on GNU/Linux Systems (and that is a good thing)"

    here https://linuxreviews.org/Firefox_70_...bilities_Fixed

    Perhaps relevant?
    Regards, Paul

    2x Tumbleweed (Snapshot: 20201025) KDE Plasma 5
    2x Leap 15.2 KDE Plasma 5

  4. #4
    Join Date
    Jan 2009
    Location
    Romania, Bucharest
    Posts
    887

    Default Re: WebGL performance degraded in Firefox, works well under Chromium

    Very interesting and insightful info, thanks for sharing! In my case I didn't have WebRender enabled in Firefox. Out of curiosity I just did: Despite the article suggesting it would make performance worse, it fixed some of the issue and is a noticeable improvement!

    Sadly it still doesn't fix it all the way: While I'm now getting 60 FPS where I'd previously get only 40 FPS, on rare occasions even 90 FPS briefly, it's very jittery and still doesn't reach the 144 FPS Chromium can (for the same demo / scene of course). Is this simply the best Firefox can do on Linux at the moment, or are there other settings I can hunt for in about:config hoping to further improve this?
    openSUSE Tumbleweed x64, KDE Framework 5

  5. #5
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    29,705
    Blog Entries
    15

    Default Re: WebGL performance degraded in Firefox, works well under Chromium

    Hi
    If you set layers.acceleration.force-enabled to true in about:config, does this help?
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  6. #6
    Join Date
    Jan 2009
    Location
    Romania, Bucharest
    Posts
    887

    Default Re: WebGL performance degraded in Firefox, works well under Chromium

    Quote Originally Posted by malcolmlewis View Post
    Hi
    If you set layers.acceleration.force-enabled to true in about:config, does this help?
    No, there doesn't seem to be any further improvement with that.
    openSUSE Tumbleweed x64, KDE Framework 5

  7. #7
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    12,773
    Blog Entries
    2

    Default Re: WebGL performance degraded in Firefox, works well under Chromium

    FYI
    About 4 mths ago I reported to Mozilla that hardware acceleration (which was enabled by default at the time) was causing my system to stutter and then lock up on a particular site that apparently made heavy use of WebGL (It aggregated at least 6 streaming apps on the page at once and did some fancy tricks to send at least one stream of data back to the server). Disabling hardware acceleration fixed the problem for me. Although the site didn't publicly state, I also suspect that the site was "mining" client CPU cycles to power the app which is why I won't name that site here. Although it could be considered similar to bitcoin mining, it wasn't that so I don't think it crossed that line.

    You may want to carefully monitor your CPU and GPU resources with hardware enabled, and of course look for patterns if performance patterns crop up.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •