-
Notifications
You must be signed in to change notification settings - Fork 12
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
Improper behavior when device was never plugged in #14
Comments
We can fix most of this pretty simply by exiting the AC monitoring thread if we start off disconnected. Do we want to do something more complex like handle the case where the user starts off disconnected, locks, and then plugs in AC? The same applies to Ethernet. Do we want to start monitoring wired Ethernet connections that were initiated after the laptop was locked? |
…C power wasn't connected to begin with at the start of monitoring. Issue #14
Andreas - what do you think? Hold open until we handle the lock > plug in > disconnect case or is this sufficient? |
The cleanest approach is probably to do two things:
|
We already were doing (1). With (2), we're now doing it for Ethernet and AC as of change d2ea136 (above). The problem is we're only tracking when AC goes from up to down when it started as up. Consider the scenario: User unplugs laptop -> locks screen -> plugs in laptop -> unplugs laptop. YoNTMA doesn't hibernate in this scenario because at lock time, it will check if AC is plugged in, see that it's not, and stop monitoring. The question is do we want to hibernate in the scenario above (i.e. monitor for up->down transitions even when we started in down). |
We could restart the monitoring thread on the down->up change if the machine is locked. Would solve it. |
Moving to post v1.0. |
If the device starts off with AC disconnected and the user locks the screen, YoNTMA hibernates the device immediately.
To reproduce:
Expected:
Machine remains powered on in locked state
Actual:
YoNTMA instantly forces machine into hibernation
The text was updated successfully, but these errors were encountered: