-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
MATE ScreenScreensaver should implement "XDG" Idle Inhibition Service specification #57
Comments
In the meantime, here is a polyfill that implements the required methods and forwards them to MATE ScreenSaver: |
Please see also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=768326 |
Would this be fixable anytime soonish ? |
Looks related: https://bugs.launchpad.net/bugs/1019878 |
Looks related: https://bugs.launchpad.net/ubuntu-mate/+bug/1403503 |
Since @monsta linked to an issue with VLC above, I want to add that VLC successfully blocks the screensaver for me once I have selected the "Disable screensaver" setting in the Video section of the VLC preferences. I am using VLC 2.2.0 and Mate 1.8.2 on Arch. This may be relevant to someone trying to test this bug. VLC might not be a good choice for testing because I still see this bug when using other video players like Firefox with H264 or using caffeine (here is the equivalent bug for caffeine: https://bugs.launchpad.net/caffeine/+bug/1026411). I tried the script @Alexander255 provided. It ran without error but did not inhibit the screensaver in my testing. Anyone know how much work it would take to fix this issue? I'd like to help but know nothing about Mate/dbus development. |
That script will not actually become operational before it wasn't able to connect to MATE screensaver over dbus; if you don't get any feedback that means that is DOES NOT work! I've updated the script slightly to give a bit more feedback about what is going on. Please also try running Workload estimate: |
Umm.. @willsALMANJ I have also checked disabled screensaver from long time back but still the screensaver does not get blocked. @Alexander255 how to know using |
@shirishag75
Hope I could help! :-) |
@Alexander255 Okay, your script does work for me. I got feedback from it (and checked that it did block the screensaver) for both VLC and Firefox. I'm not sure why it didn't work before. I thought it might be that I needed to have the script running before opening the VLC or Firefox window, but now I can restart the script with Firefox running and then maximize a video and it still works. It didn't work with Google Chrome though. I will try to review the links you provided and see what I can learn about dbus and MATE. If anyone wants to try this, don't let me discourage you as it will probably be a slow process for me. In the mean time, I found I could all of the functionality I needed from the lightson+.sh script at https://github.com/devkral/lightsonplus (I had to tweak a few lines for it to recognize Chrome properly) and from alexander's script (other than Chrome). @shirishag75 Yes, that is the setting that I checked in VLC. It works for me with the versions of VLC and MATE that I listed. I didn't do anything else to make it work. With that setting, the screensaver never activates for me when VLC is playing a video (VLC window does not need to fullscreen or even visible). If you use the same versions of the programs and it doesn't work, then I'm not sure what is going on. I see this behavior on Arch Linux. Perhaps the Arch packages use different build options from what you are using. |
Hi all,
Sorry for the long output but that's how it is. |
@shirishag75 The discussion of your problem with VLC should probably be taken to a different place since it is not related to changing MATE ScreenSaver to follow the freedesktop standard for DBus registration. That said, you still haven't specified what version of VLC you are using. You reference Debian which usually maintains quite old packages unless you are using the unstable version. I'm not sure how old the versions of VLC are in Debian release/testing/unstable, but explicit MATE support was added to VLC on May 27, 2013 here: https://git.videolan.org/?p=vlc.git;a=commitdiff;h=0b1ef649c51148cc7bd8ac2573be33b6c3d26592 I would guess this code first appeared in a stable release of VLC in version 2.1.0. |
I thought I had already shared that, this is the version I have :-
|
Ok, the situation with VLC is clear, modern versions have MATE support. |
@Alexander255: are you sure it should be done here and not in |
@monsta I've reviewed the source code a bit and found that MATE screensaver basically just proxies MATE session's inhibitors (but does remember locally which programs currently hold a lock as well): mate-screensaver/src/gs-listener-dbus.c Line 786 in edb89a7
Also MATE screensaver then uses MATE session to determine when to consider the user session idle/start the screen lock timer: Some observations:
While it's your call which daemon you choose to "burden" with this task, I'd still go for MATE ScreenSaver, since
|
@infirit: should we add this to roadmap for 1.12? |
We can add it to the roadmap, not sure if 1.12 is realistic but why not. I do like to stay as close to gnome so this has to be in settings-daemon as a plugin. This allows us to easily pickup code/fixes from there in the future. |
ping....any update on this ? |
All apps using |
I found this solution: |
@luciomoreira that is not really a solution but a hack but a terrible one at that. The whole idea of MATE is a low-cost, low-memory desktop environment. If I or anyone for that matter could use GNOME comfortably (meaning high memory and CPU usage) than why would anybody use MATE. A part of the reason is also that it looks / shares GNOME 2 like-look which old-timers like. I do hope that 1.20.0 does use this. For now I have made an alias which tells me that the specific function
No programmer hence will stop here. |
I think mate-screensaver should implement the freedesktop screensaver api. Although it's only a draft, it's the fact standard, both gnome and KDE implement it, and many application call this |
@ntninja the gist is no longer available. |
Looking at this issue for quite a while, I think mate should just remove org.mate.ScreenSaver in favor of org.freedesktop.ScreenSaver in the places it's found. I understand too little how gdbus work to do it myself. Some interesting discussion found here: https://bugzilla.mozilla.org/show_bug.cgi?id=1168090 Especially interesting are the comments from xfce4 developers. If you want to see how firefox inhibits the screensaver: https://hg.mozilla.org/mozilla-central/file/tip/widget/gtk/WakeLockListener.cpp |
It turns out that the fix is very easy: master...oz123:mate-screensaver:master The hardest part was to compile the software and figure out that I need to install everything in the right path. |
I believe this is related to my problem here, too: https://ubuntu-mate.community/t/xdg-desktop-portal-backend-call-failed/28467 Related: flatpak/xdg-desktop-portal-gtk#472 |
Until #300 is applied and rolled out. here is a little script that listens for |
@x42 interesting approach. Have you tested my patches? Can you comment on them? |
No, I have not. I prefer to stay with debian packaged mate (and use above stopgap solution).
Even though the https://specifications.freedesktop.org/idle-inhibit-spec/0.1/#org.freedesktop.ScreenSaver is still a draft, many other projects (notably Firefox and mpv) use it already. The API is sane and I cannot make a case for keeping |
GNOME and KDE already implement it and at least VLC and Firefox (33+) make use of it. It's not an "offical" Freedesktop specification but it has become a "defacto-standard".
Link: http://people.freedesktop.org/~hadess/idle-inhibition-spec/
Things to do:
org.freedesktop.ScreenSaver
additionally toorg.mate.ScreenSaver
org.mate.ScreenSaver
) asorg.freedesktop.ScreenSaver
on the object paths/ScreenSaver
and/org/freedesktop/ScreenSaver
Inhibit
andUnInhibit
correctly!The reason why you have add both the
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/4363731-mate-screenscreensaver-should-implement-xdg-idle-inhibition-service-specification?utm_campaign=plugin&utm_content=tracker%2F1635706&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F1635706&utm_medium=issues&utm_source=github)./ScreenSaver
and/org/freedesktop/ScreenSaver
object paths is because KDE orginally only added/ScreenSaver
while/org/freedesktop/ScreenSaver
fits into the official scheme. The spec fails to mention object paths entirly, but GNOME adds both paths so I guess that is what should be used...Also GNOME exports all for its ScreenSaver methods via
org.freedesktop.ScreenSaver
althrough the spec only says you have to export theInhibit
andUnInhibit
methods so I guess that's how it should be done...The text was updated successfully, but these errors were encountered: