/srv/irclogs.ubuntu.com/2023/02/21/#snappy.txt

mupPR snapd#12578 opened: interfaces/apparmor: Add read of /proc/PID/cpuset to base template <Created by alexmurray> <https://github.com/snapcore/snapd/pull/12578>01:36
mupPR snapd#12579 opened: cmd/snap,image: refactor seed manifest code in preparation of validation-sets <Created by Meulengracht> <https://github.com/snapcore/snapd/pull/12579>10:48
stuartlangridgehey, all. Firefox (as a snap) tries to inhibit my screensaver when it plays videos (correctly), but the D-Bus call is being denied by apparmor. How can I allow that? Is this a bug in the firefox snap metadata that I need to file, or should it be creating a snap connection somehow itself?11:09
stuartlangridgethe denied message, shown by snappy-debug, is:11:10
stuartlangridgeLog: apparmor="DENIED" operation="dbus_method_call"  bus="session" path="/org/freedesktop/PowerManagement/Inhibit" interface="org.freedesktop.PowerManagement.Inhibit" member="Inhibit" mask="send" name="org.freedesktop.PowerManagement" pid=288754 label="snap.firefox.firefox" peer_pid=2736 peer_label="unconfined"11:10
lissyxstuartlangridge, bandali can help you on that but I suggest you file a bug on bugzilla and/or on launchpad for that11:12
stuartlangridgelissyx, I can certainly do that; what I wasn't sure about is whether it's a local config issue, or an actual problem with the snap. (I mean, I think this ought to work out of the box, of course!) If filing a bug is the best course I'll definitely do that11:13
stuartlangridgeah. there already is a bug, which nobody is working on :(  https://bugzilla.mozilla.org/show_bug.cgi?id=178579911:28
ograstuartlangridge, TBH this looks more like a snapd bug to me, i ave seen that message with things like the snapped vlc before 11:33
stuartlangridgeI think the actual issue is: firefox isn't allowed to send dbus Inhibit messages to org.freedesktop.PowerManager. What I don't know is whose bug that is; does it need an extra setting in firefox's snapcraft.yaml? Does snapd need to allow these by default? Is there some way a user can create that connection at runtime, and so that should be an11:35
stuartlangridgeautomatically made connection on install?11:35
amurraythanks for the heads up stuartlangridge - there is already a screen-inhibit-control interface in snapd that allows various dbus methods to inhibit the screen saver and firefox plugs this - but the interface doesn't include this particular dbus interface - I just submitted https://github.com/snapcore/snapd/pull/12580 to resolve this11:42
mupPR #12580: interfaces/screen-inhibit-control: Add support for xfce-power-manager <Created by alexmurray> <https://github.com/snapcore/snapd/pull/12580>11:42
mupPR snapd#12580 opened: interfaces/screen-inhibit-control: Add support for xfce-power-manager <Created by alexmurray> <https://github.com/snapcore/snapd/pull/12580>11:43
stuartlangridgenice one alexmurray!11:51
jameshDoesn't firefox inhibit the screensaver via xdg-desktop-portal? The blocked upower call would be more about inhibiting automatic suspend11:53
stuartlangridgejamesh: it may be11:57
stuartlangridgeI'm only seeing apparmor blocks for org.freedesktop.PowerManagement.Inhibit11:58
stuartlangridgefirefox thinks it's trying to inhibit screensavers too according to MOZ_LOG11:58
stuartlangridge[Parent 288754: Main Thread]: D/LinuxWakeLock WakeLockListener video-playing state locked-foreground11:58
stuartlangridge[Parent 288754: Main Thread]: D/LinuxWakeLock shouldLock 111:58
stuartlangridge[Parent 288754: Main Thread]: D/LinuxWakeLock SendInhibit(): FreeDesktopScreensaver11:58
stuartlangridge[Parent 288754: Main Thread]: D/LinuxWakeLock SendInhibit(): GNOME11:58
stuartlangridge[Parent 288754: Main Thread]: D/LinuxWakeLock SendInhibit(): FreeDesktopPower11:58
stuartlangridge[Parent 288754: Main Thread]: D/LinuxWakeLock WakeLockListener video-playing state unlocked11:58
stuartlangridge[Parent 288754: Main Thread]: D/LinuxWakeLock shouldLock 011:58
stuartlangridgebut... the screensaver is not inhibited.11:58
stuartlangridgeand I don't see any of those calls in dbus-monitor, although I might be using dbus-monitor wrong11:59
mupPR snapd#12580 closed: interfaces/screen-inhibit-control: Add support for xfce-power-manager <cherry-picked> <Created by alexmurray> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/12580>14:49
stuartlangridgeok, having tested this stuff a bunch more, I think that what's supposed to happen is that firefox calls org.freedesktop.powermanager over dbus to inhibit suspend; on xfce that's provided by xfce-power-manager; xfce-power-manager then calls org.xfce.screensaver by dbus to inhibit that. But apparmor blocks the initial call. That will hopefully be14:49
stuartlangridgefixed by alexmurray's patch, which should hpefully arrive on people's desktops in relatively short order because snap core updates outside a release... so that may fix everything! Hooray!14:49
stuartlangridgehttps://bugzilla.mozilla.org/show_bug.cgi?id=1785799 has a detailed update on what might be happening, but hopefully this fixes everything when it arrives.14:50
stuartlangridgeAnd I see it's just been merged too, nice one mvo. So this is perhaps all great :)14:50
mupPR snapd#12489 closed: image/preseed: re-execute snap-preseed --reset <Run nested> <Created by valentindavid> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/12489>15:34
mupPR snapd#12581 opened: release: 2.58.3 <Simple 😃> <Created by mvo5> <https://github.com/snapcore/snapd/pull/12581>16:19
lissyxstuartlangridge, sorry but I thought I could be working today but I can't really, saw your comment on https://bugzilla.mozilla.org/show_bug.cgi?id=1785799#c216:33
stuartlangridgelissyx: I'm quietly hopeful that alexmurray's fix above may sort it, but I wanted to get as much stuff written down that was relevant as I could, so someone could use it to look into the problem more later if the snapcore fix isn't the thing needed.18:24
stuartlangridgebut this certainly seems to be an issue with the snap sandbox, since the binary does it right when it's not sandboxed18:24

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!