Hyprland icon indicating copy to clipboard operation
Hyprland copied to clipboard

Cannot suspend, potential dpms issue?

Open nosvagor opened this issue 1 year ago • 14 comments

Steps to reproduce

Two options (seems to have to do with dpms):

  1. systemctl suspend
  2. sleep 1 && hyprctl dispatch dpms off 2a. sleep 1 && hyprctl dispatch dpms on

Expected outcome

  1. system suspends, resumes upon keyboard / mouse input.
  2. I'm not quite sure, to be honest. I think the default is off, according to waybar`s idle indicator.
    2a. Waybar idle indicator is set to active? Screen should timeout while away? Screen shoud turn back on if off?

Noted outcome

  1. system suspends, screen enters energy saving state, but then computer immediately wakes and screen remains black. No input is registered, that I'm aware of. Must force a restart to continue.
  2. Screen should not timeout until turned back on. Seems to do nohting if it's already off. See 2a. 2a. Screen turns black. I still receive audio input and I think the keyboard works. I re-ran command via terminal to turn dps off while screen is black, but then audio disconnects and appears input of any kind is halted (cannot switch to new tty)

Hyprland Does not crash. No log in coredumpctl. But I believe suspend worked previously, so it could be my something in my config?

hyprland.conf.txt

nosvagor avatar Aug 07 '22 21:08 nosvagor

weird, as ive never had any issues with dpms on my laptop. Maybe try turning on misc:mouse_move_enables_dpms

vaxerski avatar Aug 08 '22 06:08 vaxerski

hmmm, good idea. Didn't work.

Tried running with default config in examples. Same issue. I knew it worked at one point, so now I suspect it's not hyprland causing the issue. I'll update this thread if I resolve my issue, but you can close it for now due the assumption that it is an external conflict.

nosvagor avatar Aug 08 '22 22:08 nosvagor

I'm not sure if this is related but i get black screen if i turn my monitor off and turn it back again. No input, no cursor, have to restart pc to continue. Also sound disappears when monitor is turned off so its gone at that point.

aalhitennf avatar Aug 17 '22 14:08 aalhitennf

Are you on latest?

vaxerski avatar Aug 17 '22 14:08 vaxerski

hyprland-git r1416.cd9c85a-1 installed from aur

aalhitennf avatar Aug 17 '22 14:08 aalhitennf

aaand its gone, i added misc:mouse_move_enables_dpms, maybe that was it. will report if it comes back.

aalhitennf avatar Aug 17 '22 15:08 aalhitennf

https://www.youtube.com/watch?v=-DT7bX-B1Mg

vaxerski avatar Aug 17 '22 15:08 vaxerski

somewhat relevant log: image video: Hyprland.webm epic embed fail

JustSimplyKyle avatar Aug 17 '22 15:08 JustSimplyKyle

as properly prompted, you're entering an unsafe state, because you removed the last monitor. Why not use DPMS?

vaxerski avatar Aug 17 '22 20:08 vaxerski

If you mean sleep 1 && hyprctl dispatch dpms off, it also enters unsafe mode and quits. https://0x0.st/oLqh.log

JustSimplyKyle avatar Aug 18 '22 09:08 JustSimplyKyle

probably means your monitor is crap

vaxerski avatar Aug 18 '22 10:08 vaxerski

For my issue, this issue somehow fixed itself in the recent commits.

JustSimplyKyle avatar Oct 10 '22 11:10 JustSimplyKyle

Using hyprctl disptach dpms on/off now works, as expected.

However, suspending seems to be an issue still. Currently, if I suspend, sleep (~5 secs), then suspend again in a script, then it works as expected. Furthermore, the monitor is not receiving dpms on signal, if it enters sleep. I must manually turn the monitor back on, even though the computer wakes with no issue. Restarting the computer will wake the monitor up successfully.

Also, when ever I manually turn on the monitor after a suspend command, then the workspace I return to is often not as expected. I can't reproduce this error, because it doesn't always happen. Currently, it seems to want to prioritize the first non-empty workspace, even if I switch to an empty workspace or (a workspace that is relatively higher), before suspending. This issue does not come up when using hyprctl dispatch dpms on/off

Oh, and misc:mouse_move_enables_dpms works now, unlike before.

I suspect this is an issue with my monitor, not Hyprland, but I would like to know how to fix this.

nosvagor avatar Nov 09 '22 05:11 nosvagor

is this related? the following commannd does not do what I expect it to:

hyprctl dispatch dpms off; sleep 10; hyprctl dispatch dpms on

the first command works like expected, but the second hyprctl does not wake the screen up again. I'm on NixOS using the home-manager module provided by the Flake.

wuyoli avatar Nov 16 '22 19:11 wuyoli

hyprctl dispatch dpms off; sleep 10; hyprctl dispatch dpms on

that works fine for me but only turns the focused monitor of and not the two others.

Thaodan avatar Apr 21 '23 00:04 Thaodan

with the latest -git this works for me @Thaodan can you check again please

romanstingler avatar Aug 03 '23 18:08 romanstingler

Not sure if it's worth opening another issue or just asking here; I'll ask here:

opening up a terminal and writing systemctl suspend works just fine.

binding systemctl suspend to a hotker resulted the behaviour described at the beginning of this issue

system suspends, screen enters energy saving state, but then computer immediately wakes and screen remains black. No input is registered, that I'm aware of. Must force a restart to continue.

misc:mouse_move_enables_dpms also fixed the issue for me, but I'm literally not touching the mouse at any point in between suspending the system and waking it up again. Why would it affect a suspend hotkey but not the terminal command?

Is it a bug somewhere? Is there some normal behavior I don't understand?

CatalinPuscoci avatar Mar 18 '24 21:03 CatalinPuscoci