Can not set CPU to ondemand

This forum is dedicated to advanced help and support :

Ask here your questions about advanced usage of Mageia. For example you may post here all your questions about network and automated installs, complex server configurations, kernel tuning, creating your own Mageia mirrors, and all tasks likely to be touchy even for skilled users.

Can not set CPU to ondemand

Postby mackowiakp » Jun 21st, '13, 09:21

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?
Last edited by doktor5000 on Jun 21st, '13, 20:33, edited 1 time in total.
Reason: added code tags, to improve on clarity
Linux is like wigwam. No Windows, no Gates but Apache inside

WARNING ! The administrator has the right to refuse to install WINDOWS, invoking the conscience clause
mackowiakp
 
Posts: 660
Joined: May 23rd, '13, 07:32
Location: Gdynia, Poland

Re: Can not set CPU to ondemand

Postby doktor5000 » Jun 21st, '13, 20:34

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
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18018
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Can not set CPU to ondemand

Postby mackowiakp » Jun 21st, '13, 23:01

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.
Linux is like wigwam. No Windows, no Gates but Apache inside

WARNING ! The administrator has the right to refuse to install WINDOWS, invoking the conscience clause
mackowiakp
 
Posts: 660
Joined: May 23rd, '13, 07:32
Location: Gdynia, Poland

Re: Can not set CPU to ondemand

Postby sander85 » Jun 22nd, '13, 11:56

Is the needed module loaded?

Code: Select all
lsmod | grep ondemand
Stand for something, or you will fall for nothing.
-- Richard Stallman
User avatar
sander85
 
Posts: 88
Joined: Jan 28th, '12, 20:41
Location: Estonia

Re: Can not set CPU to ondemand

Postby mackowiakp » Jun 22nd, '13, 12:08

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?
Linux is like wigwam. No Windows, no Gates but Apache inside

WARNING ! The administrator has the right to refuse to install WINDOWS, invoking the conscience clause
mackowiakp
 
Posts: 660
Joined: May 23rd, '13, 07:32
Location: Gdynia, Poland

Re: Can not set CPU to ondemand

Postby doktor5000 » Jun 22nd, '13, 12:41

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.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18018
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Can not set CPU to ondemand

Postby mackowiakp » Jun 22nd, '13, 13:31

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?
Linux is like wigwam. No Windows, no Gates but Apache inside

WARNING ! The administrator has the right to refuse to install WINDOWS, invoking the conscience clause
mackowiakp
 
Posts: 660
Joined: May 23rd, '13, 07:32
Location: Gdynia, Poland

Re: Can not set CPU to ondemand

Postby doktor5000 » Jun 22nd, '13, 13:54

I'd just blacklist p4_clockmod and try different governors and look if the frequency drops as expected.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18018
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Can not set CPU to ondemand

Postby mackowiakp » Jun 22nd, '13, 14:04

Ok. But blacklist p4_clockmod couse unpossibility to run any governor
Linux is like wigwam. No Windows, no Gates but Apache inside

WARNING ! The administrator has the right to refuse to install WINDOWS, invoking the conscience clause
mackowiakp
 
Posts: 660
Joined: May 23rd, '13, 07:32
Location: Gdynia, Poland

Re: Can not set CPU to ondemand

Postby doktor5000 » Jun 22nd, '13, 14:25

Do you have any error messages indicating that, or do you think that is how it should be?
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18018
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Can not set CPU to ondemand

Postby mackowiakp » Jun 22nd, '13, 14:54

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
Linux is like wigwam. No Windows, no Gates but Apache inside

WARNING ! The administrator has the right to refuse to install WINDOWS, invoking the conscience clause
mackowiakp
 
Posts: 660
Joined: May 23rd, '13, 07:32
Location: Gdynia, Poland


Return to Advanced support

Who is online

Users browsing this forum: No registered users and 1 guest