You are not logged in.
Pages: 1
Hello,
I'd like to know if there is a way to change the amount of time before suspension in Arch Linux, and to set it differently when the laptop is plugged in / on battery. I browsed the hibernate/suspend section of the wiki, but I wasn't able to find how to tune this parameter.
Thanks a lot for the help !
Last edited by ghostjoad (2015-04-06 17:07:50)
Offline
Depends on the desktop environment/power management tool you use. For example, in KDE/Plasma you have detailed settings, depending on if laptop is on AC, battery or low battery.
So, what governs such events in your system?
Offline
I don't use any DE, I installed Awesome WM. I didn't install anything specific for power management. These events should be governed by acpid, right ?
Offline
If you didn't configure anything, acpid won't do anything (chances are you don't have it installed in the first place). Systemd takes on some of the acpid tasks, but not all of them. So, first set up something for power management, then see how this can set up to do what you want.
Offline
systemd (logind - man logind.conf) or acpid, they both only provide an interface (in other words command and method for, say, suspending the system), however when will such command be invoked is handled by the power management tool.
Simply put, you need at least a script that will check if you're on battery, how much battery is left, how long have you been afk, and if all conditions are met, send systemctl suspend.
I know that users of Openbox often recommend xfce4-power-manager as a small and lightweight power daemon, would it work for you?
Offline
logind has a suspend when idle feature, however it's a fixed value.
Note that this requires that user sessions correctly report the idle status to the system. The system will execute the action after all sessions report that they are idle, no idle inhibitor lock is active, and subsequently, the time configured with IdleActionSec= (see below) has expired.
Some people use udev rules to change this value on battery events, but that requires restarting logind (and thus, losing all your work). You can however use systemd-inhibit to "block" suspend for a certain time. See the man page.
acpid directly listens to the kernel acpi events and I don't think these include anything related to "idle" time. It is however aware of battery/AC events. In either case the suggested xfce4-power-manager is a shortcut.
Last edited by Alad (2015-04-05 15:59:35)
Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby
Offline
Xfce4-power-manager works well, I didn't think about this before.
Thanks a lot for your help !
Offline
Pages: 1