LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).

Notices

Reply
 
LinkBack Search this Thread
Old 03-26-2007, 11:54 AM   #1
lumix
Member
 
Registered: Mar 2007
Distribution: Hardy (Gnome on Ubuntu 8.04) on Compaq N600c laptop
Posts: 323

Rep: Reputation: 30
Could use some help with cpufreq


What little I knew of cpufreq was dashed to complete confusion upon researching it. All I understand is that it can adjust and report the clock speed. After reading nearly a dozen howto's and related pages, I'm utterly lost as to whether it's part of a larger package and what it's requirements are to run. I have apt-get install'ed it, and aptitude installed it. And when I type something like "cpufreq-info" I get:

pufrequtils 002: cpufreq-info (C) Dominik Brodowski 2004-2006
Report errors and bugs to linux@brodo.de, please.
analyzing CPU 0:
no or unknown cpufreq driver is active on this CPU


I know the cpu (a p III/M) does work with cpufreq because under Knoppix it worked fine. I could change speeds and read them, I could automate them and they would speed up and down appropriately given the momentary demand.

I believe that at the core of the problem is the fact that I see nothing below the directory /sys/devices/system/cpu/cpu0 other than "crash_notes" and "topology". It suggests to me that I lack the driver, as the above message does, but simply cannot find any information on how that driver is typically obtained and installed.

Can anyone help me with this?

Thanks.

Last edited by lumix; 03-26-2007 at 11:55 AM.
 
Old 03-26-2007, 12:24 PM   #2
lumix
Member
 
Registered: Mar 2007
Distribution: Hardy (Gnome on Ubuntu 8.04) on Compaq N600c laptop
Posts: 323

Original Poster
Rep: Reputation: 30
Let me add to this

I also have acpi and acpitool installed, though I didn't when originally trying to use cpufreq. "Acpitool -c" reports 2/3 speed (800Mhz out of 1200). I haven't any idea whether I should place any stock in that, because I don't know if it uses cpufreq to get it information or does so of its own resources.

When I run Flight Gear, it runs very slowly, and essentially maxes out the cpu. This suggests that it is in fact running at low speed since I've run games like Ghost Recon at similar resolutions with no apparent lag.

Incidentally, I'm running Etch.
 
Old 03-26-2007, 03:32 PM   #3
rje_NC
Member
 
Registered: Nov 2002
Location: Greensboro, NC
Distribution: Ubuntu 8.10, Slackware 12.2
Posts: 182

Rep: Reputation: 30
I found this link very helpful when I was setting up frequency scaling on a Thinkpad and on an older Compaq laptop.

http://www.thinkwiki.org/wiki/How_to...quency_Scaling
 
Old 03-26-2007, 04:28 PM   #4
lumix
Member
 
Registered: Mar 2007
Distribution: Hardy (Gnome on Ubuntu 8.04) on Compaq N600c laptop
Posts: 323

Original Poster
Rep: Reputation: 30
Thanks for the suggestion. Unfortunately I must have read that doc a dozen times already, and it makes assumptions that are somewhat baffling to me.

Again, I don't have anything below /sys/devices/system/cpu/cpu0, and that doc (along with all the others) assumes that stuff is there. Thus it seems I'm not even at a point where that document can start to be applied.
 
Old 03-26-2007, 04:54 PM   #5
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 64
Quote:
Originally Posted by lumix
Again, I don't have anything below /sys/devices/system/cpu/cpu0, and that doc (along with all the others) assumes that stuff is there. Thus it seems I'm not even at a point where that document can start to be applied.
You need to load the appropriate kernel driver to get something to be there. That doc specifically tells you how to custom-compile your kernel including the drivers. On the other hand, your distro (which you didn’t mention) will probably already have the modules compiled, so all you need to do is modprobe the appropriate stuff (e.g., type into a root terminal “modprobe cpufreq-userspace; modprobe cpufreq-powersave; modprobe cpufreq-conservative; modprobe cpufreq-ondemand; modprobe whatever-processor-specific-thing-you-need”).
 
Old 03-26-2007, 06:40 PM   #6
lumix
Member
 
Registered: Mar 2007
Distribution: Hardy (Gnome on Ubuntu 8.04) on Compaq N600c laptop
Posts: 323

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by lumix
Incidentally, I'm running Etch.

I know nothing about Modprobe, and potentially less after reading the Man pages on it. In any case, I have modprobe'd the above suggested modules and get absolutely nothing back for confirmation. I'll have to assume no news is good news. Restarted: still no directory contents below the aforementioned path. I also see something to the effect of a "failed" (in red lettering) loading of a cpu governor something or other, at start up.

This too:

user@Moe:~$ sudo cpufreq-set -g ondemand
wrong, unknown or unhandled CPU?
user@Moe:~$
 
Old 03-26-2007, 07:38 PM   #7
rje_NC
Member
 
Registered: Nov 2002
Location: Greensboro, NC
Distribution: Ubuntu 8.10, Slackware 12.2
Posts: 182

Rep: Reputation: 30
Restarting your system after entering the modprobe commands cancels the effect of the modprobe. Try modprobing them again and then checking to see if you have more entries in the /sys directory structure.

If you do after manually modprobing the modules, you can add the commands to rc.local (or whatever is appropriate for your distro).

What is your computer model and cpu type? it is possible that your PC does not support CPU Frequency Scaling (I have a desktop system with an Athlon CPU that I cannot get working with CPU freq scaling).
 
Old 03-26-2007, 09:01 PM   #8
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 64
Quote:
Originally Posted by lumix
I know nothing about Modprobe, and potentially less after reading the Man pages on it. In any case, I have modprobe'd the above suggested modules and get absolutely nothing back for confirmation. I'll have to assume no news is good news. Restarted: still no directory contents below the aforementioned path. I also see something to the effect of a "failed" (in red lettering) loading of a cpu governor something or other, at start up.

This too:

user@Moe:~$ sudo cpufreq-set -g ondemand
wrong, unknown or unhandled CPU?
user@Moe:~$
Modprobing is a way to insert a module (i.e., a kernel driver in a separate file) into kernelspace. When you restart, your kernel will be loaded anew (not retaining said files any longer). Usually, modules you want to load each time are added to your boot sequence (the method will be distribution-dependent, but most likely you edit /etc/modules or a similar file). So using modprobe manually is very temporary. Additionally, the kernel has a log buffer which is written to by most modules that you modprobe. Depending on your distro, this log is probably recorded somewhere in /var/log (and maybe echoed to your console as well). Regardless, you can always view the latest contents of your kernel log buffer using “dmesg” (i.e., after doing all the “modprobe …” try doing a “dmesg” to see the good news).

So moral of the story: don’t modprobe and then restart and expect whatever you probed to be still in memory. Try the commands I mentioned previously and then look in /sys/devices/system/cpu/cpu0 (without restarting). Additionally, use dmesg to view the kernel buffer.

Hope that helps.
 
Old 03-26-2007, 09:39 PM   #9
lumix
Member
 
Registered: Mar 2007
Distribution: Hardy (Gnome on Ubuntu 8.04) on Compaq N600c laptop
Posts: 323

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by lumix

I know the cpu (a p III/M) does work with cpufreq because under Knoppix it worked fine. I could change speeds and read them, I could automate them and they would speed up and down appropriately given the momentary demand.


Oh... I did try to see if anything had been added to the cpu0 directory, or if cpufreq-info worked after doing the modprobes, but alas, no.
 
Old 03-26-2007, 09:46 PM   #10
lumix
Member
 
Registered: Mar 2007
Distribution: Hardy (Gnome on Ubuntu 8.04) on Compaq N600c laptop
Posts: 323

Original Poster
Rep: Reputation: 30
In dmesg:

Mount-cache hash table entries: 512
CPU: After generic identify, caps: 0383f9ff 00000000 00000000 00000000 00000000
00000000 00000000
CPU: After vendor identify, caps: 0383f9ff 00000000 00000000 00000000 00000000 0
0000000 00000000
CPU: L1 I cache: 16K, L1 D cache: 16K
CPU: L2 cache: 512K
CPU: After all inits, caps: 0383f9ff 00000000 00000000 00000040 00000000 0000000
0 00000000
.
.
.
ACPI: Core revision 20060707
ACPI: setting ELCR to 0200 (from 0800)
CPU0: Intel(R) Pentium(R) III Mobile CPU 1200MHz stepping 01
.
.
.
ACPI: SSDT (v001 COMPAQ CPQCPU 0x00001001 MSFT 0x0100000e) @ 0x1fff7c95
Initializing CPU#0
CPU: After generic identify, caps: 0383f9ff 00000000 00000000 00000000 00000000 00000000 00000000
CPU: After vendor identify, caps: 0383f9ff 00000000 00000000 00000000 00000000 00000000 00000000
CPU: L1 I cache: 16K, L1 D cache: 16K
CPU: L2 cache: 512K
CPU: After all inits, caps: 0383f9ff 00000000 00000000 00000040 00000000 00000000 00000000
Intel machine check reporting enabled on CPU#0.
CPU0: Intel(R) Pentium(R) III Mobile CPU 1200MHz stepping 01
Brought up 1 CPUs
ACPI: CPU0 (power states: C1[C1] C2[C2] C3[C3])
Intel machine check reporting enabled on CPU#0.
 
Old 03-27-2007, 02:25 PM   #11
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 64
I see…

Perhaps I left out a few modules. Which ones did you try? Perhaps you need cpufreq-stats or freq-table. Btw, these are all the related modules I have on my system:
Code:
# modprobe -l | grep cpufreq
/lib/modules/2.6.20/kernel/drivers/cpufreq/freq_table.ko
/lib/modules/2.6.20/kernel/drivers/cpufreq/cpufreq_userspace.ko
/lib/modules/2.6.20/kernel/drivers/cpufreq/cpufreq_stats.ko
/lib/modules/2.6.20/kernel/drivers/cpufreq/cpufreq_powersave.ko
/lib/modules/2.6.20/kernel/drivers/cpufreq/cpufreq_ondemand.ko
/lib/modules/2.6.20/kernel/drivers/cpufreq/cpufreq_conservative.ko
/lib/modules/2.6.20/kernel/arch/x86_64/kernel/cpufreq/powernow-k8.ko
/lib/modules/2.6.20/kernel/arch/x86_64/kernel/cpufreq/acpi-cpufreq.ko
Obviously, some are processor-specific and won’t apply to your PIII machine, and not all will be necessary to use (i.e., some are different governors, only one of which is used at one time).
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RHEL+Celeron-M - CPUfreq possible? arshadmomen Linux - Laptop and Netbook 4 01-13-2007 09:41 AM
ACPI and cpufreq question ygloo Linux - General 5 08-22-2006 08:27 PM
cpufreq not working nickptar Linux - Hardware 3 06-16-2006 03:29 AM
Gkrellm CPUFreq Plugin Chryzmo Linux - Software 2 12-01-2005 12:48 AM
powernowd and cpufreq kalvadar Linux - Newbie 0 02-07-2005 07:57 PM


All times are GMT -5. The time now is 07:54 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
Open Source Consulting | Domain Registration