Does asynch MSE disable video acceleration?

Users and developers helping users with generic and technical Pale Moon issues on all operating systems.

Moderator: trava90

Forum rules
This board is for technical/general usage questions and troubleshooting for the Pale Moon browser only.
Technical issues and questions not related to the Pale Moon browser should be posted in other boards!
Please keep off-topic and general discussion out of this board, thank you!
Pfade

Does asynch MSE disable video acceleration?

Unread post by Pfade » 2017-07-13, 00:33

I keep waiting for a version that can play videos fine. Until 27.3 I had to rely on an external video player (or Firefox) on Twitch because the video kept freeze/unfreeze constantly, and on youtube I had to play at 480p max because anything higher would give problems. There was a time I think around March when Palemoon played Twitch perfectly and with low CPU usage at max quality. Then they updated the player and everything went into the crapper.

So I try the new 27.4 that supposedly fixed the issue, and it did. In the sense that the video now loads fine but I also see a very high CPU usage, even when the video isn't even playing (on Twitch). The same for youtube videos, now they finally play even at 720p and above (instead of freezing or desynching), but the CPU usage is really high (on an older computer, it's just a core 2 duo).

I can play a video at 1080p 60 fps on Firefox with CPU around 20%, the exact same video loaded in Palemoon, but run at 720p 60 fps makes my CPU go almost constantly to at least 90%.

So I tried various settings and I noticed that if I *disable* the asynch option everything is fixed. The CPU usage is around 10% even with the video playing at 1080p 60fps.

The problem is that with asynch disabled Youtube works, but Twitch doesn't. The video would begin freeze/unfreeze as always. With asynch on it plays fine, instead, but beside an excessive CPU usage there's also probably a memory leak because memory usage kept growing very quickly.

In any case, the default settings didn't really work for me. Twitch is still a mess, but youtube now seems working properly for the first time, as long asynch stays disabled.

adisib
Lunatic
Lunatic
Posts: 380
Joined: 2015-06-13, 03:34
Location: KY

Re: Does asynch MSE disable video acceleration?

Unread post by adisib » 2017-07-13, 00:50

I have also noticed increase CPU usage and a memory leak at one point while playing video on YouTube since the update.

wyMnNHXB

Re: Does asynch MSE disable video acceleration?

Unread post by wyMnNHXB » 2017-07-13, 16:17

Twitch.tv works perfectly fine for me after the update, and CPU usage decreased compared to Flash. Did you test a browser with a clean profile?

adisib
Lunatic
Lunatic
Posts: 380
Joined: 2015-06-13, 03:34
Location: KY

Re: Does asynch MSE disable video acceleration?

Unread post by adisib » 2017-07-13, 22:24

In case numbers are more interesting, I will add that for this computer, CPU usage for a 1080p60 video on youtube using Pale Moon is about 80% (it was about 90% but Pale Moon was using about 10% without the video running and yes, this laptop has a poor CPU). I used a dedicated video player (using hardware acceleration which Pale Moon should also be using) for the same video at the same resolution and framerate downscaling the same amount (and didn't bother disabling color/brightness modifications nor the supposedly resource-intensive debanding filter) and was running it at under 15% CPU usage on that other player with higher downscaling quality.

I don't expect Pale Moon to get anywhere close to as efficient as the dedicated player with this, but at almost 6 times the CPU usage, there certainly needs to be some improvements with video resource usage.

People take battery life seriously, and this will make it difficult to watch videos on laptops and such with that much drain.

User avatar
trava90
Contributing developer
Contributing developer
Posts: 1742
Joined: 2013-05-20, 18:19
Location: Somewhere in Sector 001

Re: Does asynch MSE disable video acceleration?

Unread post by trava90 » 2017-07-13, 23:54

Watching a 1080p60fps video on YouTube in a new profile with 27.2.1, 27.3, 27.4, and a somewhat recent trunk build I am seeing the exact same CPU usage % and very close memory consumption across all versions (with 27.4 and trunk builds using slightly less RAM).

I've seen CPU age mentioned a couple times. Exactly how old of CPU's are we talking about here?

adisib
Lunatic
Lunatic
Posts: 380
Joined: 2015-06-13, 03:34
Location: KY

Re: Does asynch MSE disable video acceleration?

Unread post by adisib » 2017-07-14, 01:32

The CPU for the information I mentioned is a 6 year old CPU at 2.4GHz turbo. I am on Windows, not Linux. Even more information if you want:

Image

Here is typical 1080p60 CPU usage in Pale Moon 27.4 (Firefox gives me about 50-60%, which is still ridiculous even for this PC, but not as ridiculous as Pale Moon):

Image

This is with:
media.mediasource.enabled;true
media.mediasource.format-reader;true
media.mediasource.format-reader.mp4;true
media.mediasource.mp4.enabled;true
media.mediasource.webm.enabled;false
Which are the default values.

wyMnNHXB

Re: Does asynch MSE disable video acceleration?

Unread post by wyMnNHXB » 2017-07-14, 09:48

Hm-m-m... It seems like GPU video decoding is really broken. On Twitch, watching something 1080p60fps consumes a lot of CPU power on PM 27.4 with default settings, and GPU loading is low, while the same video on FF 56 loads GPU (25-30%) and the CPU load is low. :coffee:

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

Re: Does asynch MSE disable video acceleration?

Unread post by Moonchild » 2017-07-16, 01:33

To answer the initial topic question (title): No, async MSE does not disable HWA.

Including default information with your support request may help. Please insert the output of help -> troubleshooting information, specifically the "graphics" section. I'm not sure how well APUs are supported at the moment.
With HWA disabled and using CPU decoding, 1080p60 will load your CPU and will likely drop frames; it's inevitable regardless of which CPU you have at those data rates.
At any rate, we need more info.
"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

adisib
Lunatic
Lunatic
Posts: 380
Joined: 2015-06-13, 03:34
Location: KY

Re: Does asynch MSE disable video acceleration?

Unread post by adisib » 2017-07-16, 02:09

Moonchild wrote:I'm not sure how well APUs are supported at the moment.
If you are referring to my post, that laptop also has a discrete graphics card, so the APU is just acting as a CPU in this case (as I believe I have crossfire disabled at the moment).

Pfade

Re: Does asynch MSE disable video acceleration?

Unread post by Pfade » 2017-07-17, 20:54

Moonchild wrote:To answer the initial topic question (title): No, async MSE does not disable HWA.

Including default information with your support request may help. Please insert the output of help -> troubleshooting information, specifically the "graphics" section. I'm not sure how well APUs are supported at the moment.
With HWA disabled and using CPU decoding, 1080p60 will load your CPU and will likely drop frames; it's inevitable regardless of which CPU you have at those data rates.
At any rate, we need more info.
Now I've also noticed that youtube works fine with asynch off, but it doesn't work with live streams. The live streams play fine for a while, then they stop loading until you refresh the page. It happened enough times that I'm pretty sure it's not just the stream.

(and the "LIVE" symbol that is supposed to turn grey when you aren't up to date simply stays red, it's similar to the issue on twitch)

Graphics
Adapter Description NVIDIA GeForce GTX 750 Ti
Adapter Drivers nvd3dumx,nvwgf2umx,nvwgf2umx nvd3dum,nvwgf2um,nvwgf2um
Adapter RAM 2048
ClearType Parameters Gamma: 2200 Pixel Structure: R ClearType Level: 100 Enhanced Contrast: 50
Device ID 0x1380
Direct2D Enabled true
DirectWrite Enabled true (6.2.9200.17461)
Driver Date 12-11-2016
Driver Version 21.21.13.7633
GPU #2 Active false
GPU Accelerated Windows 3/3 Direct3D 11 (OMTC)
Subsys ID 37533842
Vendor ID 0x10de
WebGL Renderer Google Inc. -- ANGLE (NVIDIA GeForce GTX 750 Ti Direct3D11 vs_5_0 ps_5_0)
windowLayerManagerRemote true
AzureCanvasBackend direct2d 1.1
AzureContentBackend direct2d 1.1
AzureFallbackCanvasBackend cairo
AzureSkiaAccelerated 0

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

Re: Does asynch MSE disable video acceleration?

Unread post by Moonchild » 2017-07-17, 22:27

There doesn't seem to be anything wrong with your hardware acceleration, so whatever the issue is, it's somewhere else.

Also, it's known that disabling asynchronous MSE will not play nice with YouTube live streams; it's one (of many) reasons why we're updating this code (asynchronous is the updated, more spec compliant code). With it off, you can expect many issues with streaming, and it's been made an option mostly for people in need of WebM (see also releasenotes). For MP4/h.264 it's really not recommended to disable asynchronous.
"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

Pfade

Re: Does asynch MSE disable video acceleration?

Unread post by Pfade » 2017-07-17, 22:43

Moonchild wrote:There doesn't seem to be anything wrong with your hardware acceleration, so whatever the issue is, it's somewhere else.

Also, it's known that disabling asynchronous MSE will not play nice with YouTube live streams; it's one (of many) reasons why we're updating this code (asynchronous is the updated, more spec compliant code). With it off, you can expect many issues with streaming, and it's been made an option mostly for people in need of WebM (see also releasenotes). For MP4/h.264 it's really not recommended to disable asynchronous.
Yes, as I said it just takes me to enable asynch and refresh the page to see the CPU spiking up. It must be CPU code that isn't working. This PC has a Core 2 Duo 3Ghz on Windows 7. CPU spikes proportionally to the video quality, it seems. So it's not just an on/off trigger.

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

Re: Does asynch MSE disable video acceleration?

Unread post by Moonchild » 2017-07-18, 00:23

It seems you are correct; which makes me wonder if this is a YouTube specific issue in their scripting, because for data volume reasons, it makes no sense.
Specifically, I notice that 1080p resolution becomes extremely expensive at 28-32%, but 720p (both at 50fps, so high frame rate) barely dents my CPU at 6%. Still, at high CPU, no frames are dropped, so it seems to be wasted somewhere (possibly an idle loop in their player?).
You do not have the required permissions to view the files attached to this post.
"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

User avatar
trava90
Contributing developer
Contributing developer
Posts: 1742
Joined: 2013-05-20, 18:19
Location: Somewhere in Sector 001

Re: Does asynch MSE disable video acceleration?

Unread post by trava90 » 2017-07-19, 09:58

OK, I've tested playing a 1080p60fps YouTube video on 3 separate systems now:

A Linux system with a NVIDIA GTX 1050 Ti graphics card
A Linux laptop with a first generation i5 with terrible integrated Intel graphics
A borrowed Windows 7 machine with integrated Intel graphics

On both Linux machines the CPU usage is consistent across 27.3, 27.4 and the latest unstable build. CPU usage never spikes or runs very high (it does run a bit higher on the laptop but that's to be expected considering the hardware).

I was able to reproduce and saw very similar %'s as Moonchild reported on the borrowed Windows machine with 27.4.0, but couldn't reproduce with the latest unstable build (2017-07-17). Could someone please try the unstable and see if they can still repro?

wyMnNHXB

Re: Does asynch MSE disable video acceleration?

Unread post by wyMnNHXB » 2017-07-19, 19:10

I compared CPU and GPU usage of PM 27.4 and 27.5a1 on Twitch.tv using same video, both clean profiles. It seems that the latest patches did their job - CPU load is less and GPU is more on unstable version.

User avatar
trava90
Contributing developer
Contributing developer
Posts: 1742
Joined: 2013-05-20, 18:19
Location: Somewhere in Sector 001

Re: Does asynch MSE disable video acceleration?

Unread post by trava90 » 2017-07-20, 14:50

Thank you for testing and reporting your results wyMnNHXB.

Based on your report and my results from testing I'm going to assume this is fixed in trunk and will be included in a future release.

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

Re: Does asynch MSE disable video acceleration?

Unread post by Moonchild » 2017-07-20, 16:28

I can confirm that the current unstable, with a test video at 1080p60, completely offloads video to the GPU on my system (3-6% CPU) and current release does not (35-40% CPU) on Win7 x64, 32-bit Pale Moon, dedicated GPU (AMD 380X).

Video tested with: https://www.youtube.com/watch?v=eminWvN1O88
"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

wyMnNHXB

Re: Does asynch MSE disable video acceleration?

Unread post by wyMnNHXB » 2017-07-22, 20:51

Perhaps the update 27.4.1 could be released, as the solution is already found?

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

Re: Does asynch MSE disable video acceleration?

Unread post by Moonchild » 2017-07-24, 09:07

wyMnNHXB wrote:Perhaps the update 27.4.1 could be released, as the solution is already found?
Perhaps you could be more patient, too. For everyone, whatever their personal workflow requires is going to have "top priority". But we can't make point releases for each of those reasons. High CPU usage for full HD HFR video may be inconvenient, but it's certainly not a reason for a point release.
"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

adisib
Lunatic
Lunatic
Posts: 380
Joined: 2015-06-13, 03:34
Location: KY

Re: Does asynch MSE disable video acceleration?

Unread post by adisib » 2017-08-03, 18:44

Thanks for the work on 27.4.1, I can confirm that CPU usage is about 70% less after updating.