반응형
To set the logind service in systemd to poweroff when the server's state is idle, you can do the following
File: /etc/systemd/logind.conf
IdleAction=poweroff
IdleActionSec=30min
Then restart the systemd service with the command below and it will be reflected.
$ systemctl daemon-reload
$ systemctl restart systemd-logind.service
The problem here is that the determination of idle state is user interaction, so if the build goes back to the background and the user leaves the session, it will recognize it as idle and automatically turn off after 30 minutes. The workaround for this is to give the following command so that the service that goes back to the background doesn't fall into idle until it finishes.
$ systemd-inhibit --why="building" --what=idle bitbake core-image
After the bitbake core-image operation ends, idle time is counted from then on.
'Development' 카테고리의 다른 글
Thoughts on building QNX with Yocto (0) | 2024.11.24 |
---|---|
QNX and the QNX Build System (0) | 2024.11.23 |
Business Trip to China (Shanghai) - China Eastern Airlines (1) | 2024.11.18 |
Useful Commands for QNX (2) | 2024.11.16 |
To resolve the “make[5]: /bin/sh: Argument list too long” error (0) | 2024.11.14 |