Page MenuHomeSolus

Firefox: graphical glitches while scrolling
Open, LowPublic

Description

Hello everyone,
This issue is quite long, so there are both a short version and a longer one.

Short version:
Setting these configurations fix a graphical glitch which often happens on Firefox while scrolling :

  • gfx.xrender.enabled to true;
  • layers.acceleration.force-enabled to true.

This bug happens (at least) on computers running Solus with an Intel CPU with Intel Integrated Graphics.

Longer version:
I installed Solus on my laptop and on my sister's one about one year ago (they are both Lenovo Thinkpad, Intel processor and using Intel Integrated Graphics). Shortly after the installation, I noticed there was some glitches on firefox while scrolling even when the package xorg-driver-video-intel was installed.
I kept using Firefox because I didn't want to install Chrome, and unsuccessfully tried to get rid of this scrolling bug.
Last week, a couple of tweets (I and II) suggested to set to true the values of gfx.xrender and layer.acceleration.force-enabled. Turns out this solved my initial problem!

I think these two configurations should be set to true by default since they make Firefox run better out of the box.

Have a nice day,

EDIT 2018 11 14: turns out gfx.xrender has nothing to do with graphical scrolling, so it is not necessary to enable it.

josephscade renamed this task from Firefox: scrolling graphical glitches to Firefox: graphical glitches while scrolling.Oct 30 2018, 5:27 PM
livingsilver94 added a subscriber: livingsilver94.EditedOct 30 2018, 6:26 PM

I'm linking this as a reference: https://www.reddit.com/r/SolusProject/comments/7v7sig/firefox_hardware_acceleration_by_default
Back then, a user reported this fixed a tearing issue on his Intel GPU as well, yet I didn't receive an official feedback from a member of the Core Team. We're all ears! :D

JoshStrobl edited projects, added Software; removed Lacks Project.EditedOct 30 2018, 6:37 PM
JoshStrobl added a subscriber: JoshStrobl.

We intentionally disabled layers.acceleration.force-enabled in R755:15175e2de2a1256173faa8ca6b166dc54af9db2b because it'd cause Firefox to crash under nouveau, so that is something I'm opposed to re-enabling unless someone can provide testing to prove it is no longer an issue. I'm not opposed to gfx.xrender.enabled being set to true though, but thorough testing needs to be done.

JoshStrobl triaged this task as Low priority.Oct 30 2018, 6:37 PM
JoshStrobl moved this task from Backlog to Improvement on the Software board.
Jacalz added a subscriber: Jacalz.Oct 30 2018, 7:10 PM

Hello,
I have no computer with Nvidia graphic card in it, so I can't test for layers.acceleration.force-enabled with Nouveau.

I'm linking this as a reference: https://www.reddit.com/r/SolusProject/comments/7v7sig/firefox_hardware_acceleration_by_default

As said in this post, turns out layer.acceleration.force-enabled is the only setting which needs to be modified. So there is no need to change the value of gfx.xrender.enabled.

Jacalz added a comment.EditedNov 2 2018, 3:44 PM

I had the same issue on my Intel laptop, so I decided to set both settings to true and se what happened. layer.acceleration.force-enabled did definitely make the scrolling experience a whole lot better, but I have yet to do any testing using Nouveau on my Nvidia GPU. Regarding gfx.xrender.enabled I can say that it definitely made Firefox feel snappier and more responsive on that laptop. If no issues are seen with it I suggest turning it on by default.

We intentionally disabled layers.acceleration.force-enabled in R755:15175e2de2a1256173faa8ca6b166dc54af9db2b because it'd cause Firefox to crash under nouveau, so that is something I'm opposed to re-enabling unless someone can provide testing to prove it is no longer an issue. I'm not opposed to gfx.xrender.enabled being set to true though, but thorough testing needs to be done.

On recent kernels, it seems this setting doesn't cause problem with nouveau anymore. I got positive feedback from 4 people. Perhaps this could be reevaluated (and checked against LTS kernel since all tests were done with the CURRENT kernel)

Hello,
@Girtablulu said in T7189 that it is ok to enable layers.acceleration.force-enabled and gfx.xrender.enabled using Nvidia hardware on LTS kernel.

Here is his comment:

Just tested this with a LTS kernel on my stable notebook, and I don't see any difference between current and LTS with gfx.render and acceleration set to true

(@Girtablulu in T7189)

bwat47 added a subscriber: bwat47.EditedNov 12 2018, 7:21 PM

Afaik, there were two places xrender could be used in firefox:

For the compositor, and for the Cairo backend.

Since current versions of firefox use Skia for both the Azure Canvas and Content backends on linux, I'm fairly certain gfx.xrender.enabled doesn't do anything anymore (if opengl compositing is also force-enabled).

You'd probably have better results setting

gfx.content.azure.accelerated true
gfx.canvas.azure.accelerated true

to enable opengl acceleration for the skia backend

josephscade added a comment.EditedNov 14 2018, 10:00 PM

@bwat47,
You're right: as pointed before, gfx.xrender.enabled has nothing to do with scrolling glitches.
I was quoting this answer because @Girtablulu said Firefox runs well with layers.acceleration.force-enabled on Nvidia hardware and Linux LTS, not because of the xrender part.

josephscade updated the task description. (Show Details)Nov 14 2018, 10:05 PM
Girtablulu reopened this task as Open.

Ups wrong way merge :)

josephscade added a comment.EditedNov 18 2018, 1:00 PM

So we now know that enabling layers.acceleration.force-enabled is no longer an issue on Nvidia hardware using both linux-current and linux-lts.
So can we enable it by default?

It seems it has already been changed with recent update to firefox 63.0.3 (see this Differential Revision).

josephscade closed this task as Resolved.Nov 18 2018, 1:07 PM
josephscade claimed this task.

Resolved by D4374.

kyrios123 reopened this task as Open.Nov 20 2018, 6:48 PM

Unresolved by D4404

josephscade closed this task as Invalid.Dec 25 2018, 5:18 PM

Closing this since it seems to be an upstream issue.

josephscade reopened this task as Open.EditedJan 3 2019, 12:00 PM

Maybe hardware acceleration can be automatically activated on installation if there is no NVIDIA hardware? (maybe using usysconf)

moriel5 added a subscriber: moriel5.EditedJan 3 2019, 1:05 PM

@josephscade that won't help, Firefox would first have to be compiled with the appropriate flags for hardware acceleration to start working, and even then, it may claim that it is enabled when it is not (as I see for most of the related featureset on my end, running vanilla Firefox Nightly), and many users have been claiming instability with it enable (I did too, however it seems to have resolved itself since last week, with no change to what is actually enabled), regardless of the hardware.
I personally use Intel and AMD (just preGCN for now, though), I still need my NVidia card (GT8200, I put my GT9400 in my grandmother's PC, since the iGPU there was not powerful enough for things like 720p on YouTube).

Intel:
HD 520 iGPU (i5-6200U)
Legacy HD Graphics (i3-540)
AMD:
Unbranded HD6770 with 1GB GDDR5 (which appears as an HD7570 with 4GB of GDDR5, I intend to modify it's firmware to allow it to run properly).

One thing I can safely say, graphical glitches have disappeared for me sometime in the past month, even without these changes, so it is should only be a matter of time before these glitches should be gone for most people.