From d63d1cef72e865da030184986b09c2167f47f37a Mon Sep 17 00:00:00 2001 From: "Claude (noether)" Date: Fri, 15 May 2026 14:18:09 +0000 Subject: [PATCH] firefox-fourier: move vendor-prefs to defaults/preferences/ (the path Firefox actually scans) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Empirical follow-up to #9. After packaging 150.0.1-4 and installing on fresnel, MOZ_LOG showed the failure pattern was still present: D/FFmpegVideo FFMPEG: Using preferred software codec h264 No VAAPI_VLD engagement, no dmabuf surface locking — Gecko bailed before reaching the patched VAAPI path. Same symptom as issue #8 pre-fix, despite the prefs file being on disk at the expected path. Root cause: /usr/lib/firefox-fourier/browser/defaults/preferences/ is NOT a vendor-prefs scan location in Firefox 150. Mozilla's canonical scan dir is /usr/lib//defaults/preferences/ — without the 'browser/' prefix. Verified by hand-copying the same file to /usr/lib/firefox-fourier/ defaults/preferences/ and re-running the H.264 playback test: D/FFmpegVideo FFMPEG: Requesting pixel format VAAPI_VLD D/Dmabuf VideoFrameSurface: VAAPI locking dmabuf surface UID 26267 FFMPEG ID 0x4000000 mAVHWFrameContext ... D/Dmabuf VideoFrameSurface: VAAPI locking dmabuf surface UID 26268 FFMPEG ID 0x4000001 ... (15+ surface locks) End-to-end zero-copy DMABUF path engaged, hantro/rkvdec dekodes the H.264 stream via libva-v4l2-request-fourier iter38b. pkgrel 4 -> 5. No other PKGBUILD changes. --- arch/firefox-fourier/PKGBUILD | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/arch/firefox-fourier/PKGBUILD b/arch/firefox-fourier/PKGBUILD index f6a40514b..53b8a5150 100644 --- a/arch/firefox-fourier/PKGBUILD +++ b/arch/firefox-fourier/PKGBUILD @@ -13,7 +13,7 @@ pkgname=firefox-fourier pkgver=150.0.1 -pkgrel=4 +pkgrel=5 pkgdesc='Firefox with V4L2 stateless HW video decode unlocked for mainline Linux Rockchip' arch=('aarch64' 'x86_64') url='https://www.mozilla.org/firefox' @@ -171,6 +171,13 @@ LAUNCHER # at startup from the package install dir. The 0004 patch covers # media.ffmpeg.v4l2-request.enabled; this file covers the three # additional prefs that gate the path to the patched code. + # Vendor-prefs install path: /usr/lib/firefox-fourier/defaults/preferences/ + # (Mozilla's canonical scan dir for third-party default-pref drops.) The + # browser/defaults/preferences/ alternative looked promising but is NOT a + # vendor-prefs scan location in Firefox 150 — empirically confirmed on + # fresnel: file shipped there, VAAPI never engaged. Same file under + # defaults/preferences/ → MOZ_LOG showed `Requesting pixel format + # VAAPI_VLD` + dmabuf surfaces locking end-to-end. install -Dm644 "${srcdir}/rockchip-fourier-defaults.js" \ - "${pkgdir}/usr/lib/firefox-fourier/browser/defaults/preferences/rockchip-fourier-defaults.js" + "${pkgdir}/usr/lib/firefox-fourier/defaults/preferences/rockchip-fourier-defaults.js" }