Bug 245 - powernow_k8 module wont load automatically and the clock on AMD cpus stays always at the maximum
: powernow_k8 module wont load automatically and the clock on AMD cpus stays al...
Status: RESOLVED WORKSFORME
Product: Desktop Bugs
Classification: ROSA Desktop
Component: Main Packages
: Fresh
: All Linux
: Normal enhancement
: ---
Assigned To: ROSA Linux Bugs
: ROSA Linux Bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-19 14:21 MSD by Sylvainsjc
Modified: 2016-02-16 14:34 MSK (History)
4 users (show)

See Also:
RPM Package:
ISO-related:
Bad POT generating:
Upstream:


Attachments
cpuinfo (2.02 KB, application/octet-stream)
2012-05-20 17:46 MSD, Denis Koryavov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sylvainsjc 2012-05-19 14:21:15 MSD
Description of problem:
MMy CPU is AMD Athlon II X3 460 and the frequency is always at high value

I need to load manually powernow-k8 and restart cpufreq to make work the scaling CPU frequency

lshw : http://pastebin.com/CyeaiUMx

Version-Release number of selected component (if applicable):


How reproducible:
Start ROSA Marathon
type cpufreq-info
load powernow-k8 ==> modprobe powernow-k8
restart cpufreq ==> service cpufreq restart
type cpufreq-info
Comment 1 Postnikov Dmitry 2012-05-19 14:57:48 MSD
I have almost the same motherboard ASROCK N78 and processor AMD Athlon II X2 255. My CPU is not always running at full frequency.
My and your processor is collected on the same kernel. And the sound (MCP75) volume is no problem.
How do you determine that your CPU is always running at maximum frequency?
Do you can look at works statistics for the CPU?
Comment 2 Sylvainsjc 2012-05-19 21:26:39 MSD
I've reinstalled ROSA 2012 LTS so now it's a fresh install up to date

Here what I see using the konsole :

[root@Rosa2012 ~]# cpufreq-info 
cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
Veuillez rapportez les erreurs et les bogues à cpufreq@vger.kernel.org, s'il vous plait.
analyse du CPU 0 :
  pas de pilotes cpufreq reconnu pour ce CPU
  maximum transition latency: 4294.55 ms.
analyse du CPU 1 :
  pas de pilotes cpufreq reconnu pour ce CPU
  maximum transition latency: 4294.55 ms.
analyse du CPU 2 :
  pas de pilotes cpufreq reconnu pour ce CPU
  maximum transition latency: 4294.55 ms.

[root@Rosa2012 ~]# lsmod
Module                  Size  Used by
iptable_filter         12810  0 
ip_tables              27196  1 iptable_filter
x_tables               33968  2 iptable_filter,ip_tables
dm_zero                12529  0 
fuse                   78506  3 
nfs                   333590  0 
lockd                  85166  1 nfs
fscache                70782  1 nfs
auth_rpcgss            52964  1 nfs
nfs_acl                12837  1 nfs
sunrpc                238516  5 nfs,lockd,auth_rpcgss,nfs_acl
bnep                   23795  2 
af_packet              30628  2 
bluetooth             238728  7 bnep
rfkill                 21983  2 bluetooth
tun                    22796  0 
snd_hda_codec_via      66165  1 
snd_hda_intel          32910  2 
snd_hda_codec         103890  2 snd_hda_codec_via,snd_hda_intel
snd_hwdep              17659  1 snd_hda_codec
joydev                 17412  0 
snd_pcm               100184  2 snd_hda_intel,snd_hda_codec
snd_timer              29533  1 snd_pcm
snd                    82076  10 snd_hda_codec_via,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_timer
soundcore              15047  1 snd
snd_page_alloc         18484  2 snd_hda_intel,snd_pcm
sg                     36361  0 
evdev                  17753  9 
i2c_nforce2            13214  0 
button                 13825  0 
processor              31236  0 
k10temp                13119  0 
i2c_core               39936  1 i2c_nforce2
edac_core              53353  0 
serio_raw              13166  0 
binfmt_misc            17431  0 
ipv6                  335975  38 
autofs4                32449  3 
ext4                  411617  1 
jbd2                   91166  1 ext4
crc16                  12675  2 bluetooth,ext4
sr_mod                 22295  0 
sd_mod                 44753  3 
crc_t10dif             12563  1 sd_mod
usbhid                 48585  0 
hid                    95027  1 usbhid
pata_amd               14121  0 
sata_nv                31841  2 
ata_generic            12899  0 
usb_storage            53496  0 
uas                    17813  0 
pata_acpi              13027  0 
libata                219394  4 pata_amd,sata_nv,ata_generic,pata_acpi
ohci_hcd               33102  0 
forcedeth              59127  0 
scsi_mod              218244  6 sg,sr_mod,sd_mod,usb_storage,uas,libata
ehci_hcd               60841  0 
usbcore               206174  6 usbhid,usb_storage,uas,ohci_hcd,ehci_hcd
loop                   27773  0 
dm_mirror              21980  0 
dm_region_hash         20849  1 dm_mirror
dm_log                 18458  2 dm_mirror,dm_region_hash
dm_mod                 77378  3 dm_zero,dm_mirror,dm_log
[root@Rosa2012 ~]# modprobe powernow-k8

[root@Rosa2012 ~]# service cpufreq restart
Restarting cpufreq (via systemctl):                                                           [  OK  ]

[root@Rosa2012 ~]# lsmod | grep processor
processor              31236  1 powernow_k8

[root@Rosa2012 ~]# cpufreq-info 
cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
Veuillez rapportez les erreurs et les bogues à cpufreq@vger.kernel.org, s'il vous plait.
analyse du CPU 0 :
  pilote : powernow-k8
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 8.0 us.
  limitation matérielle : 800 MHz - 3.40 GHz
  plage de fréquence : 3.40 GHz, 2.70 GHz, 2.20 GHz, 800 MHz
  régulateurs disponibles : ondemand, userspace, performance
  tactique actuelle : la fréquence doit être comprise entre 800 MHz et 3.40 GHz.
                  Le régulateur "ondemand" est libre de choisir la vitesse
                  dans cette plage de fréquences.
  la fréquence actuelle de ce CPU est 800 MHz (vérifié par un appel direct du matériel).
analyse du CPU 1 :
  pilote : powernow-k8
  CPUs which run at the same hardware frequency: 1
  CPUs which need to have their frequency coordinated by software: 1
  maximum transition latency: 8.0 us.
  limitation matérielle : 800 MHz - 3.40 GHz
  plage de fréquence : 3.40 GHz, 2.70 GHz, 2.20 GHz, 800 MHz
  régulateurs disponibles : ondemand, userspace, performance
  tactique actuelle : la fréquence doit être comprise entre 800 MHz et 3.40 GHz.
                  Le régulateur "ondemand" est libre de choisir la vitesse
                  dans cette plage de fréquences.
  la fréquence actuelle de ce CPU est 800 MHz (vérifié par un appel direct du matériel).
analyse du CPU 2 :
  pilote : powernow-k8
  CPUs which run at the same hardware frequency: 2
  CPUs which need to have their frequency coordinated by software: 2
  maximum transition latency: 8.0 us.
  limitation matérielle : 800 MHz - 3.40 GHz
  plage de fréquence : 3.40 GHz, 2.70 GHz, 2.20 GHz, 800 MHz
  régulateurs disponibles : ondemand, userspace, performance
  tactique actuelle : la fréquence doit être comprise entre 800 MHz et 3.40 GHz.
                  Le régulateur "ondemand" est libre de choisir la vitesse
                  dans cette plage de fréquences.
  la fréquence actuelle de ce CPU est 800 MHz (vérifié par un appel direct du matériel).
[root@Rosa2012 ~]#
Comment 3 Postnikov Dmitry 2012-05-20 01:35:08 MSD
I do not cpufreq shows the frequency of the processor. :)
-------------
[root@mindlife init.d]# cpufreq-info
cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 0:
  no or unknown cpufreq driver is active on this CPU
  maximum transition latency: 0.00 ms.
analyzing CPU 1:
  no or unknown cpufreq driver is active on this CPU
  maximum transition latency: 0.00 ms.
[root@mindlife init.d]#
-------------
To change the CPU clock is used four kernel mode.
performance
powersave
ondemand
conservative
Perfomance enabled by default, that is, the processor is configured to the maximum frequency. See:
------------
[root@mindlife dima]# zgrep CPU_FREQ /proc/config.gz
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_TABLE=m
CONFIG_CPU_FREQ_STAT=m
CONFIG_CPU_FREQ_STAT_DETAILS=y
CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=m
CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=m
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
[root@mindlife dima]#
------------
and read this http://publib.boulder.ibm.com/infocenter/lnxinfo/v3r0m0/index.jsp?topic=%2Fliaai%2Fcpufreq%2FRebuildingYourKernel.htm

To make sure your processor is AMD used the ondemand mode should load the kernel module. To do this /etc/rc.d/rc.local add line: modprobe powernow-k8
See http://www.pantz.org/software/cpufreq/usingcpufreqonlinux.html

And your BIOS change: Advanced -> CPU Configuration -> Cool' n 'Quiet = ENABLE

My cpufreq-info after modprobe powernow-k8 (in rc.local):
--------------
[root@mindlife dima]# cpufreq-info
cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 0:
  driver: powernow-k8
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 8.0 us.
  hardware limits: 800 MHz - 3.10 GHz
  available frequency steps: 3.10 GHz, 2.40 GHz, 1.90 GHz, 800 MHz
  available cpufreq governors: userspace, performance
  current policy: frequency should be within 800 MHz and 3.10 GHz.
                  The governor "performance" may decide which speed to use
                  within this range.
  current CPU frequency is 3.10 GHz (asserted by call to hardware).
analyzing CPU 1:
  driver: powernow-k8
  CPUs which run at the same hardware frequency: 1
  CPUs which need to have their frequency coordinated by software: 1
  maximum transition latency: 8.0 us.
  hardware limits: 800 MHz - 3.10 GHz
  available frequency steps: 3.10 GHz, 2.40 GHz, 1.90 GHz, 800 MHz
  available cpufreq governors: userspace, performance
  current policy: frequency should be within 800 MHz and 3.10 GHz.
                  The governor "performance" may decide which speed to use
                  within this range.
  current CPU frequency is 3.10 GHz (asserted by call to hardware).
[root@mindlife dima]#
---------------------

IMHO this no bug.
Comment 4 Postnikov Dmitry 2012-05-20 01:54:09 MSD
Forgot (Pardon!), I might add ... 

By default, the kernel CONFIG_CPU_FREQ_GOV_PERFORMANCE = y and CONFIG_CPU_FREQ_GOV_ONDEMAND = m. I would in future kernel CONFIG_CPU_FREQ_GOV_ONDEMAND = y, corrected and that it was more loyal behavior of the frequency of the processor. It's good for laptops, but ... how it will affect the desktop computers - I don't know. Probably good, because the output from cpufreq-info shows that it uses Perfomance:
   available cpufreq governors: userspace, performance.
If do as I wrote, probably the driver powernow-k8 to be used and mode the Ondemand. For this "effect", mainteiners(programmers) need to recompile the kernel with this options.
Comment 5 Sylvainsjc 2012-05-20 10:16:05 MSD
Thank you Postnikov for your precisions and very useful links.

With this, I'm able to make functional the CPU frequency scaling in ROSA Marathon.

IMHO, for me, it's a bug that ROSA Marathon doesn't use natively these power saving feature of AMD CPU while a distribution like Opensuse does without tuning.

I hope this remark will serve to improve this soon in a futur update ?
Comment 6 Aleksandr Kazantcev 2012-05-20 10:51:01 MSD
Please give us output for

cat /proc/cpuinfo

It's need for properly detect model of CPU and fix cpufreq.pm module from harddrake.
Comment 7 Sylvainsjc 2012-05-20 11:02:45 MSD
Here the result of "cat /proc/cpuinfo" :

[root@Rosa2012 ~]# cat /proc/cpuinfo
processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 16
model           : 5
model name      : AMD Athlon(tm) II X3 460 Processor
stepping        : 3
cpu MHz         : 3415.056
cache size      : 512 KB
physical id     : 0
siblings        : 3
core id         : 0
cpu cores       : 3
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt npt lbrv svm_lock nrip_save
bogomips        : 6830.11
TLB size        : 1024 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate

processor       : 1
vendor_id       : AuthenticAMD
cpu family      : 16
model           : 5
model name      : AMD Athlon(tm) II X3 460 Processor
stepping        : 3
cpu MHz         : 3415.056
cache size      : 512 KB
physical id     : 0
siblings        : 3
core id         : 1
cpu cores       : 3
apicid          : 1
initial apicid  : 1
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt npt lbrv svm_lock nrip_save
bogomips        : 6830.42
TLB size        : 1024 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate

processor       : 2
vendor_id       : AuthenticAMD
cpu family      : 16
model           : 5
model name      : AMD Athlon(tm) II X3 460 Processor
stepping        : 3
cpu MHz         : 3415.056
cache size      : 512 KB
physical id     : 0
siblings        : 3
core id         : 2
cpu cores       : 3
apicid          : 2
initial apicid  : 2
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt npt lbrv svm_lock nrip_save
bogomips        : 6830.43
TLB size        : 1024 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate

[root@Rosa2012 ~]#
Comment 8 Denis Koryavov 2012-05-20 17:46:33 MSD
Created attachment 160 [details]
cpuinfo

Hmm. The same situation for me. 



[dkoryavov@desktop ~]$ cpufreq-info 
cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 0:
  no or unknown cpufreq driver is active on this CPU
  maximum transition latency: 4294.55 ms.
analyzing CPU 1:
  no or unknown cpufreq driver is active on this CPU
  maximum transition latency: 4294.55 ms.

After 'modprobe powernow-k8' I can see the next output: 

[dkoryavov@desktop ~]$ cpufreq-info 
cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 0:
  driver: powernow-k8
  CPUs which run at the same hardware frequency: 0 1
  CPUs which need to have their frequency coordinated by software: 0 1
  maximum transition latency: 109 us.
  hardware limits: 1000 MHz - 2.50 GHz
  available frequency steps: 2.50 GHz, 2.40 GHz, 2.20 GHz, 2.00 GHz, 1.80 GHz, 1000 MHz
  available cpufreq governors: userspace, performance
  current policy: frequency should be within 1000 MHz and 2.50 GHz.
                  The governor "performance" may decide which speed to use
                  within this range.
  current CPU frequency is 2.50 GHz.
analyzing CPU 1:
  driver: powernow-k8
  CPUs which run at the same hardware frequency: 0 1
  CPUs which need to have their frequency coordinated by software: 0 1
  maximum transition latency: 109 us.
  hardware limits: 1000 MHz - 2.50 GHz
  available frequency steps: 2.50 GHz, 2.40 GHz, 2.20 GHz, 2.00 GHz, 1.80 GHz, 1000 MHz
  available cpufreq governors: userspace, performance
  current policy: frequency should be within 1000 MHz and 2.50 GHz.
                  The governor "performance" may decide which speed to use
                  within this range.
  current CPU frequency is 2.50 GHz.
Comment 9 Sylvainsjc 2012-07-04 21:57:28 MSD
Any news about this bad behavior ?
Comment 10 philippe.roubach 2012-08-12 23:57:01 MSD
the powernow_k8 not launched by default is a pb since 2010.2 !
Comment 11 philippe.roubach 2012-08-13 00:05:54 MSD
the bad profile list 'users,performance" instead of powersave, conservative, ondemand, users, performance" is an old pb since 2010.2

with mandriva 2010.2 32 bit with kernel desktop 2.6.33.7 no pb. the profile list is powersave,ondemand,conservative,users,performance
but
if you use kernel server 2.6.33.7 because you have 6 GB ram then the profile is users,perfomance.

same pb with all mib kernels nrj pae desktop

same pb with mageia kernels

i verified this is exactly the same pb as sylvainjc describes
Comment 12 Stanislav Fomin 2015-03-06 19:35:08 MSK
Need restesting before releasing Enterprise X2.
Comment 13 Denis Silakov 2015-12-27 16:37:46 MSK
This one swept out from radar. I wonder if somebody has a machine to check if this is still an issue with modern ROSA Desktop Fresh?
Comment 14 Denis Silakov 2016-02-16 14:34:39 MSK
Let's close this ancient one as "worksforme". Feel free to open new bugs if you want any changes in kernel settings.