Git Product home page Git Product logo

Comments (2)

fohrloop avatar fohrloop commented on July 17, 2024

I tested it and for some reason I can't get the Inhibit to be permanent:

First, send the same Inhibit command as in wakepy 0.6.0:

niko@niko-ubuntu-home:~$ dbus-send --print-reply --dest=org.freedesktop.ScreenSaver /org/freedesktop/ScreenSaver org.freedesktop.ScreenSaver.Inhibit string:'foo' string:'bar'
method return time=1681232979.721795 sender=:1.59 -> destination=:1.2805 serial=209 reply_serial=2
   uint32 1498678652

Then, check the inhibitors (there is nothing):

niko@niko-ubuntu-home:~$ dbus-send --print-reply --dest=org.gnome.SessionManager /org/gnome/SessionManager org.gnome.SessionManager.GetInhibitors
method return time=1681232980.977727 sender=:1.29 -> destination=:1.2806 serial=806 reply_serial=2
   array [
   ]

If I use wakepy, I'll see (there is one, Inhibitor34):

niko@niko-ubuntu-home:~$ dbus-send --print-reply --dest=org.gnome.SessionManager /org/gnome/SessionManager org.gnome.SessionManager.GetInhibitors
method return time=1681233237.707105 sender=:1.29 -> destination=:1.2812 serial=813 reply_serial=2
   array [
      object path "/org/gnome/SessionManager/Inhibitor34"
   ]

I saw similar behavior (inhibitor lost) when closing the connection in python. So, probably the connection should be kept alive somehow? Not sure it that's possible with dbus-send or other CLI tools.

from wakepy.

fohrloop avatar fohrloop commented on July 17, 2024

Seems that it is not possible. The power manager(s) release the inhibit lock if the process calling Inhibit dies.

Refs:

from wakepy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.