omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

Turning off DPMS causes Hyprlock to crash, requiring hard reboot of Omarchy

Open nkasco opened this issue 4 months ago • 9 comments

Whenever my machine goes idle and the lockscreen displays, hypridle.conf has a configuration listener to turn off dpms.

This puts the screen to sleep, and for my LG ultrawide monitor when the light goes from white to amber when it doesn't detect input, this seems to be consistently crashing hyprlock each time.

Repro Instructions: Simulating the commands in omarchy-lock-screen allows me to repro this at will. loginctl lock-session;sleep 3;hyprctl dispatch dpms off;sleep 10;hyprctl dispatch dpms on && brightnessctl -r (Really what seems to be doing it is the hyprctl dispatch dpms off and having the monitor off for long enough that it doesn't detect input, if I do this with shorter intervals the issues doesn't repro since the monitor hasn't lost input detection)

Workaround: Comment out the listener in ~/.config/hypr/hypridle.conf that runs hyprctl dispatch dpms off

#listener {
#    timeout = 330                                            # 5.5min
#    on-timeout = hyprctl dispatch dpms off                   # screen off when timeout has passed
#    on-resume = hyprctl dispatch dpms on && brightnessctl -r # screen on when activity is detected
#}

While this will lead to the screen locking but next turning off the monitor, it's better than crashing.

Proposed Omarchy Workaround: Provide a setting in Omarchy to allow the user to choose if their screen should turn off or not when idle. This is really a hyprlock issue, but since it's provided by Omarchy we should improve the UX.

nkasco avatar Aug 26 '25 22:08 nkasco

This was mentioned in #26 by @jonh-favo and @ethantang93 as well

nkasco avatar Aug 26 '25 22:08 nkasco

Also - It looks like if you change your monitor configuration to go into standby instead of powering off (this is the verbiage on my LG monitor OSD at least) it seems to be preventing the issue.

I also run my peripherals through my monitor, so without monitor power I can't wake with a keyboard or mouse command anyway.

nkasco avatar Aug 26 '25 22:08 nkasco

I’m using the same LG monitor and experiencing the same issue, which I’m working around with the same workaround. 😢

fumita avatar Aug 27 '25 01:08 fumita

I was browsing the web to see if the developer or people like DHH had anything to say about the Hyprlock crash. From what has been gathered (and as @nkasco rightly pointed out), it's due to the monitor suspending, or Deep Sleep, which unfortunately I can't disable on my LG monitor. Replacing it just for this one feature seems a bit excessive.

However, according to this post, there seems to be some hope.

I'm crossing my fingers, and if anyone knows a workaround in the meantime, that would be awesome.

imanubdesigner avatar Aug 27 '25 18:08 imanubdesigner

I had the same problem and ultimately disabled hyprlock from hypridle. During upgrades this comes back and I just repeat the steps.

ekhall avatar Aug 28 '25 20:08 ekhall

I have the same issue on my Samsung OLED G9 G95SC. Although it doesn't happen always. It's happened three times but I can't seem to pinpoint what causes it. I also can't recover unless I reboot

acrogenesis avatar Sep 01 '25 22:09 acrogenesis

as a follow up the command loginctl lock-session;sleep 3;hyprctl dispatch dpms off;sleep 10;hyprctl dispatch dpms on && brightnessctl -r doesn't crash my hyprlock it locks, turns off the screen, and turns on again and stays in asking for a password

acrogenesis avatar Sep 02 '25 02:09 acrogenesis

as a follow up the command loginctl lock-session;sleep 3;hyprctl dispatch dpms off;sleep 10;hyprctl dispatch dpms on && brightnessctl -r doesn't crash my hyprlock it locks, turns off the screen, and turns on again and stays in asking for a password

Your monitor might have a different shutdown sequence. For example when the sleep was set to 5 instead of 10 the issue didn't occur for me.

There may not be a "standard" value that triggers it.

nkasco avatar Sep 02 '25 02:09 nkasco

My monitor is a Samsung LU28R55, and the command reproduces the same issue. However, when running ps aux | grep -i hyprlock, it shows that the hyprlock process is running.

Note that running hyprctl dispatch dpms off;sleep 10;hyprctl dispatch dpms on && brightnessctl -r (without locking) works fine.

Graphic card: NVIDIA GeForce RTX 3060 Driver version: 580.82.07

amirkarimi avatar Sep 05 '25 19:09 amirkarimi

Having the same issue:

LG 32GK850F

Geforce RTX 3080 NVIDIA Driver Version 580.82.09

Tried fallback virtual displays etc. No luck.

pXius avatar Sep 13 '25 12:09 pXius

Philips model i can't remember its some 4k 43" bgr thing Same issue wake from suspend and hyprlock crashes and its unrecoverable had to reboot from a tty

CwalkPinoy avatar Sep 28 '25 00:09 CwalkPinoy

as a follow up the command loginctl lock-session;sleep 3;hyprctl dispatch dpms off;sleep 10;hyprctl dispatch dpms on && brightnessctl -r doesn't crash my hyprlock it locks, turns off the screen, and turns on again and stays in asking for a password

I have the Samsung G80SD. I may be wrong, but from what I've tested so far, it's after the monitor shuts down, not when it turns off through dpms. So the test would be dpms off, wait until Samsung automatically powers off from no input, dpms on.

chrisrharris avatar Oct 01 '25 00:10 chrisrharris

I cloned hyprlock and built the latest version and installed it, now even if I leave the monitor (LG 27GN850 + RTX 3080 12GB) on and walk away from the computer, I find myself at the Lock screen to enter the password; I have not had any more crashes.

LG 27GN850 = No DisplayPort Deep Sleep switch (ON - OFF); which is the main cause of this problem.

imanubdesigner avatar Oct 01 '25 07:10 imanubdesigner

@imanubdesigner are you implying cloning it down may fix the issue? Did you change anything on your clone?

tute avatar Oct 01 '25 10:10 tute

Patching with latest of hyprlock seems to have also resolved my issue with the Samsung G80SD (nvidia 1060). Screensaver->lock->dpms off->Samsung power off/standby. Which also fixes waking up the monitor on input.

chrisrharris avatar Oct 01 '25 12:10 chrisrharris

are you implying cloning it down may fix the issue? Did you change anything on your clone?

No, I simply cloned and updated hyprlock to the latest updates:

hyprlock --version
Hyprlock version v0.9.1 (commit 7f769fa)

https://github.com/hyprwm/hyprlock/issues/695#issuecomment-3316137976

imanubdesigner avatar Oct 01 '25 13:10 imanubdesigner

@imanubdesigner is it not already the version in arch repo ? https://archlinux.org/packages/extra/x86_64/hyprlock/ (since 2 months)

bastnic avatar Oct 01 '25 14:10 bastnic

@imanubdesigner is it not already the version in arch repo ? https://archlinux.org/packages/extra/x86_64/hyprlock/ (since 2 months)

No, the last commit is 7f769fa.(2 weeks ago).

https://github.com/hyprwm/hyprlock/commits/main/

imanubdesigner avatar Oct 01 '25 14:10 imanubdesigner

ok so https://github.com/hyprwm/hyprlock/compare/v0.9.1...main

bastnic avatar Oct 01 '25 14:10 bastnic

ok so hyprwm/[email protected]

Yes, the version is still 0.9.1, but I don't see from the link that it includes the latest commit; the git version (https://aur.archlinux.org/packages/hyprlock-git), which you can install from the AUR, has the latest commit, which is this:

https://github.com/hyprwm/hyprlock/commit/7f769fa993cb492982d7bf25676c68ddbcc0268e

Instead of downloading it from yay, I preferred to build it myself.

imanubdesigner avatar Oct 01 '25 14:10 imanubdesigner

Yes, I agree, building from git is easiest, and it solves all problems I had.

Hopefully a new version of hyprlock is released soon so everyone gets the fix.

jonh-favo avatar Oct 01 '25 15:10 jonh-favo

Glad to be of help! ️☺️

imanubdesigner avatar Oct 01 '25 15:10 imanubdesigner

hyprlock 0.9.2 released

bastnic avatar Oct 03 '25 10:10 bastnic

I'm on latest Omarchy installation, running hyprlock 0.9.2, and still get the same bug.

i got an RTX 3080, running nvidia driver version 590.95.05

pimonteiro avatar Oct 17 '25 00:10 pimonteiro

Same, RTX 4060 here.

tute avatar Oct 17 '25 01:10 tute

Same, 3080 here

smartpbx avatar Oct 17 '25 07:10 smartpbx