I’ve been bitten by the same problem. I am running xfce, and evidently the the gnome-listing ‘gnome-session-inhibit --list’ doesn’t work (it actually dumps core). However, by letting Power Manager have a tray icon, I could see that when a youtube is playing, there’s two entries of /opt/brave.com/brave/brave is currently inhibiting power management
After some heavy AI’ing, we came up with a way to see a difference by using systemd-inhibit --list: I can see that there’s one line extra when Brave is playing a video:
libxfce4ui 1000 endre 3648 xfce4-screensav idle Inhibit requested block
(Notice how this doesn’t reference Brave, but xfce4-screensaver)
And we came up with this command to “tail” the different calls to dbus:
dbus-monitor --session “type=‘method_call’,interface=‘org.freedesktop.PowerManagement.Inhibit’” | grep -E “brave|Inhibit|UnInhibit”
.. yielding the following lines when starting to play, and then pausing, a youtube (notice the two lines per action):
method call time=1765370522.394644 sender=:1.116 → destination=org.freedesktop.PowerManagement serial=1046 path=/org/freedesktop/PowerManagement/Inhibit; interface=org.freedesktop.PowerManagement.Inhibit; member=Inhibit
string “/opt/brave.com/brave/brave”
method call time=1765370522.503690 sender=:1.116 → destination=org.freedesktop.PowerManagement serial=1052 path=/org/freedesktop/PowerManagement/Inhibit; interface=org.freedesktop.PowerManagement.Inhibit; member=Inhibit
string “/opt/brave.com/brave/brave”
method call time=1765370523.554456 sender=:1.116 → destination=org.freedesktop.PowerManagement serial=1056 path=/org/freedesktop/PowerManagement/Inhibit; interface=org.freedesktop.PowerManagement.Inhibit; member=UnInhibit
method call time=1765370525.818230 sender=:1.116 → destination=org.freedesktop.PowerManagement serial=1057 path=/org/freedesktop/PowerManagement/Inhibit; interface=org.freedesktop.PowerManagement.Inhibit; member=UnInhibit
(On pause, it takes a little while before the second “UnInhibit” line comes.)
My current understanding is that somehow this can become “stuck”; Brave not de-registering its inhibition. Maybe when it crashes? At least, in these situations, I can close, or kill, Brave, and those two entries seen via the tray icon doesn’t go away - and the screen will never turn off.