Slow response when h/w acceleration disabled Topic is solved

Talk about code development, features, specific bugs, enhancements, patches, and similar things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
AndreyZ

Slow response when h/w acceleration disabled

Unread post by AndreyZ » 2020-10-23, 12:10

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

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35475
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Slow response when h/w acceleration disabled

Unread post by Moonchild » 2020-10-23, 13:10

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.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

AndreyZ

Re: Slow response when h/w acceleration disabled

Unread post by AndreyZ » 2020-10-23, 15:00

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 ?

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35475
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Slow response when h/w acceleration disabled

Unread post by Moonchild » 2020-10-23, 15:45

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.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

AndreyZ

Re: Slow response when h/w acceleration disabled

Unread post by AndreyZ » 2020-10-24, 10:35

What are the other options related to synchronicity? Can it be enabled without touching layers.dump or other debugging-related stuff?

vannilla
Moon Magic practitioner
Moon Magic practitioner
Posts: 2183
Joined: 2018-05-05, 13:29

Re: Slow response when h/w acceleration disabled

Unread post by vannilla » 2020-10-24, 11:23

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.

AndreyZ

Re: Slow response when h/w acceleration disabled

Unread post by AndreyZ » 2020-10-28, 16:32

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.)

Locked