Firefox on Linux: Snap, Deb or Flatpak, and Hardware Video Acceleration

Quick facts
UbuntuSnap by default; the firefox deb is a transitional package that installs the Snap
Debian 13firefox-esr from the Debian archive
Linux MintNative deb maintained by Mint (no Snap)
FedoraNative RPM, preinstalled on Workstation
Arch / openSUSENative firefox package
Any distroFlathub org.mozilla.firefox, or Mozilla's APT repository for Debian-based systems
ProfileSee about:profiles; location depends on the package type (table below)
Docssupport.mozilla.org: Install Firefox on Linux

Snap vs deb vs Flatpak

Snap (Ubuntu default)Mozilla deb / distro packageFlatpak (Flathub)
Maintained byCanonical with MozillaMozilla, or your distributionMozilla
UpdatesAutomatic, in the backgroundWith system updatesWith flatpak update / software centre
Startup timeSlower first launchFastestFast
SandboxStrict confinementNone beyond Firefox's ownFlatpak sandbox with portals
Native messaging (password managers, smart cards)Works via portal on current releases, some apps still need tweaksWorksWorks via portal, some apps need tweaks
Profile location~/snap/firefox/common/.mozilla/firefox~/.mozilla/firefox (new profiles on recent versions may use ~/.config/mozilla/firefox)~/.var/app/org.mozilla.firefox/

If the Snap works for you, there's no need to switch. People usually move to the deb because of startup time, a password manager or smart-card integration that doesn't work, or to keep everything managed by apt.

Switch Ubuntu to Mozilla's APT repository

Mozilla publishes its own deb packages at packages.mozilla.org. This works on Ubuntu 26.04 and 24.04 and on Debian.

Back up first

Removing the Snap removes its profile. Sign in to Firefox Sync, or copy ~/snap/firefox/common/.mozilla/firefox somewhere safe, before step 1.

  1. Remove the Snap:
    sudo snap remove firefox
  2. Add Mozilla's signing key and repository:
    sudo install -d -m 0755 /etc/apt/keyrings
    wget -q https://packages.mozilla.org/apt/repo-signing-key.gpg -O- | sudo tee /etc/apt/keyrings/packages.mozilla.org.asc > /dev/null
    # the fingerprint should match the one on Mozilla's support page
    gpg -n -q --import --import-options import-show /etc/apt/keyrings/packages.mozilla.org.asc
    
    sudo tee /etc/apt/sources.list.d/mozilla.sources > /dev/null <<'EOF'
    Types: deb
    URIs: https://packages.mozilla.org/apt
    Suites: mozilla
    Components: main
    Signed-By: /etc/apt/keyrings/packages.mozilla.org.asc
    EOF
  3. Pin Mozilla's packages above Ubuntu's transitional package, so apt never brings the Snap back:
    sudo tee /etc/apt/preferences.d/mozilla > /dev/null <<'EOF'
    Package: *
    Pin: origin packages.mozilla.org
    Pin-Priority: 1000
    EOF
  4. Install and check:
    sudo apt update
    sudo apt install firefox
    apt policy firefox
    The candidate version should come from packages.mozilla.org, not from the Ubuntu archive.
  5. Restore your profile by copying the backed-up folder's contents into ~/.mozilla/firefox, or just sign in to Sync.

Language packs are separate packages, for example sudo apt install firefox-l10n-de. If apt update reports NO_PUBKEY, the key path in Signed-By doesn't match the file; see fixing NO_PUBKEY errors. The general repository pattern is explained in the apt guide. On Ubuntu, unattended upgrades only cover Ubuntu's own archives by default, so Mozilla's updates arrive with your normal apt upgrade.

Debian: regular Firefox instead of ESR

Use steps 2 and 4 above (no Snap and no pin needed). The firefox package installs next to firefox-esr; remove ESR afterwards if you don't need it.

Flatpak on any distribution

flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
flatpak install flathub org.mozilla.firefox
flatpak run org.mozilla.firefox

Remove the distribution's Firefox afterwards if you don't want two copies. Codecs for H.264 and other formats are provided by Flatpak runtime extensions and installed automatically.

Hardware video acceleration (VA-API)

Hardware decoding moves video playback from the CPU to the GPU, which saves a lot of battery on laptops. Current Firefox releases enable VA-API decoding by default on supported Intel and AMD GPUs under both Wayland and X11, provided the system driver is installed.

1. Install and check the driver

# Ubuntu / Debian / Mint
sudo apt install vainfo intel-media-va-driver mesa-va-drivers
# Fedora (with RPM Fusion for full H.264/HEVC on AMD)
sudo dnf install libva-utils intel-media-driver
sudo dnf swap mesa-va-drivers mesa-va-drivers-freeworld
# Arch
sudo pacman -S libva-utils intel-media-driver
vainfo

Example output (Intel):

vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics
      VAProfileH264Main               :	VAEntrypointVLD
      VAProfileHEVCMain               :	VAEntrypointVLD
      VAProfileVP9Profile0            :	VAEntrypointVLD
      VAProfileAV1Profile0            :	VAEntrypointVLD

VAEntrypointVLD means hardware decoding is available for that codec. Older Intel GPUs (before Broadwell) use i965-va-driver / libva-intel-driver instead of intel-media-driver. For AMD on Arch, the Mesa VA-API driver comes with the Mesa packages (it was a separate libva-mesa-driver package on older installs); if vainfo finds no driver, check with pacman -Ss va-driver.

2. Confirm Firefox is using it

Open about:support and look at Media → codec support: hardware decoding should be listed for the codecs vainfo shows. Play a video and watch CPU use; it should be low. If a site serves a codec your GPU can't decode (AV1 on older hardware is common), Firefox falls back to software decoding.

3. Force it on or off

In about:config, media.hardware-video-decoding.force-enabled set to true forces decoding on for GPUs Firefox has blocklisted. Set it back if you see artefacts or crashes. NVIDIA GPUs need the community nvidia-vaapi-driver and some extra configuration; results vary by driver version.

In the Snap, hardware decoding depends on the Snap's bundled graphics libraries and works on most Intel and AMD systems; if it doesn't, the Mozilla deb with your system drivers is the more reliable option.

Fixing common problems

ProblemFix
"Firefox is already running, but is not responding"Close all Firefox windows, check pgrep -a firefox, end leftovers with pkill firefox. If no process is running, delete the lock and .parentlock files in the profile folder
Can't open or save files outside your home folder (Snap/Flatpak)Use the file chooser, which goes through a portal. For the Snap, sudo snap connect firefox:removable-media grants access to /media and /mnt
Snap Firefox back after apt upgradeThe pin in /etc/apt/preferences.d/mozilla is missing or has a typo; check with apt policy firefox
Videos won't play (Fedora, openSUSE)Firefox uses the system's ffmpeg; install full codecs (RPM Fusion's ffmpeg on Fedora, Packman on openSUSE), or use the Flatpak
DRM content (Netflix, Spotify) doesn't playSettings → General → Digital Rights Management Content: enable "Play DRM-controlled content"
Blurry fonts or wrong scaling on WaylandMake sure Firefox runs natively on Wayland: about:support → Window Protocol should say wayland. See Wayland vs X11
Crashes or freezes after an updateStart in Troubleshoot Mode (firefox --safe-mode) to rule out extensions; then Help → More troubleshooting information → Refresh Firefox

For other media apps, the VLC page covers codecs and hardware decoding outside the browser, and the Ubuntu post-install guide covers the other choices worth making on a new Ubuntu system.

Frequently asked questions

Why is Firefox a Snap on Ubuntu?

Since Ubuntu 22.04, Canonical has shipped Firefox as a Snap maintained together with Mozilla, and the firefox deb in Ubuntu's archive is only a transitional package that installs the Snap. You can switch to Mozilla's own deb repository if you prefer.

Which Firefox package is fastest on Linux?

The native packages (Mozilla's deb, Fedora's or Arch's RPM/package) and the Flatpak usually start faster than the Snap. Once running, performance is similar; hardware video decoding matters more for battery life.

How do I check if Firefox uses hardware video acceleration?

Open about:support and look at the Media section's codec support table. Hardware decoding shows as supported for the codecs your GPU handles. Run vainfo to check the system driver.

Does Debian ship the latest Firefox?

Debian stable ships Firefox ESR, the extended-support release, which gets security fixes but new features only once a year or so. For the regular release, use Mozilla's APT repository or the Flatpak.

Spotted a mistake or a command that no longer works? Send a correction — pages are re-checked when reports come in.