#1126181 sway: Firefox cannot inhibit idle screen blanking under sway

Package:
sway
Source:
sway
Description:
i3-compatible Wayland compositor
Submitter:
Timothy Allen
Date:
2026-01-23 07:05:02 UTC
Severity:
normal
#1126181#5
Date:
2026-01-23 06:01:06 UTC
From:
To:
Dear Maintainer,

When Firefox plays full-screen video content (such as YouTube), it tries to
tell the desktop environment/window manager to avoid blanking the screen for
inactivity. If it fails, watching videos is incredibly frustrating since the
screen keeps turning itself off.

This works perfectly well in a full desktop environment like GNOME, but does
not work under sway.

According to investigations done by user "sincereshellfish" on Reddit[1], the
situation is this:

- when Firefox wants to inhibit screen blanking, it first tries the standard
DBus protocol org.freedesktop.impl.portal.Inhibit, which sway does not
implement
- If that fails, Firefox tries the regular Wayland "inhibit screen blanking"
protocol, which sway *does* implement
- The org.freedesktop.impl.portal.Inhibit DBus protocol is provided by the xdg-
desktop-portal proxy, which forwards it to one of the backends configured by
the /usr/share/xdg-desktop-portal/sway-portals.conf file
- Unfortunately, the protocol does not provide any way to report failure, so
once the proxy has accepted the request, it must either succeed or fail
silently
- As a result, when Firefox tries the standard DBus protocol to inhibit
blanking, it never gets a failure, so it never falls back to the mode that
works with sway

The workaround suggested by the Reddit post is to add the following line to the
sway-portals.conf file:

    org.freedesktop.impl.portal.Inhibit=none

This tells xdg-desktop-portal not to advertise the DBus protocol at all, which
means Firefox gets a failure trying to invoke it, so it falls back to the
Wayland protocol, and it Just Works.

I think this would be a good thing to include in the sway-portals.conf file
packaged in Debian.

Thank you!


Timothy Allen

[1]:
https://www.reddit.com/r/swaywm/comments/1dqud2a/how_to_get_firefox_to_inhibit_idle_when_watching/