Closed rickysarraf closed 9 years ago
Indeed it does. Just that I fucked up the changes in the last release. Following commit has the missing pieces.
https://github.com/rickysarraf/laptop-mode-tools/commit/915855731c08157a8dc2debfe2a4dc3de688f071
Need to investigate:
My guess is to start with studying systemd's behavior first.
Jul 04 16:16:44 chutzpah laptop-mode[3464]: Determining power state from /sys/class/power_supply/AC/online. Jul 04 16:16:44 chutzpah laptop-mode[3467]: Not trying other options, already found a power supply. Jul 04 16:16:44 chutzpah laptop-mode[3476]: Battery level polling is enabled. Jul 04 16:16:44 chutzpah laptop-mode[3478]: Lock acquisition on descriptor 7 succeeded with pid 3454 Jul 04 16:16:44 chutzpah laptop-mode[3480]: On battery and there was no polling daemon yet, starting the polling daemon. Jul 04 16:16:44 chutzpah laptop-mode[3484]: Prelim lock acquisition on descriptor 8 with pid 3454 Jul 04 16:16:44 chutzpah laptop-mode[3487]: Prelim lock acquisition on descriptor 9 with pid 3454 Jul 04 16:16:44 chutzpah laptop-mode[3488]: Now invoking lmt_main_function with arguments -- auto Jul 04 16:16:44 chutzpah laptop-mode[3495]: Determining power state from /sys/class/power_supply/AC/online. Jul 04 16:16:44 chutzpah laptop-mode[3498]: Not trying other options, already found a power supply. Jul 04 16:16:44 chutzpah laptop-mode[3509]: On battery power: Activating, because ENABLE_LAPTOP_MODE_ON_BATTERY is set. Jul 04 16:16:44 chutzpah laptop-mode[3511]: Not on AC and we have battery information in /sys/class/power_supply/BAT* -- checking minimum battery charge. Jul 04 16:16:44 chutzpah laptop-mode[3513]: /sys/class/power_supply/AC is of type Mains. Jul 04 16:16:44 chutzpah laptop-mode[3514]: Not of type "Battery", skipping. Jul 04 16:16:44 chutzpah laptop-mode[3516]: /sys/class/power_supply/BAT0 is of type Battery. Jul 04 16:16:44 chutzpah laptop-mode[3519]: Checking levels for /sys/class/power_supply/BAT0. Jul 04 16:16:44 chutzpah laptop-mode[3522]: Present: 1. Jul 04 16:16:44 chutzpah laptop-mode[3524]: Remaining charge: 1680000 Jul 04 16:16:44 chutzpah laptop-mode[3526]: Full capacity: 2654000 Jul 04 16:16:44 chutzpah laptop-mode[3528]: Laptop mode Jul 04 16:16:44 chutzpah laptop-mode[3529]: Checking if desired state is different from current state. Jul 04 16:16:44 chutzpah laptop-mode[3531]: enabled, active [unchanged]
and then....
Jul 04 16:17:07 chutzpah laptop-mode[3546]: Determining power state from /sys/class/power_supply/AC/online. Jul 04 16:17:07 chutzpah laptop-mode[3549]: Not trying other options, already found a power supply. Jul 04 16:17:07 chutzpah laptop-mode[3558]: Battery level polling is enabled. Jul 04 16:17:07 chutzpah laptop-mode[3560]: Lock acquisition on descriptor 7 succeeded with pid 3537 Jul 04 16:17:07 chutzpah laptop-mode[3562]: On battery and there was no polling daemon yet, starting the polling daemon. Jul 04 16:17:07 chutzpah laptop-mode[3566]: Prelim lock acquisition on descriptor 8 with pid 3537 Jul 04 16:17:07 chutzpah laptop-mode[3569]: Prelim lock acquisition on descriptor 9 with pid 3537 Jul 04 16:17:07 chutzpah laptop-mode[3570]: Now invoking lmt_main_function with arguments -- auto Jul 04 16:17:07 chutzpah laptop-mode[3577]: Determining power state from /sys/class/power_supply/AC/online. Jul 04 16:17:07 chutzpah laptop-mode[3580]: Not trying other options, already found a power supply. Jul 04 16:17:07 chutzpah laptop-mode[3591]: On battery power: Activating, because ENABLE_LAPTOP_MODE_ON_BATTERY is set. Jul 04 16:17:07 chutzpah laptop-mode[3593]: Not on AC and we have battery information in /sys/class/power_supply/BAT* -- checking minimum battery charge. Jul 04 16:17:07 chutzpah laptop-mode[3595]: /sys/class/power_supply/AC is of type Mains. Jul 04 16:17:07 chutzpah laptop-mode[3596]: Not of type "Battery", skipping. Jul 04 16:17:07 chutzpah laptop-mode[3598]: /sys/class/power_supply/BAT0 is of type Battery. Jul 04 16:17:07 chutzpah laptop-mode[3599]: Checking levels for /sys/class/power_supply/BAT0. Jul 04 16:17:07 chutzpah laptop-mode[3601]: Present: 1. Jul 04 16:17:07 chutzpah laptop-mode[3603]: Remaining charge: 1677000 Jul 04 16:17:07 chutzpah laptop-mode[3605]: Full capacity: 2654000 Jul 04 16:17:07 chutzpah laptop-mode[3607]: Laptop mode Jul 04 16:17:07 chutzpah laptop-mode[3608]: Checking if desired state is different from current state. Jul 04 16:17:07 chutzpah laptop-mode[3609]: enabled, active [unchanged]
To answer the first question, it sure if systemd invoking so frequently........
Jul 04 16:30:01 chutzpah laptop-mode[13126]: Laptop Mode Tools invoked by parent: 1 Jul 04 16:30:01 chutzpah laptop-mode[13128]: Determining power state from /sys/class/power_supply/AC/online. Jul 04 16:30:01 chutzpah laptop-mode[13131]: Not trying other options, already found a power supply. Jul 04 16:30:01 chutzpah laptop-mode[13140]: Battery level polling is enabled. Jul 04 16:30:01 chutzpah laptop-mode[13142]: Lock acquisition on descriptor 7 failed with pid 13118 Jul 04 16:30:01 chutzpah laptop-mode[13144]: Prelim lock acquisition on descriptor 8 with pid 13118 Jul 04 16:30:01 chutzpah laptop-mode[13147]: Prelim lock acquisition on descriptor 9 with pid 13118 Jul 04 16:30:01 chutzpah laptop-mode[13148]: Now invoking lmt_main_function with arguments -- auto Jul 04 16:30:01 chutzpah laptop-mode[13154]: Laptop Mode Tools invoked by parent: 1 Jul 04 16:30:01 chutzpah laptop-mode[13156]: Determining power state from /sys/class/power_supply/AC/online. Jul 04 16:30:01 chutzpah laptop-mode[13159]: Not trying other options, already found a power supply. Jul 04 16:30:01 chutzpah laptop-mode[13170]: On battery power: Activating, because ENABLE_LAPTOP_MODE_ON_BATTERY is set. Jul 04 16:30:01 chutzpah laptop-mode[13172]: Not on AC and we have battery information in /sys/class/power_supply/BAT* -- checking minimum battery charge. Jul 04 16:30:01 chutzpah laptop-mode[13174]: /sys/class/power_supply/AC is of type Mains. Jul 04 16:30:01 chutzpah laptop-mode[13175]: Not of type "Battery", skipping. Jul 04 16:30:01 chutzpah laptop-mode[13177]: /sys/class/power_supply/BAT0 is of type Battery. Jul 04 16:30:01 chutzpah laptop-mode[13178]: Checking levels for /sys/class/power_supply/BAT0. Jul 04 16:30:01 chutzpah laptop-mode[13180]: Present: 1. Jul 04 16:30:01 chutzpah laptop-mode[13182]: Remaining charge: 1591000 Jul 04 16:30:01 chutzpah laptop-mode[13184]: Full capacity: 2635000 Jul 04 16:30:01 chutzpah laptop-mode[13186]: Laptop mode Jul 04 16:30:01 chutzpah laptop-mode[13187]: Checking if desired state is different from current state. Jul 04 16:30:01 chutzpah laptop-mode[13188]: enabled, active [unchanged]
So the entire of Saturday is over and I have no substantial root cause for this issue.
My bet is that systemd (along with cgroups) is not letting the forked polling daemon process to survive.
Also filed bug with Debian SystemD maintainers: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=791412
Hope I get more pointers to root cause this issue.
Here's a clean start on Sunday morning. after changing Type=oneshot and RemainAfterExit=yes
Jul 05 13:04:28 chutzpah sudo[27652]: rrs : TTY=pts/0 ; PWD=/home/rrs ; USER=root ; COMMAND=/bin/systemctl status laptop-mode.service Jul 05 13:04:28 chutzpah sudo[27652]: pam_unix(sudo:session): session opened for user root by rrs(uid=0) Jul 05 13:04:28 chutzpah sudo[27652]: pam_unix(sudo:session): session closed for user root Jul 05 13:05:00 chutzpah sudo[27666]: rrs : TTY=pts/0 ; PWD=/home/rrs ; USER=root ; COMMAND=/bin/systemctl status laptop-mode.service Jul 05 13:05:00 chutzpah sudo[27666]: pam_unix(sudo:session): session opened for user root by rrs(uid=0) Jul 05 13:05:00 chutzpah sudo[27666]: pam_unix(sudo:session): session closed for user root Jul 05 13:05:47 chutzpah gnome-session[2089]: kio_http(27701) HTTPProtocol::sendQuery: ============ Sending Header: Jul 05 13:05:47 chutzpah gnome-session[2089]: kio_http(27701) HTTPProtocol::sendQuery: "GET /0008826580bef2f73e46d6390ff34528/scrape?info_hash=%92zM%05%b3%fbQ%9aAT%0e%ad%a4%a47%d2%9a%f4%8f%99 HTTP/1.1" Jul 05 13:05:47 chutzpah gnome-session[2089]: kio_http(27701) HTTPProtocol::sendQuery: "Host: tracker.desitorrents.com:6969" Jul 05 13:05:47 chutzpah gnome-session[2089]: kio_http(27701) HTTPProtocol::sendQuery: "Connection: keep-alive" Jul 05 13:05:47 chutzpah gnome-session[2089]: kio_http(27701) HTTPProtocol::sendQuery: "User-Agent: KTorrent/4.3.1" Jul 05 13:05:47 chutzpah gnome-session[2089]: kiohttp(27701) HTTPProtocol::sendQuery: "Accept: text/html, image/gif, image/jpeg, ; q=.2, */_; q=.2" Jul 05 13:05:47 chutzpah gnome-session[2089]: kio_http(27701) HTTPProtocol::sendQuery: "Accept-Encoding: gzip, deflate, x-gzip, x-deflate" Jul 05 13:05:47 chutzpah gnome-session[2089]: kio_http(27701) HTTPProtocol::sendQuery: "DNT: 1" Jul 05 13:05:49 chutzpah gnome-session[2089]: kio_http(27701) HTTPProtocol::readResponseHeader: ============ Received Status Response: Jul 05 13:05:49 chutzpah gnome-session[2089]: kio_http(27701) HTTPProtocol::readResponseHeader: "HTTP/1.0 200 OK"
Jul 05 13:06:09 chutzpah laptop-mode[27721]: Laptop Mode Tools invoked by parent: 25989 Jul 05 13:06:09 chutzpah laptop-mode[27723]: Determining power state from /sys/class/power_supply/AC/online. Jul 05 13:06:09 chutzpah laptop-mode[27726]: Not trying other options, already found a power supply. Jul 05 13:06:09 chutzpah laptop-mode[27735]: Battery level polling is enabled. Jul 05 13:06:09 chutzpah laptop-mode[27736]: Going to try flock now Jul 05 13:06:09 chutzpah laptop-mode[27738]: Lock acquisition on descriptor 7 failed with pid 27713 Jul 05 13:06:09 chutzpah laptop-mode[27740]: Prelim lock acquisition on descriptor 8 with pid 27713 Jul 05 13:06:09 chutzpah laptop-mode[27743]: Prelim lock acquisition on descriptor 9 with pid 27713 Jul 05 13:06:09 chutzpah laptop-mode[27744]: Now invoking lmt_main_function with arguments -- auto Jul 05 13:06:09 chutzpah laptop-mode[27750]: Laptop Mode Tools invoked by parent: 25989 Jul 05 13:06:09 chutzpah laptop-mode[27752]: Determining power state from /sys/class/power_supply/AC/online. Jul 05 13:06:09 chutzpah laptop-mode[27755]: Not trying other options, already found a power supply. Jul 05 13:06:09 chutzpah laptop-mode[27766]: On battery power: Activating, because ENABLE_LAPTOP_MODE_ON_BATTERY is set. Jul 05 13:06:09 chutzpah laptop-mode[27768]: Not on AC and we have battery information in /sys/class/power_supply/BAT* -- checking minimum battery charge. Jul 05 13:06:09 chutzpah laptop-mode[27770]: /sys/class/power_supply/AC is of type Mains. Jul 05 13:06:09 chutzpah laptop-mode[27771]: Not of type "Battery", skipping. Jul 05 13:06:09 chutzpah laptop-mode[27773]: /sys/class/power_supply/BAT0 is of type Battery. Jul 05 13:06:09 chutzpah laptop-mode[27774]: Checking levels for /sys/class/power_supply/BAT0. Jul 05 13:06:09 chutzpah laptop-mode[27776]: Present: 1. Jul 05 13:06:09 chutzpah laptop-mode[27778]: Remaining charge: 2421000 Jul 05 13:06:09 chutzpah laptop-mode[27780]: Full capacity: 2588000 Jul 05 13:06:09 chutzpah laptop-mode[27782]: Laptop mode Jul 05 13:06:09 chutzpah laptop-mode[27783]: Checking if desired state is different from current state. Jul 05 13:06:09 chutzpah laptop-mode[27784]: enabled, active [unchanged] Jul 05 13:06:09 chutzpah laptop-mode[27785]: Exiting clean Jul 05 13:06:37 chutzpah systemd[1]: Time has been changed Jul 05 13:06:37 chutzpah systemd[2080]: Time has been changed
And the invoking process was lm-polling-daemon
rrs@chutzpah:~$ ps aux | grep 25989 root 25989 0.0 0.0 4332 732 ? S 13:03 0:00 /bin/sh /usr/share/laptop-mode-tools/module-helpers/lm-polling-daemon rrs 27830 0.0 0.0 12720 2112 pts/2 S+ 13:08 0:00 grep --color=auto 25989 13:08 ♒♒♒ ☺
Followed by 2.5 mintues of sleep and then another poll. All works fine, until you plugin the adapter.
Jul 05 13:07:18 chutzpah gnome-session[2089]: konsole(2444)/kdecore (services) KServiceFactory::findServiceByDesktopPath: "searchproviders/wikit.desktop" not found Jul 05 13:08:39 chutzpah laptop-mode[27850]: Laptop Mode Tools invoked by parent: 25989 Jul 05 13:08:39 chutzpah laptop-mode[27852]: Determining power state from /sys/class/power_supply/AC/online. Jul 05 13:08:39 chutzpah laptop-mode[27855]: Not trying other options, already found a power supply. Jul 05 13:08:39 chutzpah laptop-mode[27864]: Battery level polling is enabled. Jul 05 13:08:39 chutzpah laptop-mode[27865]: Going to try flock now Jul 05 13:08:39 chutzpah laptop-mode[27867]: Lock acquisition on descriptor 7 failed with pid 27842 Jul 05 13:08:39 chutzpah laptop-mode[27869]: Prelim lock acquisition on descriptor 8 with pid 27842 Jul 05 13:08:39 chutzpah laptop-mode[27872]: Prelim lock acquisition on descriptor 9 with pid 27842 Jul 05 13:08:39 chutzpah laptop-mode[27873]: Now invoking lmt_main_function with arguments -- auto Jul 05 13:08:39 chutzpah laptop-mode[27879]: Laptop Mode Tools invoked by parent: 25989 Jul 05 13:08:39 chutzpah laptop-mode[27881]: Determining power state from /sys/class/power_supply/AC/online. Jul 05 13:08:39 chutzpah laptop-mode[27884]: Not trying other options, already found a power supply. Jul 05 13:08:39 chutzpah laptop-mode[27895]: On battery power: Activating, because ENABLE_LAPTOP_MODE_ON_BATTERY is set. Jul 05 13:08:39 chutzpah laptop-mode[27897]: Not on AC and we have battery information in /sys/class/power_supply/BAT* -- checking minimum battery charge. Jul 05 13:08:39 chutzpah laptop-mode[27899]: /sys/class/power_supply/AC is of type Mains. Jul 05 13:08:39 chutzpah laptop-mode[27900]: Not of type "Battery", skipping. Jul 05 13:08:39 chutzpah laptop-mode[27902]: /sys/class/power_supply/BAT0 is of type Battery. Jul 05 13:08:39 chutzpah laptop-mode[27903]: Checking levels for /sys/class/power_supply/BAT0. Jul 05 13:08:39 chutzpah laptop-mode[27905]: Present: 1. Jul 05 13:08:39 chutzpah laptop-mode[27907]: Remaining charge: 2404000 Jul 05 13:08:39 chutzpah laptop-mode[27909]: Full capacity: 2588000 Jul 05 13:08:39 chutzpah laptop-mode[27911]: Laptop mode Jul 05 13:08:39 chutzpah laptop-mode[27912]: Checking if desired state is different from current state. Jul 05 13:08:39 chutzpah laptop-mode[27913]: enabled, active [unchanged] Jul 05 13:08:39 chutzpah laptop-mode[27914]: Exiting clean Jul 05 13:09:01 chutzpah CRON[27923]: pam_unix(cron:session): session opened for user root by (uid=0) Jul 05 13:09:01 chutzpah CRON[27924]: (root) CMD ( [ -x /usr/lib/php5/sessionclean ] && /usr/lib/php5/sessionclean) Jul 05 13:09:01 chutzpah CRON[27923]: pam_unix(cron:session): session closed for user root
This has some pretty interesting behavior.
Jul 05 14:46:26 learner laptop-mode[16635]: Laptop mode Jul 05 14:46:26 learner laptop-mode[16636]: enabled, not active [unchanged] Jul 05 14:46:26 learner sudo[16637]: rrs : TTY=pts/0 ; PWD=/run/lock ; USER=root ; COMMAND=/bin/fuser lmt-battpoll.lock lmt-invoc.lock lmt-req.lock Jul 05 14:46:26 learner sudo[16637]: pam_unix(sudo:session): session opened for user root by rrs(uid=0) Jul 05 14:46:26 learner sudo[16637]: pam_unix(sudo:session): session closed for user root Jul 05 14:46:27 learner laptop-mode[16686]: Laptop mode Jul 05 14:46:27 learner laptop-mode[16687]: enabled, not active [unchanged] Jul 05 14:46:29 learner laptop-mode[16730]: Laptop mode Jul 05 14:46:29 learner laptop-mode[16731]: enabled, not active [unchanged] Jul 05 14:46:30 learner laptop-mode[16774]: Laptop mode Jul 05 14:46:30 learner laptop-mode[16775]: enabled, not active [unchanged] Jul 05 14:46:30 learner sudo[16776]: rrs : TTY=pts/2 ; PWD=/tmp ; USER=root ; COMMAND=/bin/systemctl status laptop-mode.service Jul 05 14:46:30 learner sudo[16776]: pam_unix(sudo:session): session opened for user root by rrs(uid=0) Jul 05 14:46:30 learner sudo[16776]: pam_unix(sudo:session): session closed for user root Jul 05 14:46:35 learner laptop-mode[16826]: Laptop mode Jul 05 14:46:35 learner laptop-mode[16827]: enabled, not active [unchanged] Jul 05 14:46:36 learner laptop-mode[16870]: Laptop mode Jul 05 14:46:36 learner laptop-mode[16871]: enabled, not active [unchanged] Jul 05 14:46:38 learner laptop-mode[16914]: Laptop mode Jul 05 14:46:38 learner laptop-mode[16915]: enabled, not active [unchanged] Jul 05 14:46:39 learner laptop-mode[16958]: Laptop mode Jul 05 14:46:39 learner laptop-mode[16959]: enabled, not active [unchanged] Jul 05 14:46:44 learner laptop-mode[17007]: Laptop mode Jul 05 14:46:44 learner laptop-mode[17008]: enabled, not active [unchanged] Jul 05 14:46:44 learner PackageKit[2373]: update-packages transaction /5259_bcdababe from uid 1000 finished with success after 114997ms Jul 05 14:46:45 learner laptop-mode[17052]: Laptop mode Jul 05 14:46:45 learner laptop-mode[17053]: enabled, not active [unchanged] Jul 05 14:46:47 learner laptop-mode[17097]: Laptop mode Jul 05 14:46:47 learner laptop-mode[17098]: enabled, not active [unchanged] Jul 05 14:46:48 learner laptop-mode[17141]: Laptop mode Jul 05 14:46:48 learner laptop-mode[17142]: enabled, not active [unchanged] Jul 05 14:46:53 learner laptop-mode[17195]: Laptop mode Jul 05 14:46:53 learner laptop-mode[17196]: enabled, not active [unchanged] Jul 05 14:46:54 learner laptop-mode[17240]: Laptop mode Jul 05 14:46:54 learner laptop-mode[17241]: enabled, not active [unchanged] Jul 05 14:46:56 learner laptop-mode[17284]: Laptop mode Jul 05 14:46:56 learner laptop-mode[17285]: enabled, not active [unchanged] Jul 05 14:46:57 learner laptop-mode[17328]: Laptop mode Jul 05 14:46:57 learner laptop-mode[17329]: enabled, not active [unchanged] Jul 05 14:47:02 learner laptop-mode[17373]: Laptop mode Jul 05 14:47:02 learner laptop-mode[17374]: enabled, not active [unchanged] Jul 05 14:47:03 learner laptop-mode[17426]: Laptop mode Jul 05 14:47:03 learner laptop-mode[17427]: enabled, not active [unchanged] Jul 05 14:47:05 learner laptop-mode[17471]: Laptop mode Jul 05 14:47:05 learner laptop-mode[17472]: enabled, not active [unchanged] Jul 05 14:47:06 learner laptop-mode[17515]: Laptop mode Jul 05 14:47:06 learner laptop-mode[17516]: enabled, not active [unchanged]
*\ The mystery is as to why does LMT get invoked so frequent.
Jul 05 14:47:14 learner sudo[17517]: rrs : TTY=pts/0 ; PWD=/run/lock ; USER=root ; COMMAND=/usr/bin/aptitude install systemd Jul 05 14:47:14 learner sudo[17517]: pam_unix(sudo:session): session opened for user root by rrs(uid=0)
*\ Then I upgraded systemd to 221.
Jul 05 14:47:29 learner laptop-mode[17724]: Laptop mode Jul 05 14:47:29 learner laptop-mode[17725]: enabled, not active [unchanged] Jul 05 14:47:29 learner laptop-mode[17768]: Laptop mode Jul 05 14:47:29 learner laptop-mode[17769]: enabled, not active [unchanged] Jul 05 14:47:32 learner laptop-mode[17812]: Laptop mode Jul 05 14:47:32 learner laptop-mode[17813]: enabled, not active [unchanged] Jul 05 14:47:32 learner laptop-mode[17856]: Laptop mode Jul 05 14:47:32 learner laptop-mode[17857]: enabled, not active [unchanged] Jul 05 14:47:35 learner laptop-mode[17900]: Laptop mode Jul 05 14:47:35 learner laptop-mode[17901]: enabled, not active [unchanged] Jul 05 14:47:35 learner laptop-mode[17944]: Laptop mode Jul 05 14:47:35 learner laptop-mode[17945]: enabled, not active [unchanged] Jul 05 14:47:40 learner laptop-mode[17989]: Laptop mode Jul 05 14:47:40 learner laptop-mode[17990]: enabled, not active [unchanged] Jul 05 14:47:41 learner laptop-mode[18033]: Laptop mode Jul 05 14:47:41 learner laptop-mode[18034]: enabled, not active [unchanged] Jul 05 14:47:43 learner laptop-mode[18077]: Laptop mode Jul 05 14:47:43 learner laptop-mode[18078]: enabled, not active [unchanged] Jul 05 14:47:44 learner laptop-mode[18121]: Laptop mode Jul 05 14:47:44 learner laptop-mode[18122]: enabled, not active [unchanged]
*\ Still the invocations were multiple.
Jul 05 14:47:47 learner dbus[1740]: [system] Reloaded configuration Jul 05 14:47:47 learner dbus[1740]: [system] Reloaded configuration Jul 05 14:47:47 learner dbus[1740]: [system] Reloaded configuration Jul 05 14:47:47 learner dbus[1740]: [system] Reloaded configuration Jul 05 14:47:47 learner dbus[1740]: [system] Reloaded configuration Jul 05 14:47:47 learner dbus[1740]: [system] Reloaded configuration Jul 05 14:47:47 learner dbus[1740]: [system] Reloaded configuration Jul 05 14:47:47 learner dbus[1740]: [system] Reloaded configuration Jul 05 14:47:47 learner dbus[1740]: [system] Reloaded configuration Jul 05 14:47:47 learner dbus[1740]: [system] Reloaded configuration Jul 05 14:47:48 learner dbus[1740]: [system] Reloaded configuration Jul 05 14:47:48 learner dbus[1740]: [system] Reloaded configuration Jul 05 14:47:48 learner dbus[1740]: [system] Reloaded configuration Jul 05 14:47:48 learner dbus[1740]: [system] Reloaded configuration Jul 05 14:47:48 learner dbus[1740]: [system] Reloaded configuration Jul 05 14:47:48 learner dbus[1740]: [system] Reloaded configuration Jul 05 14:47:48 learner dbus[1740]: [system] Reloaded configuration Jul 05 14:47:48 learner dbus[1740]: [system] Reloaded configuration Jul 05 14:47:48 learner systemd[1]: Reloading. Jul 05 14:47:49 learner systemd[1]: Reloading. Jul 05 14:47:49 learner systemd[1]: Reloading. Jul 05 14:47:49 learner polkitd(authority=local)[1877]: Registered Authentication Agent for unix-process:19752:15071159 (system bus name :1.141 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_IN.utf8) Jul 05 14:47:49 learner systemd[1]: Reexecuting. Jul 05 14:47:49 learner systemd[1]: systemd 221 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT -GNUTLS +ACL +XZ -LZ4 +SECCOMP +BLKID -ELFUTILS +KMOD -IDN) Jul 05 14:47:49 learner systemd[1]: Detected architecture x86-64. Jul 05 14:47:49 learner polkitd(authority=local)[1877]: Unregistered Authentication Agent for unix-process:19752:15071159 (system bus name :1.141, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_IN.utf8) (disconnected from bus) Jul 05 14:47:49 learner polkitd(authority=local)[1877]: Registered Authentication Agent for unix-process:19769:15071166 (system bus name :1.143 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_IN.utf8) Jul 05 14:47:49 learner systemd[1]: Stopping Login Service... Jul 05 14:47:49 learner systemd[1]: Starting Login Service... Jul 05 14:47:49 learner systemd[1]: Started Login Service. Jul 05 14:47:49 learner systemd-logind[19776]: New seat seat0. Jul 05 14:47:49 learner polkitd(authority=local)[1877]: Unregistered Authentication Agent for unix-process:19769:15071166 (system bus name :1.143, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_IN.utf8) (disconnected from bus) Jul 05 14:47:49 learner systemd-logind[19776]: Watching system buttons on /dev/input/event3 (Power Button) Jul 05 14:47:49 learner systemd-logind[19776]: Watching system buttons on /dev/input/event11 (Video Bus) Jul 05 14:47:49 learner systemd-logind[19776]: Watching system buttons on /dev/input/event1 (Power Button) Jul 05 14:47:49 learner systemd-logind[19776]: Watching system buttons on /dev/input/event2 (Lid Switch) Jul 05 14:47:49 learner systemd-logind[19776]: New session 1 of user rrs. Jul 05 14:47:49 learner polkitd(authority=local)[1877]: Registered Authentication Agent for unix-process:19777:15071179 (system bus name :1.145 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_IN.utf8) Jul 05 14:47:49 learner polkitd(authority=local)[1877]: Unregistered Authentication Agent for unix-process:19777:15071179 (system bus name :1.145, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_IN.utf8) (disconnected from bus) Jul 05 14:47:49 learner polkitd(authority=local)[1877]: Registered Authentication Agent for unix-process:19782:15071185 (system bus name :1.146 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_IN.utf8) Jul 05 14:47:49 learner polkitd(authority=local)[1877]: Unregistered Authentication Agent for unix-process:19782:15071185 (system bus name :1.146, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_IN.utf8) (disconnected from bus) Jul 05 14:47:49 learner polkitd(authority=local)[1877]: Registered Authentication Agent for unix-process:19787:15071188 (system bus name :1.147 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_IN.utf8) Jul 05 14:47:49 learner systemd[1]: Stopping Network Time Synchronization... Jul 05 14:47:49 learner systemd[1]: Starting Network Time Synchronization... Jul 05 14:47:49 learner systemd[1]: Started Network Time Synchronization. Jul 05 14:47:49 learner polkitd(authority=local)[1877]: Unregistered Authentication Agent for unix-process:19787:15071188 (system bus name :1.147, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_IN.utf8) (disconnected from bus) Jul 05 14:47:49 learner systemd-timesyncd[19795]: Synchronized to time server 123.108.225.6:123 (0.debian.pool.ntp.org). Jul 05 14:47:50 learner dbus[1740]: [system] Reloaded configuration
*\ So now we have the new systemd in action.
Jul 05 14:47:52 learner systemd-udevd[313]: invalid ACTION operation Jul 05 14:47:52 learner systemd-udevd[313]: invalid rule '/lib/udev/rules.d/40-iio-sensor-proxy.rules:5' Jul 05 14:47:52 learner systemd-udevd[313]: invalid ACTION operation Jul 05 14:47:52 learner systemd-udevd[313]: invalid rule '/lib/udev/rules.d/40-iio-sensor-proxy.rules:6' Jul 05 14:47:52 learner laptop-mode[20017]: Laptop mode Jul 05 14:47:52 learner laptop-mode[20018]: enabled, not active [unchanged] Jul 05 14:47:53 learner sudo[17517]: pam_unix(sudo:session): session closed for user root Jul 05 14:47:53 learner laptop-mode[20066]: Laptop mode Jul 05 14:47:53 learner laptop-mode[20067]: enabled, not active [unchanged] Jul 05 14:47:55 learner laptop-mode[20110]: Laptop mode Jul 05 14:47:55 learner laptop-mode[20111]: enabled, not active [unchanged] Jul 05 14:47:56 learner laptop-mode[20154]: Laptop mode Jul 05 14:47:56 learner laptop-mode[20155]: enabled, not active [unchanged] Jul 05 14:47:58 learner laptop-mode[20198]: Laptop mode Jul 05 14:47:58 learner laptop-mode[20199]: enabled, not active [unchanged] Jul 05 14:47:59 learner laptop-mode[20242]: Laptop mode Jul 05 14:47:59 learner laptop-mode[20243]: enabled, not active [unchanged] Jul 05 14:48:01 learner laptop-mode[20286]: Laptop mode Jul 05 14:48:01 learner laptop-mode[20287]: enabled, not active [unchanged] Jul 05 14:48:02 learner laptop-mode[20330]: Laptop mode Jul 05 14:48:02 learner laptop-mode[20331]: enabled, not active [unchanged] Jul 05 14:48:07 learner laptop-mode[20375]: Laptop mode Jul 05 14:48:07 learner laptop-mode[20376]: enabled, not active [unchanged]
*\ But still the frequency of the invocations is high.
Jul 05 14:48:08 learner sudo[20377]: rrs : TTY=pts/0 ; PWD=/run/lock ; USER=root ; COMMAND=/bin/fuser lmt-battpoll.lock lmt-invoc.lock lmt-req.lock Jul 05 14:48:08 learner sudo[20377]: pam_unix(sudo:session): session opened for user root by rrs(uid=0)
** At this moment, I did not have any lock on battpoll.
rrs@learner:/run/lock$ sudo fuser lmt-
14:48 ♒♒♒ ☹ => 1
rrs@learner:/run/lock$ sudo fuser lmt-
14:49 ♒♒♒ ☹ => 1
rrs@learner:/run/lock$ sudo fuser lmt-
14:49 ♒♒♒ ☹ => 1
rrs@learner:/run/lock$ sudo fuser lmt-*
14:49 ♒♒♒ ☹ => 1
Jul 05 14:48:08 learner sudo[20377]: pam_unix(sudo:session): session closed for user root Jul 05 14:48:08 learner laptop-mode[20426]: Laptop mode Jul 05 14:48:08 learner laptop-mode[20427]: enabled, not active [unchanged] Jul 05 14:48:10 learner laptop-mode[20470]: Laptop mode Jul 05 14:48:10 learner laptop-mode[20471]: enabled, not active [unchanged] Jul 05 14:48:10 learner sudo[20472]: rrs : TTY=pts/2 ; PWD=/tmp ; USER=root ; COMMAND=/bin/systemctl status laptop-mode.service Jul 05 14:48:10 learner sudo[20472]: pam_unix(sudo:session): session opened for user root by rrs(uid=0) Jul 05 14:48:10 learner sudo[20472]: pam_unix(sudo:session): session closed for user root Jul 05 14:48:11 learner laptop-mode[20521]: Laptop mode Jul 05 14:48:11 learner laptop-mode[20522]: enabled, not active [unchanged] Jul 05 14:48:13 learner laptop-mode[20565]: Laptop mode Jul 05 14:48:13 learner laptop-mode[20566]: enabled, not active [unchanged] Jul 05 14:48:14 learner laptop-mode[20609]: Laptop mode Jul 05 14:48:14 learner laptop-mode[20610]: enabled, not active [unchanged] Jul 05 14:48:19 learner laptop-mode[20654]: Laptop mode Jul 05 14:48:19 learner laptop-mode[20655]: enabled, not active [unchanged] Jul 05 14:48:20 learner laptop-mode[20698]: Laptop mode Jul 05 14:48:20 learner laptop-mode[20699]: enabled, not active [unchanged] Jul 05 14:48:22 learner laptop-mode[20742]: Laptop mode Jul 05 14:48:22 learner laptop-mode[20743]: enabled, not active [unchanged] Jul 05 14:48:22 learner sudo[20744]: rrs : TTY=pts/2 ; PWD=/tmp ; USER=root ; COMMAND=/bin/systemctl restart laptop-mode.service Jul 05 14:48:22 learner sudo[20744]: pam_unix(sudo:session): session opened for user root by rrs(uid=0)
*\ So we restart LMT now. Remember, the other things that has changed in between is systemd.
Jul 05 14:48:22 learner polkitd(authority=local)[1877]: Registered Authentication Agent for unix-process:20745:15074530 (system bus name :1.150 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_IN.utf8) Jul 05 14:48:22 learner systemd[1]: Stopping Laptop Mode Tools... Jul 05 14:48:22 learner laptop-mode[20791]: disabled, not active Jul 05 14:48:22 learner systemd[1]: Starting Laptop Mode Tools... Jul 05 14:48:22 learner laptop-mode[21322]: enabled, not active Jul 05 14:48:23 learner systemd[1]: Started Laptop Mode Tools. Jul 05 14:48:23 learner sudo[20744]: pam_unix(sudo:session): session closed for user root Jul 05 14:48:23 learner polkitd(authority=local)[1877]: Unregistered Authentication Agent for unix-process:20745:15074530 (system bus name :1.150, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_IN.utf8) (disconnected from bus) Jul 05 14:48:23 learner laptop-mode[21839]: Failed. Jul 05 14:48:25 learner laptop-mode[29049]: Laptop mode Jul 05 14:48:25 learner laptop-mode[29050]: enabled, not active [unchanged] Jul 05 14:48:25 learner laptop-mode[29093]: Laptop mode Jul 05 14:48:25 learner laptop-mode[29094]: enabled, not active [unchanged] Jul 05 14:48:26 learner laptop-mode[29137]: Laptop mode Jul 05 14:48:26 learner laptop-mode[29138]: enabled, not active [unchanged] Jul 05 14:48:28 learner laptop-mode[29181]: Laptop mode Jul 05 14:48:28 learner laptop-mode[29182]: enabled, not active [unchanged] Jul 05 14:48:29 learner laptop-mode[29225]: Laptop mode Jul 05 14:48:29 learner laptop-mode[29226]: enabled, not active [unchanged] Jul 05 14:48:31 learner laptop-mode[29269]: Laptop mode Jul 05 14:48:31 learner laptop-mode[29270]: enabled, not active [unchanged] Jul 05 14:48:32 learner laptop-mode[29313]: Laptop mode Jul 05 14:48:32 learner laptop-mode[29314]: enabled, not active [unchanged] Jul 05 14:48:34 learner laptop-mode[29357]: Laptop mode Jul 05 14:48:34 learner laptop-mode[29358]: enabled, not active [unchanged] Jul 05 14:48:35 learner laptop-mode[29401]: Laptop mode Jul 05 14:48:35 learner laptop-mode[29402]: enabled, not active [unchanged] Jul 05 14:48:37 learner laptop-mode[29445]: Laptop mode Jul 05 14:48:37 learner laptop-mode[29446]: enabled, not active [unchanged] Jul 05 14:48:38 learner laptop-mode[29489]: Laptop mode Jul 05 14:48:38 learner laptop-mode[29490]: enabled, not active [unchanged] Jul 05 14:48:40 learner laptop-mode[29533]: Laptop mode Jul 05 14:48:40 learner laptop-mode[29534]: enabled, not active [unchanged] Jul 05 14:48:41 learner laptop-mode[29577]: Laptop mode Jul 05 14:48:41 learner laptop-mode[29578]: enabled, not active [unchanged] Jul 05 14:48:55 learner laptop-mode[29622]: Laptop mode Jul 05 14:48:55 learner laptop-mode[29623]: enabled, not active [unchanged]
Jul 05 14:48:55 learner laptop-mode[29666]: Laptop mode Jul 05 14:48:55 learner laptop-mode[29667]: enabled, not active [unchanged]
Jul 05 14:48:58 learner laptop-mode[29710]: Laptop mode Jul 05 14:48:58 learner laptop-mode[29711]: enabled, not active [unchanged] Jul 05 14:48:58 learner laptop-mode[29754]: Laptop mode Jul 05 14:48:58 learner laptop-mode[29755]: enabled, not active [unchanged] Jul 05 14:49:01 learner laptop-mode[29808]: Laptop mode Jul 05 14:49:01 learner laptop-mode[29809]: enabled, active Jul 05 14:49:01 learner kernel: ahci 0000:00:1f.2: port does not support device sleep Jul 05 14:49:01 learner kernel: EXT4-fs (dm-0): re-mounted. Opts: errors=remount-ro,data=writeback,commit=600 Jul 05 14:49:01 learner kernel: EXT4-fs (dm-3): re-mounted. Opts: errors=remount-ro,data=ordered,commit=600 Jul 05 14:49:01 learner kernel: EXT4-fs (sda6): re-mounted. Opts: data=ordered,commit=600 Jul 05 14:49:01 learner laptop-mode[30343]: Failed. Jul 05 14:49:06 learner sudo[4800]: rrs : TTY=pts/0 ; PWD=/run/lock ; USER=root ; COMMAND=/bin/fuser lmt-battpoll.lock lmt-invoc.lock lmt-req.lock Jul 05 14:49:06 learner sudo[4800]: pam_unix(sudo:session): session opened for user root by rrs(uid=0) Jul 05 14:49:06 learner sudo[4800]: pam_unix(sudo:session): session closed for user root Jul 05 14:49:08 learner sudo[4807]: rrs : TTY=pts/0 ; PWD=/run/lock ; USER=root ; COMMAND=/bin/fuser lmt-battpoll.lock lmt-invoc.lock lmt-req.lock Jul 05 14:49:08 learner sudo[4807]: pam_unix(sudo:session): session opened for user root by rrs(uid=0) Jul 05 14:49:08 learner sudo[4807]: pam_unix(sudo:session): session closed for user root Jul 05 14:49:10 learner sudo[4814]: rrs : TTY=pts/0 ; PWD=/run/lock ; USER=root ; COMMAND=/bin/fuser lmt-battpoll.lock lmt-invoc.lock lmt-req.lock Jul 05 14:49:10 learner sudo[4814]: pam_unix(sudo:session): session opened for user root by rrs(uid=0) Jul 05 14:49:10 learner sudo[4814]: pam_unix(sudo:session): session closed for user root
*\ Up till this timestamp, it still did not have the locks.
rrs@learner:/run/lock$ sudo fuser lmt-
14:48 ♒♒♒ ☹ => 1
rrs@learner:/run/lock$ sudo fuser lmt-
14:49 ♒♒♒ ☹ => 1
rrs@learner:/run/lock$ sudo fuser lmt-
14:49 ♒♒♒ ☹ => 1
rrs@learner:/run/lock$ sudo fuser lmt-
14:49 ♒♒♒ ☹ => 1
Jul 05 14:49:12 learner sudo[4821]: rrs : TTY=pts/2 ; PWD=/tmp ; USER=root ; COMMAND=/bin/systemctl restart laptop-mode.service Jul 05 14:49:12 learner sudo[4821]: pam_unix(sudo:session): session opened for user root by rrs(uid=0) Jul 05 14:49:12 learner polkitd(authority=local)[1877]: Registered Authentication Agent for unix-process:4822:15079544 (system bus name :1.151 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_IN.utf8) Jul 05 14:49:12 learner systemd[1]: Stopping Laptop Mode Tools... Jul 05 14:49:13 learner laptop-mode[4872]: disabled, not active Jul 05 14:49:13 learner kernel: EXT4-fs (dm-0): re-mounted. Opts: errors=remount-ro,data=writeback,commit=0 Jul 05 14:49:13 learner kernel: EXT4-fs (dm-3): re-mounted. Opts: errors=remount-ro,data=ordered,commit=0 Jul 05 14:49:13 learner kernel: EXT4-fs (sda6): re-mounted. Opts: data=ordered,commit=0 Jul 05 14:49:13 learner systemd[1]: Starting Laptop Mode Tools... Jul 05 14:49:13 learner laptop-mode[5482]: enabled, active Jul 05 14:49:13 learner kernel: EXT4-fs (dm-0): re-mounted. Opts: errors=remount-ro,data=writeback,commit=600 Jul 05 14:49:13 learner kernel: EXT4-fs (dm-3): re-mounted. Opts: errors=remount-ro,data=ordered,commit=600 Jul 05 14:49:13 learner kernel: EXT4-fs (sda6): re-mounted. Opts: data=ordered,commit=600 Jul 05 14:49:13 learner systemd[1]: Started Laptop Mode Tools. Jul 05 14:49:13 learner sudo[4821]: pam_unix(sudo:session): session closed for user root Jul 05 14:49:13 learner polkitd(authority=local)[1877]: Unregistered Authentication Agent for unix-process:4822:15079544 (system bus name :1.151, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_IN.utf8) (disconnected from bus) Jul 05 14:49:13 learner laptop-mode[6037]: Failed. Jul 05 14:49:15 learner sudo[8908]: rrs : TTY=pts/2 ; PWD=/tmp ; USER=root ; COMMAND=/bin/systemctl status laptop-mode.service Jul 05 14:49:15 learner sudo[8908]: pam_unix(sudo:session): session opened for user root by rrs(uid=0) Jul 05 14:49:15 learner sudo[8908]: pam_unix(sudo:session): session closed for user root Jul 05 14:49:17 learner sudo[11869]: rrs : TTY=pts/2 ; PWD=/tmp ; USER=root ; COMMAND=/bin/systemctl status laptop-mode.service Jul 05 14:49:17 learner sudo[11869]: pam_unix(sudo:session): session opened for user root by rrs(uid=0) Jul 05 14:49:17 learner sudo[11869]: pam_unix(sudo:session): session closed for user root Jul 05 14:49:19 learner sudo[13323]: rrs : TTY=pts/2 ; PWD=/tmp ; USER=root ; COMMAND=/bin/systemctl status laptop-mode.service Jul 05 14:49:19 learner sudo[13323]: pam_unix(sudo:session): session opened for user root by rrs(uid=0) Jul 05 14:49:19 learner sudo[13323]: pam_unix(sudo:session): session closed for user root Jul 05 14:49:20 learner sudo[13330]: rrs : TTY=pts/2 ; PWD=/tmp ; USER=root ; COMMAND=/bin/systemctl status laptop-mode.service Jul 05 14:49:20 learner sudo[13330]: pam_unix(sudo:session): session opened for user root by rrs(uid=0) Jul 05 14:49:20 learner sudo[13330]: pam_unix(sudo:session): session closed for user root
*\ So we restarted again. And now look at the status.
Jul 05 14:49:37 learner sudo[13337]: rrs : TTY=pts/2 ; PWD=/tmp ; USER=root ; COMMAND=/bin/systemctl status laptop-mode.service Jul 05 14:49:37 learner sudo[13337]: pam_unix(sudo:session): session opened for user root by rrs(uid=0) Jul 05 14:49:37 learner sudo[13337]: pam_unix(sudo:session): session closed for user root Jul 05 14:50:24 learner sudo[13344]: rrs : TTY=pts/0 ; PWD=/run/lock ; USER=root ; COMMAND=/bin/fuser lmt-battpoll.lock lmt-invoc.lock lmt-req.lock Jul 05 14:50:24 learner sudo[13344]: pam_unix(sudo:session): session opened for user root by rrs(uid=0) Jul 05 14:50:24 learner sudo[13344]: pam_unix(sudo:session): session closed for user root
** At this time, we do have locks. rrs@learner:/run/lock$ sudo fuser lmt- /run/lock/lmt-battpoll.lock: 5452 5454 14:50 ♒♒♒ ☺
Jul 05 14:50:31 learner sudo[13351]: rrs : TTY=pts/2 ; PWD=/tmp ; USER=root ; COMMAND=/bin/systemctl status laptop-mode.service Jul 05 14:50:31 learner sudo[13351]: pam_unix(sudo:session): session opened for user root by rrs(uid=0) Jul 05 14:50:31 learner sudo[13351]: pam_unix(sudo:session): session closed for user root
*\ Since then I've had more invocations, all at the correct span of 2.5 mins.
Jul 05 14:51:43 learner laptop-mode[13409]: Laptop mode Jul 05 14:51:43 learner laptop-mode[13410]: enabled, active [unchanged] Jul 05 14:54:13 learner laptop-mode[13483]: Laptop mode Jul 05 14:54:13 learner laptop-mode[13484]: enabled, active [unchanged] Jul 05 14:55:01 learner CRON[13487]: pam_unix(cron:session): session opened for user rrs by (uid=0) Jul 05 14:55:01 learner CRON[13488]: (rrs) CMD (/home/rrs/bin/fdm.gmail) Jul 05 14:55:13 learner icedove.desktop[7185]: 2015-07-05 14:55:13 extensions.exquilla.base INFO msqEwsIncomingServer::PerformBiff (in file /c/tb/beta/src/mozilla/extensions/exquilla/src/msqEwsIncomingServer.cpp line 1041) Jul 05 14:55:33 learner fdm[13494]: gmail: 5 messages processed (0 kept) in 31.300 seconds (average 6.260) Jul 05 14:55:33 learner CRON[13487]: pam_unix(cron:session): session closed for user rrs Jul 05 14:55:37 learner dovecot[15049]: imap(rrs): Disconnected: Logged out in=5017 out=34389 Jul 05 14:56:43 learner laptop-mode[13550]: Laptop mode Jul 05 14:56:43 learner laptop-mode[13551]: enabled, active [unchanged]
And the moment, the power is plugged in, the same "frequent invocation" problem re-appears.
Jul 05 15:06:41 learner kernel: ahci 0000:00:1f.2: port does not support device sleep Jul 05 15:06:41 learner kernel: NMI watchdog: enabled on all CPUs, permanently consumes one hw-PMU counter. Jul 05 15:06:41 learner kernel: EXT4-fs (dm-0): re-mounted. Opts: errors=remount-ro,data=writeback,commit=0 Jul 05 15:06:41 learner kernel: EXT4-fs (dm-3): re-mounted. Opts: errors=remount-ro,data=ordered,commit=0 Jul 05 15:06:41 learner kernel: EXT4-fs (sda6): re-mounted. Opts: data=ordered,commit=0 Jul 05 15:06:41 learner laptop-mode[747]: Failed. Jul 05 15:06:43 learner laptop-mode[8312]: Laptop mode Jul 05 15:06:43 learner laptop-mode[8313]: enabled, not active [unchanged] Jul 05 15:06:52 learner laptop-mode[8360]: Laptop mode Jul 05 15:06:52 learner laptop-mode[8361]: enabled, not active [unchanged] Jul 05 15:06:53 learner laptop-mode[8404]: Laptop mode Jul 05 15:06:53 learner laptop-mode[8405]: enabled, not active [unchanged] Jul 05 15:06:55 learner laptop-mode[8448]: Laptop mode Jul 05 15:06:55 learner laptop-mode[8449]: enabled, not active [unchanged] Jul 05 15:06:55 learner laptop-mode[8492]: Laptop mode Jul 05 15:06:55 learner laptop-mode[8493]: enabled, not active [unchanged] Jul 05 15:07:09 learner laptop-mode[8538]: Laptop mode Jul 05 15:07:09 learner laptop-mode[8539]: enabled, not active [unchanged] Jul 05 15:07:10 learner laptop-mode[8582]: Laptop mode Jul 05 15:07:10 learner laptop-mode[8583]: enabled, not active [unchanged] Jul 05 15:07:12 learner laptop-mode[8626]: Laptop mode Jul 05 15:07:12 learner laptop-mode[8627]: enabled, not active [unchanged] Jul 05 15:07:13 learner laptop-mode[8670]: Laptop mode Jul 05 15:07:13 learner laptop-mode[8671]: enabled, not active [unchanged] Jul 05 15:07:25 learner sudo[8672]: rrs : TTY=pts/0 ; PWD=/run/lock ; USER=root ; COMMAND=/bin/fuser lmt-battpoll.lock lmt-invoc.lock lmt-req.lock Jul 05 15:07:25 learner sudo[8672]: pam_unix(sudo:session): session opened for user root by rrs(uid=0) Jul 05 15:07:25 learner sudo[8672]: pam_unix(sudo:session): session closed for user root Jul 05 15:07:36 learner laptop-mode[8722]: Laptop mode Jul 05 15:07:36 learner laptop-mode[8723]: enabled, not active [unchanged] Jul 05 15:07:37 learner laptop-mode[8766]: Laptop mode Jul 05 15:07:37 learner laptop-mode[8767]: enabled, not active [unchanged] Jul 05 15:07:39 learner laptop-mode[8810]: Laptop mode Jul 05 15:07:39 learner laptop-mode[8811]: enabled, not active [unchanged] Jul 05 15:07:40 learner laptop-mode[8854]: Laptop mode Jul 05 15:07:40 learner laptop-mode[8855]: enabled, not active [unchanged] Jul 05 15:07:48 learner sudo[8856]: rrs : TTY=pts/2 ; PWD=/tmp ; USER=root ; COMMAND=/bin/systemctl status laptop-mode.service Jul 05 15:07:48 learner sudo[8856]: pam_unix(sudo:session): session opened for user root by rrs(uid=0) Jul 05 15:07:48 learner sudo[8856]: pam_unix(sudo:session): session closed for user root Jul 05 15:07:54 learner laptop-mode[8906]: Laptop mode Jul 05 15:07:54 learner laptop-mode[8907]: enabled, not active [unchanged] Jul 05 15:07:55 learner laptop-mode[8950]: Laptop mode Jul 05 15:07:55 learner laptop-mode[8951]: enabled, not active [unchanged] Jul 05 15:07:57 learner laptop-mode[8994]: Laptop mode Jul 05 15:07:57 learner laptop-mode[8995]: enabled, not active [unchanged] Jul 05 15:07:58 learner laptop-mode[9038]: Laptop mode Jul 05 15:07:58 learner laptop-mode[9039]: enabled, not active [unchanged]
Jul 05 15:06:41 learner laptop-mode[747]: Failed.
Could it have to do with this ? systemd tends to restart a service if it senses that it failed.
I think this is almost root caused now. And the good news is that LMT had no issues.
It wasn't by LMT. The kernel/udev/systemd, for whatever reasons, was frequently emitting the "change" event, which LMT acts upon..
Now if we get an event, we've got to honor it. So there's nothing wrong here.
rrs@learner:~$ sudo udevadm monitor [sudo] password for rrs: monitor will print the received events for: UDEV - the event which udev sends out after rule processing KERNEL - the kernel uevent
KERNEL[64.264156] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
UDEV [64.265525] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
KERNEL[65.100301] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
UDEV [65.102732] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
KERNEL[70.148310] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
UDEV [70.150300] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
KERNEL[70.984387] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
UDEV [70.986980] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
KERNEL[76.040219] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
UDEV [76.042045] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
KERNEL[76.876271] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
UDEV [76.877758] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
KERNEL[90.800275] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
UDEV [90.802145] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
KERNEL[91.636408] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
UDEV [91.639345] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
KERNEL[93.748271] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
UDEV [93.749880] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
KERNEL[94.584183] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
UDEV [94.585703] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
KERNEL[102.600294] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
UDEV [102.602227] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
KERNEL[103.436332] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
UDEV [103.439042] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
KERNEL[108.500149] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
UDEV [108.501837] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
KERNEL[109.336236] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
UDEV [109.338619] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
KERNEL[111.452266] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
UDEV [111.453810] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
KERNEL[112.288262] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
UDEV [112.289760] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
KERNEL[117.348252] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
UDEV [117.350884] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
KERNEL[118.184221] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
UDEV [118.185956] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
KERNEL[120.300281] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
UDEV [120.302067] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
KERNEL[121.136168] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
UDEV [121.137734] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
KERNEL[126.196271] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
UDEV [126.198385] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
KERNEL[127.032242] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
UDEV [127.033755] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
KERNEL[132.096296] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
UDEV [132.098289] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
KERNEL[132.932273] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
UDEV [132.933789] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
KERNEL[135.044275] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
UDEV [135.045905] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
KERNEL[135.880362] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
UDEV [135.882828] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
KERNEL[155.696281] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
UDEV [155.698352] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
KERNEL[156.532210] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
UDEV [156.533731] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
KERNEL[161.596264] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
UDEV [161.598303] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
KERNEL[162.432409] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
UDEV [162.434823] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
KERNEL[164.548307] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
UDEV [164.550112] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
KERNEL[165.384273] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
UDEV [165.385748] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
KERNEL[166.663066] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/ACPI0003:00/power_supply/ACAD (power_supply)
UDEV [166.664945] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/ACPI0003:00/power_supply/ACAD (power_supply)
KERNEL[167.736257] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
UDEV [167.738737] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1 (power_supply)
In systemd 220, invocations take place...
Jul 05 18:41:02 learner systemd[1]: Reloading. Jul 05 18:41:02 learner systemd[1]: Reloading. Jul 05 18:41:02 learner systemd[1]: Reloading. Jul 05 18:41:02 learner polkitd(authority=local)[29096]: Registered Authentication Agent for unix-process:30380:113524 (system bus name :1.172 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_IN.utf8) Jul 05 18:41:02 learner systemd[1]: Reexecuting. Jul 05 18:41:02 learner systemd[1]: systemd 220 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT -GNUTLS +ACL +XZ -LZ4 +SECCOMP +BLKID -ELFUTILS +KMOD -IDN) Jul 05 18:41:02 learner systemd[1]: Detected architecture x86-64. Jul 05 18:41:02 learner polkitd(authority=local)[29096]: Unregistered Authentication Agent for unix-process:30380:113524 (system bus name :1.172, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_IN.utf8) (disconnected from bus) Jul 05 18:41:02 learner polkitd(authority=local)[29096]: Registered Authentication Agent for unix-process:30396:113539 (system bus name :1.174 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_IN.utf8) Jul 05 18:41:02 learner systemd[1]: Stopping Login Service... Jul 05 18:41:02 learner systemd[1]: Starting Login Service... Jul 05 18:41:02 learner systemd[1]: Started Login Service. Jul 05 18:41:02 learner systemd-logind[30402]: New seat seat0. Jul 05 18:41:02 learner systemd-logind[30402]: Watching system buttons on /dev/input/event3 (Power Button) Jul 05 18:41:02 learner systemd-logind[30402]: Watching system buttons on /dev/input/event11 (Video Bus) Jul 05 18:41:02 learner systemd-logind[30402]: Watching system buttons on /dev/input/event1 (Power Button) Jul 05 18:41:02 learner systemd-logind[30402]: Watching system buttons on /dev/input/event2 (Lid Switch) Jul 05 18:41:02 learner systemd-logind[30402]: New session 1 of user rrs. Jul 05 18:41:02 learner polkitd(authority=local)[29096]: Unregistered Authentication Agent for unix-process:30396:113539 (system bus name :1.174, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_IN.utf8) (disconnected from bus) Jul 05 18:41:02 learner polkitd(authority=local)[29096]: Registered Authentication Agent for unix-process:30403:113561 (system bus name :1.176 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_IN.utf8) Jul 05 18:41:02 learner polkitd(authority=local)[29096]: Unregistered Authentication Agent for unix-process:30403:113561 (system bus name :1.176, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_IN.utf8) (disconnected from bus) Jul 05 18:41:03 learner polkitd(authority=local)[29096]: Registered Authentication Agent for unix-process:30408:113571 (system bus name :1.177 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_IN.utf8) Jul 05 18:41:03 learner polkitd(authority=local)[29096]: Unregistered Authentication Agent for unix-process:30408:113571 (system bus name :1.177, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_IN.utf8) (disconnected from bus) Jul 05 18:41:03 learner polkitd(authority=local)[29096]: Registered Authentication Agent for unix-process:30413:113578 (system bus name :1.178 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_IN.utf8) Jul 05 18:41:03 learner systemd[1]: Stopping Network Time Synchronization... Jul 05 18:41:03 learner systemd[1]: Starting Network Time Synchronization... Jul 05 18:41:03 learner systemd[1]: Started Network Time Synchronization. Jul 05 18:41:03 learner polkitd(authority=local)[29096]: Unregistered Authentication Agent for unix-process:30413:113578 (system bus name :1.178, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_IN.utf8) (disconnected from bus) Jul 05 18:41:03 learner systemd-timesyncd[30421]: Synchronized to time server 123.108.225.6:123 (0.debian.pool.ntp.org). Jul 05 18:41:04 learner dbus[1821]: [system] Reloaded configuration
Jul 05 18:41:17 learner sudo[29948]: pam_unix(sudo:session): session closed for user root Jul 05 18:41:21 learner laptop-mode[4508]: Laptop mode Jul 05 18:41:22 learner laptop-mode[4509]: enabled, not active Jul 05 18:41:22 learner gnome-session[10345]: (gnome-settings-daemon:10459): GLib-CRITICAL **: Source ID 1693 was not found when attempting to remove it Jul 05 18:41:22 learner kernel: ahci 0000:00:1f.2: port does not support device sleep Jul 05 18:41:22 learner kernel: NMI watchdog: enabled on all CPUs, permanently consumes one hw-PMU counter. Jul 05 18:41:22 learner kernel: EXT4-fs (dm-0): re-mounted. Opts: errors=remount-ro,data=writeback,commit=0 Jul 05 18:41:22 learner kernel: EXT4-fs (sda6): re-mounted. Opts: data=ordered,commit=0 Jul 05 18:41:22 learner kernel: EXT4-fs (dm-3): re-mounted. Opts: errors=remount-ro,data=ordered,commit=0 Jul 05 18:41:24 learner laptop-mode[12499]: Laptop mode Jul 05 18:41:24 learner laptop-mode[12500]: enabled, not active [unchanged] Jul 05 18:41:25 learner laptop-mode[12543]: Laptop mode Jul 05 18:41:25 learner laptop-mode[12544]: enabled, not active [unchanged] Jul 05 18:41:29 learner laptop-mode[12588]: Laptop mode Jul 05 18:41:29 learner laptop-mode[12589]: enabled, not active [unchanged]
Jul 05 18:41:30 learner laptop-mode[12632]: Laptop mode Jul 05 18:41:30 learner laptop-mode[12633]: enabled, not active [unchanged]
Jul 05 18:41:32 learner laptop-mode[12678]: Laptop mode Jul 05 18:41:32 learner laptop-mode[12679]: enabled, not active [unchanged] Jul 05 18:41:33 learner laptop-mode[12722]: Laptop mode Jul 05 18:41:33 learner laptop-mode[12723]: enabled, not active [unchanged] Jul 05 18:41:35 learner laptop-mode[12766]: Laptop mode Jul 05 18:41:35 learner laptop-mode[12767]: enabled, not active [unchanged] Jul 05 18:41:36 learner laptop-mode[12810]: Laptop mode Jul 05 18:41:36 learner laptop-mode[12811]: enabled, not active [unchanged] Jul 05 18:41:41 learner laptop-mode[12855]: Laptop mode Jul 05 18:41:41 learner laptop-mode[12856]: enabled, not active [unchanged] Jul 05 18:41:42 learner laptop-mode[12899]: Laptop mode Jul 05 18:41:42 learner laptop-mode[12900]: enabled, not active [unchanged] Jul 05 18:41:44 learner laptop-mode[12943]: Laptop mode Jul 05 18:41:44 learner laptop-mode[12944]: enabled, not active [unchanged] Jul 05 18:41:45 learner laptop-mode[12987]: Laptop mode Jul 05 18:41:45 learner laptop-mode[12988]: enabled, not active [unchanged] Jul 05 18:41:50 learner laptop-mode[13032]: Laptop mode Jul 05 18:41:50 learner laptop-mode[13033]: enabled, not active [unchanged] Jul 05 18:41:51 learner laptop-mode[13076]: Laptop mode Jul 05 18:41:51 learner laptop-mode[13077]: enabled, not active [unchanged] Jul 05 18:41:53 learner laptop-mode[13130]: Laptop mode Jul 05 18:41:53 learner laptop-mode[13131]: enabled, active Jul 05 18:41:53 learner kernel: ahci 0000:00:1f.2: port does not support device sleep Jul 05 18:41:53 learner kernel: EXT4-fs (dm-0): re-mounted. Opts: errors=remount-ro,data=writeback,commit=600 Jul 05 18:41:53 learner kernel: EXT4-fs (sda6): re-mounted. Opts: data=ordered,commit=600 Jul 05 18:41:53 learner kernel: EXT4-fs (dm-3): re-mounted. Opts: errors=remount-ro,data=ordered,commit=600 Jul 05 18:41:57 learner laptop-mode[20984]: Laptop mode Jul 05 18:41:57 learner laptop-mode[20985]: enabled, active [unchanged] Jul 05 18:41:59 learner kernel: pci_pm_runtime_suspend(): hcd_pci_runtime_suspend+0x0/0x60 [usbcore] returns -16
And in systemd221, seems like they broke udev (or its invocation). The "they" here is Debian and not upstream.
Final conclusion. All changes were needed in LMT.
As for the battery-polling-daemon, udev had never guaranteed allowing that process to spawn.
quoting the manpage.
RUN{type}
Add a program to the list of programs to be executed after processing all the rules for a specific event, depending on "type":
"program"
Execute an external program specified as the assigned value. If no absolute path is given, the program is expected to live in /lib/udev; otherwise, the absolute path must
be specified.
This is the default if no type is specified.
"builtin"
As program, but use one of the built-in programs rather than an external one.
The program name and following arguments are separated by spaces. Single quotes can be used to specify arguments with spaces.
This can only be used for very short-running foreground tasks. Running an event process for a long period of time may block all further events for this or a dependent device.
Starting daemons or other long-running processes is not appropriate for udev; the forked processes, detached or not, will be unconditionally killed after the event handling
has finished.
This issue is all resolved now. With the 1.68 release, Laptop Mode Tools will work well integrated with systemd, which is the future. This bug should be closed along with the release of 1.68. Till then, it is under test on my machines.
Many thanks to Michael Biebl for patiently working with me, and answering most of my questions.
1.68 released.
With systemd, I believe battery-level-polling module is not coming into effect.
Find some time to investigate it. Easiest start would be to try with a machine without systemd.