-
Notifications
You must be signed in to change notification settings - Fork 21
DpmsInhibitor is **not** applicable. May make the system crash on suspend #62
Comments
I am sorry. This must be related to the fact that i am on Wayland and caffeine doesn't officially support it. I close the issue |
#44 apparently managed to make it work on wayland, though. |
Probably using a similare command to the following could solve the issue for Wayland users, preventing the screen from dimming on GNOME. We should see what's the command on KDE Wayland. I reopen the issue in hope to have a discussion. |
I'm very confused by this:
I wonder if Gnome changed something on their API and those cookies now expire or something. |
Makes sense. Do you know how to determine if this is applicable or not?
Yes, that's causing the extra logging. Looks like |
I didn't like that solution very much tbh. Lately I tried to search for some kind of standards between all DEs & compositors. I found the following 2 options:
I wrote two simple tests. But please: bear in mind that I have never programmed with Gtk nor with dbus. These results could very much depend on that (especially the one that uses dbus). I tired to run the tests on GNOME & KDE. Wayland protocolGTK supports the wayland protocol since this MR. My test appear to work on GNOME-Wayland. PortalsThe xdg-portal test, instead, doesn't seem to work on GNOME. With
At line 1172 of this
dbus-monitor.log
Even with On KDE it seems to work on both X11 and Wayland!
Unfortunately, tho, as soon as I click the button to toggle-off the inhibition in kde, the app crashes. I don't know why :/ ConclusionsFinally I think that we should try to go for the portal implementation as that seems like the most long-lasting protocol and it appears to be designed directly for applications. I can see it establishing between all DEs in the near future. Plus it's a start to properly package caffeine-ng with flatpak!
Oh yeah, that makes sense! |
Fyi this is a good read: https://arnaudr.io/2020/09/25/inhibit-suspending-the-computer-with-gtkapplication/ He suggests using |
Good news! After almost a year my work in order to use portals (which I think it's drawing to become the new standard cross-DEs, also thanks to wayland) in order to inhibit suspension for un-sendboxed application is completed!
What do you think about going forward with this idea, @WhyNotHugo? I could also see this as an option for having less inhibitors, since Portals are becoming really widespread across all the linux desktop |
Original issue is now fixed on |
Regarding direction: I'm thinking of addressing the Wayland support so I can use caffeine on swaywm. I've mentioned in the past that I haven't been really using caffeine, and Wayland support would put caffeine back in the "things I use" list. Portal support would be very welcome too. A few inhibitors use dbus, they are a useful reference, e.g.: d-feet is also very handy when experimenting simple d-bus method calls. |
This project has moved to codeberg. Follow-up for this issue is at https://codeberg.org/WhyNotHugo/caffeine-ng/issues/62 |
DpmsInhibitor not being applicable is a problem in both with
v3.5.1
and the git version.This is my output in
v3.5.1
:server does not have extension for +dpms option
is spammed in the console andjournalctl
with the git version.Additionally the last time the system suspended I could no longer access my pc neither in GUI nor in tty.
I am not sure if caffeine (git version) is related to it, but the following is its last output i have in
journalctl
a few minutes before the suspension of my pc, but after the system was blocked and the screen blacked out :distro: Manjaro Linux
DE: GNOME 40 on Wayland
EDIT: i tried to trigger suspension again with caffeine (git version) while playing music.
While caffeine still couldn't prevent the pc from suspending and reported the same error i reported above, I could get the control of the system back both in gui and tty.
The text was updated successfully, but these errors were encountered: