Turning off DPMS causes Hyprlock to crash, requiring hard reboot of Omarchy
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.
This was mentioned in #26 by @jonh-favo and @ethantang93 as well
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.
I’m using the same LG monitor and experiencing the same issue, which I’m working around with the same workaround. 😢
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.
I had the same problem and ultimately disabled hyprlock from hypridle. During upgrades this comes back and I just repeat the steps.
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
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
as a follow up the command
loginctl lock-session;sleep 3;hyprctl dispatch dpms off;sleep 10;hyprctl dispatch dpms on && brightnessctl -rdoesn't crash myhyprlockit 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.
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
Having the same issue:
LG 32GK850F
Geforce RTX 3080
NVIDIA Driver Version 580.82.09
Tried fallback virtual displays etc. No luck.
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
as a follow up the command
loginctl lock-session;sleep 3;hyprctl dispatch dpms off;sleep 10;hyprctl dispatch dpms on && brightnessctl -rdoesn't crash myhyprlockit 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.
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 are you implying cloning it down may fix the issue? Did you change anything on your clone?
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.
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 is it not already the version in arch repo ? https://archlinux.org/packages/extra/x86_64/hyprlock/ (since 2 months)
@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/
ok so https://github.com/hyprwm/hyprlock/compare/v0.9.1...main
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.
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.
Glad to be of help! ️☺️
hyprlock 0.9.2 released
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
Same, RTX 4060 here.
Same, 3080 here