elementary / os

The OS build system
https://elementary.io
GNU General Public License v3.0
984 stars 130 forks source link

Videos freeze while audio continues to play in Chrome, Videos, etc. [$10] #121

Closed cassidyjames closed 4 years ago

cassidyjames commented 5 years ago

From @pbirkbeck on July 9, 2018 4:1

On elementary OS Juno beta videos freeze while watching netflix, youtube etc. Audio continues to play. When I move the mouse around the video resumes playing but freezes a few seconds later without any mouse movement.

--- There is a **[$10 open bounty](https://www.bountysource.com/issues/64338934-videos-freeze-while-audio-continues-to-play-in-chrome-videos-etc?utm_campaign=plugin&utm_content=tracker%2F93529863&utm_medium=issues&utm_source=github)** on this issue. Add to the bounty at [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F93529863&utm_medium=issues&utm_source=github).
cassidyjames commented 5 years ago

From @maylton on September 20, 2018 18:44

I've been facing the very same problem. Also, it happens not only while streaming videos, but in vlc and default video player too.

cassidyjames commented 5 years ago

From @peteruithoven on September 21, 2018 17:20

There also is a Videos specific issue for this: https://github.com/elementary/videos/issues/93 I personally haven't seen this happen on Youtube, what browser and video did you use?

cassidyjames commented 5 years ago

From @irineubruno on September 22, 2018 0:4

Estou com mesmo problema, não pode ser o driver de vídeo ?

cassidyjames commented 5 years ago

From @Philip-Scott on September 22, 2018 4:15

I can confirm, but I don't think it's Gala's fault. If we search for "videos freeze until mouse movement" you will find that it's a driver problem :/

cassidyjames commented 5 years ago

Can confirm here on two Intel systems. One with 5th gen and the other with I believe 8th gen.

cassidyjames commented 5 years ago

From @sebasvisser on October 5, 2018 9:5

Can confirm this also happens on 7th gen i7 on chrome browser

kubaplas commented 5 years ago

I have the same issue on 6th gen Intel laptop with Youtube on Chrome browser. 4.15.0-36-generic kernel

Djaler commented 5 years ago

Same thing with Bomi video player. But only when it in non-fullscreen mode

PNunesDev commented 5 years ago

I can also confirm that this also happens to me on youtube or any video. i5 4200u with Intel HD. Elementary OS Juno 0.5 Kernel: 4.15.0-36-generic

I've started to use Linux recently, but I'm aware Elementary don't usually push kernel updates. so, this is issue is going to stay in here for the rest of the 2 years of the 0.5 version, or will I need to force a kernel update just like the PRO linux users :P?

cassidyjames commented 5 years ago

@PNunesDev elementary OS uses the Ubuntu kernel, which gets frequent updates gets upgraded to newer versions along with the rolling "HWE" stack.

otavioschwanck commented 5 years ago

Confirm here too.

image

azhar25git commented 5 years ago

Same here on core-i7 3rd gen...

otavioschwanck commented 5 years ago

Update: If you keep moving the mouse, the video don't freeze. Only happens when mouse is stopped.

kubaplas commented 5 years ago

I've updated the kernel to 4.18.15, didn't help.

jorge-aparicio commented 5 years ago

I tried updating to the latest mesa drivers also didn't help

otavioschwanck commented 5 years ago

Update: if mouse is out of video, the freeze doesn't happen

PNunesDev commented 5 years ago

I've updated the kernel to 4.18.15, didn't help.

Well, that's not good, probably the issue is related with intel mesa drivers. Does intel contain any easy update system for their GPU drivers?

EDIT: Nevermind, somebody replied that updating Mesa didn't helped either.

otavioschwanck commented 5 years ago

I have ubuntu 18.04 and mint 19 (same base, kernel and drivers), and this issue occurs.

leonidasv commented 5 years ago

Core 7th gen, HD graphics 620 here, same issue.

Tried upgrading to kernel 4.18.0 and 4.18.15 but this same issue continues haunting me.

I think it's not a driver problem, but Gala's compositor one. I've never had this issue using Gnome.

For example: I managed to make a video stop freezing by holding a Terminal window in front of it, with the beam animation. While the animation was playing on the Terminal window, the video on the browser behind it played smoothly. But, once the beam animation stopped (it automatically pauses after some seconds), almost instantly, the video also froze.

I think it's related to the Gala screen refresh rate. If there's no event coming from the system UI to force it redraw the screen every 1/60 second (in a 60hz display) for quite some time, it freezes and await for the next system event forcing it to redraw. This looks like a trick to save power, but this side-effect is annoying.

I opened an issue on Gala repo: elementary/gala#368

jorge-aparicio commented 5 years ago

Update videos play perfectly for some reason in firefox not sure what makes it different but its a temporary solution for online video at least

otavioschwanck commented 5 years ago

Confirmed: On firefox, all works well.

touchwood99 commented 5 years ago

Issue exists for me in Firefox - not in Chromium. When selecting full screen in Youtube, display freezes. Audio continues playing. Escape key has the screen flashing. Its as though the GPU is not being used.

MichelFrade commented 5 years ago

Same issue here too. captura de tela de 2018-10-19 18-34-16

cassidyjames commented 5 years ago

Marking as high priority since this affects a lot of people and we're getting a lot of duplicate reports of it across issue trackers and social media. Also, it really does make it difficult to do anything video related in a variety of apps across a variety of hardware.

I suppose a next step would be to see if this also happens on other OSes with the same hardware stack, like Ubuntu 18.04. Hopefully we can narrow down where the issue is.

otavioschwanck commented 5 years ago

Marking as high priority since this affects a lot of people and we're getting a lot of duplicate reports of it across issue trackers and social media. Also, it really does make it difficult to do anything video related in a variety of apps across a variety of hardware.

I suppose a next step would be to see if this also happens on other OSes with the same hardware stack, like Ubuntu 18.04. Hopefully we can narrow down where the issue is.

Have ubuntu 18.04 and Mint 19 here, dont happen. Same Drivers.

Victor-Arruda commented 5 years ago

Marking as high priority since this affects a lot of people and we're getting a lot of duplicate reports of it across issue trackers and social media. Also, it really does make it difficult to do anything video related in a variety of apps across a variety of hardware.

I suppose a next step would be to see if this also happens on other OSes with the same hardware stack, like Ubuntu 18.04. Hopefully we can narrow down where the issue is.

Have Mint 19 in another partition here, works fine.

yarbsemaj commented 5 years ago

Same here will all the same issue and fixes tried with Intel GMA 620

ritikchanna commented 5 years ago

Quick fix for Chrome users, disable H/W acceleration in settings.

For Developers, I faced the same issue on Loki when I installed open source drivers for my amd gpu. Might not be related but might help you narrow it down.

leonidasv commented 5 years ago

I suppose a next step would be to see if this also happens on other OSes with the same hardware stack, like Ubuntu 18.04. Hopefully we can narrow down where the issue is.

Arch Linux + Gnome w/ Intel drivers on X11 has no issue playing videos on Chrome on my hardware. I first thought it was a kernel/driver issue, but upgrading elementary to 4.18 did not solve.

touchwood99 commented 5 years ago

Today - Clean install of Ubuntu 18.10 on same PC running Juno There are no issues with video playback in YouTube.

yarbsemaj commented 5 years ago

Today - Clean install of Ubuntu 18.10 on same PC running Juno There are no issues with video playback in YouTube.

Had the same experience today, it's a shame really

maylton commented 5 years ago

I'm using KDE neon and there is no such a problem here too.

otavioschwanck commented 5 years ago

Franz have same problem, disabling hardware acceleration fix it. Maybe it was related to Electron Apps vs Gala =D

peteruithoven commented 5 years ago

Please people, use the thumbs up if you're not adding anything useful. There are many people who are receiving all sorts of notifications with every comment you post here.

jorge-aparicio commented 5 years ago

@otavioschwank did you just disable it for the browser or is there a way to disable Hardware acceleration at an OS level?

otavioschwanck commented 5 years ago

@otavioschwank did you just disable it for the browser or is there a way to disable Hardware acceleration at an OS level?

just disable on browser and franz. After disabling, no bugs happens.

rkoesters commented 5 years ago

I was able to fix this on my machine (Intel HD Graphics 5500) by creating the file /etc/X11/xorg.conf.d/20-intel.conf with the contents:

Section "Device"
  Identifier  "Intel Graphics"
  Driver      "intel"
  Option      "TearFree"    "true"
EndSection

(a restart will be needed afterward)

kubaplas commented 5 years ago

I confirm, @rkoesters' solution fixed issue on my "HD Graphics 520 (rev 07)".

Djaler commented 5 years ago

Hmm, still not ideal solution. After creating this file I was faced with glitches in Chrome

cassidyjames commented 5 years ago

After setting TearFree on my Intel i5-8300H, I got severe glitches in greeter, Firefox, Electron apps, and Gala. So clearly not an easy universal solution. But it does seem to confirm my suspicions that it is related to graphics drivers in some way.

mnavarrocarter commented 5 years ago

I can confirm that @rkoesters suggestion also fixes the issue in my HD Graphics 520 (rev 07). No glitches detected. Tested in Chrome (YouTube), Postman (electron), Elementary Videos, VLC and everything works fine.

mnavarrocarter commented 5 years ago

I was reading through the internet. Maybe the people that still have the screen flickering problem can try this config in /etc/X11/xorg.conf.d/20-intel.conf

Section "Device"
    Identifier "Intel Graphics"
    Driver "intel"
    Option "AccelMethod" "sna"
    Option "TearFree" "true"
    Option "DRI" "3"
EndSection

The source of this is here. It's worth a read. There are some other configs that you may test with your hardware.

rugglcon commented 5 years ago

Can confirm that the other config suggestion from @mnavarrocarter fixed the tearing and flickering at least

peterrobertz commented 5 years ago

i can confirm @mnavarrocarter solution fixed the problem for me.

dell xps 9360r ; intel i8

before: fullscreen video mode = freeze; overall sluggish

after: its gone, feels much faster + fullscreen video is no problem anymore

@cassidyjames did you simply forget to ship this file /etc/X11/xorg.conf.d/20-intel.conf ?

thank you man!

PNunesDev commented 5 years ago

@mnavarrocarter Unfortunaly I'm unable to find that file inside the X11 folder :/

mnavarrocarter commented 5 years ago

@PNunesDev You can just create it :)

cryptowyrm commented 5 years ago

@mnavarrocarter Your link says to put the file into /usr/share/X11/xorg.conf.d not /etc/X11/xorg.conf.d, and that folder actually exists already and has a few files in it, so might it be better to put the file there? The Linux folder structure is still a mystery to me for the most part so maybe there is a good reason for using /etc instead :)

One concerning issue is that the comments in your link say this increases the CPU load considerably, if true this might not be the perfect solution yet unless it's the only one that ends up working for everyone.

PNunesDev commented 5 years ago

I've used the /usr/share/X11/xorg.conf.d folder and it worked immediatally. As for the increased CPU load, it makes sense since GPU decoding probably gets disabled in videos and CPU needs to render it instead which is WAYYY less efficient.

Let's just hope this gets fixed quick. If this gets fixed in the future, let me us know so we can roll back the changes and take advantage of the GPU decode ... again! Thanks

mnavarrocarter commented 5 years ago

AFAIK, X reads from both directories. The usr one is for the default config and the etc one is for custom. That's all I know I'm afraid. :stuck_out_tongue_closed_eyes:

Cannot really comment in your second issue though. I don't have any benchmarks for that.

yarbsemaj commented 5 years ago

Can confirm that @mnavarrocarter method works however playing a 1080p youtube video causes my cpu to almost top out