Bug 30372

Summary: Purple tint to videos in last two Firefox updates
Product: Mageia Reporter: aguador <waterbearer54>
Component: RPM PackagesAssignee: Mageia Bug Squad <bugsquad>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Normal CC: chb0, ghibomgx, npomarede, zen25000
Version: Cauldron   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: firefox-91.9.0-1.mga9.src.rpm CVE:
Status comment:
Attachments: Video rendering data
Screen shot, purple video

Description aguador 2022-05-04 11:09:50 CEST
When reproducing videos in Firefox everything is tinted purple.

This happens no matter if the video is embedded or not, and happens in both E 0.25.3 and IceWM. It also occurs with add-ons disabled and with/without hardware acceleration.

My system: Asus A53S Optimus laptop, i5-2450M processor
           GeForce 610M - but defaults to onboard graphics

To replicate open Firefox and go to any video and play.
Comment 1 aguador 2022-05-04 11:12:01 CEST
Created attachment 13232 [details]
Video rendering data
Comment 2 aguador 2022-05-04 11:12:37 CEST
Created attachment 13233 [details]
Screen shot, purple video
Comment 3 sturmvogel 2022-05-04 11:29:10 CEST
You get a mass of results if you search for it (e.g. with google). It's a problem with old videocards/-chipsets and drivers.

Did you already tried following tip (which you can find in nearly all of the search results)?

enter about:config into the firefox address bar (confirm the info message in case it shows up) & search for the preference named media. windows-media-foundation. use-nv12-format. double-click it and change its value to false.
Comment 4 sturmvogel 2022-05-04 11:32:01 CEST
If this string doesn't exist you can also create it.
Comment 5 sturmvogel 2022-05-04 11:46:25 CEST
You could also try to switch to your GeForce card to check if it is a driver problem for your old intel chipset. 
https://wiki.mageia.org/en/Mageia-prime_for_Optimus
Comment 6 Barry Jackson 2022-05-04 18:31:29 CEST
I just tested the recently built firefox-beta package and the problem is fixed.

No changes to any settings, drivers etc.

CC: (none) => zen25000

Comment 7 Lewis Smith 2022-05-04 21:45:47 CEST
Thank you Frank for your helpful pointers.

And Barry; but can you say exactly which version of Firefox = "recently built firefox-beta package"?
Comment 8 Barry Jackson 2022-05-05 00:57:50 CEST
> And Barry; but can you say exactly which version of Firefox = "recently
> built firefox-beta package"?

Sorry

[baz@jackodesktop ~]$ rpm -qa|grep firefox-beta
firefox-beta-101.0-0.b2.mga9

Appeared on mirrors today 4th May.
Comment 9 Giuseppe Ghibò 2022-05-05 12:01:34 CEST
So mga8 ok, mga9 purple. Can you try also if the same problem occur with upstream binaries of the same ESR version (download from https://ftp.mozilla.org/pub/firefox/releases/91.9.0esr/linux-x86_64/en-US/firefox-91.9.0esr.tar.bz2 and untar in a local dir)?

As difference there is also mga9 using mesa 22.0.3, while mga8 mesa 21.3.8.

CC: (none) => ghibomgx

Comment 10 aguador 2022-05-05 12:59:38 CEST
Thanks for the link Giuseppe. My Cauldron is presumably up to date, but mesa shows as 22.0.2. The FF binary reproduces videos just fine, no purple.
Comment 11 Giuseppe Ghibò 2022-05-05 14:14:53 CEST
Ok, then is something in our firefox. There is a last test. Dunno if possible but should. I.e. Take the binary rpm of firefox from mga8 from some mirror and install and run it over mga9.

A first hypothesis could be compiler. AFAIK recently cauldron firefox switched from compilation from gcc to clang, while from a quick gaze firefox in mga9 from updates is built still with gcc.

Another experiment is to take the mga8's firefox 91.9.0 src.rpm, as it should use gcc and rebuild in cauldron.
Comment 12 aguador 2022-05-06 11:43:22 CEST
OK, grabbed the mga8 rpm for FF 91.9.0, but rpm reports that the mga9 package is newer and even with the --oldpackage option reports conflicts and refuses to install it.

As I was responding I realized that I am not clear about the compiler issue. From what you say in the second and third paragraphs it appears that 91.9.0 in both mga8 and mga9 were built with gcc. If that is true, then the compiler should not be the issue, right?

Nonetheless if the FF-beta src could be adapted realitively easitly to build 91.9.0 with clang, I suppose it is worth a try.

It's a pity that we are still almost 2 months from the release of the next ESR.
Comment 13 Giuseppe Ghibò 2022-05-06 14:44:05 CEST
Indeed there is the urpmi option "--downgrade" (mga8 is older than mga9). Anyway I tried and mga8's firefox wouldn't install over cauldron due to other libs dependencies.

As for compilers, I rechecked, and result is that clang was used everywhere, at least on latest versions and for x86_64; here are the compilers used:

firefox-91.9.0-1.mga9 (ESR) x86_64 (cauldron): clang 14.0.0
firefox-91.9.0-1.mga8 (ESR) x86_64 (mga8's updates_testing): clang 11.0.1
firefox-91.9.0 ESR x86_64 (upstream binaries): clang 12.0.0

so it could be either a bug in clang 14.0.0 or that version 14.0.0 triggers some bugs in mozilla code or something newer in the other libs (e.g. ffmpeg5). Maybe as an attempt it could be tried recompiling firefox in cauldron with gcc.

As for FF-beta AFAIK it is keepen only as testing for ensuring that it builds on the system and that the other system library deps are ok. AFAIK the jump to a new ESR depends either on the old ESR to exaust (at least for mga8) and the new ESR release upstream (maybe based on 102?). Apparently here is the firefox calendar:

https://wiki.mozilla.org/Release_Management/Calendar
Comment 14 Nicolas Pomarède 2022-05-15 13:53:35 CEST
Same problem here since a few days after upgrading tofirefox-91.9.0-1.mga9 under cauldron.
Previous version worked fine.

HW : thinkpad t470 laptop with integrated intel video HD graphics 620.

CC: (none) => npomarede

Comment 15 Giuseppe Ghibò 2022-05-16 14:16:19 CEST
I tried to rebuild this version with gcc instead of clang. Result is here (no locales packages):

https://copr-be.cloud.fedoraproject.org/results/ghibo/mageia9_updates/mageia-cauldron-x86_64/04414922-firefox/firefox-91.9.0-1.mga9.x86_64.rpm

You might try to install whther this version gives the same results, installing from that link with urpmi, or directly with dnf (by having previously enabled the repo with dnf copr enable ghibo/mageia9_updates). Note that since the version number is the same as the actual cauldron version you need to remove the previous installed version, or play with --downgrade.
Comment 16 Barry Jackson 2022-05-16 15:17:59 CEST
(In reply to Giuseppe Ghibò from comment #15)
> I tried to rebuild this version with gcc instead of clang. Result is here
> (no locales packages):
> 
> https://copr-be.cloud.fedoraproject.org/results/ghibo/mageia9_updates/mageia-
> cauldron-x86_64/04414922-firefox/firefox-91.9.0-1.mga9.x86_64.rpm
> 

Using the downloaded rpm from your above link I did:

[root@jackodesktop baz]# rpm -e firefox --nodeps
[root@jackodesktop baz]# urpmi /home/baz/BUGS/firefox-91.9.0-1.mga9.x86_64.rpm

This works fine without any purple :)
Tested using the same youtube video that I have tested with each time.
Comment 17 Nicolas Pomarède 2022-05-16 21:42:43 CEST
Just to confirm that this gcc build also fixed my purple issue. colors are OK again, as with previous FF versions.
christian barranco 2022-05-17 19:51:06 CEST

CC: (none) => chb0

Comment 18 aguador 2022-05-18 00:35:01 CEST
Confirming that firefox-91.9.0-2 fixes the issue.

Resolution: (none) => FIXED
Status: NEW => RESOLVED

Comment 19 christian barranco 2022-05-18 07:24:07 CEST
Hi FF ESR is now updated on Cauldron with the x86_64 version built with gcc. 
Could someone test it?
Comment 20 christian barranco 2022-05-18 07:25:59 CEST
(In reply to christian barranco from comment #19)
> Hi FF ESR is now updated on Cauldron with the x86_64 version built with gcc. 
> Could someone test it?

Sorry, saw aguador’s feedback after posting! He has been very quick to catch the update before I saw the build was ready :)