-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid polling every second #2
Comments
Does Gnome currently set this? I found it was not doing it in 2019 https://mail.gnome.org/archives/desktop-devel-list/2019-May/msg00088.html If yes, this would indeed be a good alternative. I think it will make sense to add support to use multiple detection methods and let the user pick which one to use. Also I don't see polling every second as a big problem, that shouldn't be using a lot of CPU, but removing dependency on X11 would be a good thing. |
I don't use Gnome, so can't test the current state of this unfortunately.
Yes it's not a big problem. |
It just seems like neither Gnome nor KDE support this currently :) So then this implementation would not benefit anyone until this is fixed upstream. |
Why use polling when you can use interrupts? There is an
idlehint
bool inorg.freedesktop.login1.session
at/org/freedesktop/login1/session/auto
and you can get notified when it changes by subscribing to the correspondingPropertiesChanged
dbus signal.It would be much more elegant than the current implementation that polls actively every second.
And it would also get rid of the X11 dependency.
It should be noted though that
idlehint
is not properly set right now in KDE Plasma: https://bugs.kde.org/show_bug.cgi?id=448942But that should not be a showstopper, I might fix this bug in KDE over the weekend.
The text was updated successfully, but these errors were encountered: