Closed Bug 1714633 Opened 3 years ago Closed 3 years ago

Poor Performance with Hardware Acceleration Enabled (Proprietary nvidia driver)

Categories

(Core :: Graphics, defect)

Firefox 89
defect

Tracking

()

RESOLVED DUPLICATE of bug 1737428

People

(Reporter: b4yf823ap56y457945ty4w7o, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(5 files)

Attached image Screenshot at 18-39-35.png (deleted) —

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

Steps to reproduce:

Using Linux on Ubuntu 20.04.2

Updated from 88 to 89
Checked that hardware acceleration is enabled.
Accessed https://www.testufo.com and checked FPS.

Actual results:

Performance is worse, scrolling seems laggier, videos on Twitch.tv and Youtube.com are not smooth.
Using https://www.testufo.com my frame rate struggles to go over 50FPS whereas on version 88 it sat at a stable 144FPS.

If I disable Hardware Acceleration from the settings menu then my frame rate returns to 144FPS, this worked in version 88.

Expected results:

Framerate should sit at a comfortable 144FPS with Hardware Acceleration enabled.

Attached image Screenshot at 19-06-04.png (deleted) —

I've run mozregression the issue affects all builds of 89 but not of 88 from what I found.
Not sure if I can upload a log or something from mozregression?

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

Component: Untriaged → Graphics
Product: Firefox → Core

Maybe worth mentioned I am using an Nvidia GTX 1070 GPU with Proprietary Drivers version 465

Hi Baa, could you please attach your about:support information to this bug?

Not sure if I can upload a log or something from mozregression?

If you could copy the link where it says "pushlog_url" and paste it here that would be great. Thanks!

Flags: needinfo?(b4yf823ap56y457945ty4w7o)

(In reply to Jamie Nicol [:jnicol] from comment #4)

Hi Baa, could you please attach your about:support information to this bug?

Not sure if I can upload a log or something from mozregression?

If you could copy the link where it says "pushlog_url" and paste it here that would be great. Thanks!

Hi,
Thanks for your help, the about:support log to the bug.
Here's the mozregression url: https://hg.mozilla.org/releases/mozilla-release/pushloghtml?fromchange=f1258acd08f842bbbb76104d6082f9790dd058fa&tochange=93720442b571341fd6

Kind regards,
Baa.

Flags: needinfo?(b4yf823ap56y457945ty4w7o)
Attached file aboutsupport.log (deleted) —

About:Support

Thanks for that! It seems to have run the bisection on the mozilla-release repository, and as a result the range is huge. Would you be able to run it again with the repository set to "mozilla-central"? Thanks!

Flags: needinfo?(b4yf823ap56y457945ty4w7o)

(In reply to Jamie Nicol [:jnicol] from comment #7)

Thanks for that! It seems to have run the bisection on the mozilla-release repository, and as a result the range is huge. Would you be able to run it again with the repository set to "mozilla-central"? Thanks!

yes here's the new pushlog, there are several so not sure which one is needed:
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=cdd65df84242fa01e9b2c690fb9078d7fba46cb6&tochange=40bd5bbe396ce4cb1a5bfd86d852307d7e71dc97

Flags: needinfo?(b4yf823ap56y457945ty4w7o)
Attached image Screenshot at 17-37-51.png (deleted) —

I don't know how relevant it is but I noticed this FEATURE_FAILURE_GLXTEST_FAILED note on version 89 that isn't on version 88

(In reply to Baa from comment #8)

(In reply to Jamie Nicol [:jnicol] from comment #7)

Thanks for that! It seems to have run the bisection on the mozilla-release repository, and as a result the range is huge. Would you be able to run it again with the repository set to "mozilla-central"? Thanks!

yes here's the new pushlog, there are several so not sure which one is needed:
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=cdd65df84242fa01e9b2c690fb9078d7fba46cb6&tochange=40bd5bbe396ce4cb1a5bfd86d852307d7e71dc97

That still seems like a very large range. It's the final pushlog that is output that we want, which should be much shorter. If you can copy and paste all of the output text that would be great.

(In reply to Jamie Nicol [:jnicol] from comment #10)
Hi,
Sorry I was grabbing the first one, it switches from bisecting mozilla-central to autoland so the last url is this:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=8471b70b4df960d3599dcd951f0b05fb4f7bd420&tochange=12744d62ec8944fe64bb028a68bcab2c4665cf7b

That is perfect, thanks!

So it looks like webrender got enabled for your driver, and it doesn't work well, possibly because of the high refresh rate screen.

The FEATURE_FAILURE_GLXTEST_FAILED message could be the same issue as bug 1715245, however it doesn't appear to have caused you to lose webrender from the about:support in comment 6.

Baa, if you could please capture a performance profile with hardware acceleration enabled that would be really helpful:

  • Enable hardware acceleration and restart Firefox
  • Go to https://profiler.firefox.com
  • Click "Enable Firefox Profiler Menu Button"
  • An icon should appear in your toolbar
  • Navigate to a slow page (eg the ufotest)
  • Click the downwards arrow in the new toolbar icon to open the profiler menu
  • Select "Firefox Graphics" for the settings
  • Click start recording
  • Wait around 10 seconds, then click "Capture"
  • This should open up a new tab. In the top-right there should be a "Upload Local Profile" button. Click that, then click "upload"
  • Then copy the url to here.

If you need any help with that please let me know!

Blocks: wr-nv-linux
Severity: -- → S3
Flags: needinfo?(b4yf823ap56y457945ty4w7o)
Regressed by: 1673752
Summary: Poor Performance with Hardware Acceleration Enabled → Poor Performance with Hardware Acceleration Enabled (Proprietary nvidia driver)
Has Regression Range: --- → yes

(In reply to Baa from comment #9)

I don't know how relevant it is but I noticed this FEATURE_FAILURE_GLXTEST_FAILED note on version 89 that isn't on version 88

Hm, this is odd. A failure in glxtest should trigger a fallback to software Webrender, which currently is very slow on testufo and probably scrolling on high resolutions. Are you sure your about:support in comment 6 is correct? Normally these errors should be included there.

(In reply to Robert Mader [:rmader] from comment #13)

I downloaded a new seperate copy of Firefox and opened it with a new profile to generate the about:support after confirming the issue could still be recreated. I just checked now and the GLXTEST_FAILED doesn't show up on this copy of Firefox.

It only shows up on my normal Firefox copy on my normal profile, I've now made a new profile on my normal copy of Firefox and it also doesn't show GLXTEST_FAILED, so not sure what's going on there maybe something is just wrong with my normal profile. The framerate issue is re-creatable in all instances though.

(In reply to Jamie Nicol [:jnicol] from comment #12)
Hi,
See here: https://share.firefox.dev/352Cpqj
Thanks

Flags: needinfo?(b4yf823ap56y457945ty4w7o)

From the profile you do indeed seem to be running hardware webrender, so the glxtest failure remains a mystery.

It doesn't look like the renderer thread is at all being taxed. But rather it is attempting to render at 60Hz, which I can very much believe causes performance to appear poor on a 144Hz monitor.

In your about:support I can see that we've detected the targetFrameRate as 144, but obviously something is going wrong.

Baa, I can see that in about:config you've set layout.frame_rate to 144 (or maybe Firefox did that for you). Could you try reseting that to -1, restart, and see if that makes a difference?

Also, do you have multiple monitors, or just a single 144Hz monitor?

(In reply to Jamie Nicol [:jnicol] from comment #18)

Also, do you have multiple monitors, or just a single 144Hz monitor?

I have three monitors, only one is 144hz.
I had set the layout.frame_rate to 144 manually as a workaround that worked in earlier versions. I've set it back to -1 and it remains at 60FPS regardless of hardware rendering being enabled or not.

(In reply to Baa from comment #19)

(In reply to Jamie Nicol [:jnicol] from comment #18)

Also, do you have multiple monitors, or just a single 144Hz monitor?

I have three monitors, only one is 144hz.
I had set the layout.frame_rate to 144 manually as a workaround that worked in earlier versions. I've set it back to -1 and it remains at 60FPS regardless of hardware rendering being enabled or not.

I have a theory here:

  • your compositor/WM only draws at 60FPS. On X11, WMs always run at the same FPS for all screens and the driver chooses at which one (Gnome can't pick). You may find some advice how to force 144Hz somewhere.
  • On FF 88, you probably didn't get HW-WR but had Basic or Webrender (Software) (SW-WR), now on FF 89 you get HW-WR
  • Software rendering isn't throttled by the hardware, so 144Hz got reported, but you only saw 60Hz either way
  • Hardware rendering does get throttled by the hardware, so now you get some odd ~60Hz, maybe with odd hiccups in between

I'd recommend making sure your WM/driver really runs at 144Hz, to be checked with glxgears. If that runs smoothly, you should be able to get smooth 144Hz with layout.frame_rate:-1 as well.

(In reply to Robert Mader [:rmader] from comment #20)

So I checked glxgears and it did indeed run at 60FPS, until I disabled Sync to VBlank in the Nvidia driver settings as someone suggested. Now glxgears runs at the highest FPS it can.

Firefox 89 still shows 60FPS on https://testufo.com/ when hardware is enabled.
I'll attach the about:support from Firefox 88 where 144FPS is reported, maybe it can prove your theory?

Attached file aboutsupport-88.log (deleted) —

The about:support from Firefox 88 where hardware rendering is supposedly being used and testufo.com runs at 144FPS
Here is the profiler for the same browser https://share.firefox.dev/3v6uuD1

Flags: needinfo?(robert.mader)

(In reply to Baa from comment #22)

Created attachment 9226176 [details]
aboutsupport-88.log

The about:support from Firefox 88 where hardware rendering is supposedly being used and testufo.com runs at 144FPS
Here is the profiler for the same browser https://share.firefox.dev/3v6uuD1

This about:support reports to run Basic. You can try enabling gfx.webrender.all in FF 88, then you should get the same result.

(In reply to Baa from comment #21)

(In reply to Robert Mader [:rmader] from comment #20)

So I checked glxgears and it did indeed run at 60FPS, until I disabled Sync to VBlank in the Nvidia driver settings as someone suggested. Now glxgears runs at the highest FPS it can.

Firefox 89 still shows 60FPS on https://testufo.com/ when hardware is enabled.
I'll attach the about:support from Firefox 88 where 144FPS is reported, maybe it can prove your theory?

I'm not sure if disabling VBlank will really make Gnome run at 144Hz - I found a few comments suggesting using xrandr, maybe that does the trick? https://askubuntu.com/questions/625827/nvidia-control-panel-reporting-60hz-on-144hz-monitor-how-to-make-ubuntu-output

Flags: needinfo?(robert.mader)

I haven't found a working combination but I think this is probably an Nvidia thing and not Firefox's fault. Just the implementation of hardware support makes it look like a regression.

Thanks for your help all, if I find out otherwise I'll update.

(In reply to Baa from comment #25)
Does this problem still occur?

If yes, can it be fixed by starting Firefox 92 (minimum 91: bug 1646135) with MOZ_X11_EGL=1 environment variable?
$ MOZ_X11_EGL=1 firefox

(In reply to Darkspirit from comment #26)

(In reply to Baa from comment #25)
Does this problem still occur?

If yes, can it be fixed by starting Firefox 92 (minimum 91: bug 1646135) with MOZ_X11_EGL=1 environment variable?
$ MOZ_X11_EGL=1 firefox

Hi,
Yes this is still happening, setting MOZ_X11_EGL=1 fixes it :)

Getting 144FPS on max speed UFOs :)

Depends on: linux-egl

94 enabled EGL, getting 144FPS with hardware acceleration enabled now :)

Great, let's close it then.

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: