Linux Ubuntu bionic xfce
It is a fan control that controls the fan, but when I suspend it, the setting is reset for some reason. Here is the solution:
Create a shell under system-sleep
of systemd
that specifies the behavior when returning from suspend. (The name can be anything.)
/lib/systemd/system-sleep/fancontrol-restart
#!/bin/bash
case "$1" in
post)
exec service fancontrol restart;;
esac
Create a service that executes systemctl
after suspend.target is started
/lib/systemd/system/restart-systemd
[Unit]
Description=restart systemctl
After=suspend.target
[Service]
Type=oneshot
ExecStart=/usr/bin/systemctl restart fancontrol
[Install]
WantedBy=suspend.target