Firefox does not use hardware video acceleration when you watch videos on Youtube out of the box.
You can use Chromium, where hardware video acceleration is very easy to activate:
just open the chrome flags page:
just type chrome in the adressbar and it should give you the suggestion chrome://urls or something like that. Klick that and then go to the chrome-flags page. search for Hardware-accelerated video decode and activate it. Restart the browser and you are done.
If you desperately want to use Firefox, follow these steps, that you can also see in the arch wiki:
-
install the correct va-api drivers. these are the i915 drivers. you most likely have them allready installed. Just search in pamac for intel and select installed to see if it is already installed. if you see libva.intel-driver then you have the right one already installed.
-
Open Firefox. Type about:config into the adressbar. Then search for gfx.webrender.all and change it to true.
-
Search for media.ffmpeg.vaapi.enabled in about:config and change it to true
-
Search for media.ffvpx.enabled in about:config and change it to false
-
According to Intel Core i3-4030U cpu Benchmark, Specs, Performance, comparison and Reviews - Cpu Specs Benchmarks reviews cpu upgrade your hardware does not support av1 decoding so it is better to set it to false so youtube and other sites will play the videos with a codec your hardware supports. To do this search for media.av1.enabled in about:config and change it to false
-
then close all open Firefox Windows.
-
now you need to run Firefox with the following environment variable (MOZ_X11_EGL=1). There are different ways to do that. Just like you, I also use KDE Manjaro so I will show you my method.
Just right click the KDE Menu Starter that is most likely on the bottom left of your PC. Choose edit menu entries. Go to Internet and then click Firefox and change the command to this: MOZ_X11_EGL=1 /usr/lib/firefox/firefox %u
Should look like this:
!!!Dont forget to click save!!!
Now restart (maybe no need) and open a Video on Youtube with 1080p60fps and check again. Should work now. If not follow the next step.
- This step can be optional, but was necessary for me:
First install libva-utils with pamac. then open the terminal/konsole and type this command
vainfo --display drm --device /dev/dri/renderD128
and press enter. If you see an error message do this:
open this file: /etc/mkinitcpio.conf and type i915 between the MODULES=“” so it looks like this: MODULES=“i915”. then try to save, enter password and close.
Open Terminal and type
sudo mkinitcpio -P
Then restart your PC. It should work now.