JHrenyk / Undervolt-Timer

6 stars 0 forks source link

Undervolt service starts immediately at startup #1

Open vincetran96 opened 5 years ago

vincetran96 commented 5 years ago

Thank you for your script!

I used your script to configure my undervolt service and timer. The undervolt service starts immediately after booting without waiting for two minutes as in the timer. I wonder what could be the reason. Here are their contents:

/etc/systemd/system/undervolt.service

[Unit]
Description=undervolt
After=suspend.target
After=hibernate.target
After=hybrid-sleep.target

[Service]
# Type=oneshot
# If you have installed undervolt globally (via sudo pip install):
ExecStart=/usr/bin/sudo undervolt -v --core -100 --cache -100 --gpu -50 --temp 70
# If you want to run from source:
# ExecStart=/path/to/undervolt.py -v --core -150 --cache -150 --gpu -100

[Install]
WantedBy=suspend.target
WantedBy=hibernate.target
WantedBy=hybrid-sleep.target
WantedBy=multi-user.target

/etc/systemd/system/undervolt.timer

[Unit]
Description=Apply undervolt settings

[Timer]
Unit=undervolt.service
# Wait 2 minutes after boot before first applying
OnBootSec=2min
# Run every 900 seconds
# OnUnitActiveSec=900

[Install]
WantedBy=multi-user.target
WantedBy=timers.target
isaacl commented 5 years ago

I think it's your WantedBy=multi-user.target in undervolt.service