[systemd-devel] systemd IdleAction for lock is not working

seshu pyla seshu.pyla at gmail.com
Wed Jun 3 12:21:22 UTC 2020


Hi,



I am trying the below logind parameters to configure session lock in my
system.



/etc/systemd/logind.conf

IdleAction=Lock

IdleActionSec=1min



But, with above configurations there is no effect, so I have looked in to
the code and after the below change the lock event is sent and session lock
is happening successfully.

--- a/src/login/logind.c

+++ b/src/login/logind.c

@@ -1019,7 +1019,7 @@ static int
manager_dispatch_idle_action(sd_event_source *s, uint64_t t, void *us

                     (m->idle_action_not_before_usec <= 0 || n >=
m->idle_action_not_before_usec + m->idle_action_usec)) {

                         log_info("System idle. Taking action.");



-                        manager_handle_action(m, 0, m->idle_action, false,
false);

+                        manager_handle_action(m, 0, m->idle_action, false,
true);

                         m->idle_action_not_before_usec = n;

                 }



Is there any specific reason the “Lock” action is not handling in systemd?



Is there any plan in future if the “Lock” action is handled in system?





Thanks,

Venkata.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20200603/e450fdb6/attachment.htm>


More information about the systemd-devel mailing list