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

Swaylock/waylock lose focus after resume #3581

Open
sant0s12 opened this issue Oct 15, 2023 · 29 comments
Open

Swaylock/waylock lose focus after resume #3581

sant0s12 opened this issue Oct 15, 2023 · 29 comments
Labels
bug Something isn't working

Comments

@sant0s12
Copy link

sant0s12 commented Oct 15, 2023

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:

exec-once = swayidle -w timeout 400 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on' timeout 700 'lockscreen' timeout 1000 'systemctl suspend' lock 'lockscreen' before-sleep 'lockscreen'

lockscreen script:

#!/bin/sh
playerctl -a pause

dunst_old=$(dunstctl is-paused)
dunstctl set-paused true # pause dunst

# mute
pactl set-sink-mute 0 true

pidof swaylock > /dev/null || swaylock -d >> /tmp/lockscreen.log 2>&1

# wait for swaylock to finish
wait $!

dunstctl set-paused "$dunst_old" # restore dunst state

swaylock config:

color=000000
show-keyboard-layout
daemonize
ignore-empty-password

How to reproduce

  1. Setup swayidle and swaylock as above.
  2. Make the system sleep (either by the timers expiring or by closing the laptop's lid)
  3. When the system wakes up, try to enter a password and fail

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

@sant0s12 sant0s12 added the bug Something isn't working label Oct 15, 2023
@sant0s12
Copy link
Author

sant0s12 commented Oct 17, 2023

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):

lock_error_hypr.log

@sant0s12
Copy link
Author

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.

@vaxerski
Copy link
Member

by doesnt get focus you mean keyboard focus? So you can still type behind it?

@sant0s12
Copy link
Author

Yes keyboard focus, I can't type in the password.

@vaxerski
Copy link
Member

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 pkill Hyprland

@sant0s12
Copy link
Author

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.

@mindrunner
Copy link

I think I face the same issue. I can confirm that swaylock has lost its focus and hyprland receives the keyboard inputs instead.

@mindrunner
Copy link

This only seem to happen when swayidle triggers the swaylock command in the before-sleep hook. For me there is no difference in how I initiate suspend/hibernate (e.g. wlogout, cli, lid, ...). If swaylock is active before suspend is triggered, the problem disappears:

swaylock && systemctl suspend

Workaround to recover unlockable session:

  • Have allow_session_lock_restore set to true
  • Log into a TTY
  • Kill / restart swaylock

pkill -SIGUSR1 swaylock ; WAYLAND_DISPLAY=wayland-1 swaylock

@smitropoulos
Copy link

I also tried to use waylock instead and stumbled upon this. Might be an issue with Hyprland or swayidle?

@hannessenonerCTM
Copy link

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)
As a workaround I put this line into the config (inspired by @mindrunner )
bindl = $mainMod, BackSpace , exec, pkill -SIGUSR1 swaylock && WAYLAND_DISPLAY=wayland-1 swaylock

@vaxerski
Copy link
Member

vaxerski commented Jan 7, 2024

can you check on git I made a commit rn

@hannessenonerCTM
Copy link

hannessenonerCTM commented Jan 7, 2024

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.
EDIT: it still does not work when triggered by swayidlle

@otaj
Copy link

otaj commented Jan 19, 2024

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:

  • I use multiple monitors
  • I use swayidle
  • in after-resume section of swayidle's config, I have hyprctl reload.

Now that I think about, I think it's possible that swayidle is not the culprit, but hyprctl reload is (and I have no way of triggering it right after sleep othen than swayidle at the moment, I'm too lazy to setup a systemd service.

When either of these two conditions doesn't happen, then swaylock is happily taking my keyboard. (i.e. only laptop without monitors plugged in, or not using hyprctl reload right after sleep) I was initially using hyprctl reload in order to trigger things specified in exec in my config, but I can directly put it into swayidle's after-resume section.

I did not test changing the monitor setup while the laptop was sleeping.

@otaj
Copy link

otaj commented Jan 19, 2024

I just now tested to put laptop into sleep by systemctl suspend (with swayidle running, therefore triggering before-sleep section, which locks the laptop), unplugging the monitors and waking up and everything works fine without hyprctl reload in after-resume. The other direction (sleeping without monitors, plugging in, waking up) worked as well.

Btw, I'm not on git version, but on 0.34.0-1 from Arch repos.

@mindrunner
Copy link

Happened to me without any external screens and not additional setups reloading hyprland.

@M4he
Copy link

M4he commented Mar 10, 2024

The lockscreen stopping to receive input happens to me randomly on NixOS when using swaylock-effects in Hyprland. Not just after sleep/resume, also occasionally after locking normally through swayidle.

I can confirm that the emergency recovery methods illustrated above seem to work for me:

  • set allow_session_lock_restore = true in hyprland.conf
  • add keybinding for resetting swaylock:
    bindl = SUPER, BackSpace, exec, pkill -SIGUSR1 swaylock && WAYLAND_DISPLAY=wayland-1 swaylock -f
    

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:

  • swaylock-effects 1.6.11
  • swayidle 1.8.0
  • Hyprland 0.36.0 (from git via flake package)
  • GDM 45.0.1 (as display manager)
  • nixpkgs stable 23.11

@M4he
Copy link

M4he commented Mar 22, 2024

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.

@vaxerski
Copy link
Member

I thought I fixed this.

@vaxerski
Copy link
Member

patch.txt
try

@M4he
Copy link

M4he commented Mar 25, 2024

patch.txt try

Thank you. I will thoroughly test-drive the patch this week.

@sant0s12
Copy link
Author

I have managed to hit this already:

/tmp/hypr/356414639fc06ace7045236ec41d673342981057_1711394832/hyprland.log:[ERR] BUG THIS: Session locked but focused isn't session lock on key

I was still unable to unlock it though.

@leiserfg
Copy link
Contributor

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.

@vaxerski
Copy link
Member

patch.txt
try this then

@sant0s12
Copy link
Author

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.

[LOG] Switch Lid Switch fired, triggering binds.
[LOG] Switch Lid Switch turn on, triggering binds.
[LOG] New session lock!
[LOG] Session got locked by 2d60e40
[LOG] Registered signal for owner 2d60e40: 2d60e58 -> 249e5c0 (owner: wlr_session_lock_v1)
[LOG] Registered signal for owner 2d60e40: 2d60e68 -> 249e628 (owner: wlr_session_lock_v1)
[LOG] Registered signal for owner 2d60e40: 2d60e78 -> 249e690 (owner: wlr_session_lock_v1)
[LOG] Registered signal for owner 2d7cfd0: 2d72ed8 -> 2d7cfe8 (owner: SSessionLockSurface)
[LOG] Registered signal for owner 2d7cfd0: 2d41528 -> 2d7d050 (owner: SSessionLockSurface)
[LOG] Registered signal for owner 2d7cfd0: 2d72ec8 -> 2d7d0b8 (owner: SSessionLockSurface)
[LOG] SessionLockSurface 2d7cfd0 mapped
[LOG] Set keyboard focus to surface 2d72bf0
[LOG] New Gamma event at 7ffc8a1029c0
[LOG] New Gamma event at 7ffc8a1029c0
[LOG] Switch Lid Switch fired, triggering binds.
[LOG] Keybind handling only locked (inhibitor)
[LOG] Switch Lid Switch turn off, triggering binds.
[LOG] Keybind handling only locked (inhibitor)
[LOG] Callback 2d86a78 -> 2d86a70, Keyboard removed.
[LOG] Callback 2d86940 -> 2d86938, Keyboard removed.
[LOG] Callback 2d869a8 -> 2d869a0, Keyboard removed.
[LOG] Callback 2d86a10 -> 2d86a08, Keyboard removed.
[LOG] Destroyed keyboard 2d86910
[LOG] New Gamma event at 7ffc8a1029c0
[LOG] Registered signal for owner 2dd23f0: 2e0d918 -> 2dd2828 (owner: layerSurface)
[LOG] Registered signal for owner 2dd23f0: 2da5318 -> 2dd26f0 (owner: layerSurface)
[LOG] Registered signal for owner 2dd23f0: 2e0d928 -> 2dd2758 (owner: layerSurface)
[LOG] Registered signal for owner 2dd23f0: 2e0d938 -> 2dd27c0 (owner: layerSurface)
[LOG] Registered signal for owner 2dea9d0: 2da5328 -> 2deab50 (owner: CPopup Head)
[LOG] LayerSurface 2da5250 (namespace notifications layer 3) created on monitor eDP-1
[ERR] BUG THIS: No CWLSurface for surface in damageSurface!!!
[WARN] Orphaned wlr_surface 2e0d640 in setPreferredScaleForSurface
[WARN] Orphaned wlr_surface 2e0d640 in setPreferredTransformForSurface
[LOG] LayerSurface 2da5250 mapped
[LOG] Registered signal for owner 2dd25d0: 2e0d958 -> 2dd2618 (owner: CWLSurface)
[LOG] Registered signal for owner 2dd25d0: 2e0d918 -> 2dd2680 (owner: CWLSurface)
[LOG] CWLSurface 2dd25d0 called init()
[LOG] New Gamma event at 7ffc8a1029c0
[LOG] New Gamma event at 7ffc8a1029c0
[ERR] BUG THIS: Session locked but focused isn't session lock on key
[LOG] Set keyboard focus to surface 2d72bf0
[ERR] MEGA BUG THIS: No session lock found at all to focus to??
[LOG] cursorImage request: surface 0
[LOG] Callback 1bab070 -> 1bab068, CWLSurface removed.
[LOG] Callback 1bab0d8 -> 1bab0d0, CWLSurface removed.
[LOG] CWLSurface 1bab000 called destroy()
[LOG] cursorImage request: surface 2d38fe0
[ERR] BUG THIS: Session locked but focused isn't session lock on key
[LOG] Set keyboard focus to surface 2d72bf0
[ERR] MEGA BUG THIS: No session lock found at all to focus to??
[ERR] BUG THIS: Session locked but focused isn't session lock on key
[LOG] Set keyboard focus to surface 2d72bf0
[ERR] MEGA BUG THIS: No session lock found at all to focus to??
[ERR] BUG THIS: Session locked but focused isn't session lock on key
[LOG] Set keyboard focus to surface 2d72bf0
[ERR] MEGA BUG THIS: No session lock found at all to focus to??
[ERR] BUG THIS: Session locked but focused isn't session lock on key
[LOG] Set keyboard focus to surface 2d72bf0
[ERR] MEGA BUG THIS: No session lock found at all to focus to??
[ERR] BUG THIS: Session locked but focused isn't session lock on key
[LOG] Set keyboard focus to surface 2d72bf0
[ERR] MEGA BUG THIS: No session lock found at all to focus to??
[ERR] BUG THIS: Session locked but focused isn't session lock on key
[LOG] Set keyboard focus to surface 2d72bf0
[ERR] MEGA BUG THIS: No session lock found at all to focus to??
[ERR] BUG THIS: Session locked but focused isn't session lock on key
[LOG] Set keyboard focus to surface 2d72bf0
[ERR] MEGA BUG THIS: No session lock found at all to focus to??
[ERR] BUG THIS: Session locked but focused isn't session lock on key
[LOG] Set keyboard focus to surface 2d72bf0
[ERR] MEGA BUG THIS: No session lock found at all to focus to??
[ERR] BUG THIS: Session locked but focused isn't session lock on key
[LOG] Set keyboard focus to surface 2d72bf0
[ERR] MEGA BUG THIS: No session lock found at all to focus to??
[ERR] BUG THIS: Session locked but focused isn't session lock on key
[LOG] Set keyboard focus to surface 2d72bf0
[ERR] MEGA BUG THIS: No session lock found at all to focus to??
[ERR] BUG THIS: Session locked but focused isn't session lock on key
[LOG] Set keyboard focus to surface 2d72bf0
[ERR] MEGA BUG THIS: No session lock found at all to focus to??
[ERR] BUG THIS: Session locked but focused isn't session lock on key
[LOG] Set keyboard focus to surface 2d72bf0
[ERR] MEGA BUG THIS: No session lock found at all to focus to??
[ERR] BUG THIS: Session locked but focused isn't session lock on key
[LOG] Set keyboard focus to surface 2d72bf0
[ERR] MEGA BUG THIS: No session lock found at all to focus to??
[ERR] BUG THIS: Session locked but focused isn't session lock on key
[LOG] Set keyboard focus to surface 2d72bf0
[ERR] MEGA BUG THIS: No session lock found at all to focus to??
[ERR] BUG THIS: Session locked but focused isn't session lock on key
[LOG] Set keyboard focus to surface 2d72bf0
[ERR] MEGA BUG THIS: No session lock found at all to focus to??
[ERR] BUG THIS: Session locked but focused isn't session lock on key
[LOG] Set keyboard focus to surface 2d72bf0
[ERR] MEGA BUG THIS: No session lock found at all to focus to??
[ERR] BUG THIS: Session locked but focused isn't session lock on key
[LOG] Set keyboard focus to surface 2d72bf0
[ERR] MEGA BUG THIS: No session lock found at all to focus to??
[ERR] BUG THIS: Session locked but focused isn't session lock on key
[LOG] Set keyboard focus to surface 2d72bf0
[ERR] MEGA BUG THIS: No session lock found at all to focus to??
[ERR] BUG THIS: Session locked but focused isn't session lock on key
[LOG] Set keyboard focus to surface 2d72bf0
[ERR] MEGA BUG THIS: No session lock found at all to focus to??
[ERR] BUG THIS: Session locked but focused isn't session lock on key
[LOG] Set keyboard focus to surface 2d72bf0
[ERR] MEGA BUG THIS: No session lock found at all to focus to??
[ERR] BUG THIS: Session locked but focused isn't session lock on key
[LOG] Set keyboard focus to surface 2d72bf0
[ERR] MEGA BUG THIS: No session lock found at all to focus to??
[ERR] BUG THIS: Session locked but focused isn't session lock on key
[LOG] Set keyboard focus to surface 2d72bf0
[ERR] MEGA BUG THIS: No session lock found at all to focus to??
[ERR] BUG THIS: Session locked but focused isn't session lock on key
[LOG] Set keyboard focus to surface 2d72bf0
[ERR] MEGA BUG THIS: No session lock found at all to focus to??
[ERR] BUG THIS: Session locked but focused isn't session lock on key
[LOG] Set keyboard focus to surface 2d72bf0
[ERR] MEGA BUG THIS: No session lock found at all to focus to??
[ERR] BUG THIS: Session locked but focused isn't session lock on key
[LOG] Set keyboard focus to surface 2d72bf0
[ERR] MEGA BUG THIS: No session lock found at all to focus to??
[ERR] BUG THIS: Session locked but focused isn't session lock on key
[LOG] Set keyboard focus to surface 2d72bf0
[ERR] MEGA BUG THIS: No session lock found at all to focus to??
[ERR] BUG THIS: Session locked but focused isn't session lock on key
[LOG] Set keyboard focus to surface 2d72bf0
[ERR] MEGA BUG THIS: No session lock found at all to focus to??
[ERR] BUG THIS: Session locked but focused isn't session lock on key
[LOG] Set keyboard focus to surface 2d72bf0
[ERR] MEGA BUG THIS: No session lock found at all to focus to??
[ERR] BUG THIS: Session locked but focused isn't session lock on key
[LOG] Set keyboard focus to surface 2d72bf0
[ERR] MEGA BUG THIS: No session lock found at all to focus to??
[ERR] BUG THIS: Session locked but focused isn't session lock on key
[LOG] Set keyboard focus to surface 2d72bf0
[ERR] MEGA BUG THIS: No session lock found at all to focus to??
[ERR] BUG THIS: Session locked but focused isn't session lock on key
[LOG] Set keyboard focus to surface 2d72bf0
[ERR] MEGA BUG THIS: No session lock found at all to focus to??
[LOG] New Gamma event at 7ffc8a1029c0
[LOG] Attached a keyboard with name Headphones (AVRCP)
[LOG] Registered signal for owner 2d86910: 2dce598 -> 2d86918 (owner: Keyboard)
[LOG] Registered signal for owner 2d86910: 2dce588 -> 2d86980 (owner: Keyboard)
[LOG] Registered signal for owner 2d86910: 2dce468 -> 2d86a50 (owner: Keyboard)
[LOG] Registered signal for owner 2d86910: 2dce5a8 -> 2d869e8 (owner: Keyboard)
[LOG] ApplyConfigToKeyboard for "headphones-(avrcp)", hasconfig: 0
[LOG] Attempting to create a keymap for layout ch-qwerty with variant  (rules: , model: , options: caps:swapescape)
[LOG] Updating keyboard 2d86910's translation state from an active index 0
[LOG] Set the keyboard layout to ch-qwerty and variant to  for keyboard "Headphones (AVRCP)"
[LOG] New keyboard created, pointers Hypr: 2d86910 and WLR: 2dce458
[ERR] BUG THIS: Session locked but focused isn't session lock on key
[LOG] Set keyboard focus to surface 2d72bf0
[ERR] BUG THIS: key not found in m_dPressedKeys
[LOG] Keybind handling only locked (inhibitor)
[LOG] Keybind handling only locked (inhibitor)
[LOG] Keybind handling only locked (inhibitor)
[LOG] Keybind handling only locked (inhibitor)
[LOG] Keybind handling only locked (inhibitor)
[LOG] Keybind handling only locked (inhibitor)
[LOG] Keybind handling only locked (inhibitor)
[LOG] Keybind handling only locked (inhibitor)
[LOG] Keybind handling only locked (inhibitor)
[LOG] Keybind handling only locked (inhibitor)
[LOG] Keybind handling only locked (inhibitor)
[LOG] Keybind handling only locked (inhibitor)
[LOG] Keybind handling only locked (inhibitor)
[LOG] Keybind handling only locked (inhibitor)
[LOG] Keybind handling only locked (inhibitor)
[LOG] Keybind handling only locked (inhibitor)
[LOG] Keybind handling only locked (inhibitor)
[LOG] Keybind handling only locked (inhibitor)
[LOG] Keybind handling only locked (inhibitor)
[LOG] Keybind handling only locked (inhibitor)
[LOG] Keybind handling only locked (inhibitor)
[LOG] Keybind handling only locked (inhibitor)
[LOG] Keybind handling only locked (inhibitor)
[LOG] Keybind handling only locked (inhibitor)
[LOG] Keybind handling only locked (inhibitor)
[LOG] Keybind handling only locked (inhibitor)
[LOG] Keybind handling only locked (inhibitor)
[LOG] Keybind handling only locked (inhibitor)
[LOG] Keybind handling only locked (inhibitor)
[LOG] Keybind handling only locked (inhibitor)
[LOG] Keybind handling only locked (inhibitor)
[LOG] Keybind handling only locked (inhibitor)
[LOG] Keybind handling only locked (inhibitor)
[LOG] Keybind handling only locked (inhibitor)
[LOG] Keybind handling only locked (inhibitor)
[LOG] Keybind handling only locked (inhibitor)
[LOG] Keybind handling only locked (inhibitor)
[LOG] Keybind handling only locked (inhibitor)
[LOG] Keybind handling only locked (inhibitor)
[LOG] Keybind handling only locked (inhibitor)
[LOG] Keybind handling only locked (inhibitor)
[LOG] Keybind handling only locked (inhibitor)
[LOG] Keybind handling only locked (inhibitor)
[LOG] Keybind handling only locked (inhibitor)
[LOG] Session Unlocked
[LOG] Callback 249e6b8 -> 249e6b0, wlr_session_lock_v1 removed.
[LOG] Callback 249e5e8 -> 249e5e0, wlr_session_lock_v1 removed.
[LOG] Callback 249e650 -> 249e648, wlr_session_lock_v1 removed.
[LOG] Set keyboard focus to surface 2d2c810, with [Window 2d32b20: title: "YouTube — Mozilla Firefox"]
[LOG] SessionLockSurface 2d7cfd0 destroyed
[LOG] Callback 2d7d0e0 -> 2d7d0d8, SSessionLockSurface removed.
[LOG] Callback 2d7d078 -> 2d7d070, SSessionLockSurface removed.
[LOG] Callback 2d7d010 -> 2d7d008, SSessionLockSurface removed.

@vaxerski
Copy link
Member

[ERR] MEGA BUG THIS: No session lock found at all to focus to??

wtf? sounds like a bug on the side of the lock?

@nfjdu
Copy link

nfjdu commented Apr 7, 2024

[ERR] MEGA BUG THIS: No session lock found at all to focus to??

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).

@kennylevinsen
Copy link

wtf? sounds like a bug on the side of the lock?

I don't think so:

[LOG] New session lock!
[LOG] Session got locked by 2d60e40
[LOG] SessionLockSurface 2d7cfd0 mapped
[LOG] Set keyboard focus to surface 2d72bf0
...
[LOG] LayerSurface 2da5250 (namespace notifications layer 3) created on monitor eDP-1
[LOG] LayerSurface 2da5250 mapped
[LOG] Set keyboard focus to surface 2d72bf0
...
[ERR] BUG THIS: Session locked but focused isn't session lock on key
[LOG] Set keyboard focus to surface 2d72bf0
[ERR] MEGA BUG THIS: No session lock found at all to focus to??
...
[LOG] Session Unlocked
[LOG] SessionLockSurface 2d7cfd0 destroyed

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. Set keyboard focus to surface XYZ is also printing for each the "BUG THIS" lines, which during a lock can only happen if the surface passed to CCompositor::focusSurface is a session lock surface passing all checks.

Maybe print where wlr_seat_keyboard_notify_enter is called, print the resulting focused_surface after the call, and print then same focused_surface where you do the checks that fail to make sure they're all the same? Also make sure that the logs printing surface-related things use comparable pointers, e.g. all printing the underlying wlr_surface so you can match SessionLockSurface lines with focus lines directly.

@vaxerski
Copy link
Member

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

@kennylevinsen
Copy link

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.

wlroots stuff is long gone,

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

10 participants