Video hardware acceleration support for intel CPU?

Support and discussions for the x86/x64 Linux version of Pale Moon.

Moderators: trava90, satrow

bernid
Hobby Astronomer
Hobby Astronomer
Posts: 16
Joined: 2014-05-17, 06:20
Location: PL

Video hardware acceleration support for intel CPU?

Unread post by bernid » 2017-11-14, 10:41

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%

Walter Dnes
Astronaut
Astronaut
Posts: 601
Joined: 2015-07-30, 20:29
Location: Vaughan, ON, Canada

Re: Video hardware acceleration support for intel CPU?

Unread post by Walter Dnes » 2017-11-14, 11:22

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
There's a right way
There's a wrong way
And then there's my way

bernid
Hobby Astronomer
Hobby Astronomer
Posts: 16
Joined: 2014-05-17, 06:20
Location: PL

Re: Video hardware acceleration support for intel CPU?

Unread post by bernid » 2017-11-14, 11:52

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?

Walter Dnes
Astronaut
Astronaut
Posts: 601
Joined: 2015-07-30, 20:29
Location: Vaughan, ON, Canada

Re: Video hardware acceleration support for intel CPU?

Unread post by Walter Dnes » 2017-11-14, 13:42

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.
There's a right way
There's a wrong way
And then there's my way

bernid
Hobby Astronomer
Hobby Astronomer
Posts: 16
Joined: 2014-05-17, 06:20
Location: PL

Re: Video hardware acceleration support for intel CPU?

Unread post by bernid » 2017-11-14, 14:18

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

Walter Dnes
Astronaut
Astronaut
Posts: 601
Joined: 2015-07-30, 20:29
Location: Vaughan, ON, Canada

Re: Video hardware acceleration support for intel CPU?

Unread post by Walter Dnes » 2017-11-14, 14:45

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.
There's a right way
There's a wrong way
And then there's my way

bernid
Hobby Astronomer
Hobby Astronomer
Posts: 16
Joined: 2014-05-17, 06:20
Location: PL

Re: Video hardware acceleration support for intel CPU?

Unread post by bernid » 2017-11-15, 11:56

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%

User avatar
adesh
Astronaut
Astronaut
Posts: 602
Joined: 2017-06-06, 07:38

Re: Video hardware acceleration support for intel CPU?

Unread post by adesh » 2017-11-15, 16:43

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.

Locked