Page 1 of 1

Can not set CPU to ondemand

PostPosted: Jun 21st, '13, 09:21
by mackowiakp
My (old one) PC still keep CPU freq to max 3,2 Ghz. I want to use ondemand governor and system configuration is configured to work as ondemand.

Code: Select all
[root@basia-pc ~]# cat /etc/sysconfig/cpupower
# See 'cpupower help' and cpupower(1) for more info
CPUPOWER_START_OPTS="frequency-set -g ondemand"
CPUPOWER_STOP_OPTS="frequency-set -g ondemand"


And output from cpupower frequency-info

Code: Select all
analyzing CPU 0:
  driver: p4-clockmod
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 10.00 ms.
  hardware limits: 400 MHz - 3.20 GHz
  available frequency steps: 400 MHz, 800 MHz, 1.20 GHz, 1.60 GHz, 2.00 GHz, 2.40 GHz, 2.80 GHz, 3.20 GHz
  available cpufreq governors: ondemand, conservative, powersave, userspace, performance
  current policy: frequency should be within 800 MHz and 3.20 GHz.
                  The governor "performance" may decide which speed to use
                  within this range.
  current CPU frequency is 3.20 GHz (asserted by call to hardware).
  boost state support:
    Supported: no
    Active: no


So the CPU driver is loaded and governor "performance" is in use. I try to set to ondemand manually like this:
Code: Select all
[root@basia-pc ~]# cpupower frequency-set -g ondemand
Setting cpu: 0


But it is still performance.

I look to systemctl and it looks like this:

Code: Select all
cpupower.service          loaded active exited


So, the service is not active. Then I try to set it enable and start:
Code: Select all
[root@basia-pc ~]# systemctl enable cpupower.service
[root@basia-pc ~]# systemctl start cpupower.service


But the service is still in "exited" state. Reboot does not help

Any idea how to resolve the problem?

Re: Can not set CPU to ondemand

PostPosted: Jun 21st, '13, 20:34
by doktor5000
Please use code tags when posting output/commands or log excerpts.

For your issue, what about your previous thread on this topic? viewtopic.php?f=8&t=5028

Re: Can not set CPU to ondemand

PostPosted: Jun 21st, '13, 23:01
by mackowiakp
No, it is different PC and fresh installation. No additional modules installed. Only all included in default distro install DVD.
In previous post, the problem was unnecessary additional installation of cpufreqd.
In this case, no additional "extra" modules are installed. And thats why create new topic.

Re: Can not set CPU to ondemand

PostPosted: Jun 22nd, '13, 11:56
by sander85
Is the needed module loaded?

Code: Select all
lsmod | grep ondemand

Re: Can not set CPU to ondemand

PostPosted: Jun 22nd, '13, 12:08
by mackowiakp
I think so:
Code: Select all
[root@basia-pc ~]# lsmod | grep ondemand
cpufreq_ondemand       13623  0


And

Code: Select all
[root@basia-pc ~]# cpupower frequency-info
analyzing CPU 0:
  driver: p4-clockmod
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 10.00 ms.
  hardware limits: 400 MHz - 3.20 GHz
  available frequency steps: 400 MHz, 800 MHz, 1.20 GHz, 1.60 GHz, 2.00 GHz, 2.40 GHz, 2.80 GHz, 3.20 GHz
  available cpufreq governors: ondemand, conservative, powersave, userspace, performance
  current policy: frequency should be within 800 MHz and 3.20 GHz.
                  The governor "performance" may decide which speed to use
                  within this range.
  current CPU frequency is 3.20 GHz (asserted by call to hardware).
  boost state support:
    Supported: no
    Active: no


Maybe it is p4-clockmod driver related problem?

Re: Can not set CPU to ondemand

PostPosted: Jun 22nd, '13, 12:41
by doktor5000
You should take a look at https://qa.mandriva.com/show_bug.cgi?id=43155
p4_clockmod is basically nearly useless, unless your system doesn't support anything else.

Re: Can not set CPU to ondemand

PostPosted: Jun 22nd, '13, 13:31
by mackowiakp
Hmmm. So simple question. What I have to do? What driver have to be installed. I try:

Code: Select all
[root@basia-pc ~]# modprobe acpi-cpufreq
modprobe: ERROR: could not insert 'acpi_cpufreq': No such device


Any other idea?

Re: Can not set CPU to ondemand

PostPosted: Jun 22nd, '13, 13:54
by doktor5000
I'd just blacklist p4_clockmod and try different governors and look if the frequency drops as expected.

Re: Can not set CPU to ondemand

PostPosted: Jun 22nd, '13, 14:04
by mackowiakp
Ok. But blacklist p4_clockmod couse unpossibility to run any governor

Re: Can not set CPU to ondemand

PostPosted: Jun 22nd, '13, 14:25
by doktor5000
Do you have any error messages indicating that, or do you think that is how it should be?

Re: Can not set CPU to ondemand

PostPosted: Jun 22nd, '13, 14:54
by mackowiakp
I made several tests. Using p4-clockmod only powersave, userspace, performance governors are working. But performance keep CPU freq to 3,2 GHz constantly and powersave, keep at 800 MHz constantly too. userspace gov works, but in unknown way. Maybe You know how to play with userspace.
While ondemand, conservative governors does not effect, it is still performance.

Code: Select all
[root@basia-pc modprobe.preload.d]# cpupower frequency-set -g ondemand
Setting cpu: 0
[root@basia-pc modprobe.preload.d]# cpupower frequency-info
analyzing CPU 0:
  driver: p4-clockmod
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 10.00 ms.
  hardware limits: 400 MHz - 3.20 GHz
  available frequency steps: 400 MHz, 800 MHz, 1.20 GHz, 1.60 GHz, 2.00 GHz, 2.40 GHz, 2.80 GHz, 3.20 GHz
  available cpufreq governors: ondemand, conservative, powersave, userspace, performance
  current policy: frequency should be within 800 MHz and 3.20 GHz.
                  The governor "performance" may decide which speed to use
                  within this range.
  current CPU frequency is 3.20 GHz (asserted by call to hardware).
  boost state support:
    Supported: no
    Active: no


And after loading userspace

Code: Select all
[root@basia-pc modprobe.preload.d]# cpupower frequency-info
analyzing CPU 0:
  driver: p4-clockmod
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 10.00 ms.
  hardware limits: 400 MHz - 3.20 GHz
  available frequency steps: 400 MHz, 800 MHz, 1.20 GHz, 1.60 GHz, 2.00 GHz, 2.40 GHz, 2.80 GHz, 3.20 GHz
  available cpufreq governors: ondemand, conservative, powersave, userspace, performance
  current policy: frequency should be within 800 MHz and 3.20 GHz.
                  The governor "userspace" may decide which speed to use
                  within this range.
  current CPU frequency is 3.20 GHz (asserted by call to hardware).
  boost state support:
    Supported: no
    Active: no
[root@basia-pc modprobe.preload.d]#


[EDIT - 1]

Userspace still keep CPU at 3,2 GHz...

[EDIT - 2]

EXTREMELY STRANGE
No userspace gov in kernel! But it can be loaded and operate!!!!

Look:
Code: Select all
[root@basia-pc ~]# modprobe cpufreq_userspace
[root@basia-pc ~]# lsmod |grep cpufreq
cpufreq_ondemand       13623  0
cpufreq_conservative    13548  0
cpufreq_powersave      12554  0