Laggy video playback via browser

just recently when trying to watch a video via the Firefox browser (Youtube) the playback as sooooo laggy it is unwatchable.

I wondered if anyone else is having this problem and is there a cure to it?

Nik

UPDATE:

I did a post about this problem a day ago.

If I watch a video that is local on my machine it plays no problem, but when I got on my browser (tried it on on Fire fox and Google Chrome) the playback is unwatchable.

I see the progress bar moving forward (so it is building up a buffer), but it is just not playing right. I could have it playing for 30 seconds and it is not even playing about 3 seconds of video!

I wondered if something has broken on my system or during an update something has been removed?

But saying that why do local videos play alright, if the ones in my browser do not??

Nik

You could also run Firefox with outputs in terminal and check what is going on while playing videos.

Arch wiki suggests to run in troubleshoot mode if you have problems with video acceleration

https://wiki.archlinux.org/title/firefox#Hardware_video_acceleration_issues

Other useful infos/clues on the wiki

Edit: if it worked previously, what did happen between then and now? System update? Do you use KDE plasma, xorg or wayland? Could try lts kernel instead. Or something going on with drivers… but need some system infos (top forum click help>system log tool), else too random to troubleshoot

Thanks for your reply.

I have tried a few of those things, with no luck.

As this problem is affecting Google Chrome I am at a total loss at how to sort it out.

Nik

https://discovery.endeavouros.com/forum-log-tool-options/how-to-include-systemlogs-in-your-post/2021/03/

Here is the output:


ystem:
  Kernel: 6.0.1-zen2-1-zen arch: x86_64 bits: 64 compiler: gcc v: 12.2.0
    Desktop: i3 v: 4.21 dm: LightDM Distro: EndeavourOS base: Arch Linux
Machine:
  Type: Laptop System: Dell product: XPS 13 7390 v: N/A
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: Dell model: 0G2D0W v: A00 serial: <superuser required> UEFI: Dell
    v: 1.17.0 date: 07/11/2022
Battery:
  ID-1: BAT0 charge: 39.3 Wh (79.6%) condition: 49.4/52.0 Wh (95.0%)
    volts: 8.0 min: 7.6 model: SMP DELL G8VCF6C serial: <filter>
    status: not charging
CPU:
  Info: quad core model: Intel Core i7-10510U bits: 64 type: MT MCP
    arch: Comet/Whiskey Lake note: check rev: C cache: L1: 256 KiB L2: 1024 KiB
    L3: 8 MiB
  Speed (MHz): avg: 1362 high: 2300 min/max: 400/4900 cores: 1: 2300 2: 800
    3: 2300 4: 800 5: 800 6: 800 7: 2300 8: 800 bogomips: 36799
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
  Device-1: Intel CometLake-U GT2 [UHD Graphics] vendor: Dell driver: i915
    v: kernel arch: Gen-9.5 ports: active: eDP-1 empty: DP-1,DP-2,DP-3
    bus-ID: 00:02.0 chip-ID: 8086:9b41
  Device-2: Microdia Integrated_Webcam_HD type: USB driver: uvcvideo
    bus-ID: 1-5:2 chip-ID: 0c45:6723
  Display: x11 server: X.Org v: 21.1.4 compositor: Picom v: git-7e568
    driver: X: loaded: intel unloaded: modesetting alternate: fbdev,vesa
    dri: i965 gpu: i915 display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96
  Monitor-1: eDP-1 mapped: eDP1 model: AU Optronics 0x5b2d res: 1920x1080
    dpi: 168 diag: 335mm (13.2")
  OpenGL: renderer: Mesa Intel UHD Graphics (CML GT2) v: 4.6 Mesa 22.2.1
    direct render: Yes
Audio:
  Device-1: Intel Comet Lake PCH-LP cAVS vendor: Dell driver: snd_hda_intel
    v: kernel bus-ID: 00:1f.3 chip-ID: 8086:02c8
  Sound API: ALSA v: k6.0.1-zen2-1-zen running: yes
  Sound Server-1: PulseAudio v: 16.1 running: yes
  Sound Server-2: PipeWire v: 0.3.59 running: yes
Network:
  Device-1: Intel Wi-Fi 6 AX200 vendor: Rivet Networks driver: iwlwifi
    v: kernel pcie: speed: 5 GT/s lanes: 1 bus-ID: 02:00.0 chip-ID: 8086:2723
  IF: wlan0 state: up mac: <filter>
  IF-ID-1: vmnet1 state: unknown speed: N/A duplex: N/A mac: <filter>
  IF-ID-2: vmnet8 state: unknown speed: N/A duplex: N/A mac: <filter>
Bluetooth:
  Device-1: Intel AX200 Bluetooth type: USB driver: btusb v: 0.8
    bus-ID: 1-7:3 chip-ID: 8087:0029
  Report: bt-adapter ID: hci0 rfk-id: 0 state: up address: <filter>
Drives:
  Local Storage: total: 1.38 TiB used: 88.63 GiB (6.3%)
  ID-1: /dev/nvme0n1 vendor: SK Hynix model: PC601 NVMe 512GB
    size: 476.94 GiB speed: 31.6 Gb/s lanes: 4 serial: <filter> temp: 50.9 C
  ID-2: /dev/sda type: USB vendor: SanDisk model: SD9SN8W1T00
    size: 931.51 GiB serial: <filter>
Partition:
  ID-1: / size: 459.65 GiB used: 88.61 GiB (19.3%) fs: btrfs
    dev: /dev/nvme0n1p2
  ID-2: /boot/efi size: 299.4 MiB used: 26.9 MiB (9.0%) fs: vfat
    dev: /dev/nvme0n1p1
  ID-3: /home size: 459.65 GiB used: 88.61 GiB (19.3%) fs: btrfs
    dev: /dev/nvme0n1p2
  ID-4: /var/log size: 459.65 GiB used: 88.61 GiB (19.3%) fs: btrfs
    dev: /dev/nvme0n1p2
Swap:
  ID-1: swap-1 type: partition size: 16.99 GiB used: 1024 KiB (0.0%)
    priority: -2 dev: /dev/nvme0n1p3
Sensors:
  System Temperatures: cpu: 55.0 C pch: 53.0 C mobo: 44.0 C
  Fan Speeds (RPM): cpu: 0 fan-2: 0
Info:
  Processes: 300 Uptime: 7m Memory: 15.44 GiB used: 3.3 GiB (21.4%)
  Init: systemd v: 251 default: graphical Compilers: gcc: 12.2.0
  clang: 14.0.6 Packages: 2083 pm: pacman pkgs: 2059 pm: flatpak pkgs: 24
  Shell: fish v: 3.5.1-279-g26285280a running-in: alacritty inxi: 3.3.22
1 Like

I know that it is something to to do with an update as I used Timeshift to go back and all was well.
I did an update to bring everything up to date and the problem reappears again.
Unfortunately I am unsure of what update that is causing the problem!

Look into /var/log/pacman.log.
Perhaps you could post here the relevant part.
Might give someone some idea.

Also, you could format the pasted text by highlighting it and pressing Ctrl-E for better redability.

I have look at the log and it is massive.
You say the relevant parts… but I am unsure what is the parts that would be of use.
I had about 500 parts that got updated, including the kernel.

I would look around the date of the latest update.

Maybe the local video can be played with hardware decoding from the GPU and the video on Youtube can’t because its codec is not supported by the graphic card (AV1, VP8, VP9).

As I updated a LOT of things today (over 500 updates) the log is huge.

As a linux user I am quite new to this sort of thing.

I do not think I saw any errors.

Before the update today Youtube and other sites (like Facebook) worked fine.

I am not sure about that, can anyone confirm this is right on i3wm with picom?

If you think it’s picom related you could just kill picom and see if there’s still lag. You might get screen tearing but it will take the compositor out of the equation. Then you can narrow down browser video acceleration options

I killed picom… but unfortunately the laggy video was still present?

This problem is effecting Firefox and Google Chrome.

Is YouTube laggy in general or is it just happening at certain quality settings?

It is when I go on Chrome or Firefox and watch any video (say youtube and facebook).

I am pretty sure I have seen this problem addressed in the forum a while ago between Spring/Summer this year. Would need to do some search.

Edit: it maybe a shot in the dark. But could you try to install this intel driver: sudo pacman -S xf86-video-intel then reboot and try again. If it doesn’t work you can deinstall it again sudo pacman -R xf86-video-intel

I did try what you said (they were already installed) (did a reinstall), but nothing improved :frowning:

Found something else that might be worth a shot.

Corruption or unresponsiveness in Chromium and Firefox
If you experience corruption, unresponsiveness, lags or slow performance in Chromium and/or Firefox some possible solutions are:

Set the AccelMethod to "uxa"
Disable VSYNC
Enable the TearFree option
Disable "DRI" and acceleration method (tested on Intel Iris 10th generation):
Option "NoAccel" "True"
Option "DRI" "False"

https://wiki.archlinux.org/title/intel_graphics