[MOVED] Massive video lag of YouTube/Zoom (Mint 20 Cinnamon)

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
miragon
Level 1
Level 1
Posts: 16
Joined: Mon Apr 19, 2021 8:21 am

[MOVED] Massive video lag of YouTube/Zoom (Mint 20 Cinnamon)

Post by miragon »

EDIT: Moved this topic to HW/Monitor forum, as I found out that the problem does not arise when my second monitor is disconnected.
I still want to get this working with my second monitor, so any help would be very much appreciated on the new topic! -->viewtopic.php?f=49&t=347719

---

I've switched to Linux Mint a couple of weeks ago and have started to run into problems:

Both YouTube and Zoom use large amounts of CPU (>35-40%) and lead to both laggy video playback and overall system slowdown.
I tried experimenting with hardware acceleration (on/off), h264ify, a different kernel (5.8 instead of 5.4 LTS) and different browsers (Firefox, Chrome, Chromium) to no avail.

I had no lag in Browsers or while using Zoom on the same machine under Win10, so hardware should not be an issue. The machine is a Laptop that is some years old, so 'cutting edge' hardware support is not necessary either. Neither should the connection be the root of the problem, as Netflix works fine.

I'm overall happy with the switch from Win10 but this is really very annoying...

System:

Code: Select all

$ inxi -Fxxxrz
System:    Kernel: 5.8.0-50-generic x86_64 bits: 64 compiler: N/A Desktop: Cinnamon 4.8.6 wm: muffin 4.8.1 
           dm: LightDM 1.30.0 Distro: Linux Mint 20.1 Ulyssa base: Ubuntu 20.04 focal 
Machine:   Type: Convertible System: LENOVO product: 80V4 v: Lenovo YOGA 710-14IKB serial: <filter> Chassis: 
           type: 31 v: Lenovo YOGA 710-14IKB serial: <filter> 
           Mobo: LENOVO model: LNVNB161216 v: SDK0J40709 WIN serial: <filter> UEFI: LENOVO v: 2XCN38WW(V2.12) 
           date: 07/10/2018 
Battery:   ID-1: BAT1 charge: 37.7 Wh condition: 37.7/53.0 Wh (71%) volts: 8.5/7.6 model: SIMPLO PABAS0241231 
           type: Li-ion serial: <filter> status: Full 
           Device-1: hid-77:11:12:10:08:75-battery model: CSL-301582 serial: N/A charge: N/A status: Discharging 
CPU:       Topology: Dual Core model: Intel Core i5-7200U bits: 64 type: MT MCP arch: Amber Lake rev: 9 
           L2 cache: 3072 KiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 21599 
           Speed: 2500 MHz min/max: 400/3100 MHz Core speeds (MHz): 1: 2500 2: 2500 3: 2500 4: 2500 
Graphics:  Device-1: Intel HD Graphics 620 vendor: Lenovo driver: i915 v: kernel bus ID: 00:02.0 chip ID: 8086:5916 
           Display: x11 server: X.Org 1.20.9 driver: modesetting unloaded: fbdev,vesa 
           resolution: 1920x1080~60Hz, 1920x1080~60Hz 
           OpenGL: renderer: Mesa Intel HD Graphics 620 (KBL GT2) v: 4.6 Mesa 20.2.6 direct render: Yes 
Audio:     Device-1: Intel Sunrise Point-LP HD Audio vendor: Lenovo driver: snd_hda_intel v: kernel bus ID: 00:1f.3 
           chip ID: 8086:9d71 
           Device-2: Microsoft LifeCam HD-3000 type: USB driver: snd-usb-audio,uvcvideo bus ID: 1-2.4:6 
           chip ID: 045e:0810 
           Sound Server: ALSA v: k5.8.0-50-generic 
Network:   Device-1: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter vendor: Lenovo driver: ath10k_pci 
           v: kernel port: 3040 bus ID: 01:00.0 chip ID: 168c:003e 
           IF: wlp1s0 state: up mac: <filter> 
           Device-2: Qualcomm Atheros type: USB driver: btusb bus ID: 1-7:5 chip ID: 0cf3:e300 
Drives:    Local Storage: total: 1.14 TiB used: 165.54 GiB (14.1%) 
           ID-1: /dev/sda vendor: LITE-ON model: CV3-8D256 size: 238.47 GiB speed: 6.0 Gb/s serial: <filter> 
           rev: 201 scheme: GPT 
           ID-2: /dev/sdb type: USB vendor: Western Digital model: WD My Passport 262E size: 931.51 GiB 
           serial: <filter> rev: 1085 scheme: MBR 
Partition: ID-1: / size: 233.24 GiB used: 82.92 GiB (35.5%) fs: ext4 dev: /dev/sda2 
Sensors:   System Temperatures: cpu: 61.0 C mobo: N/A 
           Fan Speeds (RPM): N/A 
Repos:     No active apt repos in: /etc/apt/sources.list 
           Active apt repos in: /etc/apt/sources.list.d/apt-fast-stable-focal.list 
           1: deb http://ppa.launchpad.net/apt-fast/stable/ubuntu focal main
           Active apt repos in: /etc/apt/sources.list.d/google-chrome.list 
           1: deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
           Active apt repos in: /etc/apt/sources.list.d/linuxuprising-shutter-focal.list 
           1: deb http://ppa.launchpad.net/linuxuprising/shutter/ubuntu focal main
           Active apt repos in: /etc/apt/sources.list.d/nm-l2tp-network-manager-l2tp-focal.list 
           1: deb http://ppa.launchpad.net/nm-l2tp/network-manager-l2tp/ubuntu focal main
           Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list 
           1: deb http://mirror.netcologne.de/linuxmint/packages ulyssa main upstream import backport
           2: deb http://ftp.fau.de/ubuntu focal main restricted universe multiverse
           3: deb http://ftp.fau.de/ubuntu focal-updates main restricted universe multiverse
           4: deb http://ftp.fau.de/ubuntu focal-backports main restricted universe multiverse
           5: deb http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
           6: deb http://archive.canonical.com/ubuntu/ focal partner
           Active apt repos in: /etc/apt/sources.list.d/signal-xenial.list 
           1: deb [arch=amd64 signed-by=/usr/share/keyrings/signal-desktop-keyring.gpg] https://updates.signal.org/desktop/apt xenial main
           No active apt repos in: /etc/apt/sources.list.d/spotify.list 
           Active apt repos in: /etc/apt/sources.list.d/vscode.list 
           1: deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main
Info:      Processes: 218 Uptime: 55m Memory: 7.50 GiB used: 2.56 GiB (34.1%) Init: systemd v: 245 runlevel: 5 
           Compilers: gcc: 9.3.0 alt: 9 Shell: zsh v: 5.8 running in: gnome-terminal inxi: 3.0.38 
inxi -Fxxxrz  4,20s user 1,36s system 82% cpu 6,722 total
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 3 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
mikeflan
Level 17
Level 17
Posts: 7106
Joined: Sun Apr 26, 2020 9:28 am
Location: Houston, TX

Re: Massive video lag of YouTube/Zoom (Mint 20 Cinnamon)

Post by mikeflan »

Welcome to the forum. Nice post.
Laggy is bad for sure. It is odd that Netflix works fine.
Your computer seems beefy enough. I'm surprised you are having these problems.

Please start System Monitor - Processes tab - sort by '% CPU' - run a video in YouTube and report the maximum % CPU and the processes that use the CPU. For me 'RDD Process' and 'Web Content' use the most. One or the other usually run 4-5% and never get over 7%. But on the Resources tab one CPU or another (of eight) is often at or near 100%. I experience no problems with Zoom or YouTube.
Last edited by mikeflan on Tue Apr 20, 2021 7:54 am, edited 1 time in total.
miragon
Level 1
Level 1
Posts: 16
Joined: Mon Apr 19, 2021 8:21 am

Re: Massive video lag of YouTube/Zoom (Mint 20 Cinnamon)

Post by miragon »

Hi mikeflan, thanks for your answer.

I was surprised as well and am both happy, that you don't see a general hardware problem, and nervous as this does not seem to be an easy obvious fix...

The CPU during a YouTube video is eaten by Web Content mostly (ranging from about 30 to about 45-48 %) and firefox (more like 20-35%).
for Zoom its mostly the zoom process itself (30-45%), Web Content once more (~12%), the system monitor itself (around 10% too, seems excessive) and pulseaudio around (%.
I really don't get the problem here... I've also tried to use VLC for videostreaming as I've seen some people recommend it but couldn't get it to work yet so I can't compare it as of yet. Would be happy to hear any ideas from you! And thanks for the welcoming btw :)
miragon
Level 1
Level 1
Posts: 16
Joined: Mon Apr 19, 2021 8:21 am

Re: Massive video lag of YouTube/Zoom (Mint 20 Cinnamon)

Post by miragon »

One addition: I'm in a zoom meeting right now and have started FF from the terminal for its output. I've just seen that this is actually flooded with the following line over and over:

Code: Select all

Sandbox: attempt to open unexpected file /proc/self/maps
After the program started, the following lines also appeared:

Code: Select all

Sandbox: attempt to open unexpected file /sys/devices/system/cpu/online
Sandbox: attempt to open unexpected file /proc/stat
Sandbox: attempt to open unexpected file /proc/net/unix
the 'unix' line also appears a couple of times (~15) in the first ~35 lines that are echoed.
I'm pretty sure that this didn't happen with YouTube and I have no idea if this might be related, but I thought it couldn't hurt to share the info!
mikeflan
Level 17
Level 17
Posts: 7106
Joined: Sun Apr 26, 2020 9:28 am
Location: Houston, TX

Re: Massive video lag of YouTube/Zoom (Mint 20 Cinnamon)

Post by mikeflan »

Maybe it's a problem with Firejail? I suggest you run your videos without Firejail as a test. Maybe open htop and search for processes with 'jail' in them and terminate all those.
miragon
Level 1
Level 1
Posts: 16
Joined: Mon Apr 19, 2021 8:21 am

Re: Massive video lag of YouTube/Zoom (Mint 20 Cinnamon)

Post by miragon »

No processes with 'jail' in them running...

While testing lots of different stuff, I also ran into the following: VLC doesn't even play video files from the drive (audio is fine but verbose hints that 'picture is too late to be displayed').
Also I don't think that I actually switched anything up since then but Neflix does lag now... :cry:
miragon
Level 1
Level 1
Posts: 16
Joined: Mon Apr 19, 2021 8:21 am

Re: Massive video lag of YouTube/Zoom (Mint 20 Cinnamon)

Post by miragon »

Okay, now it's getting really weird... I did the following:
1. completely purged VLC
2. reinstalled that to at least verify working video at all
3. opened file from SSD
--> works fine, audio and video, no lagging, a little much on the CPU but everything working so far
4. try streaming a YT video: this works at first (yay) though I was not sure if it was just a little clunky video or lagging. Tried maximizing the window.
5. Things went south: maxed window does not show the video, only audio once more. Sizing back in the window does not help.
6. Now, the file from SSD does not work once more! I mean I can't purge and reinstall VLC for every vid I watch...

I'm just really confused smh

Edit: Visualizers don't work either and also lead to the console warning (in verbose mode; 'missing' timestamp varies)

Code: Select all

[00007f1a0c028800] main video output warning: picture is too late to be displayed (missing 32176 ms)
miragon
Level 1
Level 1
Posts: 16
Joined: Mon Apr 19, 2021 8:21 am

Re: Massive video lag of YouTube/Zoom (Mint 20 Cinnamon)

Post by miragon »

Oh my god.. I'm both massively frustrated and excited right now:
Since Netflix worked but does not now, I eventually tried to 'relive' the former situation. Importantly, I watched Netflix not at my desk and therefore without my main work monitor.
I thus discovered, that video playback works fine with everything: YT, Netflix, VLC from both SSD and YT-Stream. It just doesn't when my second monitor is attached!!
The CPU still gets a little busy, but Web Content and firefox together don't really go over 25-30% together after the first couple of loading/buffering seconds and that's fine with me. Gonna have to check how zoom performs w/o the second screen although that would be a massive downer, as the monitor is especially helpful in that context.

The problem still remains and it sucks, that the second monitor somehow completely butchers the video playback capability. I will however open a new topic for this in hardware and reference this one in it.
Sorry for posting a lot by myself and thanks to you mikeflan! If you have any idea with this additional info, I'd be happy to hear it still!
User avatar
spamegg
Level 14
Level 14
Posts: 5038
Joined: Mon Oct 28, 2019 2:34 am
Contact:

Re: [MOVED] Massive video lag of YouTube/Zoom (Mint 20 Cinnamon)

Post by spamegg »

Code: Select all

Graphics:  Device-1: Intel HD Graphics 620 vendor: Lenovo driver: i915 v: kernel bus ID: 00:02.0 chip ID: 8086:5916 
           Display: x11 server: X.Org 1.20.9 driver: modesetting unloaded: fbdev,vesa 
           resolution: 1920x1080~60Hz, 1920x1080~60Hz 
           OpenGL: renderer: Mesa Intel HD Graphics 620 (KBL GT2) v: 4.6 Mesa 20.2.6 direct render: Yes 
To me this does not look like a strong enough GPU to handle all that you are throwing at it with the second monitor. This is an integrated GPU, so when it can't handle your graphical demands, it has to offload stuff to the CPU.

So you have to live with it, or get better hardware, or change your computing habits!
miragon
Level 1
Level 1
Posts: 16
Joined: Mon Apr 19, 2021 8:21 am

Re: [MOVED] Massive video lag of YouTube/Zoom (Mint 20 Cinnamon)

Post by miragon »

spamegg wrote: Tue Apr 20, 2021 3:30 pm So you have to live with it, or get better hardware, or change your computing habits!
Turns out it was the wrongly set HiDPI settings after all, see viewtopic.php?f=49&t=347719, the integrated GPU should (and is) still capable of handling video playback, also on multiple screens :)
Locked

Return to “Software & Applications”