You are not logged in.
Hello,
i want my laptop to suspend after a certain time without user interaction, so i used the following xautolock command.
xautolock -time 20 -locker "systemctl suspend"
This leads to another suspend after manual suspend using the lid switch, because xautlock is triggered immediatly after waking up.
Obviously the time of 20 minutes has passed while the laptop was suspended and xautolock did not reset the timer.
Killall xautolock solves the issue, that means i will not use it. I wonder if there is an alternative solution.
Last edited by teateawhy (2012-09-24 19:46:47)
Offline
Kill xautolock before lid suspend, restart it after lid resume.
Offline
If i use
xautolock -exit
to stop xautolock before lid suspend, it does not change anything. What i have done so far is writing a script and a service file, but to no avail.
This is what i put in /usr/lib/systemd/system-sleep/xautolock-toggle.sh
#!/bin/bash
case "$1" in
pre )
xautolock -exit
;;
post )
xautolock -time 20 -locker "systemctl suspend"
;;
esacOffline
This was not an issue for me until recently when I made a fresh install on a new drive. In fact, at first it was working as before. But over the last couple of days it had started to suspend again when I opened my laptop lid.
So presumably (I didn't check my logs or anything), it was suspending when I closed the lid, as it should. But then when I opened the lid, xautolock would say, "Hey! Look how long it has been! We need to be suspending, like right now!"
So I checked out the man page of xautolock, and sure enough, the author had already thought of this.
-detectsleep Instructs xautolock to detect that computer has been put to sleep. This is done by detecting that time has jumped by more than 3 seconds. When this occurs, the
lock timer is reset and locker program is not launched even if primary timeout has been reached. This option is typically used to avoid locker program to be
launched when awaking a laptop computer.So after appending that flag to the end of my command, all is well!
I hope this might help you teateawhy.
Offline
Thank you!!!
xautolock would say, "Hey! Look how long it has been! We need to be suspending, like right now!"
I think you got the tone wrong :-P "No user activity detected on X Window display :0. Executing locker immedia--..."
Testing if it works right now.
EDIT: It works ![]()
Last edited by teateawhy (2012-10-29 20:59:59)
Offline
Hey that is fantastic! Yyou may be right about the tone... I really can't imagine xautolock being an excitable type of application. I mean, it is not like (s)he is even multi-tallented or anything.
Edit: BTW, don't forget to mark as solved.
Last edited by WonderWoofy (2012-10-30 00:18:06)
Offline
Are you two really discussing the personality of an application?
I'll have to check h{er,im} out, maybe we'll get along, I'm not very excitable either.
Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.
Offline