Skip to content
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

Lock before suspend to prevent race #28

Merged
merged 1 commit into from Jan 17, 2018

Conversation

hcnelson99
Copy link
Contributor

@hcnelson99 hcnelson99 commented Jan 15, 2018

For suspend to work consistently, the screen must be locked before the suspend. Otherwise, occasionally the suspend will occur before the screen locks, resulting in a wakeup to a momentarily unlocked screen.

This patch removes the "-n (--nofork)" flag from the i3lock invocation. i3lock Forking is useful because it allows locking to properly occur before the suspend, as in this patch and as described in the i3lock-color man page:

i3lock forks, so you can combine it with an alias to suspend to RAM (run "i3lock && echo mem > /sys/power/state" to get a locked screen after waking up your computer from suspend to RAM)

Was there a reason for enabling nofork? If so, this patch can be reworked to fix the problem in another way.

For suspend to work consistently, the screen must be locked before the
suspend. Otherwise, occasionally the suspend will occur before the
screen locks, resulting in a wakeup to a momentarily unlocked screen.
@pavanjadhaw
Copy link
Member

Thanks, maybe this will help. I hope you have thoroughly tested these changes. :)

Copy link
Collaborator

@AUTplayed AUTplayed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works for my system

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants