Jump to content

Firefox video decoding/display bug on Linux

As the title suggests; I'm experiencing a very strange (and specific) bug with playing video on Firefox.

If the video is larger than a certain size, and is playing, any dark grey part of the image will show whatever is underneath that window (as if it were slightly transparent).

I know it's not a problem with my display because it shows up in screenshots as well. Here's a screenshot of a video from YouTube playing on Firefox.

Spoiler

779384616_Screenshotfrom2018-12-1600-12-46.png.708df8545b29d5c8b14e276aca169f19.png

(If it's not visible, here's the same screenshot but with adjusted levels to make the issue more noticeable.

Spoiler

1895076700_Screenshotfrom2018-12-1600-12-46(copy).png.ad937ba23d0e6294caa30e0ba904569e.png

You can see me writing this very post in the background! It's extremely noticeable even without the adjusted colours on my display, annoyingly.

The screenshots are of a YouTube video playing on Firefox; but the same thing happens even with Netflix videos.

It doesn't happen if the video is smaller than 'Cinema mode' on YouTube. It also doesn't happen if the video is paused; only while it's playing.

It only happens when playing videos through Firefox, local video players (e.g. VLC, mpv, etc.) and other browsers (e.g. Chrome) don't exhibit this issue.

 

I'm using GNOME 3.30.2 on Arch Linux 64-bit, if that helps. This happens even with the default theme & all extensions disabled.

I don't have xf86-video-intel installed (i.e. instead using the modesetting driver), and I don't have any additional options configured in xorg.conf/xorg.conf.d

 

Any help, even if just to point me to the right direction, would be appreciated. Thanks in advance :D

Desktop: HP Z220 Workstation, 12 GB RAM, 2x500 GB HDD RAID0, + GTX 1060 3GB

Laptop: ThinkPad T430, 8 GB RAM, 1x120 GB SSD

Link to comment
Share on other sites

Link to post
Share on other sites

my guess would be it's something to do with transparency settings, with it "trying" to make some parts of the video transparent, because they match a pre defined "background" color.

 

beyond that i probably wont be of much help, i kinda have a hatred for gnome 3..

 

sidenote, any particular reason for using arch?

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, manikyath said:

my guess would be it's something to do with transparency settings, with it "trying" to make some parts of the video transparent, because they match a pre defined "background" color.

 

beyond that i probably wont be of much help, i kinda have a hatred for gnome 3..

 

sidenote, any particular reason for using arch?

Do you know where I can find those settings somewhere in GNOME or Firefox? I dug around a bit even in about:config and didn't find anything about that ?

 

I'm using arch because of the AUR and the ABS (Arch Build System)

Even if a package doesn't exist in the normal repositories; you can usually find it in the AUR. Failing that, you can still make your own PKGBUILD so you can still update it normally with the rest of the system; and not have to resort to manually downloading and compiling source code when you want to update.

 

In Debian/Ubuntu if the package isn't in the normal repositories, you'd need to add another third-party repository. Since the packages in those repositories are pre-packaged though, you have to blindly trust whoever the repository maintainer is and hope that they didn't modify the package in any way. With the AUR/ABS, you can actually see the PKGBUILD before it gets packaged up, so you can see exactly what it's going to download and what commands it will use for compiling/installation, etc.

 

Other than that, there isn't really any other particular reason for me using arch, other than maybe since it forces you to configure everything manually, I have a slightly deeper understanding of my system, I guess ?

Desktop: HP Z220 Workstation, 12 GB RAM, 2x500 GB HDD RAID0, + GTX 1060 3GB

Laptop: ThinkPad T430, 8 GB RAM, 1x120 GB SSD

Link to comment
Share on other sites

Link to post
Share on other sites

Are you using a userChrome.css mod by any chance? Disable it to see if it's the culprit

🙂

Link to comment
Share on other sites

Link to post
Share on other sites

Wait, why are you using the modesetting driver? That is clearly the cause.

Anyway, in firefox there isn't any hardware decoding, and without vaapi + xorg drivers there isn't hardware decoding either for VLC or MPV

Link to comment
Share on other sites

Link to post
Share on other sites

6 hours ago, duncannah said:

Are you using a userChrome.css mod by any chance? Disable it to see if it's the culprit

I'm not using userChrome.css; I can't even find the file (Did # find -name "userChrome.css" in the root directory; it didn't find anything).

I did notice that Firefox would automatically adapt to the system theme somehow, but the issue happens even if I switch themes; and I'm not sure about the mechanism of how that works so I don't know of a way to completely disable it. Following instructions on the internet (e.g. env GTK_THEME=Adwaita:light firefox) didn't seem to change anything either

 

3 hours ago, Lukyp said:

Wait, why are you using the modesetting driver? That is clearly the cause.

Anyway, in firefox there isn't any hardware decoding, and without vaapi + xorg drivers there isn't hardware decoding either for VLC or MPV

I did use xf86-video-intel (i915) driver previously, but I had issues with diagonal (yes, diagonal) screen tearing when scrolling in the browser and when watching videos; even with TearFree enabled in xorg.conf. No such issue with the modesetting driver.

Anyway, I've decided to try using it again and nope; the same issue still happens, albeit now with more screen tearing issues, so I'm not sure if it's unrelated or if I'm configuring my xorg.conf wrongly.

 

I know about the issues with hardware acceleration in Firefox; and I think mpv just straight-up defaults to software decoding (as, according to the devs, it doesn't offer any benefit). I just find it strange that this issue is only occuring with Firefox and not any other software. Even Chrome works fine, so it's gotta be a Firefox-specific issue

 

EDIT: I just realized I left out a very important bit of information in my main post; this is happening on my laptop which has an Intel HD 4000 (in an i5-3320M), this doesn't happen on my desktop which has an Nvidia GTX 1060 3GB.

Both systems have pretty much an identical configuration; Arch Linux, GNOME, same themes for applications, cursor, shell, etc., same GNOME extensions, same Firefox extensions (synced via Firefox Sync), etc.

Desktop: HP Z220 Workstation, 12 GB RAM, 2x500 GB HDD RAID0, + GTX 1060 3GB

Laptop: ThinkPad T430, 8 GB RAM, 1x120 GB SSD

Link to comment
Share on other sites

Link to post
Share on other sites

8 hours ago, TakataruMC said:

I'm not using userChrome.css; I can't even find the file (Did # find -name "userChrome.css" in the root directory; it didn't find anything).

I did notice that Firefox would automatically adapt to the system theme somehow, but the issue happens even if I switch themes; and I'm not sure about the mechanism of how that works so I don't know of a way to completely disable it. Following instructions on the internet (e.g. env GTK_THEME=Adwaita:light firefox) didn't seem to change anything either

 

I did use xf86-video-intel (i915) driver previously, but I had issues with diagonal (yes, diagonal) screen tearing when scrolling in the browser and when watching videos; even with TearFree enabled in xorg.conf. No such issue with the modesetting driver.

Anyway, I've decided to try using it again and nope; the same issue still happens, albeit now with more screen tearing issues, so I'm not sure if it's unrelated or if I'm configuring my xorg.conf wrongly.

 

I know about the issues with hardware acceleration in Firefox; and I think mpv just straight-up defaults to software decoding (as, according to the devs, it doesn't offer any benefit). I just find it strange that this issue is only occuring with Firefox and not any other software. Even Chrome works fine, so it's gotta be a Firefox-specific issue

 

EDIT: I just realized I left out a very important bit of information in my main post; this is happening on my laptop which has an Intel HD 4000 (in an i5-3320M), this doesn't happen on my desktop which has an Nvidia GTX 1060 3GB.

Both systems have pretty much an identical configuration; Arch Linux, GNOME, same themes for applications, cursor, shell, etc., same GNOME extensions, same Firefox extensions (synced via Firefox Sync), etc.

That's strange, anyway you shouldn't configure X.org on modern distros because there is no need to change the default options unless you have problems (like this case), but what it seems to me is a regression, that could also not be releated to graphics (which shouldn't be that rare on Arch)
Intel cards should be the best supported ones, really strange...
Does that happened after a system update?

Stating from there https://wiki.archlinux.org/index.php/intel_graphics
anyway there are some things I would try to solve the Intel tearing issue you are having, like the .drirc file with vblank on it, because using the vesa driver isn't a good thing 

https://wiki.archlinux.org/index.php/intel_graphics#Tearing
Also try those options, this page it's very well documented

PS: Does that laptop has a dual GPU config? 

Link to comment
Share on other sites

Link to post
Share on other sites

21 hours ago, Lukyp said:

That's strange, anyway you shouldn't configure X.org on modern distros because there is no need to change the default options unless you have problems (like this case), but what it seems to me is a regression, that could also not be releated to graphics (which shouldn't be that rare on Arch)
Intel cards should be the best supported ones, really strange...
Does that happened after a system update?

Stating from there https://wiki.archlinux.org/index.php/intel_graphics
anyway there are some things I would try to solve the Intel tearing issue you are having, like the .drirc file with vblank on it, because using the vesa driver isn't a good thing 

https://wiki.archlinux.org/index.php/intel_graphics#Tearing
Also try those options, this page it's very well documented

PS: Does that laptop has a dual GPU config? 

I'm not sure when exactly it started happening. I don't usually use my laptop for watching videos since, as much as I love my ThinkPad, the display sucks quite a bit.

I already have .drirc with vblank_mode set to 1, and TearFree and SwapbuffersWait are set to true in xorg.conf.d/20-intel.conf, however the screen still exhibits a lot of tearing when watching video and occasionally when scrolling the page.

 

Also, no, this is sadly one of the lower tier ThinkPads, no webcam, optical drive or dedicated GPU. Just 1366x768 TN panel with ThinkLight and i5 with an HD 4000

Desktop: HP Z220 Workstation, 12 GB RAM, 2x500 GB HDD RAID0, + GTX 1060 3GB

Laptop: ThinkPad T430, 8 GB RAM, 1x120 GB SSD

Link to comment
Share on other sites

Link to post
Share on other sites

2 hours ago, TakataruMC said:

I'm not sure when exactly it started happening. I don't usually use my laptop for watching videos since, as much as I love my ThinkPad, the display sucks quite a bit.

I already have .drirc with vblank_mode set to 1, and TearFree and SwapbuffersWait are set to true in xorg.conf.d/20-intel.conf, however the screen still exhibits a lot of tearing when watching video and occasionally when scrolling the page.

 

Also, no, this is sadly one of the lower tier ThinkPads, no webcam, optical drive or dedicated GPU. Just 1366x768 TN panel with ThinkLight and i5 with an HD 4000

As a least attempt I would clear the entire home folder, just for testing you could add simply another user, and test all the programs from there

if the issue still persist I would reinstall all arch packages 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×