After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 794563 - Use Mutter's new D-Bus interface to reset idletime
Use Mutter's new D-Bus interface to reset idletime
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: power
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
Depends on:
Blocks:
 
 
Reported: 2018-03-21 13:18 UTC by Bastien Nocera
Modified: 2018-05-04 14:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
power: Remove X11-specific idle time reset code (2.70 KB, patch)
2018-03-21 13:18 UTC, Bastien Nocera
committed Details | Review
tests: Use Mutter's new D-Bus interface to reset idletime (3.92 KB, patch)
2018-03-21 13:18 UTC, Bastien Nocera
committed Details | Review
power: Add test for idletime inhibitors (3.42 KB, patch)
2018-03-21 14:33 UTC, Bastien Nocera
none Details | Review
power: Add test for idletime inhibitors (3.45 KB, patch)
2018-03-22 10:33 UTC, Bastien Nocera
committed Details | Review
power: Fix possible exception trying to read logind stdout (1.44 KB, patch)
2018-05-03 17:58 UTC, Bastien Nocera
committed Details | Review

Description Bastien Nocera 2018-03-21 13:18:30 UTC
.
Comment 1 Bastien Nocera 2018-03-21 13:18:35 UTC
Created attachment 369959 [details] [review]
power: Remove X11-specific idle time reset code

It's now implemented in mutter itself.

See https://bugzilla.gnome.org/show_bug.cgi?id=705942
Comment 2 Bastien Nocera 2018-03-21 13:18:47 UTC
Created attachment 369960 [details] [review]
tests: Use Mutter's new D-Bus interface to reset idletime

Rather than poke through using XTest, use Mutter's new D-Bus API to do
as if the user pressed a key on a keyboard.

See https://bugzilla.gnome.org/show_bug.cgi?id=705942
Comment 3 Bastien Nocera 2018-03-21 14:33:51 UTC
Created attachment 369964 [details] [review]
power: Add test for idletime inhibitors

See https://bugzilla.gnome.org/show_bug.cgi?id=705942
Comment 4 Benjamin Berg 2018-03-21 15:09:54 UTC
Review of attachment 369959 [details] [review]:

lgtm once the mutter changed is merged
Comment 5 Benjamin Berg 2018-03-21 15:10:26 UTC
Review of attachment 369960 [details] [review]:

lgtm
Comment 6 Benjamin Berg 2018-03-21 15:13:28 UTC
Review of attachment 369964 [details] [review]:

Hm, the check_no_suspend seems an unrelated optimisation to fail faster. Fine with keeping it in here.

One slightly oddity is that it won't even read the log with a timeout of 0 now though.
Comment 7 Bastien Nocera 2018-03-21 16:09:59 UTC
(In reply to Benjamin Berg from comment #6)
> Review of attachment 369964 [details] [review] [review]:
> 
> Hm, the check_no_suspend seems an unrelated optimisation to fail faster.
> Fine with keeping it in here.
> 
> One slightly oddity is that it won't even read the log with a timeout of 0
> now though.

Definitely need to fix that.
Comment 8 Bastien Nocera 2018-03-22 10:33:47 UTC
Created attachment 370000 [details] [review]
power: Add test for idletime inhibitors

See https://bugzilla.gnome.org/show_bug.cgi?id=705942
Comment 9 Benjamin Berg 2018-03-22 11:05:07 UTC
Review of attachment 370000 [details] [review]:

ok, that looks good
Comment 10 Bastien Nocera 2018-05-03 17:58:35 UTC
Created attachment 371643 [details] [review]
power: Fix possible exception trying to read logind stdout

ERROR: test_inhibitor_idletime (__main__.PowerPluginTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  • File "/home/hadess/Projects/jhbuild/gnome-settings-daemon/plugins/power/test.py", line 966 in test_inhibitor_idletime
    self.check_no_suspend(2)
  • File "/home/hadess/Projects/jhbuild/gnome-settings-daemon/plugins/power/test.py", line 335 in check_no_suspend
    log = self.logind.stdout.read()
IOError: [Errno 11] Resource temporarily unavailable

Comment 11 Benjamin Berg 2018-05-03 21:13:21 UTC
Review of attachment 371643 [details] [review]:

Ah, yes, non-blocking IO.
Comment 12 Bastien Nocera 2018-05-04 14:21:11 UTC
Attachment 369959 [details] pushed as 06eb39d - power: Remove X11-specific idle time reset code
Attachment 369960 [details] pushed as 5bc16fd - tests: Use Mutter's new D-Bus interface to reset idletime
Attachment 370000 [details] pushed as 3e9b7f8 - power: Add test for idletime inhibitors
Attachment 371643 [details] pushed as 5edef27 - power: Fix possible exception trying to read logind stdout