hyprlock: Can't type after resuming from suspend
I’m using hypridle
to trigger hyprlock
before suspending. After resuming, I can move my mouse and the clock updates, which signals that hypridle
is working fine, but keyboard input won’t work in the password box.
hypridle.conf
:
general {
before_sleep_cmd = WAYLAND_DEBUG=1 ~/.config/hypr/scripts/lock.sh &> /tmp/hyprlock_out.txt
after_sleep_cmd = ~/.config/hypr/scripts/wp_init.sh -r
}
listener {
timeout = 600
on-timeout = ~/.config/hypr/scripts/lock.sh --dimfirst
}
listener {
timeout = 720
on-timeout = hyprctl dispatch dpms off
}
lock.sh
:
#/bin/bash
WALLPAPER_DIR=~/Pictures/wallpapers/blurred
CURRENT_WALL=$(wpg -c)
EXTENSION="${CURRENT_WALL##*.}"
# for gifs, replace fframe with the gif.
# also, remember they are stored in the subfolder "animated"
if [[ "$EXTENSION" =~ fframe.*$ ]]; then
CURRENT_WALL=${CURRENT_WALL%.*}.png
fi
IMG="$WALLPAPER_DIR/$CURRENT_WALL"
if [ ! -f $IMG ];
then
IMG=$(ls $WALLPAPER_DIR/* | shuf | head -n 1)
fi
cp $IMG /tmp/hyprlock.png
#swaylock -f -i $IMG
if [ "$1" == "--dimfirst" ]
then
chayang -d 10 && hyprlock
else
hyprlock
fi
hyprland.log
:
[LOG] Instance Signature: 29cdd7de1f8d99462915540569fbe54f10f609f4_1709181372
[LOG] Hyprland PID: 396621
[LOG] ===== SYSTEM INFO: =====
[LOG] System name: Linux
[LOG] Node name: lucas
[LOG] Release: 6.7.6-arch1-1
[LOG] Version: #1 SMP PREEMPT_DYNAMIC Fri, 23 Feb 2024 16:31:48 +0000
[LOG] GPU information:
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GA104 [GeForce RTX 3070 Lite Hash Rate] [10de:2488] (rev a1) (prog-if 00 [VGA controller])
[WARN] Warning: you're using an NVIDIA GPU. Make sure you follow the instructions on the wiki if anything is amiss.
[LOG] 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
[LOG] ========================
[INFO] If you are crashing, or encounter any bugs, please consult https://wiki.hyprland.org/Crashes-and-Bugs/
[LOG]
Current splash: Take on me, take me on...
[LOG] Creating the HookSystem!
[LOG] Creating the KeybindManager!
[LOG] [hookSystem] New hook event registered: configReloaded
[LOG] Creating the AnimationManager!
[LOG] Created a bezier curve, baked 255 points, mem usage: 4.08kB, time to bake: 25.07µs. Estimated average calc time: 0.14µs.
[LOG] Creating the ConfigManager!
[LOG] NOTE: further logs to stdout / logfile are disabled by default. Use debug:disable_logs and debug:enable_stdout_logs to override this.
[LOG] Created a bezier curve, baked 255 points, mem usage: 4.08kB, time to bake: 10.90µs. Estimated average calc time: 0.14µs.
[LOG] Using config: /home/lucas/.config/hypr/hyprland.conf
About this issue
- Original URL
- State: open
- Created 4 months ago
- Reactions: 10
- Comments: 42 (12 by maintainers)
I can also confirm that I had this issue on the latest git this morning when I woke up to wake up my computer from sleep. It wouldn’t take in any input, also if I remember correctly, the mouse cursor was also showing which isn’t supposed to be showing.
However, after this issue was closed, I looked around at other issues and ran across #76. In that issue it was mentioned that the crashing only occurs when running
systemctl suspend
from a terminal and not when ran by hypridle. So far today, after making that change (and updating to the latest commit this morning b4a1c8c, I haven’t had this issue. But I also haven’t went to sleep overnight again. I will update hyprlock again before bed tonight to the latest git and test this again.I think the “this is fixed” was referring to a side tangent of “the textbox types 3 dots for each character typed after waking from suspend” which isn’t what it looks like the first post was talking about.
this is fixed. build from source…
bump
I have the issue with swayidle + hyprlock, on a non-systemd setup (elogind). Quickly reproducible by power cycling my monitor in a lock state. Also, power cycling the monitor in an unlocked state changes the workspace, which I can’t help but feel is related.
Also breaks with waylock, and IIRC swaylock.
Yup. You add
inputs.hyprlock.url = "github:hyprwm/hyprlock";
to your flake, then addinputs.hyprlock.homeManagerModules.default
to your HM’simports
list.So if I run
systemctl suspend
from kitty, then go to sleep while using hypridle withlock_cmd = pidof hyprlock || hyprlock
andbefore_sleep_cmd = loginctl lock-session
, Hyprlock won’t let me input any text in the morning when I wake up and wake my computer.On the other hand if I add a listener in hypridle to
on-timeout = systemctl suspend
and wait for my computer to go to sleep (instead of manually runningsystemctl suspend
, I was unable to recreate this bug. Hyprlock worked correctly upon waking up. Also, hyprlock seemed to work okay when I didhyprctl keyword exec systemctl suspend
. Granted, I haven’t tested any of these other methods overnight. It may take time to cause the issue, or the latest commits late last night or early this morning fixed this bug.I also did a quick test earlier today running
systemctl suspend
from kitty, and then immediately waking the computer up within a minute, and hyprlock worked correctly. So either the latest commits fixed it, or it takes all night for an issue to appear.