# cpufreqd error

## tane_stelzer

I followed this guide http://www.gentoo.org/doc/en/power-management-guide.xml, but on booting there seem to be some errors when starting cpufreqd, i dont know what the errors are and i dont know how to check, But once i have booted and logged in the cpu always works at 100% and it isnt steping at all? Has someone had the same problem.

Tane

----------

## acturneruk

Have you checked dmesg for errors?

```
dmesg | grep -i powernow
```

...or something like that.

Andrew

----------

## tane_stelzer

```
ubuntu / # dmesg | grep -i powernow

ubuntu / # 

```

That command doesnt tell me anything at all???

----------

## acturneruk

Okay then, try

```
dmesg
```

and wade through the output until you see something relevant.  Maybe powernow is the wrong keyword for your processor.  I wouldn't know, as you haven't said.

----------

## tane_stelzer

it tells me sth but that is not what i looking for, you when you boot up and then near the end you always get this loading inits( i think) and it always says ok in green, well there is an error there

how can i check so i can post the error here? 

tane

----------

## acturneruk

Have you looked in the /var/log directory for the relevant log file?  I'm not at my machine right now, so I'm not sure which one off the top of my head.

----------

## tane_stelzer

OK i found what i wanted to post so here is the error

```
Jan 16 18:34:50 gentoo (root-32421): Resolved address "xml:readonly:/etc/gconf/g

conf.xml.defaults" to a read-only configuration source at position 2

Jan 16 18:37:20 gentoo (root-32421): GConf server is not in use, shutting down.

Jan 16 18:37:20 gentoo (root-32421): Exiting

Jan 16 18:37:46 gentoo cpufreqd: parse_config_general     : Found an unclosed [G

eneral] section, please review your cpufreqd.conf file

Jan 16 18:37:46 gentoo cpufreqd: apm_init                 : /proc/apm: No such f

ile or directory

Jan 16 18:37:46 gentoo cpufreqd: load_plugin_list         : discarded plugin apm

Jan 16 18:37:46 gentoo cpufreqd: parse_config_profile     : Found an unclosed [P

rofile] section, please review your cpufreqd.conf file

Jan 16 18:37:46 gentoo cpufreqd: parse_config_profile     : Found an unclosed [P

rofile] section, please review your cpufreqd.conf file

Jan 16 18:37:46 gentoo cpufreqd: parse_config_profile     : Found an unclosed [P

rofile] section, please review your cpufreqd.conf file

Jan 16 18:37:46 gentoo cpufreqd: parse_config_profile     : Found an unclosed [P

rofile] section, please review your cpufreqd.conf file

Jan 16 18:37:46 gentoo cpufreqd: plugin_handle_keyword    : unandled keyword "ac

". Discarded

Jan 16 18:37:46 gentoo cpufreqd: parse_config_rule        : WARNING! skipping co

nfig option "ac"

Jan 16 18:37:46 gentoo cpufreqd: parse_config_rule        : Found an unclosed [R

ule] section, please review your cpufreqd.conf file

Jan 16 18:37:46 gentoo cpufreqd: init_configuration       : [Rule] name "battery

" has no options. Discarded.

Jan 16 18:37:46 gentoo cpufreqd: plugin_handle_keyword    : unandled keyword "ac

". Discarded

Jan 16 18:37:46 gentoo cpufreqd: parse_config_rule        : WARNING! skipping co

nfig option "ac"

Jan 16 18:37:46 gentoo cpufreqd: plugin_handle_keyword    : unandled keyword "ba

ttery_interval". Discarded

Jan 16 18:37:46 gentoo cpufreqd: parse_config_rule        : WARNING! skipping co

nfig option "battery_interval"

Jan 16 18:37:46 gentoo cpufreqd: parse_config_rule        : Found an unclosed [R

ule] section, please review your cpufreqd.conf file

Jan 16 18:37:46 gentoo cpufreqd: init_configuration       : [Rule] name "battery

_low" has no options. Discarded.

Jan 16 18:37:46 gentoo cpufreqd: plugin_handle_keyword    : unandled keyword "ac

". Discarded

Jan 16 18:37:46 gentoo cpufreqd: parse_config_rule        : WARNING! skipping co

nfig option "ac"

Jan 16 18:37:46 gentoo cpufreqd: init_configuration       : [Rule] name "ac" has

 no options. Discarded.

Jan 16 18:37:46 gentoo cpufreqd: init_configuration       : ERROR! No rules foun

d!

Jan 16 18:37:46 gentoo cpufreqd: main                     : Unable to parse conf

ig file: /etc/cpufreqd.conf

Jan 16 18:37:50 gentoo atkbd.c: Unknown key pressed (translated set 2, code 0xf4

 on isa0060/serio0).

Jan 16 18:37:50 gentoo atkbd.c: Use 'setkeycodes e074 <keycode>' to make it know

n.
```

I hope this can help you, cos i dont get it[/quote]

----------

## acturneruk

Have you checked your cpufreqd.conf file, like it says in the log?  Can you post it here?

----------

## tane_stelzer

Ok here it is

```

[General]

pidfile=/var/run/cpufreqd.pid

poll_interval=2

pm_type=acpi

verbosity=5

[Profile]

name=ondemand

minfreq=0%

maxfreq=95%

policy=ondemand

[Profile]

name=conservative

minfreq=0%

maxfreq=70%

policy=conservative

[Profile]

name=powersave

minfreq=0%

maxfreq=50%

policy=powersave

[Profile]

name=performance

minfreq=0%

maxfreq=100%

policy=performance

[Rule]

name=battery

ac=off

profile=conservative

[Rule]

name=battery_low

ac=off

battery_interval=0-10

profile=powersave

[Rule]

name=ac

ac=on

profile=ondemand

```

I hope that will help you

----------

## acturneruk

Unfortunately, I don't use cpufreqd - I use cpufrequtils, which I find much easier - so somene else me be better informed to help you.  But, just as a thought,  do you have the cpufreq govenors listed in your conf (ondemand, conservative etc) file selected in your kernel?

Cheers,

AndrewLast edited by acturneruk on Tue Jan 17, 2006 2:27 pm; edited 1 time in total

----------

## acturneruk

I have these, by the way:-

```
CONFIG_CPU_FREQ=y

CONFIG_CPU_FREQ_TABLE=y

CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y

CONFIG_CPU_FREQ_GOV_PERFORMANCE=y

CONFIG_CPU_FREQ_GOV_POWERSAVE=y

CONFIG_CPU_FREQ_GOV_USERSPACE=y

CONFIG_CPU_FREQ_GOV_ONDEMAND=y

CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y

CONFIG_X86_ACPI_CPUFREQ=y

CONFIG_X86_ACPI_CPUFREQ_PROC_INTF=y
```

HTH

----------

## tane_stelzer

they are in your cpufreqd.conf???

Is my config right, or do i have to add what you have???

----------

## acturneruk

No, in the kernel configuration.  Try

```
cat /usr/src/linux/.config | grep -i freq
```

to see if you have them compiled in your kernel.

----------

## Earthwings

You're using cpufreqd-2.0.0 and the format for the config file has changed since cpufreqd-1.x. Now you need to close all [Profile] sections etc. with ending tags like [/Profile]. See http://dev.gentoo.org/~earthwings/pmg/power-management-guide.html#doc_chap3 for the new format.

----------

## tane_stelzer

That helped me with some of the errors but still there are some remaining here they are?

```
Jan 16 18:34:50 gentoo (root-32421): starting (version 2.10.1), pid 32421 user 'root'

Jan 16 18:34:50 gentoo (root-32421): Resolved address "xml:readonly:/etc/gconf/gconf.xml.mandatory" to a read-only configuration source at position 0

Jan 16 18:34:50 gentoo (root-32421): Resolved address "xml:readwrite:/root/.gconf" to a writable configuration source at position 1

Jan 16 18:34:50 gentoo (root-32421): Resolved address "xml:readonly:/etc/gconf/gconf.xml.defaults" to a read-only configuration source at position 2

Jan 16 18:37:20 gentoo (root-32421): GConf server is not in use, shutting down.

Jan 16 18:37:20 gentoo (root-32421): Exiting

Jan 16 18:37:46 gentoo cpufreqd: parse_config_general     : Found an unclosed [General] section, please review your cpufreqd.conf file

Jan 16 18:37:46 gentoo cpufreqd: apm_init                 : /proc/apm: No such file or directory

Jan 16 18:37:46 gentoo cpufreqd: load_plugin_list         : discarded plugin apm

Jan 16 18:37:46 gentoo cpufreqd: parse_config_profile     : Found an unclosed [Profile] section, please review your cpufreqd.conf file

Jan 16 18:37:46 gentoo cpufreqd: parse_config_profile     : Found an unclosed [Profile] section, please review your cpufreqd.conf file

Jan 16 18:37:46 gentoo cpufreqd: parse_config_profile     : Found an unclosed [Profile] section, please review your cpufreqd.conf file

Jan 16 18:37:46 gentoo cpufreqd: parse_config_profile     : Found an unclosed [Profile] section, please review your cpufreqd.conf file

Jan 16 18:37:46 gentoo cpufreqd: plugin_handle_keyword    : unandled keyword "ac". Discarded

Jan 16 18:37:46 gentoo cpufreqd: parse_config_rule        : WARNING! skipping config option "ac"

Jan 16 18:37:46 gentoo cpufreqd: parse_config_rule        : Found an unclosed [Rule] section, please review your cpufreqd.conf file

Jan 16 18:37:46 gentoo cpufreqd: init_configuration       : [Rule] name "battery" has no options. Discarded.

Jan 16 18:37:46 gentoo cpufreqd: plugin_handle_keyword    : unandled keyword "ac". Discarded

Jan 16 18:37:46 gentoo cpufreqd: parse_config_rule        : WARNING! skipping config option "ac"

Jan 16 18:37:46 gentoo cpufreqd: plugin_handle_keyword    : unandled keyword "battery_interval". Discarded

Jan 16 18:37:46 gentoo cpufreqd: parse_config_rule        : WARNING! skipping config option "battery_interval"

Jan 16 18:37:46 gentoo cpufreqd: parse_config_rule        : Found an unclosed [Rule] section, please review your cpufreqd.conf file

Jan 16 18:37:46 gentoo cpufreqd: init_configuration       : [Rule] name "battery_low" has no options. Discarded.

Jan 16 18:37:46 gentoo cpufreqd: plugin_handle_keyword    : unandled keyword "ac". Discarded

Jan 16 18:37:46 gentoo cpufreqd: parse_config_rule        : WARNING! skipping config option "ac"

Jan 16 18:37:46 gentoo cpufreqd: init_configuration       : [Rule] name "ac" has no options. Discarded.

Jan 16 18:37:46 gentoo cpufreqd: init_configuration       : ERROR! No rules found!

Jan 16 18:37:46 gentoo cpufreqd: main                     : Unable to parse config file: /etc/cpufreqd.conf

Jan 16 18:37:50 gentoo atkbd.c: Unknown key pressed (translated set 2, code 0xf4 on isa0060/serio0).

Jan 16 18:37:50 gentoo atkbd.c: Use 'setkeycodes e074 <keycode>' to make it known.

Jan 16 18:37:50 gentoo atkbd.c: Unknown key released (translated set 2, code 0xf4 on isa0060/serio0).

```

----------

## Earthwings

Please post your /etc/cpufreqd.conf.

----------

## tane_stelzer

Here it is

```
[General]

pidfile=/var/run/cpufreqd.pid

poll_interval=2

enable_plugins=acpi_ac, acpi_battery

verbosity=5

[/General]

[Profile]

name=ondemand

minfreq=0%

maxfreq=95%

policy=ondemand

[/Profile]

[Profile]

name=conservative

minfreq=0%

maxfreq=70%

policy=conservative

[/Profile]

[Profile]

name=powersave

minfreq=0%

maxfreq=50%

policy=powersave

[/Profile]

[Profile]

name=performance

minfreq=0%

maxfreq=100%

policy=performance

[/Profile]

[Rule]

name=battery

ac=off

profile=conservative

[/Rule]

[Rule]

name=battery_low

ac=off

battery_interval=0-10

profile=powersave

[/Rule]

[Rule]

name=ac

ac=on

profile=ondemand

[/Rule]
```

----------

## Earthwings

The error messages and the config file don't really fit together. E.g., you don't list the apm plugin, but it tries to initialize it. Furthermore all [Profile], [Rule] sections are closed. Try to run cpufreqd by hand and check the output. I think you can also specify the config file as parameter, try that.

----------

## tane_stelzer

What do you mean try as a parameter i dont understand i will try to run it manually and tell you the result

----------

## Earthwings

I mean run it like 

```
cpufreqd --no-daemon --file=/etc/cpufreqd.conf
```

----------

## tane_stelzer

OKay i havent tried the parameter  but i tried

```
/etc/init.d/cpufregd.conf start
```

that told em that its already running so i tried

```
/etc/init.d/cpufregd.conf stop
```

it just daemon stopping and then [!!] but not [ok]

then i tried to start again and it said its still running, i will try to start it with parameters

----------

## tane_stelzer

okay the out put of

```
cpufreqd --no-daemon --file=/etc/cpufreqd.conf
```

is here

```
gentoo ~ # cpufreqd --no-daemon --file=/etc/cpufreqd.conf

load_plugin              : /usr/lib/cpufreqd_acpi_ac.so: cannot open shared obj$

load_plugin_list         : discarded plugin acpi_ac

load_plugin              : /usr/lib/cpufreqd_acpi_battery.so: cannot open share$

load_plugin_list         : discarded plugin acpi_battery

plugin_handle_keyword    : unandled keyword "ac". Discarded

parse_config_rule        : WARNING! skipping config option "ac"

init_configuration       : [Rule] name "battery" has no options. Discarded.

plugin_handle_keyword    : unandled keyword "ac". Discarded

parse_config_rule        : WARNING! skipping config option "ac"

plugin_handle_keyword    : unandled keyword "battery_interval". Discarded

parse_config_rule        : WARNING! skipping config option "battery_interval"

init_configuration       : [Rule] name "battery_low" has no options. Discarded.

plugin_handle_keyword    : unandled keyword "ac". Discarded

parse_config_rule        : WARNING! skipping config option "ac"

init_configuration       : [Rule] name "ac" has no options. Discarded.

init_configuration       : ERROR! No rules found!

main    
```

----------

## Earthwings

You can reset the init script state with 

```
/etc/init.d/cpufreqd zap
```

Before resetting a daemon like this, check that it's really not running anymore, use something like ps -C <damonname> for that. Won't be necessary in this case as cpufreqd didn't even start up.

----------

## Earthwings

The end of the line 

```
/usr/lib/cpufreqd_acpi_ac.so: cannot open shared obj$ 
```

 would be interesting. Is the acpi USE flag set on your system? Set it and recompile cpufreqd if so. Otherwise eventually revdep-rebuild will help.

----------

## tane_stelzer

Okay that did work, i set the acpi use flag and reemerged. But could you just please explain what was wrong i would like to understand the problem cos at the moment i dont understand

----------

## Earthwings

 *tane_stelzer wrote:*   

> Okay that did work, i set the acpi use flag and reemerged. But could you just please explain what was wrong i would like to understand the problem cos at the moment i dont understand

 

The part of cpufreqd that does the acpi stuff (like monitoring ac/battery state) only gets built when the acpi USE flag is set. If it's not set, the part of cpufreqd that handles the acpi_* plugins and knows what ac=on etc. means in [Rule] sections doesn't exist. cpufreqd then thinks the rule is empty and generates all these errors.

----------

## tane_stelzer

OH thanks very much for your help

Vielen Dank hehe

Tane

----------

