High CPU usage on playing video files

Everything about X, Gnome, KDE, ... and everything running on it

High CPU usage on playing video files

Postby manmath » 2020-10-18 17:10

Dear members, my system is using high cpu (~50% on playing 360p videos on firefox, and around ~20% on VLC). Consequently, the laptop becomes hot and the fan noisy. Am I missing any packages or need to make some changes in the configuration? Here are the packages related to graphics that's currently installed on my Debian Buster.

i965-va-driver
libdrm-intel1
libva-drm2
libva-wayland2
libva-x11-2
libva2
mesa-va-drivers
phonon4qt5-backend-vlc
vlc
xserver-xorg-video-intel
manmath
 
Posts: 127
Joined: 2009-11-26 07:16

Re: High CPU usage on playing video files

Postby Head_on_a_Stick » 2020-10-18 17:16

Hardware video acceleration in FF is currently only available for VA-API (so either Intel or AMD) under Wayland. See also https://wiki.archlinux.org/index.php/Fi ... celeration

EDIT: check your VA-API support with
Code: Select all
vainfo

https://packages.debian.org/buster/vainfo
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 12770
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: High CPU usage on playing video files

Postby manmath » 2020-10-18 17:29

Here's the output of vainfo:

libva info: VA-API version 1.4.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_4
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.4 (libva 2.4.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Ironlake Mobile - 2.3.0
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264Main : VAEntrypointVLD
VAProfileH264High : VAEntrypointVLD
VAProfileNone : VAEntrypointVideoProc
manmath
 
Posts: 127
Joined: 2009-11-26 07:16

Re: High CPU usage on playing video files

Postby Head_on_a_Stick » 2020-10-18 17:34

So are you using Wayland?
Code: Select all
echo $XDG_SESSION_TYPE

And have you tried following the instructions in my ArchWiki link?
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 12770
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: High CPU usage on playing video files

Postby manmath » 2020-10-18 17:36

No, I'm on Xorg.

echo $XDG_SESSION_TYPE throws:
x11

I did try the Arch linux link. But nothing to my avail.
manmath
 
Posts: 127
Joined: 2009-11-26 07:16

Re: High CPU usage on playing video files

Postby Head_on_a_Stick » 2020-10-18 18:31

You won't be able to use hardware acceleration for Firefox unless you switch to Wayland. For VLC make sure that VA-API is selected: https://wiki.archlinux.org/index.php/VL ... celeration
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 12770
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: High CPU usage on playing video files

Postby manmath » 2020-10-18 18:36

Thanks for the reply. Following the Arch link solved video acceleration issues on VLC. But Firefox is still a no go.
How do I switch to wayland? And is it stable enough? I can't see a wayland session on the login screen. BTW, here's the list of wayland packages, am I missing any package?

Code: Select all
kwayland-data                                 4:5.54.0-1                          Qt library wrapper for Wayland libraries - data files
libkf5waylandclient5                          4:5.54.0-1                          Qt library wrapper for Wayland libraries
libkf5waylandserver5                          4:5.54.0-1                          Qt library wrapper for Wayland libraries
libva-wayland2                                2.4.0-1                             Video Acceleration (VA) API for Linux -- Wayland runtime
libwayland-client0                            1.16.0-1                            wayland compositor infrastructure - client library
libwayland-cursor0                            1.16.0-1                            wayland compositor infrastructure - cursor library
libwayland-egl1                               1.16.0-1                            wayland compositor infrastructure - EGL library
libwayland-server0                            1.16.0-1                            wayland compositor infrastructure - server library
manmath
 
Posts: 127
Joined: 2009-11-26 07:16

Re: High CPU usage on playing video files

Postby Head_on_a_Stick » 2020-10-18 18:42

manmath wrote:How do I switch to wayland? And is it stable enough? I can't see a wayland session on the login screen.

Debian buster's GNOME desktop defaults to Wayland, select the plain "GNOME" session (ie, not "GNOME Classic" or "GNOME on Xorg"). I find Wayland to have pluterperfect imperturbability. YMMV :mrgreen:
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 12770
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: High CPU usage on playing video files

Postby manmath » 2020-10-18 18:50

I've installed KDE Plasma on Buster. I don't have Gnome installed on this system. Is there any way to run wayland on plasma? I did install a few packages as suggested in Debian wiki. But still no go. I couldn't get past the login screen after installing these suggested packages:

Code: Select all
kwayland-data                                 4:5.54.0-1                          Qt library wrapper for Wayland libraries - data files
kwayland-integration                          5.14.5-1                            kwayland runtime integration plugins
kwin-wayland                                  4:5.14.5-1                          KDE window manager, wayland version, PREVIEW release
kwin-wayland-backend-drm                      4:5.14.5-1                          KDE window manager drm plugin
libkf5waylandclient5                          4:5.54.0-1                          Qt library wrapper for Wayland libraries
libkf5waylandserver5                          4:5.54.0-1                          Qt library wrapper for Wayland libraries
libqt5waylandclient5                          5.11.3-2                            QtWayland client library
libqt5waylandcompositor5                      5.11.3-2                            QtWayland compositor library
libva-wayland2                                2.4.0-1                             Video Acceleration (VA) API for Linux -- Wayland runtime
libwayland-client0                            1.16.0-1                            wayland compositor infrastructure - client library
libwayland-cursor0                            1.16.0-1                            wayland compositor infrastructure - cursor library
libwayland-egl1                               1.16.0-1                            wayland compositor infrastructure - EGL library
libwayland-server0                            1.16.0-1                            wayland compositor infrastructure - server library
plasma-workspace-wayland                      4:5.14.5.1-1                        Plasma Workspace for KF5 - Wayland integration
qtwayland5                                    5.11.3-2                            QtWayland platform plugin
xwayland                                      2:1.20.4-1+deb10u1                  Xwayland X server
manmath
 
Posts: 127
Joined: 2009-11-26 07:16

Re: High CPU usage on playing video files

Postby Head_on_a_Stick » 2020-10-18 19:06

manmath wrote:Is there any way to run wayland on plasma?

I don't use Plasma myself (too many knobs for my liking) but I think that plasma-workspace-wayland package should provide a Wayland desktop for it.

EDIT: check https://community.kde.org/Plasma/Wayland_Showstoppers & https://phabricator.kde.org/project/board/99/ — it might not work on your hardware.
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 12770
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: High CPU usage on playing video files

Postby manmath » 2020-10-18 20:12

Went through the link you mentioned. Still nothing to my avail. As a last resort installed Chrome. Youtube video playback is fine, not much cpu usage, quiet fan, but have to move tons of Firefox user credentials to Chrome. Sad to know that firefox doesn't support vaapi. Thank you all.
manmath
 
Posts: 127
Joined: 2009-11-26 07:16

Re: High CPU usage on playing video files

Postby Deb-fan » 2020-10-18 21:33

Internet says Firefox does support vaapi on x11, as of version 80. The cpu overhead you're mentioning is fairly normal really, for a low-spec processor certainly. Firefox can be tuned to great extent, as can Chrome/ium too. Spent years bytching that Mozilla was being too conservative in how the browser came out-of-box, then ironically have now spent years bytching that they're too aggressive in terms of configuration ...

8 content processes, e10's out of box, plenty of other stuff. My personal rule of thumb is one CP per actual core on the system. Browsers are horrid things stock now, installed and briefly played with Chrome, it was so bad I was about to take an oath never to use the thing again, then went looking and yeppers it can no doubt be tuned to great extent as well.
Most powerful FREE tech-support tool on the planet * HERE. *
Deb-fan
 
Posts: 968
Joined: 2012-08-14 12:27

Re: High CPU usage on playing video files

Postby manmath » 2020-10-18 22:43

I was using Firefox ESR. Anyways, I'll try it one more time. Let's hope it works.
manmath
 
Posts: 127
Joined: 2009-11-26 07:16

Re: High CPU usage on playing video files

Postby Deb-fan » 2020-10-18 23:04

http://www.google.com/url?q=https://9to ... wjv-u6LlL_ Looks like it's fairly recent and the author there seems to indicate there's a tad to enabling it too, oh well ... Still people clearly wanted it, Mozilla did it.

Though again, something like Firefox can be radically tuned, it's virtually the gnu/Linux of web-browsers. Noted appears the same applies to Chrome/ium browsers too, I mean they can obviously be tuned and tweaked to fit a users tastes but all of these things yep, require people to learn. The hey, this doesn't do what i want, I'll just jump ship and use this instead(which no doubt will have plenty of downsides and things you won't like itself.)

If that's what folks want to do ... cool. Might want to take a second, do some googling and learn to use what you've got before doing that above. Each their own though. :D
Most powerful FREE tech-support tool on the planet * HERE. *
Deb-fan
 
Posts: 968
Joined: 2012-08-14 12:27

Re: High CPU usage on playing video files

Postby Deb-fan » 2020-10-19 02:35

Had an afterthought on this, unless that's a really weak processor, then 50% to watch streaming media could be questionable, you-someone may have a rogue extension or be using a borked up mozilla profile and could want to investigate that angle too. Same time depending on processors specs, that could actually be normal and would still advise people to learn to tweak FF or whichever web browsers they use.

At some point that became the norm, for major browser developers to use every and all available system resources, prefetch this, cache that, there's some free cpu or RAM left on the pc, grab it !!! Also noted that such aggressive out-of-box can have the reverse effect, make the dam browser slower and choppier,rather than faster/smoother, this weirdness can be tuned though. Haven't learned as much about Chrome/ium but some web search made it quickly clear that yes, they can be tweaked + tuned by users too.
Most powerful FREE tech-support tool on the planet * HERE. *
Deb-fan
 
Posts: 968
Joined: 2012-08-14 12:27

Next

Return to Desktop & Multimedia

Who is online

Users browsing this forum: No registered users and 13 guests

fashionable