hyprwm / Hyprland

Hyprland is an independent, highly customizable, dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
https://hyprland.org
BSD 3-Clause "New" or "Revised" License
18.57k stars 772 forks source link

Mouse and Keyboard not recognized after dpms resume #5528

Closed wjstarrsiii closed 3 months ago

wjstarrsiii commented 3 months ago

Hyprland Version

System/Version info ```sh Hyprland, built from branch main at commit 1c460e98f870676b15871fe4e5bfeb1a32a3d6d8 dirty (props: bump ver to 0.36.0). Date: Tue Feb 27 19:32:40 2024 Tag: v0.35.0-113-g1c460e98 flags: (if any) System Information: System name: Linux Node name: wjsiiicheapbeast Release: 6.8.4-arch1-1 Version: #1 SMP PREEMPT_DYNAMIC Fri, 05 Apr 2024 00:14:23 +0000 GPU information: 03:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 23 [Radeon RX 6600/6600 XT/6600M] [1002:73ff] (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: ```

Bug or Regression?

Bug

Description

For a few weeks, I am unable to use any combination it seems of idle daemons and screenlockers with my Hyprland session. For quite a while, swayidle and swaylock were working fine, then I switched to swayidle/gtklock. I would lock the screen after a while and then turn the monitors off with dpms a bit later. Recently, the system will detect either a mouse movement or keystroke and turn the monitors back on, but after that no further keyboard or mouse inputs are recognized. I did some googling and found that perhaps sddm was a contributor, so I tried moving to greetd (with Hyprland as the gui) and the issue remained. Most recently I tried hypridle and hyprlock per the wiki, with both sddm and greetd. The issue remains. I see nothing odd in the Hyprland logs.

When this happens, I can't get to a VT or do anything on the PC. I either have to hard power reset or ssh in from another machine. Doing that, killing the screenlock and/or idle processes don't unlock the GUI. All I can do is reboot.

How to reproduce

Described above.

Crash reports, logs, images, videos

No response

khaneliman commented 3 months ago

might be duplicate of https://github.com/hyprwm/Hyprland/issues/5072

vaxerski commented 3 months ago

For a few weeks

git bisect please

wjstarrsiii commented 3 months ago

might be duplicate of #5072

I was reading that bug, perhaps related, but my issue is happening with both manual power off and DPMS. Also my keyboard and mouse are attached when the system goes to sleep, and either the keyboard or the mouse will wake the monitors just fine, but that is all they can accomplish.

wjstarrsiii commented 3 months ago

For a few weeks

git bisect please

My last update was 0.35.0.r104.bc3f5b94-1 (from the Arch AUR). I updated moments ago and now have 0.38.0.r88.558d1be7-1. Reenabled hypridle and testing again...

wjstarrsiii commented 3 months ago

And with the latest and greatest, so far the problem seems to be resolved. I let it sit in DPMS off for 5+ minutes and things appear ok again. Lesson learned: update the -git packages before beefing.

wjstarrsiii commented 3 months ago

Actually, I spoke too soon. I do have my PC with KB and mouse connected to a USB switcher attached to my work laptop docking station. If I switch over to the work laptop for a while and come back to my PC, the mouse or kb will still wake the monitors, and the mouse will move the pointer around the lock screens, but the kb is not recognized by hyprlock. I CAN now get to a VT with Ctl-FnX and restart greetd to get back in.

If I leave the kb and mouse attached without switching and come back to the PC, everything works fine and I get back into my session. I would say it definitely has to do with the keyboard detaching after session lock.

wjstarrsiii commented 3 months ago

I plugged an old wired keyboard directly into my PC and let it sit there all for the last ~7 hours while I switched over to the laptop and let hyprland lock. I just came back and hyprlock gladly accepted my usb-switched keyboard and let me back in to my session. Strong indication that this is the source of the behavior.

wjstarrsiii commented 3 months ago

One more finding.... even if a USB keyboard remains plugged in, the issue seems to depend on the usb keyboard state at the time hyprlock executes. If I switch my usb devices over to my laptop without locking first, and hyprlock starts without the usb keyboard and mouse attached, I can't get back in. If I manually lock the session just before switching things over to the laptop, it appears I can get back in.

wjstarrsiii commented 3 months ago

With the latest git versions of hyprland, hyprlock, and hypridle, this issue is no longer appearing for me. Closing the issue. Thanks.