-
-
Notifications
You must be signed in to change notification settings - Fork 910
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
Swaylock/waylock lose focus after resume #3581
Comments
This is the log of the last time this happened (the last time the session was locked I was unable to unlock it, the sessions above worked fine): |
Does anybody have any idea about how I can debug this further? I switched to gtklock because of this issue but now that wlr-input-inhibitor was dropped I can no longer to that. |
by doesnt get focus you mean keyboard focus? So you can still type behind it? |
Yes keyboard focus, I can't type in the password. |
just because you can't type in the password doesn't mean focus is lost, it could be e.g. swaylock being hung? Launch a terminal in the background, get it to do this, and try to type in and send |
You are right, swaylock is still in focus because I tried what you said and it does not work. However, I can still not type my password. |
I think I face the same issue. I can confirm that |
This only seem to happen when
Workaround to recover unlockable session:
|
I also tried to use waylock instead and stumbled upon this. Might be an issue with Hyprland or swayidle? |
This is most likely an issue with hyprland, i could reproduce similar behavior when adding a monitor when locked (eg. plugging in a monitor or it coming back from sleep). For me it also happened when starting swaylock from a terminal. I was able to reproduce the same issue with waylock. I could not reproduce the issue disappearing when swaylock was active before suspending (could also be me, I switched from sway to Hyprland yesterday) |
can you check on git I made a commit rn |
Thanks for the fix, works except when closing a docked laptop, unplugging it and then opening it (I have a monitor connected to my docking station), but i can use the workaround I posted before for that situation. |
Hi, I wanted to say I was also affected by this problem, but I think, I succesfully managed to isolate when this occurs for me:
Now that I think about, I think it's possible that swayidle is not the culprit, but When either of these two conditions doesn't happen, then I did not test changing the monitor setup while the laptop was sleeping. |
I just now tested to put laptop into sleep by Btw, I'm not on git version, but on 0.34.0-1 from Arch repos. |
Happened to me without any external screens and not additional setups reloading hyprland. |
The lockscreen stopping to receive input happens to me randomly on NixOS when using I can confirm that the emergency recovery methods illustrated above seem to work for me:
When the issue occurs and input focus is lost on swaylock, I can use the keybinding to reset it. The screen will flash red briefly and then a new swaylock instance spawns which receives keyboard input again, enabling me to unlock the screen. EDIT: forgot to mention that I am unable to use the emergency recovery method from a tty since Hyprland freezes when switching back from a tty in this case for me, hence the need for the keybinding. For reference are the software versions I am using:
|
I just encountered this again (I do almost once a day) and after I hit the emergency shortcut and unlocked my screen using a new swaylock instance, I could see parts of my password that I attempted to type until I realized swaylack is not reacting inserted into the terminal window that was visible on the workspace the lockscreen was covering. So swaylock is not freezing but is actually loosing focus as the original description states. Furthermore, something on the previously active workspace might steal the focus. As long as this isn't fixed anybody affected by this should be very careful when typing a password and hitting enter. Always check if swaylock is actually reacting to input before hitting enter. Otherwise you might post your password into a chat or something. |
I thought I fixed this. |
patch.txt |
Thank you. I will thoroughly test-drive the patch this week. |
I have managed to hit this already:
I was still unable to unlock it though. |
To me, it happens mainly if I change the display setup. Like, I make the laptop sleep while plugged into a monitor and then wake it up without it, if I connect the monitor again then the focus works. |
patch.txt |
I have managed to hit the bug log but it seems to recover fine afterwards and I've always been able to log in so far.
|
wtf? sounds like a bug on the side of the lock? |
not sure its bug on the side of lock, because i tried swaylock and hyprlock this week. have 2 same bugs on both of them. 1 - described here (no ability to input something after suspend + resume ) , 2 - no ability to change keyboard layout on lockscreen(but this one i have not tried to fix yet, so doesnt matter). |
I don't think so:
There's a lock surface present the entire time, so not much more for the client to do - that's the surface that should be given focus. Maybe print where |
wlroots stuff is long gone, if this bug is still there I'll revisit it after #6608 is done. Haven't experienced it ever myself so I dunno if it's still a thing |
We just got another poke on that issue on swaylock, so I took a quick look before I closed the issue as being on the Hyprland side of things to make sure it wasn't an unreasonable assumption.
heh, yeah I was looking at an old checkout - at least it it matched the logs. The business logic in question looks quite similar now though, so the issue might have carried over. |
Hyprland Version
1b48642
Bug or Regression?
Bug
Description
I have this issue where sometimes swaylock/waylock (it happens for either of them) don't get focus when resuming from sleep. This is not always the case so I haven't been able to pin-point the issue. When it happens, sometimes the mouse cursor is visible but then goes away after pressing any key. Trying to input the password does not work at all and the screen remains black (but still lit). Then I have to kill swaylock from another tty to be able to access the system.
I have swaydle setup so that is turns off the screen before it locks it and the screen is locked using a the lockscreen script below.
I hope this is not a duplicate issue since I have not been able to find anybody else having the same problem.
hyprland config:
lockscreen script:
swaylock config:
How to reproduce
This is very inconsistent and I haven't been able to find out what exactly triggers it. But I have been having the problem quite frequently.
Any suggestions on how to pin-point the cause are greatly appreciated! I'm guessing it's probably missconfiguration.
As a final remark: I haven't had the same problem with gtklock, which does not support wayland's screen lock protocol, so maybe that has something to do with it. However, I haven't used gtklock for very long so maybe it would show up eventually.
Crash reports, logs, images, videos
No response
The text was updated successfully, but these errors were encountered: