KeepAwake icon indicating copy to clipboard operation
KeepAwake copied to clipboard

Extenstion stops working while screen is locked

Open yura-pakhuchiy opened this issue 5 years ago • 7 comments

Works perfectly if I do not lock screen, however stops working if screen is locked. It would be great if it will continue work with locked screen in 3rd mode (keep awake even after restarts).

yura-pakhuchiy avatar Jul 12 '18 17:07 yura-pakhuchiy

Just tested this and I discovered another behavior. When it is in 2nd state (keep awake) it doesn't recover the state. For the 3rd state, it works fine.

jenspfahl avatar Aug 17 '18 19:08 jenspfahl

Just to clarify, my issue is that extension does not work while screen is locked. Eg., I would like to leave laptop to download some large file or to compile something big, but lock the screen at the same time, so I can leave the computer unattended.

yura-pakhuchiy avatar Aug 21 '18 09:08 yura-pakhuchiy

This still seems to be the case, which is really unfortunate. Most of my use-cases also involve leaving the computer unattended to process / download something. Would it be possible to not undo the changes in disable() when the locked mode is enabled, because this method also gets called when the screen gets locked (as documented here)?

tschai-yim avatar Apr 18 '24 06:04 tschai-yim

Yes, instead of resetting the values to default I could just keep them. Maybe I will add a new settings option to opt-in to this behavior to not break current expectations.

jenspfahl avatar Apr 18 '24 15:04 jenspfahl

Thanks for the extension and taking the time to address this. It might then also make sense to allow for screen dimming (#25) while in locked mode or the very least while the screen is locked (by still resetting it to the default).

btw. it seems the extension currently doesn't reset the setting changes when being disabled but sets them to the factory defaults, which for some users (not in my case though) might cause unintended side effects.

tschai-yim avatar Apr 18 '24 19:04 tschai-yim

@tschai-yim If you are using systemd, systemd-inhibit cat in a terminal provides the behavior we want. Then just press Ctrl-D 2 times to cancel and close the terminal.

yura-pakhuchiy avatar Apr 18 '24 22:04 yura-pakhuchiy

@tschai-yim If you are using systemd, systemd-inhibit cat in a terminal provides the behavior we want. Then just press Ctrl-D 2 times to cancel and close the terminal.

Hmm, tried it out yesterday and didn't seem to work. My laptop still suspended (or at least looked like that, given the progress of the running process), though I haven't checked it out in detail yet. But in any case, I think the feature request still stands as a togglable indicator in the menu bar is a lot nicer than having to type in a command in another window.

tschai-yim avatar Apr 22 '24 12:04 tschai-yim