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

i3lock unexpected behaviour after resume from suspend #229

Closed
ghost opened this issue Apr 24, 2019 · 4 comments
Closed

i3lock unexpected behaviour after resume from suspend #229

ghost opened this issue Apr 24, 2019 · 4 comments

Comments

@ghost
Copy link

ghost commented Apr 24, 2019

I'm submitting a…

[ ] Bug
[ ] Feature Request
[x] Other (Please describe in detail)

Current Behavior

I suspend my laptop via systemd service and i3lock, it works just as it should on one machine and totally freezes on another. I suspend my laptop with command systemctl suspend , after that i3lock locks screen and then suspend laptop. When I resume laptop I can only type 1-2 characters and I may confirm this by indicator and then all my input from keyboard seems like not triggering event of keypress because indicator not showing as if I was typing and I can't unlock my laptop anyhow, it seems like it freezes. Later I figured out that once I typed first letter it reproduced infinitely, more info below in the debug log.

My simple screenlock.systemd service: https://pastebin.com/nJvGQDRS

Password: yes
-Correct behavior which happens 1 out of 4 time on my laptop output of i3lock --debug : https://pastebin.com/aXmDRVqj
-After resume when I pressed first "y" seems like it goes into infinite loop and indicator only reacts once, after that no input can be entered and I have to reboot, output of i3lock --debug: https://pastebin.com/L2nVRqwC
-After resume I can't enter anything, or only 1-2 characters and then again can't : https://pastebin.com/MWZHXBNT

Expected Behavior

Unlock after resume from suspend

Reproduction Instructions

I'm not sure is this a bug or not, because on one of my laptop it works perfect with same configurations, anyway, to reproduce this I created screenlock.service, enabled it and then entered "systemctl suspend"

Environment

Output of i3lock --version:

i3lock version: 2.11.1 © 2010 Michael Stapelberg
@Airblader
Copy link
Member

Can you try changing the service to this? This is similar to what I use on my system where everything works fine, so maybe worth a shot. I set it up a long time ago but remember I otherwise had issues with suspend etc.

[Unit]
Description=Starts i3lock on sleep
Before=sleep.target
 
[Service]
User=user
Type=simple
Environment=DISPLAY=:0
ExecStart=/usr/bin/i3lock -n -i /home/user/i3lock.png
ExecStartPost=/usr/bin/sleep 1
 
[Install]
WantedBy=sleep.target

@ghost
Copy link
Author

ghost commented Apr 24, 2019

Can you try changing the service to this? This is similar to what I use on my system where everything works fine, so maybe worth a shot. I set it up a long time ago but remember I otherwise had issues with suspend etc.

[Unit]
Description=Starts i3lock on sleep
Before=sleep.target
 
[Service]
User=user
Type=simple
Environment=DISPLAY=:0
ExecStart=/usr/bin/i3lock -n -i /home/user/i3lock.png
ExecStartPost=/usr/bin/sleep 1
 
[Install]
WantedBy=sleep.target

Sadly, no luck. The indicator continues either twitching, which I believe means infinite repeating of first entered character or not reacting to any keypress leaving no option to me but reboot.

@stapelberg
Copy link
Member

Does this happen with other screen lockers, too? Try slock, or xsecurelock.

@stapelberg
Copy link
Member

Closing as the reporter is inactive.

sh1r4s3 pushed a commit to sh1r4s3/i3lock-gif that referenced this issue Jun 26, 2022
…bles

chore: rename variables for examples, remove unused variables
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

No branches or pull requests

2 participants