Chome cpu usage with youtube

I’ve noticed my cpu usage is a lot higher on kde then windows. Is this a hardware acceleration issue. what can be done to reduce cpu usage.

this is my integrated graphics:

00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller (rev 06)

The first step should be to check which video formats your gpu supports hardware decoding. On Arch there is a package named libva-utils (find the equivalent package for your distro) that provides the command $ vainfo. Paste the output of vainfo here
Hardware_video_acceleration wiki page on archwiki is a good information source on this topic, sorry, I’m not allowed to post links yet

rror: XDG_RUNTIME_DIR is invalid or not set in the environment.
libva info: VA-API version 1.20.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_20
libva error: /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so init failed
libva info: va_openDriver() returns 1
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_20
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.20 (libva 2.12.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Haswell Desktop - 2.4.1
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Simple            : VAEntrypointEncSlice
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileH264MultiviewHigh      : VAEntrypointVLD
      VAProfileH264MultiviewHigh      : VAEntrypointEncSlice
      VAProfileH264StereoHigh         : VAEntrypointVLD
      VAProfileH264StereoHigh         : VAEntrypointEncSlice
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc
      VAProfileJPEGBaseline           : VAEntrypointVLD

Now see which codec YouTube is delivering to you. Right click a video playing, choose “Stats for nerds”, what does the “Codecs” line says? If it’s anything other than avc1 your system is having to use cpu for decoding (software decoding)

av01 is the codec. Would gome be better for this. I’m sure I didn’t have this issue on windows. Also youtube doesn’t autoplay for some reason. there my main issues.

If that’s the case, there is a chrome extension called “h264ify” that will tell YouTube to use avc1 for your videos, try installing it and check the cpu usage afterwards to see if it works

I can’t really think of how this looks like, I would prefer more details on this problem (a screenshot would be good) but that’s a separate issue so it would be best to create a new post for it

Thank you, it’s changed the codec in youtube but still spiking at 40% cpu

Check out section 2.5 of this: wiki(dot)archlinux(dot)org/title/Chromium#Hardware_video_acceleration
The most promising fix I can see is to create a .config/chromium-flags.conf file in your home directory with --enable-features=AcceleratedVideoDecodeLinuxGL as content in it

Otherwise there is another package called intel-gpu-tools on Arch that provides intel_gpu_top command to measure gpu usage. Try using the tool and see, maybe the gpu running but impact on cpu is still high. I’m not really familiar with Chrome so this is probably the last thing I can come up with, peace

Hi - the only other thing I’d point out here is, video decoding performance in a browser is likely to be heavily impacted by how your Linux distribution packages and ships video codecs, and how the web browser is built to use them.

KDE Neon uses Ubuntu as its base, so support resources for Ubuntu might be helpful in your situation, and if you’re using a different Linux distribution, their corresponding site or forums might help.