Git Product home page Git Product logo

Comments (4)

greatquux avatar greatquux commented on August 28, 2024 1

I went down a rabbit hole trying to figure it out, but eventually I just decided it was simpler to use the instructions in caffeine's README for checking whether it's enabled or not, and running a script every minute to set the DPMS values if caffeine is disabled. So now when I turn on caffeine, DPMS is set to all 0's (disabled), and when I disable it, within a minute they'll get set back. So I can save some power by turning off my monitors and help save the planet. :)

STATE=`gsettings --schemadir ~/.local/share/gnome-shell/extensions/[email protected]/schemas/ get org.gnome.shell.extensions.caffeine toggle-state`
if [ "$STATE" == "false" ]; then
        xset dpms 300 600 900 
fi

from gnome-shell-extension-caffeine.

stuarthayhurst avatar stuarthayhurst commented on August 28, 2024

Since Caffeine doesn't directly modify DPMS values, I feel like this should be reported elsewhere as well.

As for the scripts, this seems like a bit of a hacky fix that doesn't belong here. I don't feel like that should be implemented, but that depends on what the other maintainers think too.

from gnome-shell-extension-caffeine.

greatquux avatar greatquux commented on August 28, 2024

The script thing was just something I threw out there, figured maybe it could be generalized for other things people might need to run when enabling/disabling. I created a short movie clip that shows (via xset q|grep display) that the DPMS settings go to 0 when I click Caffeine on. Could GNOME be doing this when it gets the inhibit signal from Caffeine? I wonder how to get it to restore them then...
https://github.com/eonpatapon/gnome-shell-extension-caffeine/assets/1655942/17d1f9dd-7a04-4a1a-832f-75cea9ccf1bb

from gnome-shell-extension-caffeine.

stuarthayhurst avatar stuarthayhurst commented on August 28, 2024

I'm not super familiar with how GNOME, DBus and systemd handle inhibitors, but I'd assume at some point in that stack it changes the DPMS values when an inhibitor is added.

from gnome-shell-extension-caffeine.

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.