mirror of
https://github.com/KDE/kde-linux.git
synced 2025-12-24 00:18:23 -05:00
Only force enable hardware video decode for NVIDIA
Enabling `media.hardware-video-decoding.force-enabled` for all video cards, not just NVIDIA ones, can lead to breakages where Mozilla's blacklist disables hardware video decode for a legitimate reason. Conditionally enable hardware decode if a NVIDIA card is present, and disable it otherwise.
This commit is contained in:
@@ -28,5 +28,11 @@ elif ! flatpak info org.freedesktop.Platform.codecs-extra &>/dev/null; then
|
||||
fi
|
||||
|
||||
# Install the KDE Linux default Firefox config into the Firefox flatpak system config extension.
|
||||
mkdir -p "/var/lib/flatpak/extension/org.mozilla.firefox.systemconfig/${RUNTIME_ARCH}/stable/defaults/pref/"
|
||||
cp -rf "/usr/share/firefox-config/00-kde-linux-default.js" "/var/lib/flatpak/extension/org.mozilla.firefox.systemconfig/${RUNTIME_ARCH}/stable/defaults/pref/00-kde-linux-default.js"
|
||||
# This enables hardware acceleration on NVIDIA but can break it on other cards,
|
||||
# so this should only be done conditionally.
|
||||
if nvidia-smi > /dev/null 2>&1; then
|
||||
mkdir -p "/var/lib/flatpak/extension/org.mozilla.firefox.systemconfig/${RUNTIME_ARCH}/stable/defaults/pref/"
|
||||
cp -rf "/usr/share/firefox-config/00-kde-linux-default.js" "/var/lib/flatpak/extension/org.mozilla.firefox.systemconfig/${RUNTIME_ARCH}/stable/defaults/pref/00-kde-linux-default.js"
|
||||
else
|
||||
rm -rf "/var/lib/flatpak/extension/org.mozilla.firefox.systemconfig/${RUNTIME_ARCH}/stable/defaults/pref/00-kde-linux-default.js"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user