CPU stressed out when watching video's

Hello,
First of all am not quite sure if this the right forum to place this thread. If it is not, please somebody move it to the correct forum.

I have an 8 year old Samsung R730 laptop, with an Intel P6100 CPU (dual core, 2GHz). I run TW, fully updated with the KDE desktop.

Inxi gives me:
CPU: Topology: Dual Core model: Intel Pentium P6100 bits: 64 type: MCP arch: Nehalem rev: 5 L2 cache: 3072 KiB
flags: lm nx pae sse sse2 sse3 ssse3 bogomips: 7980
Speed: 948 MHz min/max: 933/1999 MHz Core speeds (MHz): 1: 942 2: 948
Graphics: Device-1: Intel Core Processor Integrated Graphics vendor: Samsung Co R730 Laptop driver: i915 v: kernel
bus ID: 00:02.0 chip ID: 8086:0046
Display: x11 server: X.org 1.20.6 driver: modesetting unloaded: fbdev,vesa alternate: intel compositor: kwin_x11
resolution: <xdpyinfo missing>
OpenGL: renderer: Mesa DRI Intel Ironlake Mobile v: 2.1 Mesa 19.2.6 direct render: Yes

With all other programs stopped and just Google-Chrome I watch TV. I can watch the programs which are part of the cable TV program I have an account for. When I do that, the CPU (told me by Conky on the other screen) is at or above 90%. When it reaches 100%, which is not seldom, the movie just stops for a while till the processor has calmed down.

What I would like to know is: can I let the GPU do more so the CPU relaxes and does no longer freeze the video? If so, how do I do that? Do I have to change settings, do I need to install extra packages?
Or is it really time to get newer hardware, which is a shame cause for the rest the laptop still runs good.

I have just installed the mesa-demo package and ran glxgears. This shows the gears are moving irregularly, sometimes it is normal, sometimes the gears are standing still. I recorded it and then the gears were only shaking but did not rotate. Meanwhile the CPU was used with a maximum of 58%. This tells me the CPU can handle it. Still the gears are not rotating as they should. What could be the reason for that?

Extra info:

systemctl status display-manager
● display-manager.service - X Display Manager
   Loaded: loaded (/usr/lib/systemd/system/display-manager.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2019-12-08 08:46:33 CET; 3h 58min ago
  Process: 1796 ExecStart=/usr/lib/X11/display-manager start (code=exited, status=0/SUCCESS)
 Main PID: 1882 (sddm)
    Tasks: 6 (limit: 4449)
   Memory: 145.1M
   CGroup: /system.slice/display-manager.service
           ├─1882 /usr/bin/sddm
           └─1884 /usr/bin/X -nolisten tcp -auth /run/sddm/{79615e72-b669-4f8c-96ed-09f617cafe02} -background none -noreset -displayfd 17 -seat seat0 vt7

Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
/sbin/lspci -nnk|egrep -iA3 "vga|graphics"
00:02.0 VGA compatible controller [0300]: Intel Corporation Core Processor Integrated Graphics Controller [8086:0046] (rev 02)
        Subsystem: Samsung Electronics Co Ltd R730 Laptop [144d:c06a]
        Kernel driver in use: i915
        Kernel modules: i915
systemctl get-default
graphical.target
[User: jan] @ [Server: linux-f842] - [Directory: ~]
$ /sbin/lspci -nnk|egrep -iA3 "vga|graphics"
00:02.0 VGA compatible controller [0300]: Intel Corporation Core Processor Integrated Graphics Controller [8086:0046] (rev 02)
        Subsystem: Samsung Electronics Co Ltd R730 Laptop [144d:c06a]
        Kernel driver in use: i915
        Kernel modules: i915
[User: jan] @ [Server: linux-f842] - [Directory: ~]
$ sudo systemctl cat graphical.target
[sudo] password for root: 
# /usr/lib/systemd/system/graphical.target
#  SPDX-License-Identifier: LGPL-2.1+
#
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.

[Unit]
Description=Graphical Interface
Documentation=man:systemd.special(7)
Requires=multi-user.target
Wants=display-manager.service
Conflicts=rescue.service rescue.target
After=multi-user.target rescue.service rescue.target display-manager.service
AllowIsolate=yes

Have you tried logging out of Plasma and into IceWM when you wish to watch TV?

Well I just did, had to install it first. For me there is only KDE, so I had no other DE (or WM) installed. It really helps a lot, CPU load went down 30-40%. Unbelievable. When I boot into KDE Conky says only 10% load. So how can I reduce 30-40% load by just streaming a video in Chrome?
So, yes, I can use that when I want to watch TV here. Thing is, I really don’t like it. As I wrote, for me there is only KDE. Now I have to choose between IceWM with lower CPU load (albeit with tearing pictures) and KDE with sometimes 100% load and freezing pictures. Choices, choices. What to do?

Thank you very much mrmazda, you really found a way to reduce the CPU load.

You could try installing intel-vaapi-driver with

zypper in intel-vaapi-driver

You may need to reboot afterwards. That should give you vaapi acceleration in VLC and other media players when watching video if your hardware supports it. You’d have to check but that will reduce CPU load on playback whatever desktop you’re using.

I had that installed already and still the CPU is fully stressed out. But it is only when I use Chrome to stream the TV channel. When watching a video using VLC or SMplayer it’s okay. The load is 70-80%. Still high, but nothing happens.
But anyway, thank you for the tip.

I’m not sure Chrome/Chromium vaapi support on linux is functional at present.
You’d probably find that reducing the quality of the video streamed in Chrome would reduce CPU load if that’s something you could live with.
Remember you may need to enable VAAPI in the codecs section of VLC if it isn’t automatically detected.
It might be that VAAPI isn’t supported by your intel video card in which case there might not be a way to get the acceleration you’re looking for with your current setup.

I would first try to find out if you’re definitely getting VAAPI support in VLC/SMPlayer before trying to see if Chrome will play ball.

You should see a big reduction in CPU usage in VLC with VAAPI playback enabled as opposed to playback with it not enabled if the codec of your video is supported.
So check that out first to see what benefits you might expect in Chrome or possibly Firefox which may have better VAAPI support on Tumbleweed.

Hi Franky,
I do know that there is a special version of Chromium/chrome which has vaapi enabled. I used that in my previous distro and it worked fine. I guess openSUSE doesn’t have that one in the repo’s.

I also know Intel does support it, see this page about Fedora:

https://major.io/2019/10/20/install-chromium-with-vaapi-on-fedora-30/

Also, as said, in the previous distro it worked and I could watch TV undisturbed.

I tried a setting in chrome: Override software rendering list, but that made a video look like a fast slide show, but not so fast that I could call it watching a video.

Well, I don’t always watch TV, and even now that I have a monitor with a TV station on it, CPU load is between 60-80%. No idea what happened to get this result.
I give it a rest for now. Hope the Chrome-vaapi version will become available for openSUSE AND that it will reduce the load even further.
Thank you.

Hi Jan you’re welcome. Sorry couldn’t be more helpful.
Yes newer Intel cards support it. I use it on my Intel machine in fact.
Wasn’t sure if yours did but luckily apparently so -

Also, as said, in the previous distro it worked and I could watch TV undisturbed.

Okay, so the problem is getting support for it in Chrome/Chromium on your TW install.
Unfortunately don’t have time to look into that right now but you could try Firefox as mentioned if you haven’t already.
Unless you need Widevincdm for your streaming service that might be a good alternative.

https://ultra-technology.org/linux_for_beginners/how-to-install-vaapi-vdpau-on-linux-debian-ubuntu/

Thank you Karl,
Maybe this works on the DEB distro’s, but in Yast software management I can not find those packages. What I do so, and this is installed already is Mesa-libva: This package contains the Mesa VA-API implementation provided through gallium.
On Manjaro, my previous distro, they had a special version of Chrome, one which had va-api inside and it worked great. I can not find it for openSUSE.
Strange thing is, VLC and Smplayer work fine here. I can play movies with full HD and maybe even higher without problems, it is just when watching TV through a browser which causes the problems.

In the mean time I am watching for a new laptop, one which is lighter, has a battery for hours of using the laptop instead of the one I have now, which is dead in 5 minutes. A nice CPU, some more RAM, m2 SSD, the works. But the prices!!! Madness. If you really want to have something great it is unaffordable, so you have to settle for less which in a few years might be too less already.

Jan the first thing you should do if you’re not sure you’re getting VAAPI acceleration is test it against CPU cycles with top in
a player like mpv or vlc as mentioned in one of my my previous posts.
Then you will at least be certain it’s operational on your TW system before you worry about implementation in Chrome which won’t work anyway unless VAAPI is available system wide.

What I also do to improve performance in Plasma is go into system settings -> compositor and set ‘scale method’ to ‘crisp’.
Also trying out different settings for tearing prevention/v-sync may have an advantageous effect.

Good luck.

You should get output something like this…

Using hardware decoding (vaapi).
AO: [pulse] 48000Hz stereo 2ch float
VO: [vaapi] 1280x720 vaapi[nv12]

…After running mpv in a terminal with a command something like…

mpv --hwdec=vaapi --vo=vaapi myvideo.mp4

You can try https://major.io/p/install-chromium-with-vaapi-on-fedora-30/

In the mean time I am watching for a new laptop, one which is lighter, has a battery for hours of using the laptop instead of the one I have now, which is dead in 5 minutes. A nice CPU, some more RAM, m2 SSD, the works. But the prices!!! Madness. If you really want to have something great it is unaffordable, so you have to settle for less which in a few years might be too less already.
I don’t think so. You should consider a budget notebook with state of the art hardware: https://forums.opensuse.org/showthread.php/533772-Running-Tumbleweed-on-HP-Laptop-15-da0xxx This model will work for many years. Notebooks designed for Windows 7 still work with Tumbleweed and SSD. You get very reasonable performance.

It seems to me this instruction is very outdated.

To OP:

  1. You can use VLC (mpv, etc.) to watch TV without Chromium.

  2. Try to install package “chromium-ffmpeg-extra”.

chromium-ffmpeg-extra - Extra ffmpeg codecs for browsers based on Chromium

This package contains proprietary codecs needed for the HTML5 (audio and video tags).

  1. https://www.reddit.com/r/archlinux/comments/9hdblp/chromium_hardware_acceleration/ Ubuntu Gets Snappier Video Playback With Chromium Snap For VA-API Acceleration - Phoronix

Hello Svyatko.

Thank you for your answer, but it didn’t work.
When I say I watch TV on my computer, I mean I watch the TV stations brought to us by our cable company. Although it is accessible through a website it is not a kind of Youtube like website where you can either watch flash or html5 video’s. They seem to use some kind of Microsoft stuff which with many programs is impossible to watch. Only Chrome (not Chromium) can do it, as far as I know. The extra codecs you mentioned didn’t work for this on Chromium.
I can’t use VLC since I can not address the live program into it, it’s a closed source system the cable company uses.
I give up. I will either watch TV on my old laptop or in the near future buy a new one which has more power.

Thanks again.

No idea what happened but it looks like the problem has solved itself.
I can now watch TV in Chrome with around 50% CPU usage.
I can also watch a video in Smplayer with around 50-60% CPU usage.

Maybe there was an update which solved it, I really can’t tell but I’m pretty happy with this.

Well, I will enjoy it for as long as possible.
To all of you happy holidays and all the best for the New Year.