I created a file powertop.service and placed it in /etc/systemd/system. It looks like this:
- Code: Select all
[Unit]
Description=Powertop tunings
[Service]
Type=oneshot
ExecStart=/usr/sbin/powertop --auto-tune
[Install]
WantedBy=multi-user.target
I enabled the service with:
systemctl enable powertop
I rebooted but the powertop service did not work properly.
- Code: Select all
# systemctl status powertop
● powertop.service - Powertop tunings
Loaded: loaded (/etc/systemd/system/powertop.service; enabled)
Active: failed (Result: exit-code) since Mon 2016-07-25 13:41:48 CDT; 2min 27s ago
Process: 864 ExecStart=/usr/sbin/powertop --auto-tune (code=exited, status=1/FAILURE)
Main PID: 864 (code=exited, status=1/FAILURE)
Jul 25 13:41:47 localhost powertop[864]: Loaded 67 prior measurements
Jul 25 13:41:48 localhost powertop[864]: Error opening terminal: unknown.
Jul 25 13:41:48 localhost powertop[864]: Cannot load from file /var/cache/powertop/saved_para...top
Jul 25 13:41:48 localhost powertop[864]: RAPL device for cpu 0
Jul 25 13:41:48 localhost powertop[864]: RAPL device for cpu 0
Jul 25 13:41:48 localhost powertop[864]: Cannot load from file /var/cache/powertop/saved_para...top
Jul 25 13:41:48 localhost systemd[1]: powertop.service: main process exited, code=exited, st...LURE
Jul 25 13:41:48 localhost systemd[1]: Failed to start Powertop tunings.
Jul 25 13:41:48 localhost systemd[1]: Unit powertop.service entered failed state.
Jul 25 13:41:48 localhost systemd[1]: powertop.service failed.
Hint: Some lines were ellipsized, use -l to show in full.