You are not logged in.
Pages: 1
Hello Everyone,
I am using slock. It is not working when laptop is waked up from sleep.
less /etc/systemd/system/slock@.service
[Unit]
Description=Lock X session using slock for user %i
Before=sleep.target
[Service]
User=%i
Environment=DISPLAY=:0
ExecStartPre=/usr/bin/xset dpms force suspend
ExecStart=/usr/local/bin/slock
[Install]
WantedBy=sleep.target
systemctl status slock@ananthu.service
× slock@ananthu.service - Lock X session using slock for user ananthu
Loaded: loaded (/etc/systemd/system/slock@.service; enabled; preset: disabled)
Active: failed (Result: timeout) since Sun 2025-01-26 09:26:26 CET; 20s ago
Invocation: f9ae5e99a21c4f9bb796763e9f6662ae
Process: 238577 ExecStartPre=/usr/bin/xset dpms force suspend (code=killed, signal=TERM)
Mem peak: 1.6M
CPU: 8ms
Jan 26 09:24:56 arch systemd[1]: Starting Lock X session using slock for user ananthu...
Jan 26 09:26:26 arch systemd[1]: slock@ananthu.service: start-pre operation timed out. Terminating.
Jan 26 09:26:26 arch systemd[1]: slock@ananthu.service: Control process exited, code=killed, status=15/TERM
Jan 26 09:26:26 arch systemd[1]: slock@ananthu.service: Failed with result 'timeout'.
Jan 26 09:26:26 arch systemd[1]: Failed to start Lock X session using slock for user ananthu.
journalctl -b -p3
Jan 26 09:26:26 arch systemd[1]: Failed to start Lock X session using slock for user ananthu.
How to solve this issue ?
Thanks
Last edited by Cipher69969 (2025-01-26 18:09:05)
reign the beast
Offline
Did you search the net? Very quickly I found the followig, perhaps they'll help
https://superuser.com/questions/774787/ … sion-owner
https://www.reddit.com/r/archlinux/comm … ?rdt=53379
https://www.reddit.com/r/archlinux/comm … sue_slock/
Personally I never use systemd for i3lock or slock but I'm old a cranky.
Last edited by manyroads (2025-01-26 13:42:42)
Pax vobiscum,
Mark Rabideau - http://many-roads.com
spectrwm, i3, bspwm, dwm ~ Reg. Linux User #449130
"For every complex problem there is an answer that is clear, simple, and wrong." H. L. Mencken
Offline
Thanks for looking it, I tried with all the links. Still not working.
reign the beast
Offline
Jan 26 09:26:26 arch systemd[1]: slock@ananthu.service: start-pre operation timed out. Terminating.
That's "xset dpms foce off", do you actually have xorg-xset installed? What happens if you run that manually?
Offline
Jan 26 09:26:26 arch systemd[1]: slock@ananthu.service: start-pre operation timed out. Terminating.
That's "xset dpms foce off", do you actually have xorg-xset installed? What happens if you run that manually?
Yes, I have xorg-xset installed.
When running "xset dpms force suspend" it blackens my monitor.
This also works correctly
sudo systemctl start slock@ananthu.service
systemctl status slock@ananthu.service
○ slock@ananthu.service - Lock X session using slock for user ananthu
Loaded: loaded (/etc/systemd/system/slock@.service; enabled; preset: disabled)
Active: inactive (dead)
Jan 26 15:21:41 arch systemd[1]: Started Lock X session using slock for user ananthu.
Jan 26 15:21:55 arch systemd[1]: slock@ananthu.service: Deactivated successfully.
Jan 26 15:23:50 arch systemd[1]: Starting Lock X session using slock for user ananthu...
Jan 26 15:25:21 arch systemd[1]: slock@ananthu.service: start-pre operation timed out. Terminating.
Jan 26 15:25:21 arch systemd[1]: slock@ananthu.service: Control process exited, code=killed, status=15/TERM
Jan 26 15:25:21 arch systemd[1]: slock@ananthu.service: Failed with result 'timeout'.
Jan 26 15:25:21 arch systemd[1]: Failed to start Lock X session using slock for user ananthu.
Jan 26 18:43:46 arch systemd[1]: Starting Lock X session using slock for user ananthu...
Jan 26 18:43:46 arch systemd[1]: Started Lock X session using slock for user ananthu.
Jan 26 18:43:52 arch systemd[1]: slock@ananthu.service: Deactivated successfully.
reign the beast
Offline
And what if you remove the ExecStartPre dpms call from the service?
It's hardly relevant when sleeping the system anyway.
Offline
And what if you remove the ExecStartPre dpms call from the service?
It's hardly relevant when sleeping the system anyway.
It worked.
systemctl status slock@ananthu.service
○ slock@ananthu.service - Lock X session using slock for user ananthu
Loaded: loaded (/etc/systemd/system/slock@.service; enabled; preset: disabled)
Active: inactive (dead)
Jan 26 15:23:50 arch systemd[1]: Starting Lock X session using slock for user ananthu...
Jan 26 15:25:21 arch systemd[1]: slock@ananthu.service: start-pre operation timed out. Terminating.
Jan 26 15:25:21 arch systemd[1]: slock@ananthu.service: Control process exited, code=killed, status=15/TERM
Jan 26 15:25:21 arch systemd[1]: slock@ananthu.service: Failed with result 'timeout'.
Jan 26 15:25:21 arch systemd[1]: Failed to start Lock X session using slock for user ananthu.
Jan 26 18:43:46 arch systemd[1]: Starting Lock X session using slock for user ananthu...
Jan 26 18:43:46 arch systemd[1]: Started Lock X session using slock for user ananthu.
Jan 26 18:43:52 arch systemd[1]: slock@ananthu.service: Deactivated successfully.
Jan 26 19:02:34 arch systemd[1]: Started Lock X session using slock for user ananthu.
Jan 26 19:02:50 arch systemd[1]: slock@ananthu.service: Deactivated successfully.
Thankyou for the help.
reign the beast
Offline
Pages: 1