LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 09-12-2006, 03:40 AM   #1
stardotstar
Member
 
Registered: Nov 2002
Location: /au/qld/bne/4157
Distribution: Gentoo mactel-linux
Posts: 238

Rep: Reputation: 30
Wierd cpufreqd behaviour in gnome - batt vs ac


OK, I have ondemand set as my default governor and in Gnome with the monitors sitting in the panel when I mouse over I get a hover message saying that the governor is ondemand but the reported freq is 100% - ie 2.17ghz - when I check in /sys/devices... it is the same - but the machine is cooler than it would be at 100% all the time... (notebook you could cook breakfast on)

when I take the power off and run on batt the scaling shows properly in the panel so I am guessing that gnome panel applet does not read everything from the /sys info but makes data off the acpi status which is not clearly defined for on ac - ie in laptop-mode the status is well reflected but on power although it reports ondemand the freq is not scaling...

Any ideas where to start on this?

Will
 
Old 09-12-2006, 06:24 AM   #2
eeades
Member
 
Registered: Sep 2004
Distribution: Slackware
Posts: 117

Rep: Reputation: 15
If you cat '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq' it should tell you what your current frequency is.

Eric
 
Old 09-13-2006, 01:41 AM   #3
stardotstar
Member
 
Registered: Nov 2002
Location: /au/qld/bne/4157
Distribution: Gentoo mactel-linux
Posts: 238

Original Poster
Rep: Reputation: 30
Thank you, yes this is odd because:

1) icons in the panel show 2.17GHz 100% on both - on mouse over both say "Ondemand" - but the status never changes despite quite different loads. When I disconnect the ac power the system switches to laptop-mode and the governor selected is OnDemand - then both the monitors show 1GHz and appear to scale properly.

2) If I switch the governor to Conservative on the panel it shows Conservative as the governor but remains at 100%/2.17GHz which is not right... The second Core does not change gov when selected from the panel - stays at 100% and ondemand...

3) My sys devices output is (after switching to conservative:


CPU0
Code:
spitfire cpufreq # cat cpuinfo_cur_freq
2167000
spitfire cpufreq # cat scaling_cur_freq
2167000
spitfire cpufreq # cat scaling_governor
conservative
Then on switching it back to OnDemand in Gnome:

Code:
spitfire cpufreq # cat cpuinfo_cur_freq
2167000
spitfire cpufreq # cat scaling_cur_freq
2167000
spitfire cpufreq # cat scaling_governor
ondemand
so we can see that the governor is changed but there is no actual governing happening it seems...


Going through the same process for CPU1
CPU1
Code:
spitfire cpufreq # cat cpuinfo_cur_freq
2167000
spitfire cpufreq # cat scaling_cur_freq
2167000
spitfire cpufreq # cat scaling_governor
ondemand
So we can see that CPU1 does not take governor changes in Gnome panel applet.

Hmmm....

It would seem that this is a problem with cpufreqd configuration or gnome applet:

Code:
spitfire cpufreq # cat scaling_governor
ondemand
spitfire cpufreq # ls
affected_cpus     cpuinfo_max_freq  ondemand                       scaling_available_governors  scaling_driver    scaling_max_freq  stats
cpuinfo_cur_freq  cpuinfo_min_freq  scaling_available_frequencies  scaling_cur_freq             scaling_governor  scaling_min_freq
spitfire cpufreq # cat scaling_driver
centrino
spitfire cpufreq # echo conservative > scaling_governor
spitfire cpufreq # cat scaling_governor
conservative
spitfire cpufreq # cat scaling_cur_freq
2167000
Here I manually attempt to change the governor but although it changes there is no scaling in effect.

When I pull the ac power I get the following results:

First the icons in Gnome panel immediately reflect 1GHz and read OnDemand
Code:
spitfire cpufreq # cat scaling_cur_freq
1000000
spitfire cpufreq # cat scaling_governor
ondemand
spitfire cpufreq # cat cpuinfo_cur_freq
1000000
When I try to change the governor mode - for example from OnDemand to Performance in the panel CPU0 will go to performance and jump up to 100%/2.17GHz *but* if I try the same on CPU1 it remains at 1GHz
and CPU0 jumps up!

Maybe this is faulty kernel configuration to do with the speedstep etc.

Here is my relevant stuff:

Code:
spitfire proc # cat cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 14
model name      : Genuine Intel(R) CPU           T2600  @ 2.16GHz
stepping        : 8
cpu MHz         : 1000.000
cache size      : 2048 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 2
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 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx constant_tsc pni monitor vmx est tm2 xtpr
bogomips        : 4332.49

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 6
model           : 14
model name      : Genuine Intel(R) CPU           T2600  @ 2.16GHz
stepping        : 8
cpu MHz         : 1000.000
cache size      : 2048 KB
physical id     : 0
siblings        : 2
core id         : 1
cpu cores       : 2
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 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx constant_tsc pni monitor vmx est tm2 xtpr
bogomips        : 4326.95
Code:
#
# Processor type and features
#
CONFIG_SMP=y
CONFIG_X86_PC=y
# CONFIG_X86_ELAN is not set
# CONFIG_X86_VOYAGER is not set
# CONFIG_X86_NUMAQ is not set
# CONFIG_X86_SUMMIT is not set
# CONFIG_X86_BIGSMP is not set
# CONFIG_X86_VISWS is not set
# CONFIG_X86_GENERICARCH is not set
# CONFIG_X86_ES7000 is not set
# CONFIG_M386 is not set
# CONFIG_M486 is not set
# CONFIG_M586 is not set
# CONFIG_M586TSC is not set
# CONFIG_M586MMX is not set
# CONFIG_M686 is not set
# CONFIG_MPENTIUMII is not set
# CONFIG_MPENTIUMIII is not set
# CONFIG_MPENTIUMM is not set
CONFIG_MPENTIUM4=y
# CONFIG_MK6 is not set
# CONFIG_MK7 is not set
# CONFIG_MK8 is not set
# CONFIG_MCRUSOE is not set
# CONFIG_MEFFICEON is not set
# CONFIG_MWINCHIPC6 is not set
# CONFIG_MWINCHIP2 is not set
# CONFIG_MWINCHIP3D is not set
# CONFIG_MGEODEGX1 is not set
# CONFIG_MGEODE_LX is not set
# CONFIG_MCYRIXIII is not set
# CONFIG_MVIAC3_2 is not set
CONFIG_X86_GENERIC=y
CONFIG_X86_CMPXCHG=y
CONFIG_X86_XADD=y
CONFIG_X86_L1_CACHE_SHIFT=7
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_X86_WP_WORKS_OK=y
CONFIG_X86_INVLPG=y
CONFIG_X86_BSWAP=y
CONFIG_X86_POPAD_OK=y
CONFIG_X86_CMPXCHG64=y
CONFIG_X86_GOOD_APIC=y
CONFIG_X86_INTEL_USERCOPY=y
CONFIG_X86_USE_PPRO_CHECKSUM=y
CONFIG_X86_TSC=y
# CONFIG_HPET_TIMER is not set
CONFIG_NR_CPUS=2
# CONFIG_SCHED_SMT is not set
CONFIG_SCHED_MC=y
# CONFIG_PREEMPT_NONE is not set
# CONFIG_PREEMPT_VOLUNTARY is not set
CONFIG_PREEMPT=y
CONFIG_PREEMPT_BKL=y
CONFIG_X86_LOCAL_APIC=y
CONFIG_X86_IO_APIC=y
CONFIG_X86_MCE=y
CONFIG_X86_MCE_NONFATAL=y
# CONFIG_X86_MCE_P4THERMAL is not set
# CONFIG_TOSHIBA is not set
# CONFIG_I8K is not set
# CONFIG_X86_REBOOTFIXUPS is not set
# CONFIG_MICROCODE is not set
# CONFIG_X86_MSR is not set
# CONFIG_X86_CPUID is not set

#
# CPU Frequency scaling
#
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_TABLE=y
# CONFIG_CPU_FREQ_DEBUG is not set
CONFIG_CPU_FREQ_STAT=y
# CONFIG_CPU_FREQ_STAT_DETAILS is not set
CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
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

#
# CPUFreq processor drivers
#
CONFIG_X86_ACPI_CPUFREQ=y
# CONFIG_X86_POWERNOW_K6 is not set
# CONFIG_X86_POWERNOW_K7 is not set
# CONFIG_X86_POWERNOW_K8 is not set
# CONFIG_X86_GX_SUSPMOD is not set
CONFIG_X86_SPEEDSTEP_CENTRINO=y
CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y
CONFIG_X86_SPEEDSTEP_CENTRINO_TABLE=y
CONFIG_X86_SPEEDSTEP_ICH=y
# CONFIG_X86_SPEEDSTEP_SMI is not set
# CONFIG_X86_P4_CLOCKMOD is not set
# CONFIG_X86_CPUFREQ_NFORCE2 is not set
# CONFIG_X86_LONGRUN is not set

#
# shared options
#
# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set
CONFIG_X86_SPEEDSTEP_LIB=y
# CONFIG_X86_SPEEDSTEP_RELAXED_CAP_CHECK is not set
any and all suggestions appreciated :-)

will
 
Old 09-13-2006, 11:11 PM   #4
eeades
Member
 
Registered: Sep 2004
Distribution: Slackware
Posts: 117

Rep: Reputation: 15
With the laptop plugged in, try the following as root:

echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

echo "ondemand" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor

It would be best to make a simple script to do it, as the last time I manually tried to use cpufreq with 2 (logical - read HT) processors, I got a kernel panic. (Couldn't get the second one typed in fast enough). If that works, then you will need to manually change your acpi settings.

Eric
 
Old 09-14-2006, 05:16 AM   #5
stardotstar
Member
 
Registered: Nov 2002
Location: /au/qld/bne/4157
Distribution: Gentoo mactel-linux
Posts: 238

Original Poster
Rep: Reputation: 30
thanks eric your encouraging input has been of great assistance. I have finally sorted this out by correctly configuring my profiles and rules in cpufreqd.conf - basically it was forcing to a state that was 100%...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
External USB HDD, mount problem, wierd behaviour. kniwor Slackware 5 08-18-2006 11:15 PM
Wierd keyboard and mouse behaviour in vi and emacs... lsmith Linux - Newbie 1 08-21-2005 07:07 PM
very wierd ntop behaviour takahaya Linux - Networking 2 05-19-2005 03:02 AM
Really wierd mouse behaviour esteeven Linux - Hardware 1 12-06-2004 04:11 PM
Wierd behaviour using fork() and pipe() cybermix Programming 4 01-08-2004 03:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 12:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration