Hyprland
Hyprland copied to clipboard
Swaylock crashes after wakeup
Hyprland Version
Hyprland, built from branch main at commit 8f3848788422822c2cb36c57b4f3929eec1cc42c dirty (xwayland: don't change workspace on configure for invisible windows). Tag: v0.33.1-31-g8f384878 flags: (if any) debug
Bug or Regression?
Bug
Description
Seems to be similar to #1519, except I'm not on a laptop. This is not completely consistent, but it happens more often than not: annoying: sometimes, after my pc wakes up, swaylock crashes and becomes completely unresponsive. If I try to kill it from another tty, I get a red screen instead of Hyprland.
I use https://aur.archlinux.org/packages/swaylock-effects-git / https://github.com/jirutka/swaylock-effects.
How to reproduce
- Call swaylock before sleep (I use swayidle)
- Wake up the computer
- Try to login
Crash reports, logs, images, videos
Not sure where I'm supposed to find logs for this
Might be #804 which I somehow did not find before opening this. Still, I can't find any crash logs.
I have the exact same issue on my laptop (framework 13 amd). Non responsive sway lock and if I kill it, red screen. I have to kill hyprland and relogin so it is not a kernel panic.
That's weird, it only happens on my nvidia computer for me.
It seems random and appears more often after an hibernation than a sleep. I checked hyprland logs and saw nothing. I am trying to disable waylock to sort it out.
I have noticed a pattern, the crash only happens if the fade animation doesn't finish (it might not be related directly), which happens if you use
before-sleep 'swaylock -f'
in swayidle for example. A workaround is to change the above line to
before-sleep 'sh -c "swaylock -f && sleep 3"'
Never mind, I still think there is a pattern though.
This doesn't address the underlying problem, but if you do pkill -SIGUSR1 swaylock from another tty it unlocks swaylock instead of killing it and leaving you with a red screen.
I have noticed a pattern, the crash only happens if the fade animation doesn't finish (it might not be related directly), which happens if you use
before-sleep 'swaylock -f'in swayidle for example. A workaround is to change the above line to
before-sleep 'sh -c "swaylock -f && sleep 3"'
I also lock this way using swayidle. Do you confirm it helps?
This doesn't address the underlying problem, but if you do
pkill -SIGUSR1 swaylockfrom another tty it unlocksswaylockinstead of killing it and leaving you with a red screen.
Do you use swaylock-effects or swaylock? I am testing swaylock to confirm which one is having a problem.
I also read that it was the focus that is not given to swaylock and causing the problem.
This doesn't address the underlying problem, but if you do
pkill -SIGUSR1 swaylockfrom another tty it unlocksswaylockinstead of killing it and leaving you with a red screen.Do you use swaylock-effects or swaylock? I am testing swaylock to confirm which one is having a problem.
I also read that it was the focus that is not given to swaylock and causing the problem.
swaylock-effect i facing same problem
I've been hit by this bug since version 1.7 of swaylock, but swaylock-effects was working ok. Since swaylock-effects switched to version 1.7 on archlinux the same is happening
It is happening every time after hibernation. I'm using an intel GPU
I'm on NixOS (23.11) and am having the same issue using either swaylock v1.7 or using swaylock-effects v1.6.11. It happens somewhat randomly during normal use, but I seem to be able to reproduce it 100% of the time when I lock and suspend, and then try and wake up immediately after locking & suspending. Hyprland version is commit d74607e414dcd16911089a6d4b6aeb661c880923 (v0.33.1)
I tested all of it previously with the same swaylock (not effect) version on sway and the error only occurs on hyprland, so it seems to be a compositor issue. @vaxerski any ideas?The same also happens for waylock. Gtklock doesn't work anymore due to the new wlroots version which deprecated the old locking protocol.
cna I get a wayland_debug log pls
swylocks
cna I get a wayland_debug log pls
swylocks
~I remember seeing some issue where someone mentioned setting WAYLAND_DEBUG=1, however, I can't seem to find it anymore. I can easily reproduce the bug, but not sure where to find the logs after inducing the bug. Would you able to point me to what you'd need to debug?~ Should HYPRLAND_LOG_WLR=1 also be set?
@vaxerski I think managed to figure out how to get it. Hope this helps: debug.log
swaylock doesnt seem to have crashed in that loge tho?
I've got the same issue. swaylock 1.7 hyprland on 7e033e48 from 2024-01-05. It started after hyprland update. journalctl.log
I'm having trouble artificially reproducing this for the wayland logs, but it still happens 99% of the time normally.
Also, I'm not sure if this is related, but the order my swayidle runs things is swaylock -> dpms off -> systemctl suspend, the exception is if I sleep manually, in which case only swaylock is run. The weird thing is that if all 3 of the events go through, my system doesn't actually go to sleep, it only does so once I interact with my keyboard or mouse (both are set to cancel dpms off). Not sure if this is 100% consistent, but I've had it happen a lot.
I'll set swaylock up so it always dumps log files, and upload the next time I crash.
I'm also on NixOS 23.11 and I've been having similar issues for a month or so now on both Hyprland (03ebbe1) and Sway (1.8.1), with swaylock and swaylock-effects. However unlike some other situations here I don't have auto lock on sleep configured.
It doesn't happen every time, but if I lock my laptop and close the lid then relatively often it'll be frozen when I open it. SIGUSR1 from another tty will unlock it. I'll try to get logs the next time it happens.
@olistrik closing the laptop lid automatically puts the device to sleep.
@diniamo yeah, though I thought it might be important that the locking, screen off, and sleeping events are not happening simultaneously or in quick succession. I usually lock my laptop and then close the screen ~10 seconds later.
I've had some issues in the past with i3lock because it couldn't lock faster than my laptop would go to sleep, or that swayidle would trigger immediately after waking.
I have a similar issue on my PC where I sometimes get the red screen, but more often I get blank/corrupted windows as if they didn't fully restore. Then if I open new windows and cause layout changes, sometimes they mostly "regain" their content.
I'll try to reproduce later and post some logs.
sorry for the late reply here is the swaylock log and coredump
ignore the swaylock-error --screenshots, i guess this is an internal bug.
OK this is very weird, after making swaylock blocking (by removing the -f flag, it still works in swayidle, even if you don't have it), I can't reproduce it anymore. Can someone test if this has anything to do with it?
@diniamo -f is definitely not the problem
Huhm, that's weird then
next to the coredump and swaylock here is a journal entry from today:
I usually run this script (from anopther tty) after waking my computer due to the aforementioned issue (it happens every single time on my computer)
#!/bin/bash
#
pkill -USR1 swaylock
exit
After switching back: It apparently also kills my bar, no matter of ags or nwg-shell (its visible in the log) and sometimes even firefox or electron apps.
@vaxerski if you need anything else just say so, the hyprland log is empty, do i need to build a debug build?
next to the coredump and swaylock here is a journal entry from today:
I usually run this script (from anopther tty) after waking my computer due to the aforementioned issue (it happens every single time on my computer)
#!/bin/bash # pkill -USR1 swaylock exitAfter switching back: It apparently also kills my bar, no matter of ags or nwg-shell (its visible in the log) and sometimes even firefox or electron apps.
@vaxerski if you need anything else just say so, the hyprland log is empty, do i need to build a debug build?
Same thing here, happening every wakeup on (my) primary display with multiple displays attached, happens occasionally with one display attached
Desktop PC, Alder Lake, AMDGPU (RX6650)
Happy to help troubleshoot this if I can be of help
I managed to get the log files too: wayland_debug.log
@diniamo, you can directly upload files on github.