FreeTube icon indicating copy to clipboard operation
FreeTube copied to clipboard

[Bug]: video glitch since version 0.20

Open Angedestenebres opened this issue 1 year ago • 31 comments

Guidelines

  • [X] I have encountered this bug in the latest release of FreeTube.
  • [X] I have encountered this bug in the official downloads of FreeTube.
  • [X] I have searched the issue tracker for open and closed issues that are similar to the bug report I want to file, without success.
  • [X] I have searched the documentation for information that matches the description of the bug I want to file, without success.
  • [X] This issue contains only one bug.

Describe the bug

  1. Open Freetube
  2. Click on a video
  3. The playing starts
  4. After few second, there are some glitches.
  5. See this video to illustrate the issue: https://video.tedomum.net/w/nf5o9io8pTRB7dbNXvUbMC

Expected Behavior

Playing video without issue

Issue Labels

visual bug

FreeTube Version

0.20

Operating System Version

Linux Mint 21.3

Installation Method

Flathub

Primary API used

Local API

Last Known Working FreeTube Version (If Any)

0.19.2

Additional Information

I have two laptops and both has the same OS (Linux Mint 21.3) and version (flatpak 0.20) but only one laptop has this issue. Both using X11.

However, the resolution of the laptop with the issue is 1366x768 (max for my screen). I don't have the issue on the laptop with the resolution 1920x1080.

Nightly Build

Angedestenebres avatar Apr 06 '24 20:04 Angedestenebres

I complete the ticket with the PC configuration where I get the issue:

CPU: Intel© Core™ i5-5300U CPU @ 2.30GHz × 2 GPU: Intel Corporation HD Graphics 5500 RAM: 8Gb Resolution: 1366x768 OS: Linux Mint 21.3 DE: Cinnamon Display server: X11

I tried to remove the app cache in /.var and also all the config, no effect. Remove and install again the app didn't resolve the issue.

Also, I have no issue to watch a video directly from Youtube website or from a Peertube instance or a local video. The issue is linked to Freetube only.

Angedestenebres avatar Apr 07 '24 08:04 Angedestenebres

I have this exact problem and had to switch to the Flatpak to get around it, with the version 0.20 bump it has once again reared it's ugly head.

The bug is introduced somewhere between "v0.19.1-nightly-3750 Beta" and "v0.19.1-nightly-3828 Beta" (for once, procrastinating cleaning my ~/Downloads came in useful :P). Since the Flatpak fixed the problem and no one had filed an issue here, I assumed I had a problem with my configuration.

It doesn't show up on screen record. I see it in pretty much every video, multiple times. Minimum once every five minutes, but on some videos several times a minute. I get the impression that more active videos have more of the bug. On a rewatch of a video, it doesn't occur on the same timestamps. Fullscreen or not doesn't seem to matter.

It shows up in Freetube v0.19.1-nightly-3828 Beta and the v0.20.0 Beta Flatpak, but not in the v0.19.1-nightly-3750 Beta.

Here's my configuration, it's a Dell Latitude E7450 laptop with three monitors connected trough a dock.

OS: openSUSE Tumbleweed x86_64 Host: Latitude E7450 Kernel: 6.8.2-1-default Resolution: 1920x1080, 1920x1080, 1920x1080 DE: Xfce 4.18 WM: Xfwm4 CPU: Intel i5-5300U (4) @ 2.900GHz GPU: Intel HD Graphics 5500 Memory: 4178MiB / 15863MiB Display server: X11

ssnor avatar Apr 07 '24 21:04 ssnor

Interesting, we have the same CPU / GPU. Maybe it's related to that. I think it could be interesting to have more reports and details about configurations.

Angedestenebres avatar Apr 08 '24 16:04 Angedestenebres

I've got the same problem when I use FreeTube on my old laptop (a Lenovo G70-80 with an Intel I7-5500U CPU with integrated HD 5500 graphics.) I can watch videos through other applications (browser, Celluloid, etc.) without a problem. When I use FreeTube on my main desktop PC (AMD 5700X CPU, Radeon 7600 graphics) it works fine, so the problem seems to be specific to old Intel CPUs.

jwadden avatar Apr 16 '24 13:04 jwadden

I can pretty much confirm that this is an hardware acceleration bug. The bug disappears when you deny FreeTube GPU acceleration (and CPU levels rise back to what they where before the update). Can any of you guys try it and see if that solves the issue for you? Flatseal can deny GPU acceleration in the sandbox if you use the Flatpak version of FreeTube.

I always suspected something with the GPU since the visuals of the bug reminded me of what a faulty GPU can look like. Can we assume this is an Electron bug, or is GPU acceleration handled by something else in FreeTube?

ssnor avatar Apr 17 '24 15:04 ssnor

FreeTube turns on VA-API video decoding on Linux in Electron but the rendering of the videos is outside of FreeTube's control. As you all seem to be using pretty similar hardware, I suspect that it is more likely to be GPU driver issue. Probably in the Intel driver's VA-API implementation for that hardware.

absidue avatar Apr 17 '24 16:04 absidue

Hello,

@ssnor: You are right. If I disable the GPU acceleration via Flatseal, it works like a charm.

@absidue: I think there is a link with the GPU but did you change something between old versions and the current one? Because I use Freetube on this computer since 2021 and I never see that until now.

Angedestenebres avatar Apr 17 '24 16:04 Angedestenebres

It's probably just a flag set to activate GPU acceleration for our architecture in an Electron bump. I am curious if it is possible to disable it without using the Flatpak sandbox?

This is the driver I think, but I couldn't find an issue filed for this bug. Btw, this might be woo-woo, but I found the bug reduced in frequency after a BIOS update. Could be placebo though.

ssnor avatar Apr 17 '24 17:04 ssnor

Can you run a Chromium browser (Chromium, Chrome, Brave, ...) with the --enable-features=VaapiVideoDecodeLinuxGL flag to enable hardware acceleration and see if YouTube videos play normally?

CC: @Angedestenebres @ssnor.

did you change something between old versions and the current one?

https://github.com/FreeTubeApp/FreeTube/pull/4532 happened.

Revival8697 avatar Apr 24 '24 08:04 Revival8697

Hello,

After checking by opening Chromium with this value, I have no issue at all. However, if I enable again the GPU acceleration via Flatseal, I get again the issue on Freetube.

Angedestenebres avatar Apr 26 '24 14:04 Angedestenebres

Hello,

After checking by opening Chromium with this value, I have no issue at all. However, if I enable again the GPU acceleration via Flatseal, I get again the issue on Freetube.

Hmm. If it is working on Chromium, it should work on Freetube.

Can you verify your hardware acceleration is working on Chromium? Play a video, F12 > Vertical 3 dots > More tools > Media > Video decoder, Hardware decoder should be true.

Revival8697 avatar May 10 '24 09:05 Revival8697

I have the glitching problem too. I'm running v0.20.0 on an Intel NUC (i3 processor) with XUbuntu 22.04. Actually I have it running on two identical NUCs with the same OS, and using the built-in video hardware. I only see the glitchy video on one of the NUCs. The only difference that I'm aware of is that the video resolution is set to 1280x720 where I see the glitchy video. The other is set to 1920X1080 and no problems with the video. The glitchy video shows up when playing the video in full screen OR non-fullscreen. It occurs every minute or so. I glad I found this bug report, since I hadn't thought about the resolution difference in my two setups. [EDIT 6/6/2024] I spent some time watching a video on the aforementioned1920x1080 NUC. I DO notice some video glitching but it only occurs when I click on the time line to skip forward or back in the video.[/EDIT] GREAT software otherwise - I'm really enjoying it. Here's two successive frames showing the problem Glitch1 Glitch2

blhobbs avatar May 31 '24 23:05 blhobbs

I have this issue as well. At least some workaround like a setting to disable GPU acceleration would be nice.

$ lspci -k | grep -EA3 'VGA'
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 5500 (rev 09)
	DeviceName:  Onboard IGD
	Subsystem: Dell HD Graphics 5500
	Kernel driver in use: i915

msjoberg avatar Jun 11 '24 18:06 msjoberg

I have this issue as well. At least some workaround like a setting to disable GPU acceleration would be nice.

You can use --disable-gpu for now.

Revival8697 avatar Jun 11 '24 22:06 Revival8697

Does this issue still persist for you on v0.21.0?

Hey :cat:

Does this issue still persist for you on v0.21.0?

For the moment, the flatpak version is still in 0.20. I'll try again when the 0.21 will be available.

Angedestenebres avatar Jun 21 '24 13:06 Angedestenebres

After testing with the version 0.21 with my computer (see: https://github.com/FreeTubeApp/FreeTube/issues/4890#issuecomment-2041364824), I still have the issue.

Angedestenebres avatar Jun 22 '24 10:06 Angedestenebres

Environment: librem 5, postmaketos edge, freetube 0.20, kernel 6.6.32-librem5.2, wayland, phosh 0.39.0r1.

Freetube

For me videos play normally but especially on initial load all the subscription videos show up with dark blue tint, playing the video and going back to subscription list then shows the correct color.

CaptainMorgan12 avatar Jun 30 '24 14:06 CaptainMorgan12

This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Jul 29 '24 01:07 github-actions[bot]

The issue is still there with the latest version (0.21.2).

Angedestenebres avatar Jul 29 '24 05:07 Angedestenebres

I'm running Wayland on KDE Neon distro on Intel Ultra 7 CPU with ARC graphics driver installed. There is a total video glitch in Freetube v0.21.3 beta

Снимок экрана_20240811_181843-1

Video works ok only with --disable-gpu flag

UPD: On X11 same glitch. So in my case it's look like intel ARC graphics related problem (driver installed and works fine)

Flashwalker avatar Aug 11 '24 12:08 Flashwalker

This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Sep 11 '24 01:09 github-actions[bot]

still have the issue with v0.21.3 Beta

CaptainMorgan12 avatar Sep 11 '24 02:09 CaptainMorgan12

Hello

I confirm I still have the issue and since an update of freedesktop on flatpak side, it's even worse because I can't use anymore Freetube without GPU acceleration:

image

When I run it via terminal, I got the following error:

[2:0911/172014.248428:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: Aucun fichier ou dossier de ce type
LaunchProcess: failed to execvp:
xdg-settings
Gtk-Message: 17:20:14.439: Failed to load module "xapp-gtk3-module"
[2:0911/172014.513572:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: Aucun fichier ou dossier de ce type
[2:0911/172014.513673:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: Aucun fichier ou dossier de ce type
MESA: error: Failed to query drm device.
glx: failed to create dri3 screen
failed to load driver: iris
failed to open /dev/dri/card1: Aucun fichier ou dossier de ce type
failed to load driver: iris

So currently, Freetube is unusable on my computer but maybe this can help to find the root cause, I'm not sure this is 100% on Freetube side.

Angedestenebres avatar Sep 11 '24 15:09 Angedestenebres

@Angedestenebres This may help.

https://wiki.archlinux.org/title/Intel_graphics#Corruption_or_unresponsiveness_in_Chromium_and_Firefox

Revival8697 avatar Sep 12 '24 05:09 Revival8697

@Angedestenebres This may help.

https://wiki.archlinux.org/title/Intel_graphics#Corruption_or_unresponsiveness_in_Chromium_and_Firefox

Thanks but I don't know how to set that quickly with flatpak & flatseal.

Angedestenebres avatar Sep 13 '24 07:09 Angedestenebres

@Angedestenebres Can you try running FreeTube with MESA_LOADER_DRIVER_OVERRIDE=i965?

Revival8697 avatar Sep 14 '24 05:09 Revival8697

Can you try running FreeTube with MESA_LOADER_DRIVER_OVERRIDE=i965?

it works for me

Flashwalker avatar Sep 14 '24 05:09 Flashwalker

Can those with 5th Gen Intel CPU (Gen 8 GPU) test native FreeTube (not Flatpak) on an up-to-date distro (not Debian)?

This is most likely an issue with the iris driver in mesa at this point.

Revival8697 avatar Sep 14 '24 10:09 Revival8697

Okay so it sounds like at this point it's basically confirmed to be a problem with the graphics driver which means we can't do anything about it from our side, so I'll label this with https://github.com/FreeTubeApp/FreeTube/labels/third-party .

If the graphics drivers do ever get fixed, feel free to mention it here or close the issue directly.

absidue avatar Sep 19 '24 21:09 absidue