LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 02-10-2005, 05:38 AM   #1
ruh31
Member
 
Registered: Oct 2004
Location: Germany
Distribution: Ubuntu
Posts: 51

Rep: Reputation: 15
how to control cpu freq


Hi!

I wanted to be able to change the cpu frequency and found out, that I have no idea how. :-) Under Suse I just had to enter "powersave" with some options, and it did all I wanted (at least under suse 9.2). Now I wanted to set the same thing up under debian, but don't get it to work correctly. I already installed acpid and cpudynd, but whenever I try to start acpid, it tells me:
Code:
acpid: can't open /proc/acpi/event: Device or resource busy
Entering "cpudynd", it says
Code:
cpudynd version 1.0 Copyright: Ricardo Galli <gallir@uib.es>
cpudynd: CPU frequency control disabled
Error: Nothing to do, exiting
When trying powernowd, it tells me
Code:
powernowd: PowerNow Daemon v0.90, (c) 2003-2004 John Clemens
powernowd: Found 1 cpu:
Couldn't open file: No such file or directory
Couldn't open file: No such file or directory
Couldn't open file: No such file or directory
couldn't open govn's file for writing: No such file or directory
Couldn't get per-cpu data: Illegal seek
PowerNowd encountered and error and could not start.
Please make sure that:
 - You are running a v2.5/v2.6 kernel or later
 - That you have sysfs mounted /sys
 - That you have the core cpufreq and cpufreq-userspace
   modules loaded into your kernel
 - That you have the cpufreq driver for your cpu loaded,
   and that it works. (check dmesg for errors)
If all of the above are true, and you still have problems,
please email the author: clemej@alum.rpi.edu
But since I am pretty new with setting up a system (As I mentioned above, I used Suse before, and there is not much "setting up a system" with it), that does not help me a lot. Maybe someone can help me with that issue and also tell me what daemon would be best to use (cpufreqd, cpudynd, powernowd).

My system is as follows:
Notebook: FSC Amilo M 7400
Debian sarge
Kernel 2.6.8-2

I hope that is all information that is needed to solve that problem, if not, just ask. Thanks,

ruh31
 
Old 02-10-2005, 03:27 PM   #2
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86; Gentoo PPC; Gentoo Sparc64; FreeBSD; OS X; Solaris
Posts: 3,731
Blog Entries: 4

Rep: Reputation: 65
Quote:
- That you have the core cpufreq and cpufreq-userspace
modules loaded into your kernel
- That you have the cpufreq driver for your cpu loaded,
and that it works. (check dmesg for errors)
So do you have these modules loaded? Check with lsmod. Do you have /sys mounted?

What kind of processor do you have anyway?
 
Old 02-11-2005, 05:40 AM   #3
ruh31
Member
 
Registered: Oct 2004
Location: Germany
Distribution: Ubuntu
Posts: 51

Original Poster
Rep: Reputation: 15
I think that I have not loaded those modules. I get
Code:
$ lsmod
Module                  Size  Used by
i830                   78596  3
ipv6                  264644  8
ds                     18756  2
irtty_sir               9152  2
sir_dev                19244  1 irtty_sir
irda                  197120  2 irtty_sir,sir_dev
crc_ccitt               2144  1 irda
lp                     11176  0
af_packet              22568  2
snd_intel8x0m          20264  0
snd_intel8x0           36460  0
snd_ac97_codec         69988  2 snd_intel8x0m,snd_intel8x0
snd_pcm_oss            55080  0
snd_mixer_oss          20096  1 snd_pcm_oss
snd_pcm                98728  3 snd_intel8x0m,snd_intel8x0,snd_pcm_oss
snd_timer              25668  1 snd_pcm
snd_page_alloc         11752  3 snd_intel8x0m,snd_intel8x0,snd_pcm
gameport                4704  1 snd_intel8x0
snd_mpu401_uart         7968  1 snd_intel8x0
snd_rawmidi            25124  1 snd_mpu401_uart
snd_seq_device          8200  1 snd_rawmidi
snd                    57156  10 snd_intel8x0m,snd_intel8x0,snd_ac97_codec,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer,snd_mpu401_uart,snd_rawmidi,snd_seq_device
soundcore              10336  1 snd
shpchp                101900  0
pciehp                 99020  0
pci_hotplug            34640  2 shpchp,pciehp
intel_agp              22816  1
agpgart                34664  4 intel_agp
parport_pc             36900  1
parport                41800  2 lp,parport_pc
pcspkr                  3592  0
rtc                    12760  0
ehci_hcd               32004  0
usbhid                 32224  0
eth1394                21576  0
uhci_hcd               33136  0
usbcore               119012  5 ehci_hcd,usbhid,uhci_hcd
b44                    22308  0
mii                     5120  1 b44
yenta_socket           21728  0
pcmcia_core            70868  2 ds,yenta_socket
ohci1394               35492  0
nls_iso8859_1           4032  1
nls_cp437               5696  2
capability              4520  0
commoncap               7232  1 capability
freq_table              4228  0
cpufreq_userspace       5272  0
ac                      4812  0
tsdev                   7392  0
battery                 9388  0
mousedev               10476  1
button                  6296  0
joydev                  9984  0
fan                     3980  0
evdev                   9600  0
thermal                12656  0
processor              17264  1 thermal
sr_mod                 17316  0
sbp2                   24392  0
scsi_mod              125228  2 sr_mod,sbp2
ieee1394              111512  3 eth1394,ohci1394,sbp2
psmouse                20360  0
ide_cd                 42656  0
cdrom                  40732  2 sr_mod,ide_cd
vfat                   14656  1
fat                    46784  1 vfat
ntfs                  101940  1
ext2                   71848  0
ext3                  127240  1
jbd                    62616  1 ext3
mbcache                 9348  2 ext2,ext3
ide_generic             1408  0
piix                   13440  1
ide_disk               19296  5
ide_core              139940  4 ide_cd,ide_generic,piix,ide_disk
unix                   28756  266
font                    8320  0
vesafb                  6656  0
cfbcopyarea             3872  1 vesafb
cfbimgblt               3040  1 vesafb
cfbfillrect             3776  1 vesafb
Moreover you said I should check dmesg for any errors. What exactly am I looking for in the messages that dmesg shows me. Should I post everything with "ACPI: ..." and "CPU: ..." here or is something else needed?

I am using a pentium M 1.7GHz processor (centrino). Hope you can help me!
 
Old 02-11-2005, 12:48 PM   #4
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86; Gentoo PPC; Gentoo Sparc64; FreeBSD; OS X; Solaris
Posts: 3,731
Blog Entries: 4

Rep: Reputation: 65
Ok, well you have the cpufreq governor loaded there, it looks like you just need the modules for your cpu. I have done a little reading in /usr/src/linux/Documentation/cpu-freq and your processor is supported.

I don't have a centrino, so this is only best guess but it would seem you need to run:
"modprobe speedstep-centrino"

If this works then cd to /sys/devices/system/cpu/cpu0/cpufreq/
You should see files like:
cpuinfo_min_freq
cpuinfo_max_freq
etc...
 
Old 02-12-2005, 05:01 AM   #5
ruh31
Member
 
Registered: Oct 2004
Location: Germany
Distribution: Ubuntu
Posts: 51

Original Poster
Rep: Reputation: 15
Well, I tried what you said, but I get the following error message:
Code:
# modprobespeedstep-centrino
FATAL: Error inserting speedstep_centrino (/lib/modules/2.6.8-2-686/kernel/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.ko): No such device
What does this mean? By the way: Thanks a lot for your help!
 
Old 02-13-2005, 09:00 AM   #6
basileus
Member
 
Registered: Nov 2004
Location: Turku, Finland
Distribution: Debian, Ubuntu, Gentoo
Posts: 388

Rep: Reputation: 30
I use cpu frequency scaling on my laptop (K6-3 processor).

You can lower cpu clock rate with both "CPU frequency scaling" and from ACPI with "CPU Throttling". I use CPU Frequency scaling. I suggest trying to use APM instead of ACPI... disable/remove the "acpid" and install "apmd". You might have to change BIOS settings also.

Anyways, to use "CPU frequency scaling" you need to have "cpufreq-userspace"-module loaded, and also a module specific for your processor:

Intel

* speedstep-centrino
* speedstep-ich (P4 Mobile)
* speedstep-smi

AMD

* powernow-k6
* powernow-k7
* powernow-k8

You can check "cat /proc/cpuinfo" to see which processor you have, and if it supports scaling. You can also see from it if the scaling works (it shows _current_ frequency). You can add appropriate modules to /etc/modules so that the load automatically.

You also need the "powernowd"-daemon (which you already had installed). It should work without problems.
 
Old 02-14-2005, 09:58 AM   #7
TLV
Member
 
Registered: Jun 2004
Distribution: Ubuntu
Posts: 185

Rep: Reputation: 30
I Google is correct, you should have a Pentium M processor - same as me (I have an IBM R40). What I did to get the frequency scaling to work in Debian was to:
  • In /etc/fstab add "sysfs /sys sysfs /defaults 0 0", if it's not there already. (The sysfs must be mounted.)
I recompiled the kernel with the following options (under Power management options, CPU Frequency scaling):
  • Default CPU Freq governor set to performance
  • 'powersave' governor as a module
  • 'userspace' governor for userspace frequency scaling into the kernel
  • CPU frequency table helpers into the kernel
  • Intel Enhanced SpeedStep into the kernel
Make sure the cpufreqd package is installed. Adjust /etc/cpufreqd.conf as needed.

With APM it wouldn't work unless the options above were compiled into the kernel. With APCI it seemed to work even when they were modules.

/TLV
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
cpu freq. scaling problem sonis Linux - Laptop and Netbook 4 04-25-2005 07:24 AM
CPU heat monitoring and freq. control Yonatanph Programming 1 04-12-2005 04:19 PM
cpu freq. scaling problem sonis Suse/Novell 3 01-12-2005 05:04 PM
Lower CPU freq Adony Linux - Hardware 2 10-01-2004 09:23 AM
Emachines M5310 CPU Freq Control, ACPI, Poor Video, Volume Buttons johnandrhona Linux - Laptop and Netbook 2 03-14-2004 10:54 PM


All times are GMT -5. The time now is 04:10 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration