-
-
Notifications
You must be signed in to change notification settings - Fork 192
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
GameControllerWakelock: Use dbus to inhibit screensaver #1897
base: main
Are you sure you want to change the base?
Conversation
1b88f1e
to
decfccc
Compare
Joy, Xfce's screensaver doesn't implement |
decfccc
to
3b74458
Compare
3b74458
to
8a2cf31
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
But luckily it does use the same arguments and function names. Looked at Gnome in a VM and it also implements |
I'm not sure if that's a proper way. At least it's compatibility hell. There's |
If they expose Inhibit from GtkApplication does absolutely nothing for me. |
They don't. The names I mentioned are both the bus and interface names. Object paths differ as well. I think I saw
You mean the implementation that we currently have in place? Shoot. I thought we're only talking about simplifying things and extending to Wayland, not fixing. 😅 xdg-screensaver does support KDE, though. It actually uses the same interface as you do here for KDE 4 🤔 and targets the Gnome, MATE, and Cinnamon equivalents as well as other handlers.
Awesome... Could be the same reason as for |
Yup, I just tested this on the fresh debian 11 vm with xfce4, it's not working. Screen blanks after the timeout of 1 minute that I set.
If I monitor the destination with
I don't know. I'll test the hacky script on the debian 11 vm and see if it actually works. edit: The gtk application inhibit script also does nothing in the debian 11 xfce vm |
I'm really tempted to just open a PR that removes it. If someone want to resurrect it with a method that works on various desktops they can open a PR. |
I still don't get why it doesn't. If you look at https://cgit.freedesktop.org/xdg/xdg-utils/tree/scripts/xdg-screensaver.in, you see that it should do exactly what you're doing here in its |
I got a clue edit: also, it's not just plasma, it fails just as much on xfce4 on a default debian 11install |
It doesn't support xfc4's screensaver, wip https://gitlab.freedesktop.org/xdg/xdg-utils/-/merge_requests/38 Ah, and I was right about the process needing to be running, here is why it doesn't work on plasma https://gitlab.freedesktop.org/xdg/xdg-utils/-/issues/114 (only 5 years old). All these are old af so I don't think we should rely on it anymore. I rather just read |
Oh wow, now that makes a lot of sense... 😒 So, ideally we'd have a library that we can use from within our process to make the KDE Inhibit calls work properly and with Xfce support and probably a lot more. I don't want to keep you from building that monster, but I'm not sure if this plugin is such an important feature. To be honest I don't fully understand the use case at all. A screensaver / locker should not jump in during gaming sessions anyway, at least due to regular input, no? |
Controller and joysticks are not considered regular input and won't reset the timer.
Nope, now that I start to think about it'll never end. So my suggestion is to drop the plugin for now. And I'll update #1896 restoring the plugin and if it ever starts working it can be merged rebased and merged. I really thought, cool, standard freedesktop interface, this should be simple 😭 . |
Thanks für the explanation. 👍 I thought controllers usually do show up as input devices. I'm fine with the removal, just want to add: If I'm not mistaken, the current implementation does not work with KDE 4's screensaver and Xfce's but it does seem to work for others, including MATE's, Cinnamon's, xscreensaver, xautolock, and anything that respects the X screensaver options set with |
Quality Gate passedIssues Measures |
This actually works for me on KDE. I'll test XFCE later.