Apparmor denying firefox polling memory pressure

Since the last snap firefox update the logs are being spammed with

 [25302.313640] audit: type=1400 audit(1765650449.410:11639): apparmor="DENIED" operation="open" class="file" profile="snap.firefox.firefox" name="/proc/pressure/memory" pid=40403 comm="MemoryPoller" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
[25307.314870] audit: type=1400 audit(1765650454.411:11640): apparmor="DENIED" operation="open" class="file" profile="snap.firefox.firefox" name="/proc/pressure/memory" pid=40403 comm="MemoryPoller" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
[25312.344144] audit: type=1400 audit(1765650459.440:11641): apparmor="DENIED" operation="open" class="file" profile="snap.firefox.firefox" name="/proc/pressure/memory" pid=40403 comm="MemoryPoller" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
[25317.375927] audit: type=1400 audit(1765650464.472:11642): apparmor="DENIED" operation="open" class="file" profile="snap.firefox.firefox" name="/proc/pressure/memory" pid=40403 comm="MemoryPoller" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
[25322.465447] audit: type=1400 audit(1765650469.561:11643): apparmor="DENIED" operation="open" class="file" profile="snap.firefox.firefox" name="/proc/pressure/memory" pid=40403 comm="MemoryPoller" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
[25335.517062] audit: type=1400 audit(1765650482.613:11644): apparmor="DENIED" operation="open" class="file" profile="snap.firefox.firefox" name="/proc/pressure/memory" pid=40403 comm="MemoryPoller" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0

Moved to Support and Help.

Please note that Project Discussion is for discussion not technical support.

Also, please don’t use block quotes for terminal output, instead use the </> icon on the toolbar to wrap with code tags.

Thanks

per snap info firefox:

name:      firefox
summary:   Mozilla Firefox web browser
publisher: Mozillaāœ“
store-url: https://snapcraft.io/firefox
contact:   https://support.mozilla.org/kb/file-bug-report-or-feature-request-mozilla

Please report any issues with Firefox to https://support.mozilla.org/kb/file-bug-report-or-feature-request-mozilla. Firefox is maintained by Mozilla themselves.

Additionally, snaps are not an Ubuntu project, despite being a Canonical Product. Help with most things snap-related should be directed to https://forums.snapcraft.io.

1 Like

Solution (kind of):

I ran into the same issues myself. From what I can tell, the AppArmor rules aren’t being applied correctly by the SNAP package. Unfortunately, there’s no way to fix this permanently on the local side when using SNAP. After quite a bit of research, I decided to switch over to the Mozilla Debian package instead. Below you’ll find my analysis along with a step‑by‑step guide. Since making the change, Firefox shows a much lower CPU footprint and runs noticeably smoother overall.

Here’s the guide/lab-notes (tested on Ubuntu 24.04.3 LTS)

Best regards, Dirk

2 Likes

I was seeing that on 25.10 yesterday (don’t see it in dmesg now but was tweaking stuff), but it seems interesting: Why does Firefox need to poll memory usage or care about it?

@dirksan28 Welcome to Ubuntu Discourse :slight_smile:

With my moderator hat on, I need to make the following comments:

We appreciate the time and effort you took to find a solution that works for you.

I stress for you because this is not the recommended course of action that we would suggest to users.

Adding caveats and warnings to your guide would be my suggestion as well as steps on how to revert those changes back to the default.

I am certain the last thing you would want is for someone to come back here reporting a broken system because they followed that guide.

Note to all users:

We always prefer to try and find solutions to issues, whenever possible, before taking the step to remove a snap (or any other package) but recognize that sometimes we have no choice.

Please be aware, however, that support may be limited or we may redirect you to other forums to deal with any issues arising from such changes.

Thanks!

5 Likes

Thanks for your friendly and thoughtful feedback. I understand your concerns and agree this approach is more suitable for advanced users.

Following your suggestion, I’ve updated the GitHub gist: it now starts with a clear disclaimer and ends with instructions on how to revert/undo the changes to return to the default Snap setup.

3 Likes

I have reported the bug here: https://bugzilla.mozilla.org/show_bug.cgi?id=2005923

6 Likes

A potential fix

3 Likes

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.