Playing video on chrome freezes frequently (Too slow to catch up)

Bug #1803848 reported by Paco Raxim
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
chromium-browser (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

Latest update of ubuntu made some strange problems:

system-udev made a high CPU usage on nvidia, i have made a restart on the udev, thus i have decided to bleach it and run the following commands:

sudo systemctl start systemd-udevd systemd-udevd-kernel.socket systemd-udevd-control.socket
sudo systemctl stop systemd-udevd systemd-udevd-kernel.socket systemd-udevd-control.socket

It solved some of the flickering problem, but it did not disappear.

I'm running on 120Hz, sometimes the screen resolution has been changed so quickly on boot, that i have noticed lines at the bottom of my screen. (like in a bad monitor) Why ubuntu needs to change that so frequently, it just amortize the graphics card.

The real issue is that my video playback youtube / scolling main site of origo.hu (local news portal) etc. flickering frequently. It is too slow to catch up. Suddenly stops, and after 2-3 seconds it restarts.

It only happens on chrome seems to me, and does not happen when i disabling gpu.
https://bugs.chromium.org/p/chromium/issues/detail?id=906861#c8

As a matter of fact, my CPU usage is not that much with or without gpu,
so on gnome-shell some optimization needs to happen.

Why i have GPU acceleration, if the gnome-shell swallows the benefit?

On firefeox it does not happen, but the WebConsole CPU usage is 3 times more than in chrome. (70-80% on a full hd video, which is burning up all my cpu time, so it cannot be the solution to jump to firefox)

Other thing is that the cooler less frequently making noise without gpu, even if the CPU has got higher load. If the cooler is running on high frequency, i hardly able to work.

The non-accelerated Chrome CPU usage is half of the accelerated firefox cpu usage.

I have posted the problem on both side, because i have a feeling there is problem at the middle, how ubuntu and chrome corporates with each other.

Visual studio code also has some high CPU problem while scrolling, cooler makes noise.

To me seems that it does matter whether the gpu makes the heat or the cpu regarding to cooling insensitivity.
---
ProblemType: Bug
ApportVersion: 2.20.9-0ubuntu7.5
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
DisplayManager: gdm3
DistroRelease: Ubuntu 18.04
InstallationDate: Installed on 2017-08-07 (471 days ago)
InstallationMedia: Ubuntu 16.04.3 LTS "Xenial Xerus" - Release amd64 (20170801)
Package: gnome-shell 3.28.3-0ubuntu0.18.04.3
PackageArchitecture: amd64
ProcVersionSignature: Ubuntu 4.15.0-39.42-generic 4.15.18
Tags: bionic third-party-packages
Uname: Linux 4.15.0-39-generic x86_64
UpgradeStatus: Upgraded to bionic on 2018-08-24 (89 days ago)
UserGroups: adm cdrom dip docker lpadmin plugdev sambashare sudo vboxusers video wireshark
_MarkForUpload: True
---
ProblemType: Bug
ApportVersion: 2.20.9-0ubuntu7.5
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
DisplayManager: gdm3
DistroRelease: Ubuntu 18.04
InstallationDate: Installed on 2017-08-07 (471 days ago)
InstallationMedia: Ubuntu 16.04.3 LTS "Xenial Xerus" - Release amd64 (20170801)
Package: gnome-shell 3.28.3-0ubuntu0.18.04.3
PackageArchitecture: amd64
ProcVersionSignature: Ubuntu 4.15.0-39.42-generic 4.15.18
Tags: bionic third-party-packages
Uname: Linux 4.15.0-39-generic x86_64
UpgradeStatus: Upgraded to bionic on 2018-08-24 (89 days ago)
UserGroups: adm cdrom dip docker lpadmin plugdev sambashare sudo vboxusers video wireshark
_MarkForUpload: True

Revision history for this message
Paco Raxim (raxim1) wrote :

Not just youtube, i'm using different web based players also

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Please reword this bug so that it is about ONE issue only. You can open new bugs for other issues.

Please also run this command to send us more information about the system:

  apport-collect 1803848

Changed in gnome-shell (Ubuntu):
status: New → Incomplete
Revision history for this message
Paco Raxim (raxim1) wrote :

done

description: updated
summary: - Playing video on chrome sometimes freezes until i'm not moving my mouse
+ Playing video on chrome freezes frequently (Too slow to catch up)
description: updated
description: updated
description: updated
Paco Raxim (raxim1)
description: updated
description: updated
description: updated
description: updated
description: updated
Paco Raxim (raxim1)
description: updated
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

The Bug Description sounds more like a Chrome issue than gnome-shell. Can you explain why you think this is a gnome-shell problem? Which process(es) use high CPU and when?

Please also remember to run: apport-collect 1803848

Revision history for this message
Paco Raxim (raxim1) wrote : Dependencies.txt

apport information

tags: added: apport-collected bionic third-party-packages
description: updated
Revision history for this message
Paco Raxim (raxim1) wrote : GsettingsChanges.txt

apport information

Revision history for this message
Paco Raxim (raxim1) wrote : ProcCpuinfoMinimal.txt

apport information

Revision history for this message
Paco Raxim (raxim1) wrote : ProcEnviron.txt

apport information

Revision history for this message
Paco Raxim (raxim1) wrote :

Ok, i have tracked down the issue, for later reference, you can read it:
https://www.linuxuprising.com/2018/08/how-to-enable-hardware-accelerated.html
https://askubuntu.com/questions/1066105/how-to-install-amd-graphic-drivers-on-ubuntu-18-04

First of all, i have two cards in my machine HD5500 - R7 M260 (Topaz)

Unfortunately ubuntu 18.04.1 does not pick up mesa at default, and it needs to be installed separately.
It was installed before, but the official amd-gpu was a crap, i was not able to login, so i installed the linux and amd-gpu version back and forth, and with bionic beaver it just didn't happen automatically.

When the ubuntu 18.04 upgrade was coming, my GPU card was disappeared very likely. I do remember that it was there on the lspci list.

The post was right, vp8/vp9 hardware acceleration just not supported by my card (i had to instal the h264ify plugin), and i had to install latest dev chromium to make some progress.

Now my CPU is not used at all, steady 6%, however neither ubuntu nor latest released chrome is not there yet to avoid tweaking.

This youtube video is a very good test on 1080p, on chrome it simply kills my PC:
https://www.youtube.com/watch?v=YqeW9_5kURI

Although my CPU is not used at all, the lagging hasn't disappeared.
I think when it's buffering the CPU goes high. (30-40%)

I have read also about some VPN throttling.

I'm not just using youtube. I have made the apport-collect

description: updated
Revision history for this message
Paco Raxim (raxim1) wrote : Dependencies.txt

apport information

Revision history for this message
Paco Raxim (raxim1) wrote : GsettingsChanges.txt

apport information

Revision history for this message
Paco Raxim (raxim1) wrote : ProcCpuinfoMinimal.txt

apport information

Revision history for this message
Paco Raxim (raxim1) wrote : ProcEnviron.txt

apport information

Revision history for this message
Paco Raxim (raxim1) wrote :

At the last apport, i made the playback on both chrome, if it does help.

Revision history for this message
Paco Raxim (raxim1) wrote :

Pls. remember there is a thread on https://bugs.chromium.org/p/chromium/issues/detail?id=906861 also.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thanks. We are unable to track Chrome bugs on Launchpad, but can track bugs in the related 'chromium-browser' project. So reassigning there.

Another possible workaround for you is documented here:
https://wiki.ubuntu.com/IntelQuickSyncVideo#YouTube

affects: gnome-shell (Ubuntu) → chromium-browser (Ubuntu)
Changed in chromium-browser (Ubuntu):
status: Incomplete → New
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

The bug is also reported upstream:
https://bugs.chromium.org/p/chromium/issues/detail?id=463440

And despite what the bug says, a fix is being worked on here:
https://chromium-review.googlesource.com/c/chromium/src/+/532294

Changed in chromium-browser (Ubuntu):
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Paco Raxim (raxim1) wrote :

Sorry VPN was DNS throttling.

Revision history for this message
Olivier Tilloy (osomon) wrote :

Paco, with this last comment do you mean that after solving this DNS throttling issue the problem with video playback is seemingly resolved?

Revision history for this message
Paco Raxim (raxim1) wrote :

I can't really test dns throttling, so the answer is no.

Latest experiences on this tricky issue. I had problems with prover management in years time.

WIFI is unusable (using usb tethering), so and it's kept "disconnecting". (disconnecting mean, that it's connected, but the connection dies (locks the chrome tab, even if I'm kept pushing the refresh button - if I open a new tab many times the responsiveness comes back again) unlike xperia phone, where even if the wifi is disconnected at some point not so frequently, the tab does not die, connecting back, right away will get the connection and update the page, if it's necessary)

Upgraded mesa on daily basis, and it was getting worse.

I have disabled the dimming (power management), and the problem seemed to be disappeared for a while.

When I'm opening chrome before packageit process is finishing its job. (so right away after I see the default desktop screen), I'm more likely getting system-ud cpu hog (50-100%), and flickering issues. When I'm restarting with it, system-ud does not appear on the top 30 processes.

When I restarted my chrome browser (the initial ubuntu loading has been finished - no CPU usage - 1-2%), the flickering issue has not happened that frequently.

I have disabled also screensavers. (i had to install the program to disable it)

It seems to happen on full screen only and sometimes I have a feeling that the ubuntu is just stopping after some inactivity period, as my wifi is gone in the background. (unfortunately even if I set wifi always on xperia, it seems disconnecting the wifi, but not that frequently, and when i'm activating the xperia again goes back - but in this case wifi should be always active)

I think it's something with the power management, what I felt so buggy in the last couple of years. (the only thing which has been resolved, that from hibernate mode it's not corrupting my ubuntu anymore, and doesn't make cpu hog also)

It's very hard to really figure out when the problem happens, but I do think it's nothing to do with mesa, it's something else, which keep killing the mesa.

The voice was steadily working, just every 5-10 sec video playback stopped for 3 sec. It's the worst case scenario.

Revision history for this message
Paco Raxim (raxim1) wrote :

xperia phone = in context with usb tethering (so every test made on the ubuntu laptop - with and without usb tethering)

Revision history for this message
Paco Raxim (raxim1) wrote :

system-ud cpu hog and flickering issues are unrelated, as when i restarted the system-ud, and it did disappear from the top 20 process, flickering issues didn't disappear, just less frequently happened, if I restarted the chrome browser. (unfortunately my chrome browser is the first program, what i tend to open and does not stop, even if i work 14 hours a day)

Revision history for this message
Paco Raxim (raxim1) wrote :

When I'm restarting it (Grammarly bug - not with it :)), system-ud does not appear on the top 30 processes.

Revision history for this message
Paco Raxim (raxim1) wrote :

WIFI is unusable when I'm connecting with ubuntu directly. When I'm connecting with my phone and using the usb tethering is much more stable. Unfortunately, even if I set Xperia always on, it seems at some point it's disconnecting, even if the stream is trying to load the next batch.

With usb tethering, Xperia disconnects rarely even if the screen is inactive (blank on the phone) than in Ubuntu, even if the screen is active.

Revision history for this message
Paco Raxim (raxim1) wrote :

disabled all the power management option anyway being displayed on the gnome panel, so something still exists in the background

Revision history for this message
Paco Raxim (raxim1) wrote :

at flickering - cpu was on 20-30%.

With the dev version of chrome and using h264ify, so the gpu has been used with youtube, cpu goes under 10%, but the flickering persists. HD5500 hasn't any gpu hardware acceleration, only the secondary card, which only appears when mesa installed. (AMD M260 Topaz)

Revision history for this message
Paco Raxim (raxim1) wrote :

with GPU flickering hasn't been solved. The HD5500 using a different set of code in Ubuntu, so either with mesa or without it, the problem persists, and it's not just video playback, it's scrolling also. (with similar frequency)

Revision history for this message
Paco Raxim (raxim1) wrote :

I have identified at power management at least 5 critical bug in the last 3 years which hasn't been solved. For example one year before my battery lifetime showed 4 hours, now just 2 hours. 2 years before 2 hours. So in the middle of the time frame something has been fixed and after that the fix has been reverted.

I have removed also the diagram from my top bar, which shows the cpu usage. (as I have read forums, that 120HZ might kill something in Ubuntu while animating - that one solved the system-ud hog - as a process hasn't locked something right away, with a delayed chrome start, the system was more stable)

Revision history for this message
Paco Raxim (raxim1) wrote :

Sometimes the CPU is on a too high level, that it's crashing the whole ubuntu, and when I'm restarting, half of the screen contains lines, so I need to restart again.

Can I ask you one thing? Would you deliberately kill my graphics card, so I need to buy a new one?

If something is not accessing something, it shouldn't go to a never-ending loop. The computer is still running and alive.

Revision history for this message
Paco Raxim (raxim1) wrote :

syslog is showing that in a never ending circle - No NVIDIA gra
phics adapter found!

I have no and never had nvidia graphics card, i have an intel HD5500 and an M260 Topaz

What can i do with this crap, that's why i have got this hard restart 2 times.

Revision history for this message
Paco Raxim (raxim1) wrote :

Nov 27 20:17:57 raxim-SATELLITE-L50-B systemd-udevd[1380]: Process '/sbin/modprobe nvidia-uvm' failed with exit code 1.
Nov 27 20:17:57 raxim-SATELLITE-L50-B kernel: [ 40.582066] nvidia-nvlink: Nvlink Core is being initialized, major device number 237
Nov 27 20:17:57 raxim-SATELLITE-L50-B kernel: [ 40.582294] NVRM: No NVIDIA graphics adapter found!
Nov 27 20:17:57 raxim-SATELLITE-L50-B kernel: [ 40.582371] nvidia-nvlink: Unregistered the Nvlink Core, major device number 237
Nov 27 20:17:57 raxim-SATELLITE-L50-B kernel: [ 40.642079] nvidia-nvlink: Nvlink Core is being initialized, major device number 237
Nov 27 20:17:57 raxim-SATELLITE-L50-B kernel: [ 40.642304] NVRM: No NVIDIA graphics adapter found!
Nov 27 20:17:57 raxim-SATELLITE-L50-B kernel: [ 40.642383] nvidia-nvlink: Unregistered the Nvlink Core, major device number 237
Nov 27 20:17:57 raxim-SATELLITE-L50-B systemd-udevd[1380]: Process '/usr/bin/nvidia-smi' failed with exit code 9.
Nov 27 20:17:57 raxim-SATELLITE-L50-B systemd[1]: nvidia-persistenced.service: Start request repeated too quickly.
Nov 27 20:17:57 raxim-SATELLITE-L50-B systemd[1]: nvidia-persistenced.service: Failed with result 'exit-code'.
Nov 27 20:17:57 raxim-SATELLITE-L50-B systemd[1]: Failed to start NVIDIA Persistence Daemon.
Nov 27 20:17:57 raxim-SATELLITE-L50-B kernel: [ 40.746077] nvidia-nvlink: Nvlink Core is being initialized, major device number 237
Nov 27 20:17:57 raxim-SATELLITE-L50-B kernel: [ 40.746324] NVRM: No NVIDIA graphics adapter found!
Nov 27 20:17:57 raxim-SATELLITE-L50-B kernel: [ 40.746402] nvidia-nvlink: Unregistered the Nvlink Core, major device number 237

Revision history for this message
Paco Raxim (raxim1) wrote :

I have removed the nvidia drivers, it was automatically installed somehow even if i have amd, and intel graphics card:

https://askubuntu.com/questions/206283/how-can-i-uninstall-a-nvidia-driver-completely

I kept checking whether problem comes back.

Revision history for this message
Paco Raxim (raxim1) wrote :

I have removed ureadhead service also

Revision history for this message
Paco Raxim (raxim1) wrote :
Download full text (3.2 KiB)

nvidia does not appear in the log at least:

The following errors were coming up in the clean log:

1)
Nov 27 22:04:37 raxim-SATELLITE-L50-B gnome-shell[2708]: JS ERROR: TypeError: active.get_devices(...)[0] is undefined#012ensureActiveConnectionProps@resource:///org/gnome/shell/ui/status/network.js:97:22#012_getMainConnection@resource:///org/gnome/shell/ui/status/network.js:1814:13#012wrapper@resource:///org/gnome/gjs/modules/_legacy.js:82:22#012_syncMainConnection@resource:///org/gnome/shell/ui/status/network.js:1832:32#012wrapper@resource:///org/gnome/gjs/modules/_legacy.js:82:22

2)
Nov 27 22:02:34 raxim-SATELLITE-L50-B systemd[1]: Started Wait until snapd is fully seeded.
Nov 27 22:02:34 raxim-SATELLITE-L50-B dbus-daemon[1599]: [session uid=128 pid=1599] Activating service name='org.gnome.ScreenSaver' requested by ':1.9' (uid=128 pid=1601 comm="/usr/lib/gnome-session/gnome-session-binary --auto" label="unconfined")
Nov 27 22:02:34 raxim-SATELLITE-L50-B gnome-session[1601]: gnome-session-binary[1601]: CRITICAL: Unable to create a DBus proxy for GnomeScreensaver: Error calling StartServiceByName for org.gnome.ScreenSaver: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.gnome.ScreenSaver exited with status 1

3) Nov 27 22:02:38 raxim-SATELLITE-L50-B snapd[983]: udevmon.go:184: udev monitor observed remove event for unknown device "/sys/kernel/slab/:A-0000704/cgroup/files_cache(687:plymouth-start.service)" - (several reccoring lines)

4) Nov 27 22:02:33 raxim-SATELLITE-L50-B gpu-manager[986]: Error: can't open /lib/modules/4.15.0-39-generic/updates/dkms

5) Nov 27 22:04:39 raxim-SATELLITE-L50-B ModemManager[985]: <info> Couldn't check support for device at '/sys/devices/pci0000:00/0000:00:14.0/usb2/2-2': not supported by any plugin

6) Nov 27 22:04:44 raxim-SATELLITE-L50-B zeitgeist-datah[3268]: zeitgeist-datahub.vala:210: Error during inserting events: GDBus.Error:org.gnome.zeitgeist.EngineError.InvalidArgument: Incomplete event: interpretation, manifestation and actor are required
Nov 27 22:04:47 raxim-SATELLITE-L50-B org.gnome.Shell.desktop[2708]: [3327:3327:1127/220447.209776:ERROR:CONSOLE(6)] "Uncaught ReferenceError: gbar is not defined", source: https://clients5.google.com/pagead/drt/dn/ (6)

7) Nov 27 22:02:37 raxim-SATELLITE-L50-B gnome-shell[1646]: Error looking up permission: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.impl.portal.PermissionStore was not provided by any .service files

8) Nov 27 22:04:17 raxim-SATELLITE-L50-B org.gnome.Shell.desktop[2708]: [3366:3366:1127/220417.395496:ERROR:sandbox_linux.cc(379)] InitializeSandbox() called with multiple threads in process gpu-process.
Nov 27 22:04:39 raxim-SATELLITE-L50-B org.gnome.Shell.desktop[2708]: [3327:3343:1127/220439.904717:ERROR:connection_factory_impl.cc(400)] Failed to connect to MCS endpoint with error -105

9) Nov 27 22:04:40 raxim-SATELLITE-L50-B gsd-sharing[2825]: Failed to StopUnit service: GDBus.Error:org.freedesktop.systemd1.NoSuchUnit: Unit rygel.service not loaded.
Nov 27 22:04:40 raxim-SATELLITE-L50-B gsd-sharing[2825]: Failed to StopUnit service: GDBus.Error:org.freedesktop.systemd1.NoSuchUnit: Unit...

Read more...

Revision history for this message
Paco Raxim (raxim1) wrote :

10) Called "net usershare info " but it failed: Failed to execute child process “net”

https://askubuntu.com/questions/798928/nautilus-share-message-called-net-usershare-info-but-it-failed/912960

Opening 3 independent text file each other in the same gedit from nautius, the mouse icon is kept showing circle, even if the file is loaded

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

You don't need to keep commenting here. We have already established that this bug is about:

https://bugs.chromium.org/p/chromium/issues/detail?id=463440
https://chromium-review.googlesource.com/c/chromium/src/+/532294

If you have any other problems then please open new bugs for them.

Revision history for this message
Paco Raxim (raxim1) wrote :

Sorry, just one thing more. If you look at my description, that it's a complex problem, and what the chromium bug says is not completely right.

I was able to use my GPU with chromium dev version (with a plugin to force youtube to h264) and the flickering didn't disappear.

I think the problem is two-sided, one, why ubuntu installed nvidia driver onto a non-nvidia machine. Second why I feel that inactivity causes the flickering issues? It was a nightmare also that the system-udev didn't realize that the nvidia driver would like to crap my amd card. (and seriously almost killed half of my laptop monitor with that lines (i saw what you can on a very old crap monitor))

To me, it seemed regarding what the mouse move felt when the playback just stopped for seconds,
that like reloading whole driver or renewing wifi periodically which did happen exactly in syslog. Some has been solved some of them not.

So even if the chromium bug is definitely there I would reconsider that the problem is really related to what you have established. I think it's 3-4 more issues combined, and that's why I have commented a lot. I just tried to resolve the problems individually.

My feeling is that while playing video is simply reloading my driver because of inactivity, and that's why even the mouse movement stuck for a moment. (scrolling whatever)

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Wherever you can, please separate each issue into a new bug.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.