Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 326889 - sys-power/cpufreqd-2.4.2: unable to work
Summary: sys-power/cpufreqd-2.4.2: unable to work
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-04 16:14 UTC by Nan Wang
Modified: 2012-11-18 12:03 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
my kernel configuraion (config,63.71 KB, text/plain)
2010-07-04 16:20 UTC, Nan Wang
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nan Wang 2010-07-04 16:14:08 UTC
cpufreqd start but the socket doesn't appear in its place, all cpufreqd operations are not workable:

$ cpufreqd-get 
No cpufreqd socket found

According to /proc/cpuinfo, the CPU frequency is fixed to 1.60GHz when I doing some CPU intensive works, but it should be set to 2.20GHz in 'performance' governor. (cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor report 'performance')


Another problem:

bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=495655

arises after I update sys-apps/lm_sensors-3.1.2 and sys-fs/udev-149, below messages are shown in /var/log/message each time when cpufreqd start:

Jul  4 23:49:37 wn cpufreqd: get_class_device_attribute: couldn't open /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0A:00/power_supply/BAT0/energy_full (No such file or directory)
Jul  4 23:49:37 wn cpufreqd: get_class_device_attribute: couldn't open /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0A:00/power_supply/BAT0/energy_now (No such file or directory)



Reproducible: Always

Steps to Reproduce:
Comment 1 Nan Wang 2010-07-04 16:19:53 UTC
Sorry, I forget to provide my platform.

kernel configuration is attached.

----------------------------
cat /proc/cpuinfo

processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 15
model name	: Intel(R) Core(TM)2 Duo CPU     T7500  @ 2.20GHz
stepping	: 10
cpu MHz		: 1600.000
cache size	: 4096 KB
physical id	: 0
siblings	: 2
core id		: 0
cpu cores	: 2
apicid		: 0
initial apicid	: 0
fdiv_bug	: no
hlt_bug		: no
f00f_bug	: no
coma_bug	: no
fpu		: yes
fpu_exception	: yes
cpuid level	: 10
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm lahf_lm ida tpr_shadow vnmi flexpriority
bogomips	: 4387.10
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:

processor	: 1
vendor_id	: GenuineIntel
cpu family	: 6
model		: 15
model name	: Intel(R) Core(TM)2 Duo CPU     T7500  @ 2.20GHz
stepping	: 10
cpu MHz		: 1600.000
cache size	: 4096 KB
physical id	: 0
siblings	: 2
core id		: 1
cpu cores	: 2
apicid		: 1
initial apicid	: 1
fdiv_bug	: no
hlt_bug		: no
f00f_bug	: no
coma_bug	: no
fpu		: yes
fpu_exception	: yes
cpuid level	: 10
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm lahf_lm ida tpr_shadow vnmi flexpriority
bogomips	: 4387.72
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:
------------------------


---------------------------
lsmod:

...
cpufreq_ondemand        7782  0 
cpufreq_conservative     5528  0 
cpufreq_userspace       2327  0 
cpufreq_powersave        786  0 
acpi_cpufreq            7348  0 
...
battery                 7931  0 
thermal                11231  0 
...
processor              34655  3 acpi_cpufreq
...
-------------------------------------


------------------------------
uname -a:

Linux xx.xx.xx 2.6.32-gentoo-r7 #7 SMP PREEMPT Sat May 15 21:06:59 CST 2010 i686 Intel(R) Core(TM)2 Duo CPU T7500 @ 2.20GHz GenuineIntel GNU/Linux

-----------------------------
Comment 2 Nan Wang 2010-07-04 16:20:28 UTC
Created attachment 237455 [details]
my kernel configuraion
Comment 3 Michael Weber (RETIRED) gentoo-dev 2010-07-04 17:25:40 UTC
Ok, 
I just checked, you should have done everything right. What does `cpufreq-info` say? My Thinkpad R61 doesn't step higher that 1,6 (max 2.0) w/o battery inserted at boot time.

Please assure that acpi_cpufreq is loaded via /etc/conf.d/modules before `/etc/init.d/cpufrequtils start` is run at bootup. 

Michael
Comment 4 Nan Wang 2010-07-04 17:47:21 UTC
(In reply to comment #3)
> Ok, 
> I just checked, you should have done everything right. What does `cpufreq-info`
> say? My Thinkpad R61 doesn't step higher that 1,6 (max 2.0) w/o battery
> inserted at boot time.
> 
> Please assure that acpi_cpufreq is loaded via /etc/conf.d/modules before
> `/etc/init.d/cpufrequtils start` is run at bootup. 
> 
> Michael
> 

'cpufreq-info' report is listed below.

I also check my rc configuration. cpufrequtils doesn't exist in my runlevel. However the CPU frequency still fixed at 1.6GHz after I start cpufrequtils.


cpufrequtils 005: cpufreq-info (C) Dominik Brodowski 2004-2006
Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 0:
  driver: acpi-cpufreq
  CPUs which need to switch frequency at the same time: 0
  hardware limits: 800 MHz - 2.20 GHz
  available frequency steps: 2.20 GHz, 2.20 GHz, 1.60 GHz, 1.20 GHz, 800 MHz
  available cpufreq governors: ondemand, conservative, userspace, powersave, performance
  current policy: frequency should be within 1.60 GHz and 1.60 GHz.
                  The governor "performance" may decide which speed to use
                  within this range.
  current CPU frequency is 1.60 GHz.
  cpufreq stats: 2.20 GHz:0.00%, 2.20 GHz:0.00%, 1.60 GHz:0.00%, 1.20 GHz:0.00%, 800 MHz:0.00%  (118)
analyzing CPU 1:
  driver: acpi-cpufreq
  CPUs which need to switch frequency at the same time: 1
  hardware limits: 800 MHz - 2.20 GHz
  available frequency steps: 2.20 GHz, 2.20 GHz, 1.60 GHz, 1.20 GHz, 800 MHz
  available cpufreq governors: ondemand, conservative, userspace, powersave, performance
  current policy: frequency should be within 1.60 GHz and 1.60 GHz.
                  The governor "performance" may decide which speed to use
                  within this range.
  current CPU frequency is 1.60 GHz.
  cpufreq stats: 2.20 GHz:0.00%, 2.20 GHz:0.00%, 1.60 GHz:0.00%, 1.20 GHz:0.00%, 800 MHz:0.00%  (118)

Comment 5 Michael Weber (RETIRED) gentoo-dev 2010-07-04 19:23:21 UTC
Ok, 
looks like an issue with your upper bound for the scaling frequency.
There's a hardware limit and a software limit which determines the range of operation of every governor.

Can you please check 

`cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq`
  it should report `1600000`

`cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies`
  it should report `2200000 <some values> 1600000 <some values> 800000`

And `echo -n <highest value of available freq> > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq` should set it to this value.
Recheck wih `cat ...max_freq` and repeat i for the others cpus.

`cpufreq-set --max .... --cpu 0` and `cpufreq-set --max .... --cpu 1` should do the same.
`cpufreq-info` should report this new software-limit then.

Does it work?
Comment 6 Nan Wang 2010-07-04 19:33:14 UTC
(In reply to comment #5)
> Ok, 
> looks like an issue with your upper bound for the scaling frequency.
> There's a hardware limit and a software limit which determines the range of
> operation of every governor.
> 
> Can you please check 
> 
> `cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq`
>   it should report `1600000`
> 
> `cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies`
>   it should report `2200000 <some values> 1600000 <some values> 800000`
> 
> And `echo -n <highest value of available freq> >
> /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq` should set it to this
> value.
> Recheck wih `cat ...max_freq` and repeat i for the others cpus.
> 
> `cpufreq-set --max .... --cpu 0` and `cpufreq-set --max .... --cpu 1` should do
> the same.
> `cpufreq-info` should report this new software-limit then.
> 
> Does it work?
> 

My hardware support 2.2GHz speed. I tested the above sysfs files and they all report that my CPU support 2201000 frequency. Even /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq report 2201000.

I have removed cpufreqd and cpufrequtils from rc list. Now my processor works at its highest speed, but never scale down when idle. (I select CPU_FREQ_DEFAULT_GOV_PERFORMANCE when compiling my kernel) I haven't check cpufreq-set.

cpufreq-info now report:

  current policy: frequency should be within 800 MHz and 2.20 GHz.
                  The governor "performance" may decide which speed to use
                  within this range.

Notice: I REMOVE cpufreqd and lm-sensors related scripts from my rc list, only stop them changes nothing.
Comment 7 Michael Weber (RETIRED) gentoo-dev 2010-07-04 20:43:02 UTC
Ok, so your hardware does react to the settings.
(You can switch the governor by setting `cpufreq-set --governor ondemand --cpu 0` and `... --cpu 1`).

I'll assigning it to the maintainers of cpufreqd since i have little knowledge of the config files of cpufreqd.

Bye, Michael
Comment 8 Nan Wang 2011-07-08 01:15:16 UTC
(In reply to comment #7)
> Ok, so your hardware does react to the settings.
> (You can switch the governor by setting `cpufreq-set --governor ondemand --cpu
> 0` and `... --cpu 1`).
> 
> I'll assigning it to the maintainers of cpufreqd since i have little knowledge
> of the config files of cpufreqd.
> 
> Bye, Michael

I should have this option set (there's no cpufreqd.conf in my system currently because of one-year updates). I still remember that this problem arises after I do a `emerge --update --deep world'. I never changed any file in /etc.
Comment 9 Pacho Ramos gentoo-dev 2012-11-18 12:03:34 UTC
(In reply to comment #7)
> Ok, so your hardware does react to the settings.
> (You can switch the governor by setting `cpufreq-set --governor ondemand
> --cpu 0` and `... --cpu 1`).
> 
> I'll assigning it to the maintainers of cpufreqd since i have little
> knowledge of the config files of cpufreqd.
> 
> Bye, Michael

Running cpufreq-set --governor ondemand over your CPUs should get scaling working... does it work?