Page 1 of 1

Video hardware acceleration support for intel CPU?

Posted: Tue, 14 Nov 2017, 10:41
by bernid
Hi,
Few days ago I installed newest Palemoon:

Code: Select all

Application Basics
------------------

Name: Pale Moon
Version: 27.6.0
Build ID: 20171109012208
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.9) Gecko/20100101 Goanna/3.4 Firefox/52.9 PaleMoon/27.6.0
OS: Linux 4.13.0-16-generic
Multiprocess Windows: 0/1 (default: false)
Safe Mode: false

Extensions
----------

Name: uBlock Origin
Version: 1.14.18
Enabled: true
ID: uBlock0@raymondhill.net

Name: uBlock Origin & uMatrix Updater
Version: 1.2.1
Enabled: true
ID: ublock0-updater@Off.JustOff

Graphics
--------

Adapter Description: Intel Open Source Technology Center -- Mesa DRI Intel(R) HD Graphics 500 (Broxton 2x6)
Device ID: Mesa DRI Intel(R) HD Graphics 500 (Broxton 2x6)
Driver Version: 3.0 Mesa 17.2.2
GPU Accelerated Windows: 0/1 Basic
Vendor ID: Intel Open Source Technology Center
WebGL Renderer: Intel Open Source Technology Center -- Mesa DRI Intel(R) HD Graphics 500 (Broxton 2x6)
windowLayerManagerRemote: false
AzureCanvasBackend: cairo
AzureContentBackend: cairo
AzureFallbackCanvasBackend: none
AzureSkiaAccelerated: 0

Important Modified Preferences
------------------------------

browser.cache.disk.capacity: 358400
browser.cache.disk.smart_size.first_run: false
browser.download.importedFromSqlite: true
browser.places.smartBookmarksVersion: 4
browser.search.useDBForOrder: true
browser.startup.homepage: https://www.google.pl
browser.startup.homepage_override.buildID: 20171109012208
browser.startup.homepage_override.mstone: 3.4.0
extensions.lastAppVersion: 27.6.0
image.http.accept: image/webp,image/jxr,image/png,image/*;q=0.8,*/*;q=0.5
network.cookie.prefsMigrated: true
network.http.speculative-parallel-limit: 0
places.database.lastMaintenance: 1510423116
places.history.expiration.transient_current_max_pages: 104858
privacy.sanitize.migrateFx3Prefs: true
storage.vacuum.last.index: 1
storage.vacuum.last.places.sqlite: 1510423116

Important Locked Preferences
----------------------------

Places Database
---------------

JavaScript
----------

Incremental GC: true

Accessibility
-------------

Activated: false
Prevent Accessibility: 1

Library Versions
----------------

NSPR
Expected minimum version: 4.16
Version in use: 4.16

NSS
Expected minimum version: 3.32.1
Version in use: 3.32.1

NSSSMIME
Expected minimum version: 3.32.1
Version in use: 3.32.1

NSSSSL
Expected minimum version: 3.32.1
Version in use: 3.32.1

NSSUTIL
Expected minimum version: 3.32.1
Version in use: 3.32.1

Experimental Features
---------------------

I observe high CPU usage during video playback about 30-40%
When I use Kodi for 1080p h264, HEVC content I have about 5-8%.
Can I turn on hardware video acceleration in PaleMonn or currently this is not supported?
If not when VAAPI support could be added?
My system:

Code: Select all

Computer
Processor   Intel(R) Celeron(R) CPU J3455 @ 1.50GHz 4 cores
Memory   7824MB (1786MB used)
Machine Type   Desktop
Operating System   Ubuntu 17.10

Display
Resolution   1920x1200 pixels
Vendor   The X.Org Foundation
Version   1.19.5
Monitors
Monitor 0   1920x1200 pixels
OpenGL
Vendor   Intel Open Source Technology Center
Renderer   Mesa DRI Intel(R) HD Graphics 500 (Broxton 2x6)
Version   3.0 Mesa 17.2.2
Direct Rendering   Yes

Audio Devices
Audio Adapter   HDA-Intel - HDA Intel PCH


EDIT:
Firefox CPU usage during video playback is similar ~30%

Re: Video hardware acceleration support for intel CPU?

Posted: Tue, 14 Nov 2017, 11:22
by Walter Dnes
What does the Graphics section look like when you go to about:support (Sort of like about:config). I've attached a screen-capture of mine, on a 2008 Intel Core2, running Gentoo. Is GPU Accelerated Windows enabled?

grph.png

Re: Video hardware acceleration support for intel CPU?

Posted: Tue, 14 Nov 2017, 11:52
by bernid
Walter Dnes wrote:What does the Graphics section look like when you go to about:support (Sort of like about:config). I've attached a screen-capture of mine, on a 2008 Intel Core2, running Gentoo. Is GPU Accelerated Windows enabled?

grph.png

My Graphics section is as follows:

Code: Select all

Graphics
--------

Adapter Description: Intel Open Source Technology Center -- Mesa DRI Intel(R) HD Graphics 500 (Broxton 2x6)
Device ID: Mesa DRI Intel(R) HD Graphics 500 (Broxton 2x6)
Driver Version: 3.0 Mesa 17.2.2
GPU Accelerated Windows: 0/1 Basic
Vendor ID: Intel Open Source Technology Center
WebGL Renderer: Intel Open Source Technology Center -- Mesa DRI Intel(R) HD Graphics 500 (Broxton 2x6)
windowLayerManagerRemote: false
AzureCanvasBackend: cairo
AzureContentBackend: cairo
AzureFallbackCanvasBackend: none
AzureSkiaAccelerated: 0


Unfortunately I have:

Code: Select all

windowLayerManagerRemote: false

How to switch it on?

Re: Video hardware acceleration support for intel CPU?

Posted: Tue, 14 Nov 2017, 13:42
by Walter Dnes
GPU Accelerated Windows: 0/1 Basic looks like the problem. I had to set it up manually on my system. Try the following expeiment. It assumes you use bash as your default shell

    * copy this post to a text file
    * open a terminal (xterm or whatever)
    * in the terminal execute killall palemoon (that's why you need a separate copy of this post)
    * in the terminal execute export MOZ_USE_OMTC=1
    * in the terminal execute palemoon
    * in Pale Moon go to about:support and check "Graphics" again
If you get "1/1" instead of "0/1" it worked. If not, don't bother with the following.

    * Test it on some videos that spike the cpu, to see if it helps.
    * The next step is to implement this permanently.
    * edit/insert the command export MOZ_USE_OMTC=1 into .bashrc and .bash_profile
    * shut down X and restart X
Pale Moon should start up with acceleration enabled when launched.

Re: Video hardware acceleration support for intel CPU?

Posted: Tue, 14 Nov 2017, 14:18
by bernid
Walter Dnes wrote:GPU Accelerated Windows: 0/1 Basic looks like the problem. I had to set it up manually on my system. Try the following expeiment. It assumes you use bash as your default shell

I use LXDE shell (lubuntu-core installed in ubuntu server 17.10)
After

Code: Select all

export MOZ_USE_OMTC=1
from terminal I still see:

Code: Select all

GPU Accelerated Windows: 0/1 Basic

but now I see 'palemoon' as a running process

Code: Select all

/usr/sbin/lightdm
   lightdm--session-child 13 16
      /usr/bin/lxsession -s LXDE -e LXDE
         lxpanel --profile LXDE
            palemoon

Before was 'x-www-browser' or something like this

Re: Video hardware acceleration support for intel CPU?

Posted: Tue, 14 Nov 2017, 14:45
by Walter Dnes
bernid wrote:I use LXDE shell (lubuntu-core installed in ubuntu server 17.10)
After

Code: Select all

export MOZ_USE_OMTC=1
from terminal I still see:

Code: Select all

GPU Accelerated Windows: 0/1 Basic


Sorry, it looks like that doesn't work. I can't think of anything else. I have the same problem on my old ASUS Atom netbook.

bernid wrote:but now I see 'palemoon' as a running process

Code: Select all

/usr/sbin/lightdm
   lightdm--session-child 13 16
      /usr/bin/lxsession -s LXDE -e LXDE
         lxpanel --profile LXDE
            palemoon

Before was 'x-www-browser' or something like this

That's not important. It's a function of being launched manually from the commandline, versus via the launchbar.

Re: Video hardware acceleration support for intel CPU?

Posted: Wed, 15 Nov 2017, 11:56
by bernid
Thank you.
It's working now :)
I set additionally (in about:config):

Code: Select all

webgl.force-enabled = true.
layers.acceleration.force-enabled = true
layers.offmainthreadcomposition.enabled  = true

Now I see:

Code: Select all

Adapter Description: Intel Open Source Technology Center -- Mesa DRI Intel(R) HD Graphics 500 (Broxton 2x6)
Device ID: Mesa DRI Intel(R) HD Graphics 500 (Broxton 2x6)
Driver Version: 3.0 Mesa 17.2.2
GPU Accelerated Windows: 1/1 OpenGL (OMTC)
Vendor ID: Intel Open Source Technology Center
WebGL Renderer: Intel Open Source Technology Center -- Mesa DRI Intel(R) HD Graphics 500 (Broxton 2x6)
windowLayerManagerRemote: true
AzureCanvasBackend: cairo
AzureContentBackend: cairo
AzureFallbackCanvasBackend: none
AzureSkiaAccelerated: 0

However the improvement is not spectacular. ;)
From 30-40% CPU usage to about 20%.
When I use Kodi for HD H.264 or HVEC content I have ~6%

Re: Video hardware acceleration support for intel CPU?

Posted: Wed, 15 Nov 2017, 16:43
by adesh
I do not comment about the numbers you are seeing, but one thing to keep in mind is that a dedicated video player will always use less CPU than a web browser for the same video content. This is due to the complexity in the browser, and player being optimized for video.