hyprwm / hyprlock

Hyprland's GPU-accelerated screen locking utility
BSD 3-Clause "New" or "Revised" License
802 stars 59 forks source link

20-30 second freeze after screen turns back on #463

Open ach-17 opened 2 months ago

ach-17 commented 2 months ago

Regression?

No

Hyprlock Info and Version

hyprlock 0.4.1-1

Hyprlock config ```sh background { monitor = path = /home/sohrac/.cache/blurred_lock.png # only png supported for now } input-field { monitor = size = 200, 50 outline_thickness = 3 dots_size = 0.33 # Scale of input-field height, 0.2 - 0.8 dots_spacing = 0.15 # Scale of dots' absolute size, 0.0 - 1.0 dots_center = true dots_rounding = -1 # -1 default circle, -2 follow input-field rounding outer_color = rgb(151515) inner_color = rgb(FFFFFF) font_color = rgb(10, 10, 10) fade_on_empty = true fade_timeout = 1000 # Milliseconds before fade_on_empty is triggered. placeholder_text = Input Password... # Text rendered in the input box when it's empty. hide_input = false rounding = -1 # -1 means complete rounding (circle/oval) check_color = rgb(204, 136, 34) fail_color = rgb(204, 34, 34) # if authentication failed, changes outer_color and fail message color fail_text = $FAIL ($ATTEMPTS) # can be set to empty fail_transition = 300 # transition time in ms between normal outer_color and fail_color capslock_color = -1 numlock_color = -1 bothlock_color = -1 # when both locks are active. -1 means don't change outer color (same for above) invert_numlock = false # change color if numlock is off swap_font_color = false # see below position = 0, -20 halign = center valign = center } label { monitor = #clock text = cmd[update:1000] echo "$TIME" color = rgba(200, 200, 200, 1.0) font_size = 55 font_family = JetBrainsMono NFM SemiBold position = -100, 70 halign = right valign = bottom shadow_passes = 5 shadow_size = 10 } label { monitor = text = $USER color = rgba(200, 200, 200, 1.0) font_size = 20 font_family = JetBrainsMono NFM SemiBold position = -100, 160 halign = right valign = bottom shadow_passes = 5 shadow_size = 10 } image { monitor = #DP-1 path = /home/sohrac/.cache/square_lock.png size = 280 # lesser side if not 1:1 ratio rounding = -1 # negative values mean circle border_size = 4 border_color = rgb(221, 221, 221) rotate = 0 # degrees, counter-clockwise reload_time = -1 # seconds between reloading, 0 to reload with SIGUSR2 #reload_cmd = # command to get new path. if empty, old path will be used. don't run "follow" commands like tail -F position = 0, 200 halign = center valign = center } ```

Compositor Info and Version

System/Version info ```sh Hyprland, built from branch at commit 9a09eac79b85c846e3a865a9078a3f8ff65a9259 (props: bump version to 0.42.0). Date: Wed Aug 7 19:17:10 2024 Tag: v0.42.0, commits: 5069 flags: (if any) System Information: System name: Linux Node name: arch-desktop Release: 6.10.4-arch2-1 Version: #1 SMP PREEMPT_DYNAMIC Sun, 11 Aug 2024 16:19:06 +0000 GPU information: 03:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 32 [Radeon RX 7700 XT / 7800 XT] [1002:747e] (rev c8) (prog-if 00 [VGA controller]) 12:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Raphael [1002:164e] (rev c7) (prog-if 00 [VGA controller]) os-release: NAME="Arch Linux" PRETTY_NAME="Arch Linux" ID=arch BUILD_ID=rolling ANSI_COLOR="38;2;23;147;209" HOME_URL="https://archlinux.org/" DOCUMENTATION_URL="https://wiki.archlinux.org/" SUPPORT_URL="https://bbs.archlinux.org/" BUG_REPORT_URL="https://gitlab.archlinux.org/groups/archlinux/-/issues" PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/" LOGO=archlinux-logo plugins: ```

Description

I have my PC (using hypridle) set to lock after 10 minutes of inactivity with hyprlock and then turn the screen off (with hyprctl dispatch dpms off) after 30 minutes.

If I get back to my PC BEFORE the screen turns off, everything works as expected: I enter my password and it unlocks as normal.

If I get back to my PC AFTER the screen has turned off, the problem occurs:

I tried testing a script to see if just the "hyprctl dispatch dpms on/off" was the problem:

hyprctl dispatch dpms off
sleep 10
hyprctl dispatch dpms on

but this worked fine (no freeze)

Trying a similar script resulted in the freezing behaviour described before:

hyprlock &
sleep 5
hyprctl dispatch dpms off &
sleep 10
hyprctl dispatch dpms on

I will post the logs below for hyprlock and dpms on

How to reproduce

Crash reports, logs, images, videos

Wouldn't let me upload hypridle.conf so I copied it to a text file: hypridle.txt

hyprlock-freeze.log - Obtained with "WAYLAND_DEBUG=1 hyprlock -v >> hyprlock-freeze.log"

dpms-on-freeze.log - Obtained with "WAYLAND_DEBUG=1 hyprctl dispatch dpms on >> dpms-on-freeze.log"

Let me know if you need anything else. I'm new to debugging/problems like this so I looked through other threads that were somewhat related to this issue for things to try.

I also tried "journalctl -b0 --user -u hypridle" but there were no entries

HarshNarayanJha commented 2 months ago

The exact same thing happens to me. In my case, when I manually lock using keybind, and then close laptop's lid to suspend (again a bind), swayidle kicks in and turns off dpms and also runs the lock script. Though, I have pidof hyprlock || hyprlock in that script to prevent it from running twice.

Now as soon as I open the lid, dpms turns on (swayidle) and hyprlock freezes. Can do absolutely nothing, cannot change tty, nothing. BUT, after the first timeout in swayidle happens (lowering the brightness), hyprlock comes back to life.

This doesn't happen when I let swayidle lock if I just close the lid