Auto-cpufreq keeps terminating itself

Hello Garuda users.

I recently installed auto_cpufreq from garuda assistant and enabled it (from assistant). However, the program seems to keep terminating itself. I tried deactivating and re enabling the service from systemctl thinking that was the issue but that doesn't seem to be it, as the program still quits itself whenever I log out, or after a fix time (around 24hrs approx.) Here is the systemctl status of the daemon:

○ auto-cpufreq.service - auto-cpufreq - Automatic CPU speed & power optimizer for Linux
Loaded: loaded (/usr/lib/systemd/system/auto-cpufreq.service; enabled; preset: disabled)
Active: inactive (dead) since Sun 2022-12-18 10:43:57 IST; 15min ago
Duration: 19h 35min 53.547s
Process: 68129 ExecStart=/usr/bin/auto-cpufreq --daemon (code=killed, signal=TERM)
Main PID: 68129 (code=killed, signal=TERM)
CPU: 14min 45.605s

Dec 17 15:08:04 siddharth systemd[1]: Started auto-cpufreq - Automatic CPU speed & power optimizer for Linux.
Dec 18 10:43:57 siddharth systemd[1]: Stopping auto-cpufreq - Automatic CPU speed & power optimizer for Linux>
Dec 18 10:43:57 siddharth systemd[1]: auto-cpufreq.service: Deactivated successfully.
Dec 18 10:43:57 siddharth systemd[1]: Stopped auto-cpufreq - Automatic CPU speed & power optimizer for Linux.
Dec 18 10:43:57 siddharth systemd[1]: auto-cpufreq.service: Consumed 14min 45.605s CPU time.

I have attached my garuda assistant's setting page's screenshot as well incase some config here is messing with it:

inxi:

System:
  Kernel: 6.0.12-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 12.2.0
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
    root=UUID=6a7bcee6-f3ae-4c03-b6b0-7cb27fb4c8d4 rw [email protected]
    quiet quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0
    resume=UUID=1b9b6f2d-a19b-4eee-b2bf-6af31dfdf566 loglevel=3 ibt=off
  Desktop: KDE Plasma v: 5.26.4 tk: Qt v: 5.15.7 info: latte-dock
    wm: kwin_x11 vt: 1 dm: SDDM Distro: Garuda Linux base: Arch Linux
Machine:
  Type: Convertible System: LENOVO product: 81X1 v: IdeaPad Flex 5 14IIL05
    serial: <superuser required> Chassis: type: 31 v: IdeaPad Flex 5 14IIL05
    serial: <superuser required>
  Mobo: LENOVO model: LNVNB161216 v: SDK0Q55722 WIN
    serial: <superuser required> UEFI: LENOVO v: ECCN41WW date: 06/27/2022
Battery:
  ID-1: BAT0 charge: 39.5 Wh (89.8%) condition: 44.0/52.6 Wh (83.6%)
    volts: 12.2 min: 11.5 model: Sunwoda L19D3PD6 type: Li-poly serial: <filter>
    status: discharging cycles: 1285
  Device-1: wacom_battery_0 model: Wacom HID 5218 serial: N/A charge: 0%
    rechargeable: yes status: N/A
CPU:
  Info: model: Intel Core i7-1065G7 bits: 64 type: MT MCP arch: Ice Lake
    gen: core 10 level: v4 note: check built: 2019-21 process: Intel 10nm
    family: 6 model-id: 0x7E (126) stepping: 5 microcode: 0xB6
  Topology: cpus: 1x cores: 4 tpc: 2 threads: 8 smt: enabled cache:
    L1: 320 KiB desc: d-4x48 KiB; i-4x32 KiB L2: 2 MiB desc: 4x512 KiB L3: 8 MiB
    desc: 1x8 MiB
  Speed (MHz): avg: 979 high: 1001 min/max: 400/3900 scaling:
    driver: intel_pstate governor: powersave cores: 1: 1000 2: 855 3: 1000
    4: 976 5: 1000 6: 1000 7: 1000 8: 1001 bogomips: 23961
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data mitigation: Clear CPU buffers; SMT vulnerable
  Type: retbleed mitigation: Enhanced IBRS
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: Enhanced IBRS, IBPB: conditional, RSB
    filling, PBRSB-eIBRS: SW sequence
  Type: srbds mitigation: Microcode
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel Iris Plus Graphics G7 vendor: Lenovo driver: i915 v: kernel
    arch: Gen-11 process: Intel 10nm built: 2019-21 ports: active: eDP-1
    empty: DP-1, DP-2, DP-3, HDMI-A-1 bus-ID: 00:02.0 chip-ID: 8086:8a52
    class-ID: 0300
  Device-2: NVIDIA GP108M [GeForce MX330] vendor: Lenovo driver: nvidia
    v: 525.60.11 alternate: nouveau,nvidia_drm non-free: 525.xx+
    status: current (as of 2022-12) arch: Pascal code: GP10x
    process: TSMC 16nm built: 2016-21 pcie: gen: 1 speed: 2.5 GT/s lanes: 4
    link-max: gen: 3 speed: 8 GT/s bus-ID: 01:00.0 chip-ID: 10de:1d16
    class-ID: 0302
  Device-3: Acer Integrated Camera type: USB driver: uvcvideo bus-ID: 3-2:2
    chip-ID: 5986:212a class-ID: 0e02
  Display: x11 server: X.Org v: 21.1.5 with: Xwayland v: 22.1.6
    compositor: kwin_x11 driver: X: loaded: modesetting,nvidia unloaded: nouveau
    alternate: fbdev,intel,nv,vesa dri: iris gpu: i915 display-ID: :0
    screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.00x11.22")
    s-diag: 582mm (22.93")
  Monitor-1: eDP-1 model: ChiMei InnoLux 0x1406 built: 2019 res: 1920x1080
    hz: 60 dpi: 158 gamma: 1.2 size: 309x173mm (12.17x6.81") diag: 354mm (13.9")
    ratio: 16:9 modes: 1920x1080
  API: OpenGL v: 4.6 Mesa 22.3.1 renderer: Mesa Intel Iris Plus Graphics
    (ICL GT2) direct render: Yes
Audio:
  Device-1: Intel Ice Lake-LP Smart Sound Audio vendor: Lenovo
    driver: sof-audio-pci-intel-icl
    alternate: snd_hda_intel,snd_sof_pci_intel_icl bus-ID: 00:1f.3
    chip-ID: 8086:34c8 class-ID: 0401
  Sound API: ALSA v: k6.0.12-zen1-1-zen running: yes
  Sound Server-1: PulseAudio v: 16.1 running: no
  Sound Server-2: PipeWire v: 0.3.63 running: yes
Network:
  Device-1: Intel Ice Lake-LP PCH CNVi WiFi driver: iwlwifi v: kernel
    bus-ID: 00:14.3 chip-ID: 8086:34f0 class-ID: 0280
  IF: wlp0s20f3 state: up mac: <filter>
Bluetooth:
  Device-1: Intel AX201 Bluetooth type: USB driver: btusb v: 0.8
    bus-ID: 3-10:4 chip-ID: 8087:0026 class-ID: e001
  Report: bt-adapter ID: hci0 rfk-id: 8 state: down
    bt-service: enabled,running rfk-block: hardware: no software: yes
    address: <filter>
Drives:
  Local Storage: total: 476.94 GiB used: 34.06 GiB (7.1%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung
    model: MZALQ512HALU-000L2 size: 476.94 GiB block-size: physical: 512 B
    logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
    rev: 3L1QFXV7 temp: 60.9 C scheme: GPT
Partition:
  ID-1: / raw-size: 459.82 GiB size: 459.82 GiB (100.00%)
    used: 34.05 GiB (7.4%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 608 KiB (0.2%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
  ID-3: /home raw-size: 459.82 GiB size: 459.82 GiB (100.00%)
    used: 34.05 GiB (7.4%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-4: /var/log raw-size: 459.82 GiB size: 459.82 GiB (100.00%)
    used: 34.05 GiB (7.4%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-5: /var/tmp raw-size: 459.82 GiB size: 459.82 GiB (100.00%)
    used: 34.05 GiB (7.4%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
Swap:
  Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: zram size: 15.29 GiB used: 1.42 GiB (9.3%)
    priority: 100 dev: /dev/zram0
  ID-2: swap-2 type: partition size: 16.82 GiB used: 0 KiB (0.0%)
    priority: -2 dev: /dev/nvme0n1p3 maj-min: 259:3
Sensors:
  System Temperatures: cpu: 59.0 C mobo: N/A
  Fan Speeds (RPM): N/A
Info:
  Processes: 313 Uptime: 1d 8h 58m wakeups: 37 Memory: 15.29 GiB
  used: 7.09 GiB (46.3%) Init: systemd v: 252 default: graphical
  tool: systemctl Compilers: gcc: 12.2.0 Packages: pm: pacman pkgs: 1327
  libs: 353 tools: octopi,pamac,paru Shell: fish v: 3.5.1 default: Bash
  v: 5.1.16 running-in: konsole inxi: 3.3.24
e[1;34mGaruda (2.6.10-1):e[0m
e[1;34m  System install date:e[0m     2022-11-12
e[1;34m  Last full system update:e[0m 2022-12-18 e[1;31m↻
e[1;34m  Is partially upgraded:  e[0m No
e[1;34m  Relevant software:      e[0m NetworkManager
e[1;34m  Windows dual boot:      e[0m Probably (Run as root to verify)
e[1;34m  Snapshots:              e[0m Snapper
e[1;34m  Failed units:           e[0m 

Try to remove the flag on the other packages:
powersave-tweaks, power-profiles daemon, thermald and their services enabled and reboot.

I did as you said however apart from the other services that started normally the auto-cpufreq.service stayed inactive despite being enabled.

systemctl status auto-cpufreq.service
○ auto-cpufreq.service - auto-cpufreq - Automatic CPU speed & power optimizer for Linux
Loaded: loaded (/usr/lib/systemd/system/auto-cpufreq.service; enabled; preset: disabled)
Active: inactive (dead)

Try to reinstall it

sudo pacman -S auto-cpufreq 

Please consider that I see several open issues upstream

Although probably in chaotic-aur we still have 1.9.6, not 1.9.7 as in AUR, which is bringing several issues
https://aur.archlinux.org/packages/auto-cpufreq

1 Like

Actually we have 1.9.7-1 in chaotic aur as well. I tried reinstalling the software but same problem the service didn't restart after reboot.

pacman -Si auto-cpufreq
Repository      : chaotic-aur
Name            : auto-cpufreq
Version         : 1.9.7-1
Description     : Automatic CPU speed & power optimizer
Architecture    : any
URL             : https://github.com/AdnanHodzic/auto-cpufreq
Licenses        : LGPL3
Groups          : None
Provides        : None
Depends On      : python-distro  python-psutil  python-click  dmidecode
Optional Deps   : cpufreqctl: CPU Power Manager
gnome-shell-extension-cpufreq: CPU Power Manager for GNOME Shell
thermald: recommended to have running alongside by upstream
Conflicts With  : None
Replaces        : None
Download Size   : 44.73 KiB
Installed Size  : 185.82 KiB
Packager        : Nico Jensch <[email protected]>
Build Date      : Monday 05 December 2022 02:39:37 PM
Validated By    : MD5 Sum  SHA-256 Sum  Signature

But I think I found the problem:
When I restarted auto-cpufreq.service power-profiles-daemon.service gets deactivated and vice versa. activating power-profiles-daemon makes auto-cpufreq terminate.

systemctl status power-profiles-daemon.service
● power-profiles-daemon.service - Power Profiles daemon
Loaded: loaded (/usr/lib/systemd/system/power-profiles-daemon.service; enabled; preset: disabled)
Active: active (running) since Sun 2022-12-18 14:33:02 IST; 46s ago
Main PID: 4438 (power-profiles-)
Tasks: 3 (limit: 18724)
Memory: 3.4M
CPU: 64ms
CGroup: /system.slice/power-profiles-daemon.service
└─4438 /usr/lib/power-profiles-daemon

Dec 18 14:33:02 siddharth systemd[1]: Starting Power Profiles daemon...
Dec 18 14:33:02 siddharth systemd[1]: Started Power Profiles daemon.

╭─[email protected] in ~ took 15ms
84%
╰─λ systemctl restart auto-cpufreq.service

╭─[email protected] in ~ took 6s
85%
╰─λ systemctl status auto-cpufreq.service
● auto-cpufreq.service - auto-cpufreq - Automatic CPU speed & power optimizer for Linux
Loaded: loaded (/usr/lib/systemd/system/auto-cpufreq.service; enabled; preset: disabled)
Active: active (running) since Sun 2022-12-18 14:34:14 IST; 14s ago
Main PID: 4648 (auto-cpufreq)
Tasks: 1 (limit: 18724)
Memory: 18.0M
CPU: 869ms
CGroup: /system.slice/auto-cpufreq.service
└─4648 /usr/bin/python /usr/bin/auto-cpufreq --daemon

Dec 18 14:34:14 siddharth systemd[1]: Started auto-cpufreq - Automatic CPU speed & power optimizer for Linux.

╭─[email protected] in ~ took 15ms
85%
╰─λ systemctl status power-profiles-daemon.service
○ power-profiles-daemon.service - Power Profiles daemon
Loaded: loaded (/usr/lib/systemd/system/power-profiles-daemon.service; enabled; preset: disabled)
Active: inactive (dead) since Sun 2022-12-18 14:34:14 IST; 19s ago
Duration: 1min 12.666s
Process: 4438 ExecStart=/usr/lib/power-profiles-daemon (code=killed, signal=TERM)
Main PID: 4438 (code=killed, signal=TERM)
CPU: 66ms

Dec 18 14:33:02 siddharth systemd[1]: Starting Power Profiles daemon...
Dec 18 14:33:02 siddharth systemd[1]: Started Power Profiles daemon.
Dec 18 14:34:14 siddharth systemd[1]: Stopping Power Profiles daemon...
Dec 18 14:34:14 siddharth systemd[1]: power-profiles-daemon.service: Deactivated successfully.
Dec 18 14:34:14 siddharth systemd[1]: Stopped Power Profiles daemon.

Yes, that's the intended behaviour, to use one of the two. That's why I suggested to remove the other flags.
Considering the open issues, if auto-cpufreq still has problems after disabling power-profiles daemon, I'd keep the latter for a while.

3 Likes

Hmm, I am assuming that by removing the flag you mean the unticking the checkbox next to it in garuda assistant right? I tried doing that to power-profiles-daemon.service but after reboot it still started running despite being disabled and I suppose because of that auto-cpufreq terminated.


Unchecking the other checkboxes uninstalls those services and their dependencies. Since there was no enable/disable checkbox for Powersave tweaks I had to click the only available option which uninstalled it. But the auto-cpufreq is still terminated.

systemctl status auto-cpufreq
○ auto-cpufreq.service - auto-cpufreq - Automatic CPU speed & power optimizer for Linux
Loaded: loaded (/usr/lib/systemd/system/auto-cpufreq.service; enabled; preset: disabled)
Active: inactive (dead) since Sun 2022-12-18 15:13:21 IST; 14s ago
Duration: 11.828s
Process: 729 ExecStart=/usr/bin/auto-cpufreq --daemon (code=killed, signal=TERM)
Main PID: 729 (code=killed, signal=TERM)
CPU: 430ms

Dec 18 15:13:10 siddharth systemd[1]: Started auto-cpufreq - Automatic CPU speed & power optimizer for Linux.
Dec 18 15:13:21 siddharth systemd[1]: Stopping auto-cpufreq - Automatic CPU speed & power optimizer for Linux>
Dec 18 15:13:21 siddharth systemd[1]: auto-cpufreq.service: Deactivated successfully.
Dec 18 15:13:21 siddharth systemd[1]: Stopped auto-cpufreq - Automatic CPU speed & power optimizer for Linux.

╭─[email protected] in ~ took 4s
100%
[🔴] × systemctl status power-profiles-daemon.service
● power-profiles-daemon.service - Power Profiles daemon
Loaded: loaded (/usr/lib/systemd/system/power-profiles-daemon.service; disabled; preset: disabled)
Active: active (running) since Sun 2022-12-18 15:13:21 IST; 26s ago
Main PID: 2074 (power-profiles-)
Tasks: 3 (limit: 18724)
Memory: 3.5M
CPU: 35ms
CGroup: /system.slice/power-profiles-daemon.service
└─2074 /usr/lib/power-profiles-daemon

Dec 18 15:13:21 siddharth systemd[1]: Starting Power Profiles daemon...
Dec 18 15:13:21 siddharth systemd[1]: Started Power Profiles daemon.

looking at the github issues page upstream this is an open issue from two weeks ago. So I guess this isn't something that disabling a particular service would help with.

I guess I will go with second option of keeping power-profiles-daemon for a while.

BTW, is there any way I can install version 1.9.6 i.e, older version of this software from pacman??

I don't know if there's an easier way (apparently there's no old packages in chaotic?) than building from the old PKGBUILD
https://aur.archlinux.org/cgit/aur.git/commit/?h=auto-cpufreq&id=02b0a8071e4777ae9287c54eb9906d4146ddf647
download, tar xzf, cd, buildpkg -i.

are you by chance referring to makepkg -si because I couldn't find the above command in my man.

Sorry, makepkg. I shouldn't cite from memory...

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.