You are not logged in.

#1 2018-08-01 09:13:27

blux
Member
Registered: 2012-08-17
Posts: 9

Laptop suspend timeout

How do I control the time until my laptop suspends/hibernates under Arch Linux? I am running Arch on a Thinkpad T450s.

I am sorry if this is completely obvious, but I have been searching the wiki pages and can not find the answer to this basic question.

Offline

#2 2018-08-09 20:03:03

wrycode
Member
Registered: 2018-08-09
Posts: 1

Re: Laptop suspend timeout

Hi blux, I'm working on the same thing. There are a number of options listed on the wiki. Have you read
https://wiki.archlinux.org/index.php/Power_management ?

I was going to use systemd (configured in /etc/systemd/logind.conf ) but setting

 IdleAction=suspend 
 IdleActionSec=15min

doesn't work properly; the system suspends every 15 minutes whether or not I'm using it.

My next attempt was to use xautolock, but setting "systemctl suspend" for the -killer command won't work (the computer just doesn't suspend). However, it works fine as the -locker command.

Here's my current command, for reference:

xautolock -locker lock.sh -time 1 -killer "systemctl suspend" -killtime 15 &

See

https://bbs.archlinux.org/viewtopic.php?id=208699
Here the user solved the problem by launching two xautolock processes, which I don't want to do.

https://bbs.archlinux.org/viewtopic.php?id=225583
And here they changed the syntax of their command a little, but that didn't work for me.

You can't normally suspend non-interactively, which rules out scripts I think (unless you want to add an exception for that command in the sudoers file, then run "sudo systemctl suspend" in your script, which makes me nervous).

Offline

Board footer

Powered by FluxBB