mp4 rendering is broken independent of "Use hardware acceleration when available" and "media.hardware-video-decoding.enabled" / "media.hardware-video-decoding.force-enabled" settings. Used to work before. Reproducible: Always Could be related to https://bugzilla.mozilla.org/show_bug.cgi?id=1708444 and/or https://bugzilla.mozilla.org/show_bug.cgi?id=1759557. Symptomps are very similar to this SO question: https://stackoverflow.com/questions/64435763/ffmpeg-screen-blend-mode-turns-image-pink
Created attachment 787646 [details] FF+Ch side-by-side
Works with AMD GPU. Fails on i965.
Please include emerge --info.
Sure. Portage 3.0.30 (python 3.9.13-final-0, default/linux/amd64/17.1/desktop, gcc-11.3.0, glibc-2.34-r13, 5.15.32-gentoo-r1 x86_64) ================================================================= System uname: Linux-5.15.32-gentoo-r1-x86_64-Intel-R-_Xeon-R-_CPU_E3-1246_v3_@_3.50GHz-with-glibc2.34 KiB Mem: 24644600 total, 1937356 free KiB Swap: 5242876 total, 5093908 free Timestamp of repository gentoo: Sat, 25 Jun 2022 17:45:01 +0000 Head commit of repository gentoo: d2f32e14392d7a09da0881605071e001051c4997 sh bash 5.1_p16 ld GNU ld (Gentoo 2.37_p1 p2) 2.37 ccache version 4.5.1 [disabled] app-misc/pax-utils: 1.3.3::gentoo app-shells/bash: 5.1_p16::gentoo dev-java/java-config: 2.3.1::gentoo dev-lang/perl: 5.34.1-r3::gentoo dev-lang/python: 3.9.13::gentoo, 3.10.5::gentoo dev-lang/rust: 1.60.0::gentoo dev-util/ccache: 4.5.1::gentoo dev-util/cmake: 3.22.4::gentoo dev-util/meson: 0.61.4-r2::gentoo sys-apps/baselayout: 2.8::gentoo sys-apps/openrc: 0.44.10::gentoo sys-apps/sandbox: 2.29::gentoo sys-devel/autoconf: 2.13-r2::gentoo, 2.71-r1::gentoo sys-devel/automake: 1.16.5::gentoo sys-devel/binutils: 2.37_p1-r2::gentoo sys-devel/binutils-config: 5.4.1::gentoo sys-devel/clang: 14.0.4::gentoo, 15.0.0.9999::gentoo sys-devel/gcc: 11.3.0::gentoo sys-devel/gcc-config: 2.5-r1::gentoo sys-devel/libtool: 2.4.7::gentoo sys-devel/lld: 14.0.4::gentoo sys-devel/llvm: 14.0.4::gentoo, 15.0.0.9999::gentoo sys-devel/make: 4.3::gentoo sys-kernel/linux-headers: 5.15-r3::gentoo (virtual/os-headers) sys-libs/glibc: 2.34-r13::gentoo Repositories: gentoo location: /var/db/repos/gentoo sync-type: rsync sync-uri: rsync://rsync.de.gentoo.org/gentoo-portage priority: -1000 sync-rsync-extra-opts: sync-rsync-verify-metamanifest: yes sync-rsync-verify-jobs: 0 sync-rsync-verify-max-age: 24 crossdev location: /var/db/repos/crossdev masters: gentoo priority: 10 pf4public location: /var/lib/layman/pf4public sync-type: laymansync sync-uri: https://github.com/PF4Public/gentoo-overlay.git masters: gentoo priority: 50 Installed sets: @dellgen ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="@FREE" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=haswell -O3 -pipe -floop-nest-optimize -floop-strip-mine -floop-block -fgraphite-identity -floop-parallelize-all -ftree-parallelize-loops=4 -flto=8 -fdevirtualize-at-ltrans -falign-functions=32 -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-stack-protector -fomit-frame-pointer -fno-semantic-interposition -fno-plt -fipa-pta" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/i2pd/certificates" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php8.0/ext-active/ /etc/php/apache2-php8.1/ext-active/ /etc/php/cgi-php8.0/ext-active/ /etc/php/cgi-php8.1/ext-active/ /etc/php/cli-php8.0/ext-active/ /etc/php/cli-php8.1/ext-active/ /etc/php/fpm-php8.0/ext-active/ /etc/php/fpm-php8.1/ext-active/ /etc/php/phpdbg-php8.0/ext-active/ /etc/php/phpdbg-php8.1/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-march=haswell -O3 -pipe -floop-nest-optimize -floop-strip-mine -floop-block -fgraphite-identity -floop-parallelize-all -ftree-parallelize-loops=4 -flto=8 -fdevirtualize-at-ltrans -falign-functions=32 -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-stack-protector -fomit-frame-pointer -fno-semantic-interposition -fno-plt -fipa-pta" DISTDIR="/var/cache/distfiles" EMERGE_DEFAULT_OPTS="--autounmask --autounmask-write --autounmask-keep-masks --nospinner --jobs --load-average 15 --buildpkg-exclude 'sys-kernel/gentoo-sources sys-kernel/linux-firmware sys-firmware/* virtual/* acct-*/*'" ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg buildpkg-live compress-index config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news nodoc noinfo noman parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://mirror.hetzner.de/gentoo/" LANG="en_GB.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--sort-common -Wl,-z,norelro -march=haswell -O3 -pipe -floop-nest-optimize -floop-strip-mine -floop-block -fgraphite-identity -floop-parallelize-all -ftree-parallelize-loops=4 -flto=8 -fdevirtualize-at-ltrans -falign-functions=32 -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-stack-protector -fomit-frame-pointer -fno-semantic-interposition -fno-plt -fipa-pta" LINGUAS="en_GB de ru" MAKEOPTS="-j9 -l15" PKGDIR="/var/cache/binpkgs" PORTAGE_COMPRESS="xz" PORTAGE_COMPRESS_FLAGS="-9 -T0 --memory=90%" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" SHELL="/bin/bash" USE="X a52 aac acl acpi alsa amd64 bluetooth branding bzip2 cairo cdda cdr cjk cli crypt cups custom-cflags dbus dri dts dvd dvdr elogind encode exif ffmpeg fftw flac gdbm gif gmp gnome-keyring graphite gtk gtk3 gui iconv icu iptables ipv6 jit jpeg lcms libglvnd libnotify libtirpc lto mad matroska mng mp3 mp4 mpeg mtp multilib ncurses nls nptl ogg opengl openmp opus pam pango pcre pgo png policykit postgres ppds pulseaudio qt5 readline samba sdl seccomp smp sound spell split-usr ssl startup-notification svg syslog theora threads tiff truetype udev udisks unicode upower usb v4l vaapi vorbis vulkan wifi x264 x265 xattr xcb xml xv xvid zlib" ABI_X86="64" ADA_TARGET="gnat_2020" ALSA_CARDS="hda_intel" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 aes avx avx2 f16c fma3 pclmul popcnt sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en en-GB de de-DE ru ru-RU" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="x86" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9" RUBY_TARGETS="ruby27" USERLAND="GNU" VIDEO_CARDS="intel i965" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LEX, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
I am seeing very similar behavior with most (or all?) videos, including all youtube videos I've tried. It shows videos with an intensely pink tint/filter to them, while everything else is fine (including the pre-play image web pages often show in place of videos). I'm not sure when it broke exactly, but I think it has been at least several weeks and less than several months. I also noticed that trying to adjust hardware acceleration via firefox settings/UI doesn't seem to do anything. But I'm only seeing the problem on three out of five machines I've tried it on. I suspect the actual problem might be in one of firefox's many dependencies (or they way the interact with firefox) rather than firefox itself, since I think firefox itself is built the same same way on all five machines. FYI: Google chrome works fine on the one "non-working" machines I have it installed on. Same with the testing I've done with various non-browser dedicated video playback applications. At first glance media-libs/openh264 might seem like an option, but there doesn't appear to be much room for variability in its USE flags. Maybe ffmpeg? Although is that involved given the separate h264 dependency above? On the other hand, some of the five machines are building ffmpeg with somewhat different USE flags. I should probably try rebuilding ffmpeg with more consistent USE flags and see if that affects firefox. --- I would guess it isn't the graphics card/driver, because of the variety involved: Broken machines are using a variety of graphics cards and drivers: - xf86-video-ati-19.1.0-r1 (radeon) - nvidia-drivers-470.129.06 (masked older) - xf86-video-nouveau-1.0.17 (much older card no longer supported by nvidia at all) Working machines are using a couple of newer nvidia cards: - nvidia-drivers-470.129.06 (also masked older, but I don't think the card is as old as above) - Latest nvidia. Unfortunately, the broken machines are all at home and working machines are at work, making it more involved to compare them... --- Maybe something else? I'm not sure what other packages and USE flags might be relevant. Playing with ffmpeg USE flags is currently my best guess. Where should I focus my efforts at narrowing this down?
I don't know if ffmpeg USE flags might have something to do with the breakage, but one of the broken machines has: ---- $ emerge -pv ffmpeg These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] media-video/ffmpeg-4.4.2:0/56.58.58::gentoo USE="X alsa amr bluray bzip2 dav1d doc encode fontconfig gnutls gpl gsm iconv libass modplug mp3 network opengl opus postproc sdl speex theora threads truetype v4l vaapi vdpau vorbis x264 xvid zlib (-amf) -amrenc (-appkit) -bs2b -cdio -chromaprint -chromium -codec2 -cpudetection (-cuda) -debug -fdk -flite -frei0r -fribidi -gcrypt -gme -gmp -hardcoded-tables -iec61883 -ieee1394 -jack -jpeg2k -kvazaar -ladspa -libaom -libaribb24 -libcaca -libdrm -libilbc -librtmp -libsoxr -libtesseract -libv4l -libxml2 -lv2 -lzma (-mipsdspr1) (-mipsdspr2) (-mipsfpu) (-mmal) -nvenc -openal -opencl -openh264 -openssl -oss -pic -pulseaudio -rav1e -rubberband -samba -snappy -sndio -srt -ssh -static-libs -svg -svt-av1 -test -twolame -verify-sig -vidstab (-vmaf) -vpx -vulkan -webp -x265 -zeromq -zimg -zvbi" ABI_X86="32 (64) (-x32)" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 sse4_1 sse4_2 ssse3 -3dnow -3dnowext -aes -avx -avx2 -fma3 -fma4 -xop" FFTOOLS="aviocat cws2fws ffescape ffeval ffhash fourcc2pixfmt graph2dot ismindex pktdumper qt-faststart sidxindex trasher" 0 KiB Total: 1 package (1 reinstall), Size of downloads: 0 KiB ---- While one of the working machines has: ---- $ emerge -pv ffmpeg These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] media-video/ffmpeg-4.4.2:0/56.58.58::gentoo USE="X alsa bzip2 dav1d encode fontconfig gnutls gpl iconv mp3 network opengl opus postproc sdl svg threads truetype v4l vorbis x264 xvid zlib (-amf) -amr -amrenc (-appkit) -bluray -bs2b -cdio -chromaprint -chromium -codec2 -cpudetection (-cuda) -debug -doc -fdk -flite -frei0r -fribidi -gcrypt -gme -gmp -gsm -hardcoded-tables -iec61883 -ieee1394 -jack -jpeg2k -kvazaar -ladspa -libaom -libaribb24 -libass -libcaca -libdrm -libilbc -librtmp -libsoxr -libtesseract -libv4l -libxml2 -lv2 -lzma (-mipsdspr1) (-mipsdspr2) (-mipsfpu) (-mmal) -modplug -nvenc -openal -opencl -openh264 -openssl -oss -pic -pulseaudio -rav1e -rubberband -samba -snappy -sndio -speex -srt -ssh -static-libs -svt-av1 -test -theora -twolame -vaapi -vdpau -verify-sig -vidstab (-vmaf) -vpx -vulkan -webp -x265 -zeromq -zimg -zvbi" ABI_X86="(64) -32 (-x32)" CPU_FLAGS_X86="aes avx mmx mmxext sse sse2 sse3 sse4_1 sse4_2 ssse3 -3dnow -3dnowext -avx2 -fma3 -fma4 -xop" FFTOOLS="aviocat cws2fws ffescape ffeval ffhash fourcc2pixfmt graph2dot ismindex pktdumper qt-faststart sidxindex trasher" 0 KiB Total: 1 package (1 reinstall), Size of downloads: 0 KiB ---- I should probably investigate flipping some of the differences for more consistency...
On my machines ffmpeg differs only by cpu_flags_x86 and vaapi+vdpau, but their effect seems to be in reverse to yours, thus it is unlikely to be ffmpeg USE flags :( Although who knows.
If you'd like, you could rebase our 0027-bmo-1663844-OpenH264-Allow-using-OpenH264-GMP-decode.patch to its latest state. I haven't bothered because I'm not sure if it changes anything. mkdir -p /etc/portage/patches/www-client/firefox-102.0.1/ cd /etc/portage/patches/www-client/firefox-102.0.1/ wget wget https://src.fedoraproject.org/rpms/firefox/raw/33fd704cce4e66e27623dcab99d8f3cef02a991e/f/mozilla-1663844.patch (now, either take the firefox-102.0.1 ebuild and modify it in your local overlay, or modify the sync-tree one. BUT REMEMBER TO "git restore" the ebuild after your experiment!) cd /var/db/repos/gentoo/www-client/firefox edit: --- firefox-102.0.1.ebuild.orig 2022-07-20 15:24:24.000000000 -0000 +++ firefox-102.0.1.ebuild 2022-07-20 15:06:17.959168796 -0000 @@ -581,6 +581,7 @@ src_prepare() { use lto && rm -v "${WORKDIR}"/firefox-patches/*-LTO-Only-enable-LTO-*.patch + rm "${WORKDIR}"/firefox-patches/0027-bmo-1663844-OpenH264-Allow-using-OpenH264-GMP-decode.patch || die "not found" eapply "${WORKDIR}/firefox-patches" # Allow user to apply any additional patches without modifing ebuild emerge -av firefox (make sure it says "user patches applied" so your /etc/portage/patches/ file is recognized) git restore firefox-102.0.1.ebuild I'm gonna drop the experimental vaapi patches for 102esr so you may try to experiment that too if you want. It could prove helpful, too. Oh yea, the -bin version affected? I'd like to ask about esr but downgrading can destroy your profile, so make sure to backup your profile before attempting that.
I normally only run stable, so the first thing I tried was to adapt your patch/ebuild instructions to firefox-91.11.0. That wasn't successful: I tried changing the prefix number of the filename for the "removed" patch to match what was actually there (0031 instead of 0027), but then the new manually downloaded patch still wouldn't apply. ---- FIXED in 102?: In the spirit of only changing one thing at a time, I then simply tried an update with package.accept_keywords: =www-client/firefox-102.0.1 ~amd64 =dev-libs/nss-3.79-r1 ~amd64 =media-libs/dav1d-1.0.0 ~amd64 and then firefox 102 can play videos fine, without the intense pink tint/filter effect. I did NOT modify the ebuild nor apply any user patches. The dav1d bump also caused ffmpeg to be rebuilt (with all the same USE flags). Once this worked on one of my three failing machines, I did the same thing to the other two, and they also work now. I still don't know what was wrong with 91.* (on only some machines), but I am not inclined to dig into it.
I can confirm this issue is fixed in firefox-102.