Armadilloフォーラム

input-poweroffdの動作について

masakimuto

2023年2月28日 11時08分

お世話になります。
sw1を長押ししましたが、rebootもshutdownにもなりませんでした。
input-poweroffdがinactiveになっていることが原因かと存じますが、回避方法はございますでしょうか?

ご教示いただけますと幸いでございます。

root@armadillo:~# uname -a
Linux armadillo 4.9.133-at21 #2 SMP PREEMPT Tue Jul 27 08:24:15 JST 2021 armv7l GNU/Linux
root@armadillo:~# systemctl status input-poweroffd
● input-poweroffd.service - input event poweroff daemon
Loaded: loaded (/lib/systemd/system/input-poweroffd.service; enabled; vendor
Active: inactive (dead) since Tue 2023-02-28 10:49:37 JST; 6min ago
Process: 2297 ExecStart=/usr/bin/input-poweroff start (code=exited, status=0/S
Process: 2389 ExecStop=/usr/bin/input-poweroff stop (code=exited, status=0/SUC
Main PID: 2330 (code=exited, status=0/SUCCESS)

Feb 28 10:49:36 armadillo systemd[1]: Starting input event poweroff daemon...
Feb 28 10:49:37 armadillo systemd[1]: Started input event poweroff daemon.
Feb 28 10:49:37 armadillo systemd[1]: input-poweroffd.service: Succeeded.
root@armadillo:~# systemctl start input-poweroffd
root@armadillo:~# systemctl status input-poweroffd
● input-poweroffd.service - input event poweroff daemon
Loaded: loaded (/lib/systemd/system/input-poweroffd.service; enabled; vendor
Active: inactive (dead) since Tue 2023-02-28 10:56:19 JST; 3s ago
Process: 3000 ExecStart=/usr/bin/input-poweroff start (code=exited, status=0/S
Process: 3034 ExecStop=/usr/bin/input-poweroff stop (code=exited, status=0/SUC
Main PID: 3028 (code=exited, status=0/SUCCESS)

Feb 28 10:56:19 armadillo systemd[1]: Starting input event poweroff daemon...
Feb 28 10:56:19 armadillo systemd[1]: Started input event poweroff daemon.
Feb 28 10:56:19 armadillo systemd[1]: input-poweroffd.service: Succeeded.

コメント

at_mizo

2023年2月28日 14時07分

溝渕です。

> sw1を長押ししましたが、rebootもshutdownにもなりませんでした。
> input-poweroffdがinactiveになっていることが原因かと存じますが、回避方法はございますでしょうか?

input-poweroffdはArmadillo-IoT G3L用のソフトウェアなので、Armadillo-IoT G3ではカスタマイズする必要があります。

Armadillo-IoT G3LとArmadillo-IoT G3の違いはキーコードで、それぞれのSW1のキーコードは次のようになっています。

Armadillo-IoT G3L: KEY_POWER2
Armadillo-IoT G3: KEY_1

input-poweroffdが扱うデフォルトのキーコードはKEY_POWER2ですので、Armadillo-IoT G3ではそのまま利用できません。

以下のフォーラムはArmadillo-X1に対してのものですが、Armadillo-IoT G3にも適用可能です。参考にしてみてください。

https://armadillo.atmark-techno.com/forum/armadillo/3465

masakimuto

2023年2月28日 15時21分

溝渕様
ありがとうございます。
/lib/systemd/system/input-poweroffd.service
を下記の内容に変更したところ、動作いたしました。

[Service]
Type=simple
ExecStart=/usr/sbin/input-poweroffd -d /dev/input/event1 -k KEY_1