Package Details: auto-cpufreq-git 1.5.5.r203.3985d3e-1

Git Clone URL: https://aur.archlinux.org/auto-cpufreq-git.git (read-only, click to copy)
Package Base: auto-cpufreq-git
Description: Automatic CPU speed & power optimizer
Upstream URL: https://github.com/AdnanHodzic/auto-cpufreq
Licenses: LGPL-3.0
Conflicts: auto-cpufreq
Provides: auto-cpufreq
Submitter: crian
Maintainer: None
Last Packager: crian
Votes: 16
Popularity: 0.053761
First Submitted: 2020-01-07 09:54 (UTC)
Last Updated: 2021-02-04 13:53 (UTC)

Pinned Comments

OlexandrCh commented on 2020-08-13 20:44 (UTC) (edited on 2020-08-13 20:44 (UTC) by OlexandrCh)

Currently, we don't need to run --install on AUR
After installing from AUR, we need to start the systemd service.
systemctl enable auto-cpufreq
systemctl start auto-cpufreq

and check if it enabled and running with
systemctl status auto-cpufreq

Latest Comments

johnjohn commented on 2022-07-13 06:54 (UTC)

I am using pyenv. To fix any installation issue, I had to change python version to system $ pyenv global system

InkedHand commented on 2022-04-10 12:43 (UTC)

I tried bobselpt's changes on the PKGBUILD and I was able to install auto-cpufreq successfully.

bobslept commented on 2021-12-25 20:59 (UTC) (edited on 2021-12-25 21:00 (UTC) by bobslept)

We use the python virtual environment on auto-cpufreq, so the current systemd service file is made for the python virtual environment.

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 85ceacc..88cae6c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -26,6 +26,18 @@ pkgver() {
 prepare() {
     cd "$srcdir/${pkgname%-git}"
     sed -i 's|usr/local|usr|g' "scripts/${pkgname%-git}.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() {
@@ -39,5 +51,5 @@ package() {
     install -Dm644 LICENSE "$pkgdir/usr/share/licenses/${pkgname%-git}/LICENSE"
     install -Dm644 README.md "$pkgdir/usr/share/doc/${pkgname%-git}/README"
     install -Dm755 scripts/cpufreqctl.sh -t "$pkgdir/usr/share/${pkgname%-git}/scripts"
-    install -Dm644 "scripts/${pkgname%-git}.service" -t "$pkgdir/usr/lib/systemd/system"
+    install -Dm644 "auto-cpufreq.service" -t "$pkgdir/usr/lib/systemd/system"
 }

rori commented on 2021-10-18 19:00 (UTC)

I ran into a problem installing this package on my system. I could not start the daemon properly using systemctl start auto-cpufreq .

The problem was pyenv, since it cause the package to be in a different location than expected. Modifying the pkgbuild and replacing python with env PATH=$(getconf PATH) python solved the problem for me.

yochananmarqos commented on 2021-08-10 15:54 (UTC)

@adrianteri: Please unflag the package.

Note: VCS packages are not considered out of date when the pkgver changes, do not flag them as the maintainer will merely unflag the package and ignore you.

https://wiki.archlinux.org/title/Arch_User_Repository#Flagging_packages_out-of-date

adrianteri commented on 2021-08-10 15:32 (UTC)

Bump up version to 1.6.4?

yochananmarqos commented on 2021-02-03 17:18 (UTC)

@crian: dmidecode is a new dependency:

https://github.com/AdnanHodzic/auto-cpufreq/commit/5d26803204bbd110185381f45277245d70ee016b

yochananmarqos commented on 2020-12-06 15:34 (UTC)

@crian: It turns out auto-cpufreq will backup /usr/bin/cpufreqctl if it finds it on first run as /usr/bin/cpufreqctl.auto-cpufreq.bak. Either way int places it's own binary as an untracked file. See here. To deal with that, add the following to the install file:

    # Remove auto-cpufreq's cpufreqctl binary
    rm /usr/bin/cpufreqctl

    # Restore original cpufreqctl binary if backup was made
    if [ -f "/usr/bin/cpufreqctl.auto-cpufreq.bak" ]; then
        mv /usr/bin/cpufreqctl.auto-cpufreq.bak /usr/bin/cpufreqctl
    fi

yochananmarqos commented on 2020-09-13 03:45 (UTC)

As of v1.3, this no longer requires inxi.

yochananmarqos commented on 2020-09-02 15:18 (UTC) (edited on 2020-09-02 15:20 (UTC) by yochananmarqos)

@crian: Oh, I see. Use this:

pkgver() {
    cd "$srcdir/${pkgname%-git}"
    local srcversion="$(grep "version: '" snap/snapcraft.yaml | cut -d "'" -f 2)"
    printf "%s.r%s.%s" $srcversion "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
1.2.2.r136.4c2670c

crian commented on 2020-09-02 14:36 (UTC) (edited on 2020-09-02 14:36 (UTC) by crian)

@yochananmarqos: because the tags couldn't be fetched. Throws out an error during the pkg build. Don't know what upstream has done to cause this.

yochananmarqos commented on 2020-09-02 13:59 (UTC)

@crian: Why did you change the pkgver()? r < 1, so it will now appear as a downgrade. Please revert the change as tags should be used.

OlexandrCh commented on 2020-08-13 20:44 (UTC) (edited on 2020-08-13 20:44 (UTC) by OlexandrCh)

Currently, we don't need to run --install on AUR
After installing from AUR, we need to start the systemd service.
systemctl enable auto-cpufreq
systemctl start auto-cpufreq

and check if it enabled and running with
systemctl status auto-cpufreq

yochananmarqos commented on 2020-08-10 01:06 (UTC)

Please remove the v from the tag with s/^v//:

pkgver() {
    cd "$srcdir/${pkgname%-git}"
    git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

yochananmarqos commented on 2020-08-06 20:14 (UTC)

inxi is also required with the --debug flag.

yochananmarqos commented on 2020-08-05 22:24 (UTC)

This no longer requires python-power, see this commit.

I had to tweak a few things, see my updated PKGBUILD.

crian commented on 2020-05-19 12:56 (UTC)

@Asutorufa fixed

yochananmarqos commented on 2020-05-18 21:26 (UTC)

@Asutorufa: That's not necessary. Just use sed to change the path:

prepare() {
    cd "$srcdir/${pkgname%-git}"
    sed -i 's|usr/local|usr|g' "scripts/${pkgname%-git}.service"
}

Asutorufa commented on 2020-05-14 02:26 (UTC)

cant start with systemctl, the /usr/local/bin/auto-cpufreq not exists, please add a link ln -s /usr/bin/auto-cpufreq /usr/local/bin/auto-cpufreq.

crian commented on 2020-03-23 08:40 (UTC)

Fixed :D

yochananmarqos commented on 2020-03-23 06:55 (UTC)

You forgot to run makepkg -o at to generate the pkgver. ;)

crian commented on 2020-03-23 06:53 (UTC)

Thanks. Done.

yochananmarqos commented on 2020-03-23 01:04 (UTC) (edited on 2020-03-23 01:06 (UTC) by yochananmarqos)

python-setuptools should be added to makedepends().

Tags are now available, please follow VCS package guidelines:

pkgver() {
    cd "$srcdir/${pkgname%-git}"
    git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
1.1.r0.gabe463c

Please also install the service in /usr/lib/systemd/system/ as symlinks will be created in /etc/systemd/system/ when the service is enabled.

crian commented on 2020-03-23 00:55 (UTC)

Updated package with the latest upstream changes.

emiliobadillio commented on 2020-03-21 01:11 (UTC)

"install: cannot stat 'auto-cpufreq.py': No such file or directory" when running makepkg -si in terminal.

procyon-lotor commented on 2020-01-18 20:37 (UTC)

Have not no. Got the psutils 1.90-1

crian commented on 2020-01-18 17:00 (UTC)

Have you uninstalled psutil?

procyon-lotor commented on 2020-01-18 16:44 (UTC)

getting this error

auto-cpufreq Traceback (most recent call last): File "/bin/auto-cpufreq", line 11, in <module> import psutil ModuleNotFoundError: No module named 'psutil'

crian commented on 2020-01-11 23:37 (UTC)

@yochananmarqos Thanks for the hint. I will change it.

yochananmarqos commented on 2020-01-11 22:43 (UTC)

Normally services are enabled / started by the user, not the package. See the Simplicity clause.

If you do enable / start services via the package, it needs to be in the install file. Do not use the repo's install or remove scripts, Pacman will install and remove the main files. See my example PKGBUILD and install file here.