We switch to a python virtual environment on auto-cpufreq on the next release, so the systemd service file is made for the python virtual environment. Just a heads up for next release that will come.
I'm not a Arch user myself, and there are maybe better ways of doings this, but this seems to fix the issue.
Hope the maintainer find this patch helpfull.
diff --git a/PKGBUILD b/PKGBUILD
index ec948a2..b495634 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -19,6 +19,18 @@ b2sums=('a1c113132edf11ed38cb835df6aeaf22da787095d1d3f8b9c8a75b45954d372b641777f
prepare() {
cd "$srcdir/$pkgname-$pkgver"
sed -i 's|usr/local|usr|g' "scripts/${pkgname}.service" auto_cpufreq/core.py
+ cat > auto-cpufreq.service <<EOF
+[Unit]
+Description=auto-cpufreq - Automatic CPU speed & power optimizer for Linux
+After=network.target network-online.target
+
+[Service]
+Type=simple
+User=root
+ExecStart=/usr/bin/auto-cpufreq --daemon
+[Install]
+WantedBy=multi-user.target
+EOF
}
build() {
@@ -32,5 +44,5 @@ package() {
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README"
install -Dm755 scripts/cpufreqctl.sh -t "$pkgdir/usr/share/$pkgname/scripts"
- install -Dm644 "scripts/$pkgname.service" -t "$pkgdir/usr/lib/systemd/system"
+ install -Dm644 "auto-cpufreq.service" -t "$pkgdir/usr/lib/systemd/system"
}
Pinned Comments
liljaylj commented on 2021-06-03 12:13 (UTC)
@coxe87b you don't need to --install daemon manually, this package contains systemd service already. instead, you need to start and enable service using:
systemctl enable --now auto-cpufreq.service