hyprwm / Hyprland

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

Input does not work after locking and turning off monitor #5072

Open 1over137 opened 4 months ago

1over137 commented 4 months ago

Hyprland Version

System/Version info ```sh Hyprland, built from branch HEAD at commit 1c460e98f870676b15871fe4e5bfeb1a32a3d6d8 (props: bump ver to 0.36.0). Date: Wed Feb 28 00:32:40 2024 Tag: v0.36.0 flags: (if any) System Information: System name: Linux Node name: nr200 Release: 6.7.5-gentoo-x86_64 Version: #1 SMP PREEMPT_DYNAMIC Tue Feb 20 18:12:12 EST 2024 GPU information: 01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GA102 [GeForce RTX 3090] [10de:2204] (rev a1) (prog-if 00 [VGA controller]) 10:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Raphael [1002:164e] (rev c1) (prog-if 00 [VGA controller]) os-release: NAME=Gentoo ID=gentoo PRETTY_NAME="Gentoo Linux" ANSI_COLOR="1;32" HOME_URL="https://www.gentoo.org/" SUPPORT_URL="https://www.gentoo.org/support/" BUG_REPORT_URL="https://bugs.gentoo.org/" VERSION_ID="2.14" ```

Bug or Regression?

Bug

Description

After turning off the monitor (using the power button on the monitor, not with dpms), which is also connected to the keyboard via its KVM switch, the keyboard does not work and it becomes impossible to unlock the session. This results in needing to kill the entire hyprland session since it just shows a red screen if the lock is killed.

This has been tested with swaylock and hyprlock and the bug is present in both, so it is unlikely to be an issue with the locker.

How to reproduce

Setup: Standard desktop machine configuration, single monitor with USB hub

  1. Connect the keyboard to the USB hub on the monitor
  2. Lock the session in some way, with a command or a key.
  3. Turn off the monitor which has a KVM that connects to the keyboard.
  4. Turn the monitor back on
  5. Attempt to input a password, but it does not work

Crash reports, logs, images, videos

lock-no-return.log

brettalcox commented 4 months ago

@1over137 I have this issue occasionally as well (also on Nvidia--RTX 4090). Although I wonder how much of this is just Nvidia being Nvidia. It happens maybe 20% of the time for me

1over137 commented 4 months ago

My NVIDIA card is only used for compute. It is not connected to the display. It should have nothing to do with this. The display is connected to the AMD iGPU. With the specific set of actions I did (crucially the keyboard needs to be connected to the monitor, or otherwise disconnected at the same time), this occurs 100% of the times. I also had the same on an intel machine, so it's not likely to be the issue here.

Kommynct commented 4 months ago

I'm also facing this issue on my desktop and laptop, so, it's not nvidia.

amdgpu and cpu in the desktop, laptop is intel integrated graphics.

M4he commented 3 months ago

If any of you is using swaylock, can you try the emergency workaround I posted here to check if it's the same issue or different?

khaneliman commented 3 months ago

I've had this issue for a long time, as well. Basically can't let dpms kick in while my keyboard is detached otherwise it's restart greetd to get back in. My case though isn't using a monitor usb hub, I have a dedicated unit and see the same thing. I was just never sure whose "fault" it was.

khaneliman commented 3 months ago

I let my hyprlock kick in when keyboard wasn't connected again, just now. When I got back in I could see all my input from the keyboard inside my neovim that was apparently in focus instead of the hyprlock.

Not sure if this is related in any way: Mar 29 13:08:01 khanelinix hypridle[730778]: [WARN] BUG THIS: inhibit locks < 0. Brought back to 0.

If any of you is using swaylock, can you try the emergency workaround I posted here to check if it's the same issue or different?

Enabling that hyprland option works for unlocking hyprlock from another tty. ~But, the keybind doesn't seem to work for me.~ EDIT: I accidentally passed binary path and not just name hyprlock. That keybind works, I guess I'll use that as a workaround so I dont have to be so anxious about letting my computer lock while I'm using my work computer.