On Tue, 2018-12-04 at 15:34 +0000, Grand T wrote:
> Very strange, the behavior is not the same on starting

I guess you mean that after a reboot the behavior is not the same. That
is, the issue is no more present. Correct ?

> $ systemctl status laptop-mode.service -l -n 50
> ● laptop-mode.service - Laptop Mode Tools
>    Loaded: loaded (/lib/systemd/system/laptop-mode.service; enabled;
> vendor preset: enabled)
>    Active: active (exited) since Tue 2018-12-04 15:39:31 CET; 47min
> ago
>      Docs: man:laptop_mode(8)
>            man:laptop-mode.conf(8)
>            http://github.com/rickysarraf/laptop-mode-tools
>   Process: 29150 ExecReload=/usr/sbin/laptop_mode auto (code=exited,
> status=0/SUCCESS)
>   Process: 5008 ExecStart=/usr/sbin/laptop_mode init force
> (code=exited, status=0/SUCCESS)
>   Process: 5007 ExecStartPre=/bin/rm -f /var/run/laptop-mode-
> tools/state (code=exited, status=0/SUCCESS)
>   Process: 4862 ExecStartPre=/bin/rm -f /var/run/laptop-mode-
> tools/enabled (code=exited, status=0/SUCCESS)
>  Main PID: 5008 (code=exited, status=0/SUCCESS)
> 
> déc. 04 16:19:42 debian laptop_mode[27822]: enabled, active
> [unchanged]
> déc. 04 16:19:42 debian systemd[1]: Reloaded Laptop Mode Tools.
> déc. 04 16:19:51 debian systemd[1]: Reloading Laptop Mode Tools.
> déc. 04 16:19:51 debian laptop_mode[27931]: Laptop mode
> déc. 04 16:19:51 debian laptop_mode[27931]: enabled, active
> [unchanged]
> déc. 04 16:19:51 debian systemd[1]: Reloaded Laptop Mode Tools.
> déc. 04 16:20:02 debian systemd[1]: Reloading Laptop Mode Tools.
> déc. 04 16:20:02 debian laptop_mode[28037]: Laptop mode
> déc. 04 16:20:02 debian laptop_mode[28037]: enabled, active
> [unchanged]
> déc. 04 16:20:02 debian systemd[1]: Reloaded Laptop Mode Tools.
> déc. 04 16:20:14 debian systemd[1]: Reloading Laptop Mode Tools.
> déc. 04 16:20:14 debian laptop_mode[28150]: Laptop mode
> déc. 04 16:20:14 debian laptop_mode[28150]: enabled, active
> [unchanged]
> déc. 04 16:20:14 debian systemd[1]: Reloaded Laptop Mode Tools.
> déc. 04 16:20:25 debian systemd[1]: Reloading Laptop Mode Tools.
> 
> Why reloaded and started with no ending??

There are a couple of things that take place.

1. Laptop Mode Tools acts on kernel events. Like when you plug a device
, or plug/unplug your machine with a power source. We act on those
events.

2. The usual system service stuff.

3. We also poll the battery to know its status.


So, usually, Laptop Mode Tools gets invoked very very early during the
boot process through kernel events. Much before systemd is ready to
start it.

Later, when systemd wants to start it, it is told that the service is
already running and that it should just reload to see if any power
state has changed (like you suspend on power and resume on ac).

So, that is why there's no ending. LMT will always act on events,
service requests and polling of the battery state. And through all
these avenues, the state needs to be synchronized.

Hope this helps. If your issue is resolved, please close this issue.


-- 
Ritesh Raj Sarraf | http://people.debian.org/~rrs
Debian - The Universal Operating System

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to