I just installed Ubuntu 8.04 Hardy. My cpu seems to always be running at its max of 1.83 ghz. It scales fine under windows XP. When i start the computer it tells me that CPU Frequency Scaling is Unsupported blah blah blah misconfigured etc.
I'm new to linux and really have no idea where to begin.
Probably havent heard of my laptop, but its a Haier W36. very similar to an asus w7j (i think)
So where should i start?
Thanks
-
-
You probably have either the cpufreq or powernow daemon running for CPU throttling. Search with Synaptic to find which one is in use and reinstall it; then reboot. This often fixes this kind of problem. If that doesn't work, install another daemon (ex, remove existing powernowd and install cpufreqd).
-
I tried uninstalling and reinstalling both cpufreq and powernowd individually and rebooted after each but it still isnt working. Are there any other programs i might need to reinstall that i dont know about?
Any other ideas? -
I'm not well-acquainted with Ubuntu, but shouldn't you first check whether the proper speedstepping module is loaded?
Code:# modprobe acpi_cpufreq
-
Try checking your BIOS for Speedstep (EIST) settings
-
I checked my bios the other day and there are very minimal settings. ill take another look right now to see if i missed anything. Its a chinese brand computer, and i cant even find any bios updates... Haier W36
After i rebooted i tried that code again and this is what i got
-
Menu> Administration > Services
Check whether something like cpufreqd or powernowd is present. -
No neither of those are. but i think i just uninstalled everyhitng related to cpu frequency. I have tried cpufreqd, powernowd, and cpudyn on their own.
The only things that look related under services right now are Power Management (acpid) and Power Management (apmd) -
Just to clarify things for anyone else confused about this subject, (it comes up often enough here), it is typically the kernel level CPU frequency processor driver (called CPUfreq), that enables the capability to change the CPU frequency while the system is running. As a result, it's important to choose the right CPU frequency driver, and make sure it loads when your system boots. Once the kernel knows how to change frequencies, it is done according to the CPU frequency policy, and a scaling governor profile. The CPU frequency policy defines the CPU frequency range, and the scaling governor profile decides which of the available frequencies within that range, to configure. For example, the powersave governor profile always chooses the lowest frequency available, the performance governor always the highest one, and the ondemand governor makes its decisions depending on the current CPU load. This same "on demand" scaling can also be applied using tools, such as the ones previously mentioned;
cpufreqd - is a small daemon to adjust cpu speed and voltage for kernels using any of the Linux kernel CPUfreq drivers available. This would work for your Intel CPU, but does require some configuration.
cpudyn - is a program designed to control the speed in any processor supported by the Linux CPUfreq driver and simply reduces the processor's speed under low utilization and increases it under high system utilization. This should also work with your Intel CPU.
powernowd - is another program that will adjust the CPU speed, depending on system load. While it works as a client of the Linux CPUfreq driver, it is designed for use with CPU's supporting AMD's PowerNow power management scheme. The author states that, "This code has been tested on various AMD and PPC processors", so it may or may not support Intel frequency scaling correctly.
There are also other programs that are designed to enable an on demand CPU scaling functionality including, as mentioned, the Linux kernel on demand scaling governor profile. This can be enabled, for Gnome users, by installing the CPU Scaling applet, and applying the On Demand profile. It's important to understand that none of these programs enable CPU frequency scaling. They simply allow you to configure the system management of it. In addition to enabling the correct Linux CPUfreq kernel driver, you should make sure you have the correct governor profiles configured and installed.
To your specific problem. While it's difficult to diagnose the exact problem without the necessary information, the most common mistake in this area, is not having the correct Linux kernel CPUfreq driver loaded at all. As archer7 has already pointed out, the likely CPUfreq driver for your computer is the ACPI Processor P-States driver. It's easy enough to test to see if it will load on your system by loading the module with root, or superuser, privileges. If you open a terminal as your regular user, just type in the following command;
Code:sudo modprobe acpi_cpufreq
Good Luck.. -
Wow, thanks for the detailed description. OK, so when i put that code into terminal, it asked me for my password, then just brought be to the next line without doing anything. i entered it again and it still didnt do anything. is that what i wanted it to do? was just not to receive an error message. because i didnt receive anything.
I have been to that post you provided a link for, and followed all of the steps and got error messages in between. That was a day ago, so ill start over and see what happens this time. -
You should also make it so that acpi_cpufreq and cpufreqd are loaded at boot, but Ubuntu might do that automatically for you. I'm sure a knowledgeable Ubuntu user will drop by and fill us in on that. -
Code:sudo lsmod
Good Luck.. -
Here is what i am getting when i follow this page http://ubuntuforums.org/showthread.php?t=248867
It said to use speedstep-centrino for core duo. I have core 2 duo and got an error after i entered it. so then i used acpi-cpufreq, which gave no output. This post was from 2006 and didnt even list core 2 duo as an option, anyone know if its a different code?
I stopped at the first part of Step 5 because its not giving me any output... i dont get it
-
When i add the CPU frequency scaling thing to my task bar, i get this message
-
First off, your CPUfreq module is not speedstep-centrino, it's acpi_cpufreq. I'm not sure whether both acpi_cpufreq and acpi-cpufreq work as module names, but you're better off using acpi_cpufreq. When you load it, no message means a successful load. Once you load the driver and the governors, you need to see if they are indeed loaded. Post the output of the command;
Code:sudo lsmod
Good Luck.. -
Ok here is the output
-
You won't need to flash the BIOS. The fact that it scales down under Windows means it's not a BIOS problem. I think the only thing you're missing now is making sure that cpufreqd is running.
-
so how do i do that?
-
I really don't know how you would go about it in Ubuntu, but the process itself is very basic and straightforward, and I'm sure it's covered somewhere in the Ubuntu guides and wikis. Essentially, what you're looking for is how to manage daemons (service processes) in Ubuntu.
Just for reference from other distros, this is how you'd do it in Fedora and other RPM-based distros:
Code:# chkconfig cpufreqd on
Code:DAEMONS=(... cpufreq ...)
-
Sorry for my memory being dim. If you're laptop is indeed similar to an Asus W7j, then it looks like my experience with Linux CPU scaling on Asus laptops will be a bit more relevant than I thought. Let me give a bit more background.
1) First off, for clarification's sake, cpufreqd does not enable CPU scaling. It is a governor program for Linux kernel CPU scaling. To enable Linux CPU frequency scaling, you need to configure your Linux kernel, and/or kernel modules correctly.
2) System BIOS absolutely can affect CPU scaling in Linux, and not affect it in Windows. I found that out the hard way when I bought my first Asus laptop, the A8Js. The only BIOS versions I could get to support CPU Scaling under Linux were the first rev, 203, and the second 204. Subsequent versions would not allow CPU scaling under Linux. My process was documented here.
3) When I sold my A8Js, I got an Asus W7j, and I discovered something even stranger related to Linux CPU frequency scaling. Once I correctly configured the acpi_cpufreq CPUfreq driver, when my computer would boot and load the module, I could not get CPU scaling to work. (The error message from the applet is the same one mentioned in this thread and it indicates CPU frequency scaling has not been enabled) I tried all BIOS versions available then, and nothing worked. I finally simply removed the CPUfreq driver module and then reloaded it, and all of a sudden it starting working. This thread on the Ubuntu forums, and more specifically this post from that thread, indicates others had exactly the same problem, and unfortunately were stuck with the same hack solution. I never did figure out what was causing it, and any BIOS version I tried seem to have the same problem. What I ended up doing was putting the command to remove the module and then load the module in my system startup file, and I never noticed it again. If you want to test if this is in fact your problem, you can try the following commands in a terminal window, one at a time;
Code:sudo modprobe acpi_cpufreq sudo rmmod acpi_cpufreq sudo modprobe acpi_cpufreq sudo modprobe cpufreq_conservative sudo modprobe cpufreq_ondemand sudo modprobe cpufreq_powersave sudo modprobe cpufreq_stats sudo modprobe cpufreq_userspace cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
Code:rmmod acpi_cpufreq modprobe acpi_cpufreq
In terms of updating your system BIOS, both AFLASH, which is designed to program, or flash, your BIOS from a bootable DOS device, like a USB stick or floppy disk, or WINFLASH, which is designed to flash your BIOS from within Windows, are the programs for installing, or flashing, your BIOS. They're not the actual BIOS file. That download would be called something else, like these archive file names for W7j BIOS from the Asus website; W7JF303AS.zip and W7JF302AS.zip. To flash the system BIOS you download both a BIOS file, and a flashing program, and then follow the instructions included with either the BIOS or flash program.
Good Luck.. -
AWESOME! I just entered those codes u gave me one at a time, and this time after i entered the last line it gave an an output of
OK, so i have the little CPU frequency monitor on my taskbar, but it doesnt let me change the speed. I removed it, then re-added it and it DID NOT give me the Scaling Not Supported error. So thats good. but i still cant change speed with it.
So right now... i dont have any of the powernowd, cpufreq, or some other one (forget the name) installed. Should i install one? Will that change my cpu speed on demand, according to system needs? Which one is best?
Then after i do that do I enter those last codes u gave me to the startup file? -
In order to get the CPU Frequency scaling applet to work, (and let a user change the CPU speed), under Ubuntu, you need to follow the instructions on this howto. Specifically now that you have correctly installed the applet on your panel bar, read down the howto and follow the instructions that begin with;
First, you'll want to make sure you have certain modules configured to load in your /etc/modules file. So you should do the following;
Code:sudo gedit /etc/modules
Code:acpi_cpufreq cpufreq_conservative cpufreq_ondemand cpufreq_powersave cpufreq_stats cpufreq_userspace
Code:sudo gedit /etc/rc.local
Code:rmmod acpi_cpufreq modprobe acpi_cpufreq
Good Luck.. -
Ok, now the applet lets me change the speed. i assume ondemand means it will automatically adjust?
I added the module names to the first file
the rc.local files has this
-
Code:sudo chmod +x /etc/rc.local
Good Luck.. -
OK, awesome, i rebooted and scaling seems to be working, and i didnt get that error message from the applet. But the settings to keep it ondemand arent saving when i reboot. Also, my sound volume isnt sticking between rebooting. Could they be related?
Im almost there... -
Code:sudo gedit /etc/modprobe.d/alsa-base
Code:options snd_hda_intel model=3stack
Good Luck.. -
OK, i just did step 7. i will reboot in a sec.
in regards to my sounds
Should i add ur code in addition to this one, or replace this one? -
Good Luck.. -
I just rebooted and step 7 from the HOWTO didnt work
here is the config file that i currently have.... does it look right?
-
Jas, thanks for all your help here
i changed that line from asus to 3stack, and the sounds still works, but its still not saving my volume setting between reboots. Ill keep messing around. Anyone else have any ideas? -
BTW, when you say that Step 7 didn't work, I assume you mean that when your system boots and you move your mouse over the CPU scaling applet in the panel bar, it states some other governor than Ondemand, is enabled, right? (Like Userspace or Performance?)
After thinking about it some more, due to the weird nature of the CPU scaling, the sysfs configuration probably will NOT work. It is likely trying to set ondemand in a scaling directory that doesn't exist yet, so you'll need to set it after the loading and unloading of the CPUfreq module. But that's pretty simple.
Just add the following line to your /etc/rc.local file after the module load and unload lines;
Code:echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
Good Luck.. -
Yes that is what i mean with regards to step 7. Ill give a try adding a space between the "="
-
Awesome, that did it. The second part. adding the space to the first one didnt do anyhitng.
I added that code to /etc/rc.local and when i rebooted, cpu0 was at ondemand. So then i went back and also added that same code but with a cpu1, and when i rebooted my other core was also at ondemand.
So now you say i can remove the sysfsutils package? what is the uninstall command?
Thanks so much man, you have ensured that ill stick with linux this time. because about 2 years ago i gave up and and went back to windows.
now i just still need to solve a few other little things.
My sound volume doesnt save after reboot.
I cant turn off bluetooth.
my memory card slot doesnt recognize anyhting. -
After thinking about it some more, due to the weird nature of the CPU scaling, the sysfs configuration probably will NOT work because the system configuration is trying to set ondemand in a scaling cpufreq directory that doesn't exist yet, so pretty much the only way to do it is to set it in the rc.conf file like you did.
Also you should only need to have the "echo" configuration line for cpu0 and not cpu1. It should set the ondemand governor for both cores with just the one cpu0 setting. Finally since you won't need the sysfsutils package for the cpu scaling configuration, I would remove it, as I don't think you would be using it for anything else. I would assume that the Ubuntu command for removing would be;
Code:sudo apt-get remove sysfsutils
If it doesn't you can try one last hack. You can manually set the volume every time you boot your computer by again editing the /etc/rc.local file and adding the following line after the CPU scaling lines, and before the "exit 0" line;
Code:insert "amixer -q set Master 50% unmute"
In terms of the other stuff, if this laptop is truly the same as the Asus W7j, you may want to read through this thread here at NBR, and take a look at the Ubuntu page on the W7j, for further guidance. They may contain some helpful hints on addressing your hardware going forward.
Good Luck.. -
Actually, after i rebooted with adding the first echo line, only cpu0 was set to ondemand while cpu1 was still on performance. Thats why i went back and added another echo line for cpu1, and now they both boot to ondemand.
I went to audio groups and Use Audio Devices was already checked for my name. so then i went to the root user and checked it there. Rebooted. and nothing.
I will try that last hack you gave me. 50% is much better than blasting speakers everytime i restart.
Another weird thing, it seems that in my internet browser, if i use flash (youtube, or other site that plys video), all my sounds and sound control goes away on my desktop (using vlc or other media player, program sounds, etc). And when i use a media player first, then i get no sound in my web browsers (youtube, etc.)
so just to clarify. if i open a youtube video and the sound is blasting, adjusting the master volume on my taskbar does nothing. i can only adjust the volume with youtube's own volume control. Then, if i close out the browser. i get no sound from anyhitng else on my computer.
My laptop is just full of issues ...
Thanks for those other links, hopefully they will help out, i am pretty sure it is at least similar to w7j.... -
-
You could try alsamixer. Just open a terminal and enter this. (Make sure you're logged in as a normal user.)
Code:$ alsamixer
Afterwards, if it works and you want to store your settings for the next boot, use this command:
Code:$ sudo alsactl store
-
I get this output when i enter "alsamixer"
Ubuntu CPU Scaling not working with Laptop core2duo T5600
Discussion in 'Linux Compatibility and Software' started by aerowinged, Aug 18, 2008.