You are not logged in.
Hi, for the last year or two I've been often encountering severe choppiness in firefox. I've tried a new profile, I've tried copying over a profile that is working on my backup linux install - even directly running it through
arch-chrootbut no success. I checked that both systems report the same gpu driver in use (
amdgpu- I have only a laptop iGPU).
The only difference I can find is, that on my backup install I cannot uninstall
pipewire-jacknor other pipewire non-essential packages (alsa, pulse) without losing basically all media-related apps. I do not have that issue on my main system, yet the main system is the one causing choppiness.
Choppiness becomes noticeable on all videos played in firefox and firefox only at 720p60 quality and higher. I made sure even the kernel args are the same - but my amd_pstate options should affect only the cpu, which proved to be ineffective as well since removing all unnecessary kernel args or changing the kernel to lts didn't change anything either.
I've got no more ideas for what to try next to figure this out.
System: Ryzen 7 5800H, running sway under vulkan
Last edited by Kepis (2025-10-26 17:03:00)
Offline
Your iGPU doesn't support hardware AV1 decoding. But nowadays more and more videos on the internet are AV1-encoded. Choppiness at higher resolutions might be a result of software decoding.
There are some extensions that allow to block AV1-encoded videos from loading on youtube: https://addons.mozilla.org/en-US/firefo … ?q=h264ify
Try to use them. If playback improves then you'll get a confirmation that the problem is with AV1. Although I'm not sure if those extension would work outside youtube.
Offline
no - as I mentioned, everything works fine on my backup installation. If it works fine from an install on a usb stick, there is no reason for it to not be working just as well directly from my ssd.
I did forget to mention, that the choppiness isn't because of performance, because whether it gets choppy on one install or not on the other it doesn't even make my fans turn on for at least a few minutes.
Edit: checking the youtube "stats for nerds" told me the codec is VP9, which should be supported by the gpu.
Edit2: the problem is slightly less prominent when the osd is present (like with the playback settings open etc.). No difference when I use the picture-in-picture mode.
Last edited by Kepis (2025-10-25 18:31:21)
Offline
which "should" be supported by the gpu.
vainfo also open "about:support" and upload that file.
Is it only firefox or do you have the same problems when playing videos w/ eg. chromium/vivaldi or mpv?
on my backup install I cannot uninstall
pipewire-jack
pacman -Qs 'pulse|wire'
systemctl --user status pulseaudio
systemctl --userstatus pipewireOnline
vainfo:
Trying display: wayland
vainfo: VA-API version: 1.22 (libva 2.22.0)
vainfo: Driver version: Mesa Gallium driver 25.2.5-arch1.2 for AMD Radeon Graphics (radeonsi, renoir, ACO, DRM 3.64, 6.17.5-arch1-1)
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileHEVCMain : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointEncSlice
VAProfileHEVCMain10 : VAEntrypointVLD
VAProfileHEVCMain10 : VAEntrypointEncSlice
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileVP9Profile0 : VAEntrypointVLD
VAProfileVP9Profile2 : VAEntrypointVLD
VAProfileNone : VAEntrypointVideoProcI do not have any such problems in other programs (tested mpv and now also chromium on https://www.youtube.com/watch?v=qsNwYzAylcU)
pipewire + pulse info from my main (problematic) install
local/iw 6.17-1
nl80211 based CLI configuration utility for wireless devices
local/libcanberra 1:0.30+r2+gc0620e4-6
A small and lightweight implementation of the XDG Sound Theme Specification
local/libpipewire 1:1.4.9-1
Low-latency audio/video router and processor - client library
local/libpulse 17.0+r88+geee0e8f22-1
A featureful, general-purpose sound server (client library)
local/libraw1394 2.1.2-4
Provides an API to the Linux IEEE1394 (FireWire) driver
local/libwireplumber 0.5.12-1
Session / policy manager implementation for PipeWire - client library
local/linux 6.17.5.arch1-1
The Linux kernel and modules
local/linux-lts 6.6.72-1
The LTS Linux kernel and modules
local/pipewire 1:1.4.9-1
Low-latency audio/video router and processor
local/pipewire-audio 1:1.4.9-1
Low-latency audio/video router and processor - Audio support
local/pipewire-pulse 1:1.4.9-1
Low-latency audio/video router and processor - PulseAudio replacement
local/pulsemixer 1.5.1-7
CLI and curses mixer for pulseaudio
local/wavemon 0.9.6-1
Ncurses-based monitoring application for wireless network devices
local/wireless-regdb 2025.10.07-1
Central Regulatory Domain Database
local/wireplumber 0.5.12-1
Session / policy manager implementation for PipeWire
local/wpa_supplicant 2:2.11-3
A utility providing key negotiation for WPA wireless networks
Unit pulseaudio.service could not be found.
● pipewire.service - PipeWire Multimedia Service
Loaded: loaded (/usr/lib/systemd/user/pipewire.service; disabled; preset: enabled)
Active: active (running) since Sat 2025-10-25 17:27:48 CEST; 3h 17min ago
Invocation: eb9474298b3e4943ad5a8cb60985c150
TriggeredBy: ● pipewire.socket
Main PID: 1550 (pipewire)
Tasks: 3 (limit: 16394)
Memory: 8M (peak: 11.1M)
CPU: 34.061s
CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/pipewire.service
└─1550 /usr/bin/pipewireFirefox about:support
https://pastebin.com/raw/Xq7hWDRw
Last edited by Kepis (2025-10-25 18:53:18)
Offline
HW decoding is enabled because
"media.hardware-video-decoding.force-enabled": true but overall the setup looks ok.
Do you have the problem w/ local videos (eg. if you yt-dlp the video and open that file in firefox)?
Online
After accidentaly downloading the AV1 version I can say that SW decoding works without any issues at all.
However, the VP9 version (.webm) immediately becomes unbearably choppy even when played from a local file. When opening it in mpv it correctly uses VAAPI for HW decoding and there is no lag at all.
Last edited by Kepis (2025-10-25 19:18:22)
Offline
What happens if you don't set media.hardware-video-decoding.force-enabled ?
Is FF running as https://wiki.archlinux.org/title/Waylan … plications ?
https://wiki.archlinux.org/title/Firefox#Xwayland
Online
as I mentioned in the original post - it works exactly the same way in a clean profile as well as in the profile that I used on my usb stick when run on my main install - the hwdec enforcement doesn't change anything.
Yes, firefox is running under wayland, no xwayland server is running.
Last edited by Kepis (2025-10-25 19:47:37)
Offline
https://bugzilla.mozilla.org/show_bug.cgi?id=1688947
https://wiki.archlinux.org/title/AMDGPU#Monitoring - does amdgpu_top suggest that FF uses VAAPI at all (compare w/ mpv)
Does FF behave better under xwayland?
Is you monitor https://wiki.archlinux.org/title/Variable_refresh_rate capable?
Or do you use https://wiki.archlinux.org/title/HDR_monitor_support ?
Online
amdgpu_top makes it clear that firefox is doing some weird processing, because the media engine is at 50 to 60% usage with CPU jumping between 5% to 45%,
whereas mpv is jumping between 1 to 25% on the media engine and has a stable 10-12% CPU usage.
- xwayland shows no difference at all
- my eDP display doesn't have variable refresh rate, however I tried it in both its 60fps mode and 120fps - no difference once again
- no HDR with the builtin display either ![]()
Note: as I mentioned in the beginning - it works perfectly fine on the same hardware just when running under a backup installation with just a smaller set of packages (both up-to-date) and dotfiles synchronized with git.
This makes me think that the problem has something to do with the installed packages, but I do not know how to test the difference.
Last edited by Kepis (2025-10-26 12:24:26)
Offline
Update: Found the culprit, do not know the solution other than changing the cpu governor.
I thought I checked it before, but it seems I hadn't. TLP gpu power limiting wasn't the issue.
However, when I enabled cpupower-gui also on my backup system the stuttering came there again.
After trying out all the cpu governors the only one that causes that stutter in firefox appears to be the one I am using -
conservativeI am not sure if this is a kernel bug, but it seems to affect only FF, though I have no idea why.
Last edited by Kepis (2025-10-26 13:05:34)
Offline
After playing with the cpupower-gui tool I found out some really strange behaviour that probably isn't caused by the app itself.
- USERSPACE governor doesn't change anything - behaves identically as the governor it was switched from
- CONSERVATIVE and POWERSAVE governors don't get actually activated either when they were switched onto from SCHEDUTIL or from one another with the preceeding working switch was SCHEDUTIL.
- POWERSAVE governor always keeps the CPU frequency at minimum, so it makes sense the video is lagging, however ↓↓
- CONSERVATIVE governor raises the frequency as required except for FF when playing video
- it does increase frequency when loading webpages (yt / doing CPU benchmarks etc.)
- but it behaves as if firefox wasn't doing anything when FF is playing video (with the rest of the system idle the cpu freq. falls to minimum values on all cores)
Last edited by Kepis (2025-10-26 13:31:10)
Offline
https://wiki.mozilla.org/Security/Sandbox
MOZ_DISABLE_GPU_SANDBOX is apparently only for windows but maybe better try that, too - othrewise security.sandbox.gpu.level ?
Online
The problem suggests it is a cpu workload recognition problem. But I have no clue how that works, so I'm mostly capable of only filing bugs and following instructions.
MOZ_DISABLE_GPU_SANDBOX=1 firefoxdidn't help
security.sandbox.gpu.level This setting is associated with the compositor. According to the docs they don't support higher levels than the default. And since the default was 0 it is understandable that -1 nor 1 had no effect.
They have a line for Media process type, which could prove useful. But it says that it is embedded and doesn't seem to have an option associated with it. I'm not sure, if there is a way to change the sandboxing level for that.
Tried also MOZ_DISABLE_RDD_SANDBOX, MOZ_DISABLE_GMP_SANDBOX and MOZ_DISABLE_CONTENT_SANDBOX, all to no avail.
Anyway, it seems the Schedutil governor is now capable of using the full range of cpu frequencies available, so I don't need to use the conservative governor anymore.
Should I mark this as solved then or is it worth trying to solve this bug?
Last edited by Kepis (2025-10-26 16:41:19)
Offline
You can mark this solved since there's a solution for the OP - the bug is perhaps still worth investigating but you'd need to file it at https://bugzilla.mozilla.org/
My only guess about what's causing the difference would be the GPU sandbox, but idk whether and how to control that beyond the forementioned ![]()
Online
I'll mark this as solved then. Thank you for your help ![]()
Offline