Coder Social home page Coder Social logo

Comments (3)

schlomo avatar schlomo commented on July 28, 2024

How about adding a mode that monitors the dependencies and switches back to internal only if there are no dependencies for some time, like 30 seconds? That way you don't have to monitor for specific events but solve the generic case of returning to the internal only mode after a forced switch to dynamic switching.

from gswitch.

hughperkins avatar hughperkins commented on July 28, 2024

How about, it sounds like you can detect when the monitor is plugged in, and know which device it is? So:

  • if gSwitch was set to 'integrated' when display plugged in, then note this down, note down the display device, and switch to dynamic/gpu
  • when the display device is disconnected, check against the previous notes, and notice that at the time the display device was connected, gSwitch was set to 'integrated only', and so switch back to integrated only.
    • of course there is an edge-case here for people who were in integrated only, then attach a display, then start somethign that does need gpu, and then disconnect the monitor
    • such people could simply switch to dynamic mode first though, or not disconnect the monitor. (or you could set the new behavior as an option perhaps)

from gswitch.

CodySchrank avatar CodySchrank commented on July 28, 2024

The initial comment was really just a mental note for myself but I appreciate your responses! I forgot about this issue, but I encountered it the other day and it annoyed me so I'll fix it lol.

@hughperkins Yep that's pretty much exactly how I'll do it. Thanks for doing all the thinking for me ;)

from gswitch.

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.