--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: cpufreqd: failed to parse profile= per CPU node at Rules section.
- From: Kyuma Ohta <whatisthis.sowhat@gmail.com>
- Date: Mon, 13 Jun 2022 14:09:42 +0900
- Message-id: <165509698275.285099.7890152343508892404.reportbug@melchior.hokkemirin.dtdns.net>
Package: cpufreqd
Version: 2.4.2-2.3
Severity: important
Dear Maintainer,
At [Rule] Section, setting profile per CPU node failes to parse cpufreqd.conf.
i.e)
profile=foo_profile -> Success.
profile=ALL:foo_profile -> Success.
profile=CPU0:foo_profile -> Failed with below log;
> init_configuration : Wrong format for Profile name "CPU0:foo_profile".
This is bug of config parser around [Rule] section.
Below is fix for this issue.
Best regards,
Ohta.
Patch:
--- cpufreqd-2.4.2.orig/src/config_parser.c
+++ cpufreqd-2.4.2/src/config_parser.c
@@ -834,7 +834,7 @@ int init_configuration(struct cpufreqd_c
strncpy(profile_name, strstr(token, ":") + 1, MAX_STRING_LEN);
cpu_num = atoi(token + 3);
- if (profile_name[0]) {
+ if (!profile_name[0]) {
clog(LOG_ERR, "Wrong format for Profile name \"%s\".\n",
token);
return -1;
-- System Information:
Debian Release: bookworm/sid
APT prefers unstable-debug
APT policy: (500, 'unstable-debug'), (500, 'stable-security'), (500, 'unstable'), (1, 'experimental-debug'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 5.18.3-homebrew-4-amd64 (SMP w/12 CPU threads; PREEMPT)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=ja_JP.UTF-8, LC_CTYPE=ja_JP.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages cpufreqd depends on:
ii libc6 2.33-7
ii libcpufreq0 008-2
ii libsensors5 1:3.6.0-7
ii libsysfs2 2.1.1-1
ii lsb-base 11.2
Versions of packages cpufreqd recommends:
ii acpid 1:2.0.33-1
Versions of packages cpufreqd suggests:
ii cpufrequtils 008-2
-- Configuration Files:
/etc/cpufreqd.conf changed:
[General]
pidfile=/run/cpufreqd.pid
poll_interval=2
verbosity=6
enable_remote=1
remote_group=cpufreq
[/General]
[sensors_plugin]
sensors_conf=/etc/sensors3.conf
[/sensors_plugin]
[Profile]
name=On Demand High
minfreq=0%
maxfreq=100%
policy=ondemand
freq_step=10
sampling_rate=10%
[/Profile]
[Profile]
name=On Demand Middle
minfreq=0%
maxfreq=75%
policy=ondemand
up_threshold=5
freq_step=5
sampling_rate=5%
[/Profile]
[Profile]
name=On Demand Low
minfreq=0%
maxfreq=15%
policy=ondemand
freq_step=5
sampling_rate=50%
[/Profile]
[Profile]
name=SCHED_Very_High
minfreq=0%
maxfreq=100%
policy=schedutil
up_threshold=15
down_threshold=5
ignore_nice_load=0
freq_step=5
sampling_rate=5%
[/Profile]
[Profile]
name=SCHED_Very_High
minfreq=0%
maxfreq=100%
policy=schedutil
up_threshold=15
down_threshold=5
ignore_nice_load=0
freq_step=5
sampling_rate=5%
[/Profile]
[Profile]
name=SCHED_High
minfreq=0%
maxfreq=85%
policy=schedutil
up_threshold=5
down_threshold=10
ignore_nice_load=0
freq_step=10
sampling_rate=5%
[/Profile]
[Profile]
name=SCHED_Middle
minfreq=0%
maxfreq=75%
policy=schedutil
freq_step=15
sampling_rate=10%
[/Profile]
[Profile]
name=SCHED_Middle_Low
minfreq=0%
maxfreq=45%
policy=schedutil
up_threshold=5
down_threshold=10
freq_step=15
sampling_rate=30%
[/Profile]
[Profile]
name=SCHED_Low
minfreq=0%
maxfreq=30%
policy=schedutil
up_threshold=5
down_threshold=5
freq_step=1
sampling_rate=45%
[/Profile]
[Profile]
name=CONSERVATIVE Very_High
minfreq=0%
maxfreq=100%
policy=conservative
ignore_nice_load=0
freq_step=5
sampling_rate=5%
[/Profile]
[Profile]
name=CONSERVATIVE High
minfreq=0%
maxfreq=85%
policy=conservative
ignore_nice_load=0
freq_step=5
sampling_rate=5%
[/Profile]
[Profile]
name=CONSERVATIVE Middle
minfreq=0%
maxfreq=75%
policy=conservative
freq_step=5
sampling_rate=10%
[/Profile]
[Profile]
name=CONSERVATIVE Middle_Low
minfreq=0%
maxfreq=45%
policy=conservative
up_threshold=5
down_threshold=10
freq_step=10
sampling_rate=30%
[/Profile]
[Profile]
name=CONSERVATIVE Low
minfreq=0%
maxfreq=30%
policy=conservative
up_threshold=5
down_threshold=5
freq_step=1
sampling_rate=45%
[/Profile]
[Profile]
name=Performance High
minfreq=70%
maxfreq=100%
policy=performance
[/Profile]
[Profile]
name=Performance Low
minfreq=0%
maxfreq=70%
policy=performance
[/Profile]
[Profile]
name=Powersave High
minfreq=0%
maxfreq=100%
policy=powersave
sampling_rate=20%
[/Profile]
[Profile]
name=Powersave Middle
minfreq=0%
maxfreq=75%
policy=powersave
sampling_rate=30%
[/Profile]
[Profile]
name=Powersave Low
minfreq=0%
maxfreq=30%
policy=powersave
sampling_rate=30%
[/Profile]
[Profile]
name=Powersave Very Low
minfreq=0%
maxfreq=20%
policy=powersave
up_threshold=65
down_threshold=5
sampling_rate=20%
[/Profile]
name=AC Rule Very_High ALL
ac=on # (on/off)
sensor=Tctl:0-77 # Uprise limit.
cpu_interval=ALL:85-100,4.0
profile=SCHED_High
[/Rule]
[Rule]
name=AC Rule High SMP0
ac=on # (on/off)
sensor=Tctl:0-77
cpu_interval=0:75-100,4.0;6:75-100,4.0
profile=CPU0:SCHED_Very_High
[/Rule]
[Rule]
name=AC Rule Middle SMP0
ac=on # (on/off)
sensor=Tctl:0-82
cpu_interval=0:12-75,6:12-75
profile=CPU0:SCHED_Middle
[/Rule]
[Rule]
name=AC Rule High SMP1
ac=on # (on/off)
sensor=Tctl:0-77
cpu_interval=1:75-100,4.0;7:75-100,4.0
profile=CPU1:SCHED_Very_High
[/Rule]
[Rule]
name=AC Rule Middle SMP1
ac=on # (on/off)
sensor=Tctl:0-82
cpu_interval=1:12-75,7:12-75
profile=CPU1:SCHED_Middle
[/Rule]
[Rule]
name=AC Rule High SMP2
ac=on # (on/off)
sensor=Tctl:0-77
cpu_interval=2:75-100,4.0;8:75-100,4.0
profile=CPU2:SCHED_Very_High
[/Rule]
[Rule]
name=AC Rule Middle SMP2
ac=on # (on/off)
sensor=Tctl:0-82
cpu_interval=2:12-75,8:12-75
profile=CPU2:SCHED_Middle
[/Rule]
[Rule]
name=AC Rule High SMP3
ac=on # (on/off)
sensor=Tctl:0-77
cpu_interval=3:75-100,4.0;9:75-100,4.0
profile=CPU3:SCHED_Very_High
[/Rule]
[Rule]
name=AC Rule Middle SMP3
ac=on # (on/off)
sensor=Tctl:0-82
cpu_interval=3:12-75,9:12-75
profile=CPU3:SCHED_Middle
[/Rule]
[Rule]
name=AC Rule High SMP4
ac=on # (on/off)
sensor=Tctl:0-77
cpu_interval=4:75-100,4.0;10:75-100,4.0
profile=CPU4:SCHED_Very_High
[/Rule]
[Rule]
name=AC Rule Middle SMP4
ac=on # (on/off)
sensor=Tctl:0-82
cpu_interval=4:12-75,10:12-75
profile=CPU4:SCHED_Middle
[/Rule]
[Rule]
name=AC Rule High SMP5
ac=on # (on/off)
sensor=Tctl:0-77
cpu_interval=5:75-100,4.0;11:75-100,4.0
profile=CPU5:SCHED_Very_High
[/Rule]
[Rule]
name=AC Rule Middle SMP5
ac=on # (on/off)
sensor=Tctl:0-82
cpu_interval=5:12-75,11:12-75
profile=CPU5:SCHED_Middle
[/Rule]
[Rule]
name=AC Rule Idol SMP0
ac=on # (on/off)
sensor=Tctl:0-82
cpu_interval=0:0-13;6:0-13
profile=CPU0:SCHED_Low
[/Rule]
[Rule]
name=AC Rule Idol SMP1
ac=on # (on/off)
sensor=Tctl:0-82
cpu_interval=1:0-13;7:0-13
profile=CPU1:SCHED_Low
[/Rule]
[Rule]
name=AC Rule Idol SMP2
ac=on # (on/off)
sensor=Tctl:0-82
cpu_interval=2:0-13;8:0-13
profile=CPU2:SCHED_Low
[/Rule]
[Rule]
name=AC Rule Idol SMP3
ac=on # (on/off)
sensor=Tctl:0-82
cpu_interval=3:0-13;9:0-13
profile=CPU3:SCHED_Low
[/Rule]
[Rule]
name=AC Rule Idol SMP4
ac=on # (on/off)
sensor=Tctl:0-82
cpu_interval=4:0-13;10:0-13
profile=CPU4:SCHED_Low
[/Rule]
[Rule]
name=AC Rule Idol SMP5
ac=on # (on/off)
sensor=Tctl:0-82
cpu_interval=5:0-13;11:0-13
profile=CPU5:SCHED_Low
[/Rule]
[Rule]
name=CPU Hot1a
sensor=Tctl:81-85
cpu_interval=70-100,4.0
profile=Powersave High
[/Rule]
[Rule]
name=CPU Hot1b
sensor=Tctl:81-85
cpu_interval=12-70,4.0
profile=Powersave Middle
[/Rule]
[Rule]
name=CPU Hot1c
sensor=Tctl:81-85
cpu_interval=ALL:0-12,4.0
profile=Powersave Low
[/Rule]
[Rule]
name=CPU Too Hot2
sensor=Tctl:85-9999
profile=Powersave Very Low
[/Rule]
-- no debconf information
--- End Message ---