Page 1 of 1

Slow response when h/w acceleration disabled

Posted: 2020-10-23, 12:10
by AndreyZ
Hello everyone,

Pale Moon takes long take time to respond (for example, scrolling and clicking menu buttons are delayed) when hardware acceleration is disabled in X11 in any of the following cases:
  1. There are animated elements on the displayed page; for example, on https://broker.vtb.ru , where some images gradually change their size when hovered over by the mouse. This issue seems to be solved by setting layers.offmainthreadcomposition.async-animations to false.
  2. Big enough (like 576p) HTML5 video is being played on the screen. This can be alleviated by setting layers.dump to true at the expense of making the video choppy.
No such delays in Firefox, Seamonkey, Chromium.

32-bit Linux (Slackware), Celeron 550 @ 2.00GHz, 2GB DDR2 533 MHz, integrated graphics card.

Hardware acceleration is disabled in X11 for stability reasons by placing the following stanza in /etc/X11/xorg.conf :

Code: Select all

Section "Device"
  Identifier "Intel Graphics"
  Driver "modesetting"
  Option "AccelMethod" "none"
EndSection
Alternatively, one may use fbdev driver instead of modesetting:

Code: Select all

Section "Device"
  Identifier "Intel Graphics"
  Driver "fbdev"
EndSection

Re: Slow response when h/w acceleration disabled

Posted: 2020-10-23, 13:10
by Moonchild
I'm sorry but hardware acceleration is simply required for the situations you list where you're having performance issues, especially on bottom-barrel CPU/GPU combinations like a celeron+intel. It is entirely expected that the browser responds sluggishly if the processor is swamped.

Re: Slow response when h/w acceleration disabled

Posted: 2020-10-23, 15:00
by AndreyZ
But why does changing those settings help? I understand layers.dump is a debugging/profiling feature, it should make everything slow, so why does it improve responsiveness? And what have I lost by changing layers.offmainthreadcomposition.async-animations ?

Re: Slow response when h/w acceleration disabled

Posted: 2020-10-23, 15:45
by Moonchild
There is no simple answer to the "why". layers composition and rendering is a very complex piece of code and how exactly it interacts with your particular X setup and video drivers is unknown without a lot of research.
"best guess" answers:
Both options will make the rendering behave in a more synchronous way (dumping of layers data requires synchronicity) which likely makes your X not get swamped with concurrent paint events, avoiding some of the congestion at the expense of smoothness.

Re: Slow response when h/w acceleration disabled

Posted: 2020-10-24, 10:35
by AndreyZ
What are the other options related to synchronicity? Can it be enabled without touching layers.dump or other debugging-related stuff?

Re: Slow response when h/w acceleration disabled

Posted: 2020-10-24, 11:23
by vannilla
Try the command line option "--sync", but nothing is guaranteed.
If it doesn't work then you can only have synchronous X communications through side effects.

Re: Slow response when h/w acceleration disabled

Posted: 2020-10-28, 16:32
by AndreyZ
Thanks, vanilla, Moonchild! The '--sync' option does the trick, and no layers.dump'ing is necessary anymore; however, async-animations is still required for bigger animations (that one practically hangs PM even if HWA is disabled only in the browser, not in X).

So, the workaround for my problem goes like this:
  1. For animations: type about:config in URL bar, find the option layers.offmainthreadcomposition.async-animations, set it to false.
  2. For videos: always start Pale Moon with the '--sync' option, for example, using a script such as this:

    Code: Select all

    #!/bin/sh
    exec /usr/local/opt/palemoon/palemoon --sync "$@"
    
    (Change the path to PM as necessary.)