hyprlock
hyprlock copied to clipboard
lockscreen is applied to virtual-terminal that are in background after they are opened
Regression?
No
Hyprlock Info and Version
0.4.1
Hyprlock config
$text_color = rgba(F7DCDEFF)
$entry_background_color = rgba(1D101111)
$entry_border_color = rgba(A58A8D55)
$entry_color = rgba(DEBFC2FF)
$font_family = Gabarito
$font_family_clock = Gabarito
$font_material_symbols = Material Symbols Rounded
background {
color = rgba(1D101177)
path = screenshot
blur_size = 5
blur_passes = 4
}
input-field {
monitor =
size = 250, 50
outline_thickness = 2
dots_size = 0.1
dots_spacing = 0.3
outer_color = $entry_border_color
inner_color = $entry_background_color
font_color = $entry_color
# fade_on_empty = true
position = 0, 20
halign = center
valign = center
}
label { # Clock
monitor =
text = $TIME
shadow_passes = 1
shadow_boost = 0.5
color = $text_color
font_size = 65
font_family = $font_family_clock
position = 0, 300
halign = center
valign = center
}
label { # Greeting
monitor =
text = hi $USER !!!
shadow_passes = 1
shadow_boost = 0.5
color = $text_color
font_size = 20
font_family = $font_family
position = 0, 240
halign = center
valign = center
}
label { # lock icon
monitor =
text = lock
shadow_passes = 1
shadow_boost = 0.5
color = $text_color
font_size = 21
font_family = $font_material_symbols
position = 0, 65
halign = center
valign = bottom
}
label { # "locked" text
monitor =
text = locked
shadow_passes = 1
shadow_boost = 0.5
color = $text_color
font_size = 14
font_family = $font_family
position = 0, 50
halign = center
valign = bottom
}
label { # Status
monitor =
text = cmd[update:5000] ~/.config/hypr/hyprlock/status.sh
shadow_passes = 1
shadow_boost = 0.5
color = $text_color
font_size = 14
font_family = $font_family
position = 30, -30
halign = left
valign = top
}
Compositor Info and Version
System/Version info
Hyprland, built from branch at commit 0f594732b063a90d44df8c5d402d658f27471dfe (props: bump version to 0.43.0).
Date: Sun Sep 8 16:48:21 2024
Tag: v0.43.0, commits: 5196
flags: (if any)
System Information:
System name: Linux
Node name: ArchLinux
Release: 6.10.10-arch1-1
Version: #1 SMP PREEMPT_DYNAMIC Thu, 12 Sep 2024 17:21:02 +0000
GPU information:
00:02.0 VGA compatible controller [0300]: Intel Corporation CoffeeLake-H GT2 [UHD Graphics 630] [8086:3e9b] (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:
Description
Lock screen is applied after switching to the virtual terminal and therefore the contents of desktop show up before getting locked.
How to reproduce
- Start Hyprland session on virtual terminal 1
- Switch to empty virtual terminal ( i.e 5)
- Run
loginctl lock session 1(i.e lock hyprland session from another terminal) - switch to virtual terminal containing hyprland session
- lock screen is not applied, it will take few seconds for lock screen to start ( system dependent ). But lock-screen will be applied after switching to hyprland session.
This delay is not in other DE. ( i.e KDE )
Crash reports, logs, images, videos
No response
try hyprlock --immediate-render
try
hyprlock --immediate-render
It's still happening.
Can you try the reproduce this behaviour on your system.
Idk on my system i currently cannot get loginctl to work (even though hypridle is running for that session)
$loginctl lock-session 2
Failed to issue method call: Session does not support lock screen.
But when I use hyprctl --instance 2 dispatch exec "hyprlock", hyprlock starts properly without showing the desktop when i switch back to the other tty.
There have been some changes since tagged hyprland and hyprlock in that realm i think, so if you can please try hyprland-git and hyprlock-git. Also please share your hypridle confiig :)
But when I use
hyprctl --instance 2 dispatch exec "hyprlock", hyprlock starts properly without showing the desktop when i switch back to the other tty.
Not sure, but want to cross check, you have to trigger hyprlock while being on another tty ( not on tty where tty will be locking ), then switch to tty where hyprlock got triggered. For me at this point my desktop will show up for few seconds and after which hyprlock locks the screen. This time frame where desktop content is shown dosen't happen when i test KDE DE.
Hypridle config
general {
lock_cmd = pidof hyprlock || hyprlock --quiet
unlock_cmd = killall -q -s SIGUSR1 hyprlock
before_sleep_cmd = loginctl lock-session & playerctl pause
ignore_dbus_inhibit = false
}
listener {
timeout = 300
on-timeout = loginctl lock-session
}
listener {
timeout = 600
on-timeout = hyprctl dispatch dpms off
}
listener {
timeout = 1800
on-timeout = systemctl suspend-then-hibernate
}
Not sure, but want to cross check, you have to trigger hyprlock while being on another tty ( not on tty where tty will be locking ), then switch to tty where hyprlock got triggered.
Yeah i got that part...
Like i said it does seem to work on my end. I will also try to test it with loginctl. Maybe there is some dbus weirdness going on. Buf if you can, please install *-git and see if it is gone or not.
It works with loginctl as well on my system. Let me know if updating fixes the issue for you.
@PaideiaDilemma I update to hyprlock-git also added --immediate-render in hypridle.conf. Still not working. There's still delay.
By the way, hyprctl --instance 2 dispatch exec "hyprlock" how come your instance idntifier is so short? Did you edited before posting?
Lets see if someone else can test this.
Can you try this, maybe it will work -->
- switch tty1
- execute
sleep 5; hyprlock - instantly switch to tty6
- wait for 8 seconds
- switch back to tty1
is the lock-screen applied ? or desktop is showing and 1 second later lock screen is applied?
i am also having focus problem, where i have to move mouse so that my keyboard input get registered by hyplock.
@PaideiaDilemma I update to hyprlock-git also added --immediate-render in hypridle.conf. Still not working. There's still delay.
What about hyprland? did you also update that to hyprland-git? I think this issue is more likely to be on the compositor side of things.
switch tty1
execute sleep 5; hyprlock
instantly switch to tty6
wait for 8 seconds
switch back to tty1
Those exact steps work just fine on my end. Hyprlock is already present when switching back to tty1 (tty2 in my case)
i am also having focus problem, where i have to move mouse so that my keyboard input get registered by hyplock.
This was fixed recently!
Still not fixed with -git packages.
yay -Qs hypr
local/grimblast-git r95.1688400-1
A helper for screenshots within Hyprland.
local/hyprcursor-git 0.1.9.r12.gb98726e4-1
The hyprland cursor format, library and utilities
local/hypridle-git 0.1.2.r16.gcc23f978-1
Hyprland's idle daemon
local/hyprland-git 0.43.0.r82.6649255d-1
Hyprland is an independent, highly customizable, dynamic tiling Wayland
compositor that doesn't sacrifice on its looks.
local/hyprlang-git 0.5.2.r12.gdfeb5811-1
The official implementation library for the hypr config language
local/hyprlock-git 0.4.1.r18.g9ea80478-1
Hyprland's GPU-accelerated screen locking utility
local/hyprpicker 0.3.0-2
A wlroots-compatible Wayland color picker that does not suck
local/hyprutils-git 0.2.3.r2.g3f529343-1
Hyprland utilities library used across the ecosystem
local/hyprwayland-scanner-git 0.4.2.r1.g500c81a9-1
A Hyprland implementation of wayland-scanner, in and for C++
local/xdg-desktop-portal-hyprland 1.3.6-1
xdg-desktop-portal backend for hyprland
```
aquamarine-git?
yes i also used aquamarine-git, i forgot to include it.
not sure if it's related but when the laptop wakes from sleep, a frame of the desktop is also shown for a moment before the lock screen appears
Uhm I just realized that I can reproduce this on my laptop. But on my desktop it starts immediately.
I am going to look into it at some point
not sure if it's related but when the laptop wakes from sleep, a frame of the desktop is also shown for a moment before the lock screen appears
This is the solution for that https://github.com/hyprwm/hyprlock/issues/184#issuecomment-2063714751
Uhm I just realized that I can reproduce this on my laptop. But on my desktop it starts immediately.
I am going to look into it at some point
Could this be some laptop powersaving feature? Can we tag vaxerski ? If he had something to say, he would have done so. But i am not sure.
@KAGEYAM4 I personally think this is basically the same issue as #184.
The underlying reason is that the wayland session is inactive and hyprlock has not started yet. I think this is an inherent problem that can not be fixed easily.
It happens on sway+swaylock as well.
swaylock has the --ready-fd flag, which allows another process to get notified as soon as swaylock locked.
Could this be some laptop powersaving feature?
It could be. There has to be some reason why it does not affect my desktop, as I use the exact same setup on my laptop.
The underlying reason is that the wayland session is inactive and hyprlock has not started yet. I think this is an inherent problem that can not be fixed easily.
It happens on sway+swaylock as well. swaylock has the
--ready-fdflag, which allows another process to get notified as soon as swaylock locked.
Don't know how but in plasma, the locksceen does get applied while the session is not active. I just installed Gnome, so i can test its behaviour too.
Edit: So it works on Both KDE and GNOME.
Don't know how but in plasma, the locksceen does get applied while the session is not active. I just installed Gnome, so i can test its behaviour too.
Hmm but they both don't use ext-session-lock-v1. Maybe I will check out how they are able to do that.