You are not logged in.

#1 2016-11-08 12:01:48

ggoranov
Member
Registered: 2016-04-09
Posts: 13

Intel Skylake - Youtube - High CPU Usage

Hello Everyone!

I installed arch linux with Xorg and KDE on a lenovo t460 a few days ago and I have the following issue: Youtube videos (in both Google Chrome only) use more CPU than expected:

  • 720p@60 uses around 70%

  • 720p@30 uses around 50%

  • 144p@30 uses around 30% (which is wtf)

The codec used is video/webm; codecs="vp9". Hardware acceleration is activated.
I have compared the usage on a windows machine and there the 720p@60 in Google Chrome uses around 30% CPU.
Example youtube video: https://www.youtube.com/watch?v=E-ZdJ-iQ_KU

Here are the specs for the laptop:

  • No discrete GPU

I have read through the wiki and several forum topics, especially the Intel graphics and Hardware video acceleration and found nothing that helped.

I have installed xf86-video-intel and libva-intel-driver. Here is output from vainfo command:

libva info: VA-API version 0.39.3
libva info: va_getDriverName() returns 0
libva info: User requested driver 'i965'
libva info: Trying to open /usr/lib/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_39
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.39 (libva 1.7.2)
vainfo: Driver version: Intel i965 driver for Intel(R) Skylake - 1.7.2
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Simple            : VAEntrypointEncSlice
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointEncSliceLP
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointEncSliceLP
      VAProfileH264MultiviewHigh      : VAEntrypointVLD
      VAProfileH264MultiviewHigh      : VAEntrypointEncSlice
      VAProfileH264StereoHigh         : VAEntrypointVLD
      VAProfileH264StereoHigh         : VAEntrypointEncSlice
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointEncPicture
      VAProfileVP8Version0_3          : VAEntrypointVLD
      VAProfileVP8Version0_3          : VAEntrypointEncSlice
      VAProfileHEVCMain               : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointEncSlice

Please let me know what else could be helpful as information.

Last edited by ggoranov (2016-11-08 14:48:44)

Offline

#2 2016-11-08 12:45:42

SayCheeseOrDie
Member
From: Saint-Petersburg, Russia
Registered: 2016-11-07
Posts: 16

Re: Intel Skylake - Youtube - High CPU Usage

Greetings.

That's definitely strange. I was running i5-6400 and have never experienced any problems like this.

First, are you running x86 or x86_64 version of Arch?
Second, have you installed mesa-vdpau and lib32-mesa-vdpau (this one is only for x86_64)?
Third, is everything looks fine when you playing some non-browser videos (from your local storage using some player)?

And finally, while installing arch, have you also installed intel-ucode package and  enabled microcode updates?

Last edited by SayCheeseOrDie (2016-11-08 13:03:50)

Offline

#3 2016-11-08 13:08:27

seth
Member
Registered: 2012-09-03
Posts: 51,213

Re: Intel Skylake - Youtube - High CPU Usage

And make sure you're not using the flash player (uninstall flash) - it's not accelerated.

Offline

#4 2016-11-08 13:11:12

ggoranov
Member
Registered: 2016-04-09
Posts: 13

Re: Intel Skylake - Youtube - High CPU Usage

SayCheeseOrDie wrote:

Greetings.

That's definitely strange. I was running i5-6400 and have never experienced any problems like this.

First, are you running x86 or x86_64 version of Arch?
Second, have you installed mesa-vdpau and lib32-mesa-vdpau (this one is only for x86_64)?
Third, is everything looks fine when you playing some non-browser videos (from your local storage using some player)?

And finally, while installing arch, have you also installed intel-ucode package and  enabled microcode updates?

I am running x86_64 version of Arch and have not installed either of mesa-vdpau or intel-ucode.
As a reference for a local movie (fhd episode of Sherlock that it 6.6GB) Dragon Player eats uses 30% and VLC uses around 40%.

I will try installing the suggested packages and enable microcode updates and give feedback.

EDIT: Flash is definitely not used!

Last edited by ggoranov (2016-11-08 13:11:52)

Offline

#5 2016-11-08 13:55:18

ggoranov
Member
Registered: 2016-04-09
Posts: 13

Re: Intel Skylake - Youtube - High CPU Usage

I tried the suggestions but it does not seem to change.

I am pasting a screenshot with system monitor.

Offline

#6 2016-11-08 14:31:03

SayCheeseOrDie
Member
From: Saint-Petersburg, Russia
Registered: 2016-11-07
Posts: 16

Re: Intel Skylake - Youtube - High CPU Usage

Strange. Google Chrome uses only ~40% of CPU time (one is 30 and one is 9), and system is loaded at around 70%. Haven't you tried to run any 4k clip on YouTube and see how that's going?

Offline

#7 2016-11-08 14:36:55

ggoranov
Member
Registered: 2016-04-09
Posts: 13

Re: Intel Skylake - Youtube - High CPU Usage

With 4K the processor is on 90% and the video is lagging a lot (basically unwatchable). Note that the screenshot was made with only 1 window and 1 tab for google chrome in private mode (so no plugins).

Offline

#8 2016-11-08 14:38:07

seth
Member
Registered: 2012-09-03
Posts: 51,213

Re: Intel Skylake - Youtube - High CPU Usage

It's 45% (36+9)
+5 for xorg, 6 for kwin, +5 for another chrome and we're at 61% - add some minor stuff and your at 66% and then the OP simply exaggerated ;-)

Check "chrome://flags/" and look for accelerated video decoding. You suggested it's the same with firefox, though?

Offline

#9 2016-11-08 14:48:19

ggoranov
Member
Registered: 2016-04-09
Posts: 13

Re: Intel Skylake - Youtube - High CPU Usage

I lied about Firefox - it uses between 30% and 40% of CPU on 720p@60 (will edit the first post).

I checked chrome://flags and discovered that "Hardware-accelerated video decode" is not available on linux.
In addition there is "Accelerated 2D canvas" which is enabled.

I also tried disabling hardware acceleration in Chrome - no significant effect on cpu usage.

Last edited by ggoranov (2016-11-08 14:50:54)

Offline

#10 2016-11-08 15:16:46

seth
Member
Registered: 2012-09-03
Posts: 51,213

Re: Intel Skylake - Youtube - High CPU Usage

https://bugs.chromium.org/p/chromium/is … ?id=463440
https://aur.archlinux.org/packages/chromium-dev/ (but that means to build chromium from source - much fun)

Those allow you to play (and download) about almost all videos in non-crippled players:
https://www.archlinux.org/packages/comm … be-viewer/
https://www.archlinux.org/packages/comm … outube-dl/

Offline

#11 2016-11-08 16:31:40

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: Intel Skylake - Youtube - High CPU Usage

Video playback in Linux browsers is all software, both decoding and presentation, so higher CPU usage than in Windows is not surprising. There are a few options, each with their drawbacks:

For Firefox, install pepperflash and freshplayer. Freshplayer has hardware presentation and hardware decoding support. But of course it only handles flash, not HTML5 video, so you need to disable a bunch media options in about:config so that youtube will fall back to flash.

For Chromium, compile it with the vaapi patch and install the h264ify extension, the extension will make youtube serve h264 (which will be hardware decoded using vaapi) instead of vp9.

Offline

#12 2016-11-09 01:57:25

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: Intel Skylake - Youtube - High CPU Usage

Another thing: youtube is moving to vp9, which skylake does not have full support for.


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#13 2016-11-09 09:11:51

newbie1962
Member
From: italy
Registered: 2012-07-24
Posts: 137

Re: Intel Skylake - Youtube - High CPU Usage

use mpv

mpv --hwdec vaapi --msg-level=ytdl_hook=debug --ytdl-format "bestvideo[ext=mp4]+bestaudio[ext=m4a]" https://www.youtube.com/watch? Playing: https://www.youtube.com/watch?v=7TOoSX_YE0U

[oggi.png](https://postimg.org/image/xgqphb57v/)


hp-envy dv7

Offline

#14 2016-11-09 12:43:01

ggoranov
Member
Registered: 2016-04-09
Posts: 13

Re: Intel Skylake - Youtube - High CPU Usage

Alright, I played a bit with chrome://flags and maybe I made it work:
- Enabled "Override software rendering list"
- Enabled "GPU rasterization"

Now chrome://gpu says:

Graphics Feature Status
Canvas: Hardware accelerated
Flash: Hardware accelerated
Flash Stage3D: Hardware accelerated
Flash Stage3D Baseline profile: Hardware accelerated
Compositing: Hardware accelerated
Multiple Raster Threads: Enabled
Native GpuMemoryBuffers: Software only. Hardware acceleration disabled
Rasterization: Hardware accelerated
Video Decode: Hardware accelerated
Video Encode: Hardware accelerated
VPx Video Decode: Hardware accelerated
WebGL: Hardware accelerated

Also I have installed the following packages:
intel-gpu-tools
intel-tbb
intel-ucode
lib32-libva-intel-driver
lib32-mesa
lib32-vulkan-intel
libva-intel-driver
mesa
vulkan-intel
xf86-video-intel

I said maybe because the system monitor tool still says it is using 60%-70% of CPU but google chrome task manager says it is using the GPU as wlel.

Offline

#15 2016-11-09 15:08:15

seth
Member
Registered: 2012-09-03
Posts: 51,213

Re: Intel Skylake - Youtube - High CPU Usage

This refers to HW rendering, not video decoding and chrome://gpu says a lot of nonsense (eg. suggest HW encoding while my GPU does certainly not provide such HW caps) - thus the remaining CPU load.

As mentioned before, one has to patch chromium (might be cool if the stock arch package would do that) - whether the upstream disabled feature is for technical or political reasons, I don't know.

Offline

#16 2016-11-09 15:54:27

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: Intel Skylake - Youtube - High CPU Usage

@seth: It's technical reasons. it was simply too buggy too often. So they only activate vaapi support on Chromebooks, because there they control both hardware and software and can therefore better test that things are working as they should.

Offline

#17 2016-12-09 05:09:14

meijieru
Member
Registered: 2016-12-01
Posts: 5

Re: Intel Skylake - Youtube - High CPU Usage

Same issue with you, despite it indicates that gpu acceleration is adopted, the cpu occupation is still high. Finally, how do you solve it?

Offline

#18 2016-12-09 07:18:31

ggoranov
Member
Registered: 2016-04-09
Posts: 13

Re: Intel Skylake - Youtube - High CPU Usage

This answer helped me get noticeably better performance. At the moment 720p videos take up around 50% cpu which still seems a lot. Nevertheless it is better than before, the pc is usable while playing video in the background.

Offline

Board footer

Powered by FluxBB