Can't play 60fps video on youtube

Please read that topic i linked to and you will know…

1 Like
  1. What hardware and drivers you are using?

    • give us the output of inxi -Fazy
  2. What is your TLP configuration?

    • give us the output of sudo tlp-stat -p
  3. Are you experiencing the issue when running on Battery or AC? Or both?

  4. what is your CPU frequency, CPU usage (when trying to play a 1080p 60hz video)?

    • You can use a program called s-tui to monitor your CPU frequency and CPU usage. Install it using pamac install s-tui, afterwards run s-tui and watch the usage)
  5. what is your RAM usage (while watching a 1080p 60hz video)?

    • htop is good for monitoring RAM usage. Install it using pamac install htop, afterwards run htop and watch the usage.
  6. what is your GPU frequency and GPU usage (while watching a 1080p 60hz video)?

    • package intel-gpu-tools contains tools for monitoring intel iGPU.
      Install it using pamac install intel-gpu-tools.
    • intel_gpu_top monitors GPU usage.
      Run it using sudo intel_gpu_top and watch the GPU usage.
    • intel_gpu_frequency shows you the GPU frequency.
      Run it using watch sudo intel_gpu_frequency and watch the GPU frequency.
  7. Is your firefox using webrender?

    1. "Load about:support in the Firefox address bar.
    2. Scroll down to the features section and check the value of the field “Compositing”.
      If you see WebRender, you know that it is enabled in the browser."
      See: ghacks(2020/12/14): How to find out if webrender is enabled in firefox and how to enable it if it is not

Mod edit: Layout and link

1 Like

output of tlp-stat -p

+++ Processor
CPU model      = Intel(R) Core(TM) i3-4030U CPU @ 1.90GHz

    /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver    = intel_cpufreq
    /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor  = schedutil
    /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors = performance schedutil 
    /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq  =   800000 [kHz]
    /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq  =  1900000 [kHz]

    /sys/devices/system/cpu/cpu1/cpufreq/scaling_driver    = intel_cpufreq
    /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor  = schedutil
    /sys/devices/system/cpu/cpu1/cpufreq/scaling_available_governors = performance schedutil 
    /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq  =   800000 [kHz]
    /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq  =  1900000 [kHz]

    /sys/devices/system/cpu/cpu2/cpufreq/scaling_driver    = intel_cpufreq
    /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor  = schedutil
    /sys/devices/system/cpu/cpu2/cpufreq/scaling_available_governors = performance schedutil 
    /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq  =   800000 [kHz]
    /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq  =  1900000 [kHz]

    /sys/devices/system/cpu/cpu3/cpufreq/scaling_driver    = intel_cpufreq
    /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor  = schedutil
    /sys/devices/system/cpu/cpu3/cpufreq/scaling_available_governors = performance schedutil 
    /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq  =   800000 [kHz]
    /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq  =  1900000 [kHz]

    /sys/devices/system/cpu/intel_pstate/min_perf_pct      =  42 [%]
    /sys/devices/system/cpu/intel_pstate/max_perf_pct      = 100 [%]
    /sys/devices/system/cpu/intel_pstate/no_turbo          =   0
    /sys/devices/system/cpu/intel_pstate/turbo_pct         =   9 [%]
    /sys/devices/system/cpu/intel_pstate/num_pstates       =  12

    /sys/devices/system/cpu/cpu0/power/energy_perf_bias    =  4 (balance_performance) [EPB]
    /sys/devices/system/cpu/cpu1/power/energy_perf_bias    =  4 (balance_performance) [EPB]
    /sys/devices/system/cpu/cpu2/power/energy_perf_bias    =  4 (balance_performance) [EPB]
    /sys/devices/system/cpu/cpu3/power/energy_perf_bias    =  4 (balance_performance) [EPB]

    /sys/module/workqueue/parameters/power_efficient       = Y
    /proc/sys/kernel/nmi_watchdog                          = 0

output of inxi -Fazy

System:
          Kernel: 5.9.11-3-MANJARO x86_64 bits: 64 compiler: gcc v: 10.2.0 
          parameters: BOOT_IMAGE=/boot/vmlinuz-5.9-x86_64 
          root=UUID=678c6b06-1d82-4b2d-b49b-380c965414d5 rw quiet apparmor=1 
          security=apparmor udev.log_priority=3 
          Desktop: KDE Plasma 5.20.4 tk: Qt 5.15.2 info: latte-dock wm: kwin_x11 
          dm: SDDM Distro: Manjaro Linux 
        Machine:
          Type: Portable System: Dell product: Inspiron 3542 v: N/A serial: <filter> 
          Chassis: type: 8 serial: <filter> 
          Mobo: Dell model: 0V25HW v: A04 serial: <filter> UEFI: Dell v: A04 
          date: 08/05/2014 
        Battery:
          ID-1: BAT0 charge: 1.9 Wh condition: 9.2/41.4 Wh (22%) volts: 15.3/14.8 
          model: LGC-LGC2.8 DELL T1G4M49 type: Li-ion serial: <filter> status: Unknown 
        CPU:
          Info: Dual Core model: Intel Core i3-4030U bits: 64 type: MT MCP 
          arch: Haswell family: 6 model-id: 45 (69) stepping: 1 microcode: 26 
          L2 cache: 3072 KiB 
          flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx 
          bogomips: 15168 
          Speed: 798 MHz min/max: 800/1900 MHz Core speeds (MHz): 1: 798 2: 798 3: 798 
          4: 798 
          Vulnerabilities: Type: itlb_multihit status: KVM: VMX disabled 
          Type: l1tf 
          mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable 
          Type: mds mitigation: Clear CPU buffers; SMT vulnerable 
          Type: meltdown mitigation: PTI 
          Type: spec_store_bypass 
          mitigation: Speculative Store Bypass disabled via prctl and seccomp 
          Type: spectre_v1 
          mitigation: usercopy/swapgs barriers and __user pointer sanitization 
          Type: spectre_v2 mitigation: Full generic retpoline, IBPB: conditional, 
          IBRS_FW, STIBP: conditional, RSB filling 
          Type: srbds mitigation: Microcode 
          Type: tsx_async_abort status: Not affected 
        Graphics:
          Device-1: Intel Haswell-ULT Integrated Graphics vendor: Dell driver: i915 
          v: kernel bus ID: 00:02.0 chip ID: 8086:0a16 
          Device-2: Sunplus Innovation Dell HD Webcam type: USB driver: uvcvideo 
          bus ID: 1-1.5:3 chip ID: 1bcf:2880 
          Display: x11 server: X.Org 1.20.10 compositor: kwin_x11 driver: intel 
          unloaded: modesetting alternate: fbdev,vesa display ID: :0 screens: 1 
          Screen-1: 0 s-res: 1366x768 s-dpi: 96 s-size: 361x203mm (14.2x8.0") 
          s-diag: 414mm (16.3") 
          Monitor-1: eDP1 res: 1366x768 hz: 60 dpi: 102 size: 340x190mm (13.4x7.5") 
          diag: 389mm (15.3") 
          OpenGL: renderer: Mesa DRI Intel HD Graphics 4400 (HSW GT2) 
          v: 4.5 Mesa 20.2.3 compat-v: 3.0 direct render: Yes 
        Audio:
          Device-1: Intel Haswell-ULT HD Audio vendor: Dell driver: snd_hda_intel 
          v: kernel bus ID: 00:03.0 chip ID: 8086:0a0c 
          Device-2: Intel 8 Series HD Audio vendor: Dell driver: snd_hda_intel 
          v: kernel bus ID: 00:1b.0 chip ID: 8086:9c20 
          Sound Server: ALSA v: k5.9.11-3-MANJARO 
        Network:
          Device-1: Qualcomm Atheros QCA9565 / AR9565 Wireless Network Adapter 
          vendor: Dell driver: ath9k v: kernel port: f040 bus ID: 06:00.0 
          chip ID: 168c:0036 
          IF: wlp6s0 state: up mac: <filter> 
          Device-2: Realtek RTL810xE PCI Express Fast Ethernet vendor: Dell 
          driver: r8169 v: kernel port: e000 bus ID: 07:00.0 chip ID: 10ec:8136 
          IF: enp7s0 state: down mac: <filter> 
          Device-3: Qualcomm Atheros AR9462 Bluetooth type: USB driver: btusb 
          bus ID: 1-1.6:6 chip ID: 0cf3:0036 
        Drives:
          Local Storage: total: 931.51 GiB used: 81.32 GiB (8.7%) 
          SMART Message: Unable to run smartctl. Root privileges required. 
          ID-1: /dev/sda vendor: Western Digital model: WD10JPVX-75JC3T0 
          size: 931.51 GiB block size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s 
          rotation: 5400 rpm serial: <filter> rev: 1A01 scheme: GPT 
        Partition:
          ID-1: / raw size: 243.71 GiB size: 238.89 GiB (98.02%) 
          used: 54.15 GiB (22.7%) fs: ext4 dev: /dev/sda2 
        Swap:
          Kernel: swappiness: 60 (default) cache pressure: 100 (default) 
          ID-1: swap-1 type: partition size: 3.73 GiB used: 611.5 MiB (16.0%) 
          priority: -2 dev: /dev/sda3 
        Sensors:
          System Temperatures: cpu: 52.0 C mobo: 52.0 C 
          Fan Speeds (RPM): cpu: 0

when i run 1080p60fps videos the cpu usage is 93% and firefox ram usage is about 1.2gb firefox uses about 60% of the cpu (there is a sub process of firefox named web it uses 50% and firefox process uses 10% so totally 60%)


Mod edit: Formatting

Cool. Can also you still give me the rest of the information?

More specifically, my previous questions:

  • 3 (Are you experiencing the issue when running on Battery or AC? Or both?)
  • 4 (What is your CPU frequency while watching the video?)
  • 6 (What is your GPU frequency and GPU usage while watching the video?)
  • 7 (Is your firefox using webrender ?)

i am experiencing the issue on both

my cpu frequency is 798 Mhz
Note:My CPU is intel core i3 4030u 1.90Ghz dual core

gpu freq is 200/1000 MHz GPU Usage is 93.41% 93% RC6

yes i have enabled webrender after seeing your last post

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:

  1. 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.

  2. Open Firefox. Type about:config into the adressbar. Then search for gfx.webrender.all and change it to true.

  3. Search for media.ffmpeg.vaapi.enabled in about:config and change it to true

  4. Search for media.ffvpx.enabled in about:config and change it to false

  5. 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

  6. then close all open Firefox Windows.

  7. 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.

2 Likes

Nothing comes up searching for that because it’s called Hardware-accelerated video decode :wink:

There’s a little more to it than that. See:

Thanks for the information.

I can see that your CPU is running at a very low frequency(798Mhz) while being fully loaded. This is not OK, and if the reported frequency is correct, it explains why you cannot watch the video. I can also see that your system is running the intel_cpufreq scaling driver instead of intel_pstate. There have seen several reports mentioning this as an issue, resulting in decreased CPU frequency.


Set CPU scaling driver to intel_p-state
[SOLVED] No intel_pstate driver since kernel 5.8.

Therefore I would start by checking whether enabling the intel_pstate driver improves the issue.

Force the kernel to use intel_pstate driver by using a kernel command intel_pstate=active:

  • open grub config file by tiping sudo nano /etc/default/grub
  • insert intel_pstate=active in GRUB_CMDLINE_LINUX_DEFAULT, so for example it might look like this:
    GRUB_CMDLINE_LINUX_DEFAULT="quiet apparmor=1 intel_pstate=active security=apparmor udev.log_priority=3"
  • save using CTRL+S and exit using CTRL+X
  • update grub by running sudo update-grub
  • reboot
  • verify that the scaling driver is active by running tlp-stat -p. You should see that
    /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver = intel_pstate

Afterwards, check your CPU frequency, and CPU usage and please report back. Test it with both webrender enabled and disabled (and remember to restart firefox when switching).

Another option - if this does not improve the situation - is to change the scaling governor to performance, but I would personally wait and see whether this brings an improvement.

Regarding the use of webrender in Firefox - in my case, it actually results in more lost frames because it increases GPU load, (however overall it results in a smoother browsing experience). Just keep this in mind and preferably test the system with both configurations.

1 Like

Does the OP have a dGPU or is using the iGPU the Intel i3 has? But if he can play a 1080p@60fps with Windows but not Linux, then that is very likely due to the lower Clockspeed of the CPU.

Fixing the CPU to use clockspeed it is supposed to be using when playing 60fps web videos will Solve this Issue he is having.

thx. changed it to Hardware-accelerated video decode in my post.

1 Like

He has this laptop - with not dGPU.

I have personally not experienced a different level of Firefox Youtube playback performance in Windows and Linux in the last few months with the default configuration on several devices with Intel mobile CPUs. Therefore it is also my assumption (confirmed by the information which he provided) that something is wrong with the CPU settings.

I will be able to test this on a very similar laptop (same CPU family and gen, just i5) in 24h if it does not get solved by then.

I thought that I posted a Reply to this already…

May I went back to the previous page. I wasn’t sure if he’s using a Laptop or Desktop. Most MiniPCs using a Laptop CPU, but not all. Same with High End laptops.

Once I reread all the OP posts and saw the really low clockspeed I figured that was the main reason.

I forgot what it what is called. But Manjaro was defaulted to some sort of Power Scaling set to a lower clock with CPU Boost deactivated.

I don’t recall how I fix this by edited a Config file in /etc or by update…

i have somehow managed to enable intel_pstate but the cpu frequency is still locked in 798 MHz
i’ve disabled webrender and now 720p60fps is good and 1080p60fps is still laggy

Cool, good job!

I got access to a laptop with i5-3317U, which has very similar CPU and iGPU performance (unfortunately one generation older though). I booted on it Manjaro KDE live image with the same kernel and I can confirm that by default, the system boots with the intel_cpufreq scaling driver and I was able to force it to use the intel_pstate driver by using the above-mentioned command.

Unfortunately, I cannot reproduce the same issue with CPU being stuck on this laptop. No matter the scaling driver, everything seems to be working fine. The laptop easily plays 1080p 60hz youtube videos (with both webrender enabled and disabled, no extra configuration was needed).

At this point, I do not see anything “wrong” with the CPU configuration itself. You can try to set the governor to performance mode, but I do not expect this to help.

  1. Open tlp config file sudo nano /etc/tlp.conf
  2. On the line 76 you should have a parameter #CPU_SCALING_GOVERNOR_ON_AC="xxxxx". Uncomment it and set it to performance. CPU_SCALING_GOVERNOR_ON_AC="performance". Save and exit.
  3. Restart TLP using sudo nano systemctl restart tlp

You could also try to boot a Manjaro live image. That way you could ensure that no changes to the system or updates caused the issue.

Could you check whether you are not experiencing the same issues right now also in Windows? I found several users stating similar issues with Dell laptops with this generation of Intel chips. Just so that we can be sure that it is indeed an issue with Linux and not with the laptop itself.

  1. Inspiron 3542 does stuck at 0,76GHz not detecting AC adaptor (likely a hardware fault) first report and second report.
  2. CPU was stuck at 0,8GHz, because Intel Speet test was disabled in BIOS.

i tried this fixed 720p60 it is now watchable but 1080p60 needs improvement
i also tried other browser including chromium but in every browser youtube lagged

i tried manjaro on live usb booted with proprieatory driver 720p60 looks good but 1080p still lags but not much tested with open source drivers 720p60 and 1080p60 lagged

my laptop’s original power adapter is broken so now i am using an alternate power adapter (it is not original it is my dad’s laptop power adapter) even when i was using the original adapter 1080p60 lagged because it was frayed for a long time since the last few months when i plugged in my adapter it will show charging but there will be no timestamp as when it will completely charge at certain positions the laptop will charge so i am not sure it is a hardware or software issue

intel speed test is enabled in bios but still the maximum clock speed is 798Mhz i think using the laptop with non-original charger is hindering with clock speeds i downloaded youtube videos and 1080p60 videos are running smooth no problem at all i think the problem is with browser or drivers

the problem beside your low clock speed is that no browser on linux uses hardware video acceleration out of the box. this basically means your cpu usage is way higher than it can be and therefore 1080p60 youtube lags on your laptop.

Just follow the steps in my post before and the problem is gone.

now the problem is fixed clock speeds are higher now after i have changed the adapter and 1080p60 is smooth

1 Like

your solution worked thanks i figured the problem was with low clock speeds combined with hardware acceleration problems from the posts thanks

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.