recently I am facing this issue where any youtube video will lag if running at 1080p60 and the cpu usage is at 85% for all cores according to htop. and all this causes the video to buffer the video gets loaded but still buffers.
I have tried this in brave and firefox.
situations are worse in brave .
EDIT: Read the whole disscussion for step by step solution or you can just go to the solution if You are advanced user.
Youtube need some resources, you do nothing with it, but cpu usage highly depend on your CPU and GPU. If you have old hardware itâs obvious that usage will be high. Show inxi -Fazy output.
Browsers donât support out of the box hardware accelerated video decoding in linux. So, high cpu use is normal with a dual core. If you want somewhat a solution you can download chromium from Pamac. Then in search tab enter chrome://flags >> search Hardware-accelerated-video and enable it. I am also running on integrated graphics and it works most of the time.
Okay so this is a hardware problem , well i noticed some jitterness from the beginning but why only on linux .
Everything is fine on windows side never had such problems
I know Google stopped Chrome GPU acceleration development.
Didnât know Mozilla Firefox doesnât support GPU acceleration too.
Why?
Can it be enabled on Firefox?
[quote="[HowTo] Enable Hardware Video Acceleration / Video Decode In Google Chrome, Brave, Vivaldi And Opera Browsers, post:1, topic:51895"] For Brave and Vivaldi:
Since these browsers are not configured to use a user config file like Chrome, youâll need to enable the flags in chrome://flags:
Use GPU to rasterize web content: chrome://flags/#enable-gpu-rasterization
Raster threads write directly to GPU memory associated with tiles: chrome://flags/#enable-zero-copy
[/quote]
Please help me I am a newbie,
I have done chrome flags settings ,I am using brave. I am unable to understand where to go what to do from the arch wiki can You help me to install VA-API driver
i dont know how chromium fares, but gChrome has defunct (no more listed) the âhardware-accelerated-videoâ flag in chrome://flags since ver. 88. now if you need hardware acceleration it need to be explicitly passed as a switch in commandline invoked as in tomekâs post, for it to come into affect. check âmediaâ under âdeveloper toolsâ.
brave --use-gl=desktop --enable-features=VaapiVideoDecoder
this is the output
[Thundra ď§ ~]$ brave --use-gl=desktop --enable-features=VaapiVideoDecoder
(brave:31036): Gtk-WARNING **: 18:27:43.237: Theme parsing error: gtk.css:73:46: The style property GtkScrolledWindow:scrollbars-within-bevel is deprecated and shouldn't be used anymore. It will be removed in a future version
Gtk-Message: 18:27:43.313: Failed to load module "appmenu-gtk-module"
Opening in existing browser session.
this does open a new window
in Developer tools â media the video decoder name is Vpxdecoder but the cpu usage is still high. and video lags
chrome://gpu shows Video Decode: Software only. Hardware acceleration disabled
thank You man It did work when I launched new browser with this command , But how do I make it permanent as soon as I closed that instance of brave chrome://gpu again shows Video Decode: Software only. Hardware acceleration disabled
Also these were the errors I got when ran the command
[Thundra ď§ ~]$ brave --use-gl=desktop --enable-features=VaapiVideoDecoder
(brave:40965): Gtk-WARNING **: 07:26:41.837: Theme parsing error: gtk.css:73:46: The style property GtkScrolledWindow:scrollbars-within-bevel is deprecated and shouldn't be used anymore. It will be removed in a future version
Gtk-Message: 07:26:41.915: Failed to load module "appmenu-gtk-module"
[40999:40999:0824/072642.275903:ERROR:gpu_init.cc(441)] Passthrough is not supported, GL is desktop
[40999:40999:0824/072642.348228:ERROR:sandbox_linux.cc(374)] InitializeSandbox() called with multiple threads in process gpu-process.
[40965:40965:0824/072713.616446:ERROR:CONSOLE(1)] "[Shields]: Can't request shields panel data. Error: No tab url specified", source: chrome-extension://mnojpmjdmbbfmejpflffifhffcmidifd/out/brave_extension_background.bundle.js (1)
[40965:40965:0824/072713.629622:ERROR:CONSOLE(1)] "[Shields]: Can't request shields panel data. Error: No tab url specified", source: chrome-extension://mnojpmjdmbbfmejpflffifhffcmidifd/out/brave_extension_background.bundle.js (1)
[40965:40965:0824/072836.733172:ERROR:CONSOLE(1)] "[Shields]: Can't request shields panel data. Error: No tab url specified", source: chrome-extension://mnojpmjdmbbfmejpflffifhffcmidifd/out/brave_extension_background.bundle.js (1)
[40965:40965:0824/072836.734349:ERROR:CONSOLE(1)] "[Shields]: Can't request shields panel data. Error: No tab url specified", source: chrome-extension://mnojpmjdmbbfmejpflffifhffcmidifd/out/brave_extension_background.bundle.js (1)
[40965:40965:0824/073002.605856:ERROR:CONSOLE(1)] "[Shields]: Can't request shields panel data. Error: No tab url specified", source: chrome-extension://mnojpmjdmbbfmejpflffifhffcmidifd/out/brave_extension_background.bundle.js (1)
[40965:40965:0824/073002.606946:ERROR:CONSOLE(1)] "[Shields]: Can't request shields panel data. Error: No tab url specified", source: chrome-extension://mnojpmjdmbbfmejpflffifhffcmidifd/out/brave_extension_background.bundle.js (1)
no worries, disregard the errors. none of those are even close to critical.
run command;
ls ~/.local/share/applications/*brave*.desktop
if this returns a file, skip to (3) note: treat it as name and path of file from hereon
if the above command returns no files, run commands;
cp /usr/share/applications/*brave*.desktop ~/.local/share/applications/
and
chown $USER:$USER ~/.local/share/applications/*brave*.desktop
and
ls ~/.local/share/applications/*brave*.desktop
the last command gets you the name and path of the file desktop (shortcut) file. so open it in a file editor.
kate <path-and-name-of-file>
find lines starting with âExec=â, and append " --enable-features=VaapiVideoDecoder" at the end on all occurrences. also add " --use-gl=desktop" if it is not already there, and save the file
should be working with the menu shortcut now, if not logout-login, worse restart.