Quantcast
Channel: PowerDevil activity
Viewing all articles
Browse latest Browse all 1766

Jakob Petsovits closed merge request !279: Draft: suspendsession: reenter suspend after waking up due to AC state change or mouse move with lid closed at Pla...

$
0
0

On some devices, plugging or unplugging AC power or moving the mouse while suspended will wake the system up, and it will not go back to sleep.

Before suspending, remember

  • the state of AC (plugged/unplugged),
  • the suspension mode (to ram/to disk) and
  • the suspension trigger (idle/button/lid close).

On about to resume, if

  • AC state has changed
  • or the reason for suspend was lid close and the lid is still closed,
  • and the suspend method was not suspend-then-hibernate,

then abort the resume and instead send the device back to sleep, in the mode appropriate for the new AC state.

Doesn't catch the cases of

  • plugged before sleep, unplugged during suspend, plugged again,
  • suspend-then-hiberated and AC state changed during suspend.

BUG: 476492CCBUG: 466025


Viewing all articles
Browse latest Browse all 1766

Trending Articles