Bug 2129624 - [NVIDIA] Wrong colors in video playback in firefox
Summary: [NVIDIA] Wrong colors in video playback in firefox
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: firefox
Version: 37
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Gecko Maintainer
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-09-25 15:23 UTC by eric.pouech
Modified: 2023-12-05 23:28 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-12-05 23:28:07 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
wrong colors at work (91.00 KB, image/png)
2022-09-25 15:24 UTC, eric.pouech
no flags Details

Description eric.pouech 2022-09-25 15:23:51 UTC
Description of problem:
Since upgrade to fedora37, most video playback on firefox end up with wrong colors. See an example attached (color of miniature is correct) while the main window isn't.
Green saturated (instead of cyan), or gray scale are also seen.

Version-Release number of selected component (if applicable):
[eric:~]$ uname -a
Linux euterpe 5.19.10-300.fc37.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Sep 20 15:13:35 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
[eric:~]$ LANG=C dnf list firefox* 
Last metadata expiration check: 0:00:31 ago on Sun Sep 25 17:17:37 2022.
Installed Packages
firefox.x86_64                                 104.0.2-1.fc37                   @fedora        
firefox-langpacks.x86_64                       104.0.2-1.fc37                   @fedora        
Available Packages
firefox-pkcs11-loader.x86_64                   3.13.6-8.fc37                    fedora         
firefox-wayland.x86_64                         104.0.2-1.fc37                   fedora         
firefox-wayland.x86_64                         104.0.2-1.fc37                   updates-testing
firefox-x11.x86_64                             104.0.2-1.fc37                   fedora         
firefox-x11.x86_64                             104.0.2-1.fc37                   updates-testing


How reproducible:
Most of video playback (starting with youtube, but not only)

Steps to Reproduce:
1. launch video playback
2.
3.

Actual results:


Expected results:


Additional info:
local playback (mplayer, parole) don't suffer from the same issue
tried to disable video accel in firefox => same issue (not sure it was active)

Comment 1 eric.pouech 2022-09-25 15:24:32 UTC
Created attachment 1914226 [details]
wrong colors at work

Comment 2 eric.pouech 2022-09-25 15:29:58 UTC
funnily enough, installing libvdpau-va-gl solved the issue
(can't tell whether if it was installed on fedora36, but maybe it's a dependancy issue...)
component is likely to be changed too

Comment 3 Martin Stransky 2022-09-26 07:08:34 UTC
Does libvdpau-va-gl solve the issue with VA-API enabled or disabled?
You should see VA-API status at about:support page. Firefox 105 has 'HARDWARE_VIDEO_DECODING' field there.

Comment 4 eric.pouech 2022-09-26 07:30:12 UTC
thanks for the feedback

from [[about:support]]
HARDWARE_VIDEO_DECODING	
available by default
unavailable by runtime: Force disabled by gfxInfo
...
Failure Log
(#0) Error	glxtest: VA-API test failed: no supported VAAPI profile found.

tried to turn on/off via (about:config) media.ffmpeg.vaapi.enabled, but still the same failure log
(always closing / restarting firefox after change of config & testing values/results)

moreover: libvdpau-va-gl only works when hw acceleration is disabled in about:preferences

[eric:~]$ vainfo 
libva info: VA-API version 1.15.0
libva info: Trying to open /usr/lib64/dri/nouveau_drv_video.so
libva info: Found init function __vaDriverInit_1_15
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.15 (libva 2.15.0)
vainfo: Driver version: Mesa Gallium driver 22.2.0 for NVE4
vainfo: Supported profile and entrypoints
      VAProfileNone                   :	VAEntrypointVideoProc

Comment 5 Martin Stransky 2022-09-26 07:54:32 UTC
The about:support line says VA-API is disabled. Also vainfo confirms that.
I wonder how libvdpau-va-gl is involved here - can you confirm that colors are broken when you remove it?
Thanks.

Comment 6 eric.pouech 2022-09-26 08:19:52 UTC
you're right
I removed libvdpau-va-gl and only get the issue when hw accel is enabled in about:preferences
(likely I didn't check that firefox was properly closed)

Comment 7 Martin Stransky 2022-09-26 09:19:11 UTC
(In reply to eric.pouech from comment #6)
> you're right
> I removed libvdpau-va-gl and only get the issue when hw accel is enabled in
> about:preferences
> (likely I didn't check that firefox was properly closed)

What do you mean with 'hw accel is enabled'? WebRender or VA-API?

Comment 8 eric.pouech 2022-09-26 09:50:18 UTC
I mean the tick box in about:preferences < General < performance < Use hardware acceleration when available

I saved the about:support pages with this enabled and disabled
[eric:~]$ diff info-enabled.xhtml info-disabled.xhtml 
47c47
< Remote Processes 	6 <#remote-processes>
---
> Remote Processes 	7 <#remote-processes>
92a93
> Isolated Web Content	1
125c126
< Compositing	WebRender
---
> Compositing	WebRender (Software)
166a168
> disabled by user: Disabled by layers.acceleration.disabled=true
169c171
< available by default
---
> unavailable by default: Hardware compositing is disabled
172a175
> unavailable-no-hw-compositing by runtime: Hardware compositing is disabled
186a190
> unavailable by runtime: WebRender disabled
189a194
> unavailable by runtime: WebRender disabled
235c240
< Roundtrip latency (standard deviation)	227.27ms (194.31)
---
> Roundtrip latency (standard deviation)	925.29ms (556.74)
370a376
> layers.acceleration.disabled	true

[eric:~]$ grep -3 -i video info-enabled.xhtml info-disabled.xhtml 
info-enabled.xhtml-DMABUF	
info-enabled.xhtml-available by default
info-enabled.xhtml-
info-enabled.xhtml:HARDWARE_VIDEO_DECODING	
info-enabled.xhtml-available by default
info-enabled.xhtml-unavailable by runtime: Force disabled by gfxInfo
info-enabled.xhtml-
--
info-enabled.xhtml-media.gmp-widevinecdm.lastUpdate	1654873663
info-enabled.xhtml-media.gmp-widevinecdm.version	4.10.2449.0
info-enabled.xhtml-media.gmp.storage.version.observed	1
info-enabled.xhtml:media.videocontrols.picture-in-picture.video-toggle.enabled	false
info-enabled.xhtml:media.videocontrols.picture-in-picture.video-toggle.has-used	true
info-enabled.xhtml-network.cookie.prefsMigrated	true
info-enabled.xhtml-network.predictor.cleaned-up	true
info-enabled.xhtml-network.trr.blocklist_cleanup_done	true
--
info-disabled.xhtml-DMABUF	
info-disabled.xhtml-available by default
info-disabled.xhtml-
info-disabled.xhtml:HARDWARE_VIDEO_DECODING	
info-disabled.xhtml-available by default
info-disabled.xhtml-unavailable by runtime: Force disabled by gfxInfo
info-disabled.xhtml-
--
info-disabled.xhtml-media.gmp-widevinecdm.lastUpdate	1654873663
info-disabled.xhtml-media.gmp-widevinecdm.version	4.10.2449.0
info-disabled.xhtml-media.gmp.storage.version.observed	1
info-disabled.xhtml:media.videocontrols.picture-in-picture.video-toggle.enabled	false
info-disabled.xhtml:media.videocontrols.picture-in-picture.video-toggle.has-used	true
info-disabled.xhtml-network.cookie.prefsMigrated	true
info-disabled.xhtml-network.predictor.cleaned-up	true
info-disabled.xhtml-network.trr.blocklist_cleanup_done	true

HTH

Comment 9 Martin Stransky 2022-09-26 11:13:50 UTC
I see, Thanks. So the libvdpau-va-gl looks like a part of OpenGL stack which needs to be installed in order to get NVIDIA working on Fedora.

Comment 10 Martin Stransky 2022-09-26 11:14:58 UTC
libvdpau-va-gl should be installed by default on NVIDIA systems.

Comment 11 eric.pouech 2022-09-26 11:33:17 UTC
that's not my understanding :-(

It looks I did two changes at once (thinking I was only doing a single one), which creates some confusion. My bad.

1) I de-installed (removed) libvdpau-va-gl.
2) video playback in firefox when 'about:preferences < General < performance < Use hardware acceleration when available'
is ticked (enabled) gets the wrong colors
3) video playback in firefox when 'about:preferences < General < performance < Use hardware acceleration when available'
is not ticked (disabled) gets the right colors

(Note: I have the same results when libvdpau-va-gl was installed)

AFAICT:
A) libvdpau-va-gl doesn't come into play (see above)
B) the settings for the video playback in firefox are the same in 2) and 3) (see comment #8) (HARDWARE_VIDEO_DECODING is disabled in both cases)
HARDWARE_VIDEO_DECODING	
available by default
unavailable by runtime: Force disabled by gfxInfo
C) the difference I see in whether composition is hw-accelerated or not (see comment #8)

[eric:~]$ diff -u -2 info-enabled.xhtml info-disabled.xhtml 
--- info-enabled.xhtml	2022-09-26 11:44:21.969948758 +0200
+++ info-disabled.xhtml	2022-09-26 11:45:44.965379455 +0200
@@ -45,5 +45,5 @@
 Multiprocess Windows 	1/1
 Fission Windows 	1/1 Enabled by default
-Remote Processes 	6 <#remote-processes>
+Remote Processes 	7 <#remote-processes>
 Enterprise Policies 	Inactive
 Google Location Service Key 	Found
@@ -91,4 +91,5 @@
 Privileged About	1
 Extension	1
+Isolated Web Content	1
 Preallocated	3
 Socket	1
@@ -123,5 +124,5 @@
 
 Features
-Compositing	WebRender
+Compositing	WebRender (Software)
 Asynchronous Pan/Zoom	wheel input enabled; scrollbar drag enabled; keyboard enabled; autoscroll enabled; smooth pinch-zoom enabled
 WebGL 1 Driver WSI Info	EGL_VENDOR: Mesa Project
@@ -165,10 +166,12 @@
 HW_COMPOSITING	
 available by default
+disabled by user: Disabled by layers.acceleration.disabled=true
 
 OPENGL_COMPOSITING	
-available by default
+unavailable by default: Hardware compositing is disabled
 
 WEBRENDER	
 available by default
+unavailable-no-hw-compositing by runtime: Hardware compositing is disabled
 
 WEBRENDER_QUALIFIED	
@@ -185,7 +188,9 @@
 WEBRENDER_SHADER_CACHE	
 disabled by default: Disabled by default
+unavailable by runtime: WebRender disabled
 
 WEBRENDER_OPTIMIZED_SHADERS	
 available by default
+unavailable by runtime: WebRender disabled
 
 WEBRENDER_ANGLE	
@@ -233,5 +238,5 @@
 Max Channels	2
 Preferred Sample Rate	48000
-Roundtrip latency (standard deviation)	227.27ms (194.31)
+Roundtrip latency (standard deviation)	925.29ms (556.74)
 Output Devices
 Name 	Group 	Vendor 	State 	Preferred 	Format 	Channels 	Rate 	Latency
@@ -369,4 +374,5 @@
 gfx.crash-guard.status.glcontext	2
 idle.lastDailyNotification	1664101473
+layers.acceleration.disabled	true
 media.benchmark.vp9.fps	241
 media.benchmark.vp9.versioncheck	5

Comment 12 Martin Stransky 2022-09-26 12:40:21 UTC
The difference here is WebRender / WebRender (Software). 
So do you sat that the playback is broken regardless of libvdpau-va-gl ?

Comment 13 eric.pouech 2022-09-26 12:48:29 UTC
yes the playback is broken when  'about:preferences < General < performance < Use hardware acceleration when available' is ticked (enabled) regardless if libvdpau-va-gl is installed or not

Comment 14 Martin Stransky 2022-09-26 12:53:36 UTC
Okay, Thanks. Do you mind to report at bugzilla.mozilla.org uder Core :: Graphics component?

Comment 15 eric.pouech 2022-09-26 13:13:16 UTC
done
https://bugzilla.mozilla.org/show_bug.cgi?id=1792429
(couldn't set component though)

Comment 16 Nicolas Chauvet (kwizart) 2022-10-12 07:53:48 UTC
(In reply to Martin Stransky from comment #10)
> libvdpau-va-gl should be installed by default on NVIDIA systems.

Side note: libvdpau-va-gl is a vdpau wrapper for a VAAPI backend, so that would be the opposite wrapper (libva-vdpau-driver).
But there is also nvidia-vaapi-driver (available in rpmfusion-nonfree as it's used the proprieatary nvdec API) that works in some contexts for firefox (not yet on chrome based browsers).

Hope this helps.

Comment 17 Robert Mader 2022-10-12 10:01:51 UTC
There is a good chance that this is a duplicate of a Mesa/NIR bug visible on Raspberry Pi/v3d (assuming nouveau now also uses NIR): https://gitlab.freedesktop.org/mesa/mesa/-/issues/7062

There currently doesn't appear to be any Mesa devs actively working on it, however some investigation was already done (https://gitlab.freedesktop.org/mesa/mesa/-/issues/7062#note_1574199) - maybe some RedHat nouveau dev could have a look?

Comment 18 Aoife Moloney 2023-11-23 00:23:59 UTC
This message is a reminder that Fedora Linux 37 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 37 on 2023-12-05.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '37'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 37 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 19 Aoife Moloney 2023-12-05 23:28:07 UTC
Fedora Linux 37 entered end-of-life (EOL) status on None.

Fedora Linux 37 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.