You are not logged in.
Hi!
Up till yesterday, frequency scaling worked flawlessly on my laptop (Thinkpad R61, Intel Core 2 Duo T7500 2x2.2 GHz). I set it up following this wiki entry.
Since yesterday the scaling will no longer go up to 2.2GHz as it used to, but only to 1.2GHz. So my first action was to inspect the files in
/sys/devices/system/cpu/cpu0/cpufreq
And this is what I found:
cpuinfo_max_freq:
2201000
scaling_available_frequencies:
2201000 2200000 1600000 1200000 800000
scaling_available_governors:
powersave ondemand userspace performance
scaling_governor:
ondemand
scaling_max_freq:
1200000
So my first intention was to edit scaling_max_freq and set it manually to 2201000:
sudo vi scaling_max_freq
but when I tried to write my changes, I got the error
"scaling_max_freq" E667: Fsync fehlgeschlagen
with "fehlgeschlagen" being German and meaning "failed".
Next I tried to pipe (?) the frequency to the file:
sudo cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
only to read, I had no permission.
Same with
/sys/devices/system/cpu/cpu1/cpufreq
Any suggestions are very much appreciated,
cheers!
Last edited by quarK (2009-01-23 23:45:08)
Offline
Hi..
maybe your "max_freq=" entry in /etc/conf.d/cpufreq is not right?
Last edited by chris89 (2008-03-30 01:32:08)
Offline
you can also edit the files in /etc/cpufreqd.conf to your liking. Profiles are listed first, and when to use those profiles are listed in the second part of the file.
Offline
Hi y'all!
maybe your "max_freq=" entry in /etc/conf.d/cpufreq is not right?
Ooops, it seems I forgot to include my experiences with the /etc/conf.d/cpufreq
Well, I tried to set the correct frequencies in GHz, MHz and kHz, with no successs. The next step was to comment out the lines in question completely, which also had no effect. I then tried to set higher frequencies than my actual max frequencies, unsuccessful again. Finally, to test, if the information in this file had any effect at all, I set the freqencies to different allowed levels (e.g. min_freq=1200MHz) and guesst what? No change at all, the scaling still only works in two steps: 800MHz and 1.2GHz.
you can also edit the files in /etc/cpufreqd.conf to your liking.
Sorry, I don't have either a directory nor a file named "cpufreqd.conf" anywhere.
Anybody got any more ideas??
Offline
Hi again!
I think I just found the cause for my problems with the frequency scaling:
Whenever the battery (standard) is inserted in my laptop (Lenovo R61), the frequency scaling works as it should. That is it's scaling from 800MHz to 2.2GHz. But as soon as I remove the battery the frequency won't go higher than 1.2GHz. It doesn't matter which governor is used. For some (possibly weird) reason , I believe, posting the output of lsmod will help other people to help me:
bash-3.2$ lsmod
Module Size Used by
aes_i586 33408 2
aes_generic 26816 0
i915 22656 2
drm 72340 3 i915
joydev 10048 0
firewire_ohci 16000 0
firewire_core 36800 1 firewire_ohci
crc_itu_t 2304 1 firewire_core
pcmcia 33324 0
serio_raw 5636 0
thinkpad_acpi 46668 0
i2c_i801 8848 0
nvram 7432 1 thinkpad_acpi
ohci1394 28976 0
intel_agp 22164 1
yenta_socket 23564 1
rsrc_nonstatic 11392 1 yenta_socket
psmouse 37136 0
video 16016 0
pcspkr 2944 0
pcmcia_core 33304 3 pcmcia,yenta_socket,rsrc_nonstatic
ieee1394 81464 1 ohci1394
i2c_core 19584 1 i2c_i801
output 3200 1 video
agpgart 28120 3 drm,intel_agp
sg 26896 0
thermal 12956 0
fan 3844 0
button 6544 0
battery 10756 0
ac 4612 0
arc4 2176 2
ecb 3072 2
snd_seq_oss 30336 0
snd_hda_intel 292000 1
snd_seq_midi_event 6656 1 snd_seq_oss
snd_seq 48464 4 snd_seq_oss,snd_seq_midi_event
snd_seq_device 6796 2 snd_seq_oss,snd_seq
snd_hwdep 7556 1 snd_hda_intel
snd_pcm_oss 38432 0
snd_pcm 70404 2 snd_hda_intel,snd_pcm_oss
snd_timer 19588 2 snd_seq,snd_pcm
snd_page_alloc 8072 2 snd_hda_intel,snd_pcm
snd_mixer_oss 14848 1 snd_pcm_oss
snd 46436 11 snd_seq_oss,snd_hda_intel,snd_seq,snd_seq_device,snd_hwdep,snd_pcm_oss,snd_pcm,snd_timer,snd_mixer_oss
soundcore 6496 1 snd
iwl3945 86504 0
mac80211 117644 1 iwl3945
cfg80211 11400 1 mac80211
evdev 9344 7
usbhid 42560 0
hid 38272 1 usbhid
ff_memless 5128 1 usbhid
tg3 110596 0
cpufreq_powersave 1920 0
cpufreq_ondemand 7180 1
cpufreq_userspace 3796 0
acpi_cpufreq 11292 2
freq_table 4112 2 cpufreq_ondemand,acpi_cpufreq
processor 29144 4 thermal,acpi_cpufreq
rtc_cmos 7712 0
rtc_core 15752 1 rtc_cmos
rtc_lib 3072 1 rtc_core
ext3 124040 2
jbd 44308 1 ext3
mbcache 7168 1 ext3
sr_mod 15268 0
cdrom 34080 1 sr_mod
sd_mod 23168 4
pata_acpi 5248 0
ehci_hcd 33804 0
uhci_hcd 23312 0
usbcore 128620 4 usbhid,ehci_hcd,uhci_hcd
ata_piix 14852 0
ahci 23812 3
ata_generic 5380 0
libata 141424 4 pata_acpi,ata_piix,ahci,ata_generic
Well a simple fix would be to leave the battery in all the time:), but I read several warnings in lenovo manuals and on independant websites that this should not be done, as it will damage the battery and is not too good for the laptop either...
Offline
Hi!
It's getting weirder and weirder.:P The battery doesn't have any effect anymore. 800MHz to 1.2GHz, no matter what I do. I've tried to change things with the
cpufreq-set
command. I was able to change the governor, and the minimum frequency for the scaling. The only thing that still isn't working is scaling up to 2.2GHz (as it once did).
What seems really weird to me, is that the available scaling frequency goes up to 2.2GHz:
scaling_available_frequencies:
2201000 2200000 1600000 1200000 800000
But the actual frequency won't any more.
Anybody any more ideas??
cheers
quarK
Offline
Have you tried this already?
$ su root
# echo 2201000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
btw:
It should work without the cpufreqd. Just make shure that the scaling_max_freq and governor you want to use are "loaded" at boot. e.g. via /etc/rc.local
This is my rc.local
#!/bin/bash
#
# /etc/rc.local: Local multi-user startup script.
#
echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo 1400000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
The needed kernel modules should also be loadadat boot
edit:
just noticed you have a core2 cpu.
You should add an entry for each core.
e.g.
echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo 2201000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo ondemand > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
echo 2201000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
I think, it's also possible that the problem is related to some ACPI stuff...
Last edited by SiD (2008-04-03 15:57:25)
Offline
Hi,
First of all: Thanks to all of you for your help so far!
I tried this
[root@mother ~]# echo 2201000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
and without returning an error message, it didn't have any effect. Changing the governor in this manner worked and defining a new minimal freqency for the scaling worked as well:
[root@mother ~]# echo 1200000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
But no chance of changing the max frequency
btw: It was only necessary to give one cpu (e.g. cpu0) a new governor or frequency and it was changed on both of them.
I also changed my /etc/rc.local and it now looks like this
#!/bin/bash
#
# /etc/rc.local: Local multi-user startup script.
#
echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo ondemand > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
echo 2201000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo 2201000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
In the past, it looked like this:
# Set CPU Frequency Scaling
echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "ondemand" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
cat /sys/devices/system/cpu/cpu1/cpufreq/cpuinfo_max_freq > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
cat /sys/devices/system/cpu/cpu1/cpufreq/cpuinfo_max_freq > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
With both of them: no effect (yes, I rebooted ).
The needed modules are loaded at startup. Here's are the relevant lines of my /etc/rc.conf
MOD_AUTOLOAD="yes"
MOD_BLACKLIST=()
MODULES=(acpi-cpufreq cpufreq_userspace cpufreq_ondemand cpufreq_powersave tg3 iwl
3945 snd-mixer-oss snd-pcm-oss snd-hwdep snd-page-alloc snd-pcm snd-timer snd snd-
hda-intel soundcore)
...
DAEMONS=(syslog-ng !network !netfs !crond hal fam kdm sshd wicd cpufreq)
About the acpi-stuff: I have never done any configuration with that. As far as I know this is for hibernate and standby mode and stuff. You may of course be right to suspect any problems coming from that, but I'm afraid I don't even know where to start looking for them
Why would I be able to specify each parameter to my liking except the max frequency?? Quite a mystery to me... could my laptop be just lazy ?
cheers
quarK
Offline
hmm,
I don't know about the acpi thing.
After setting the max_freq with
echo 2201000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
the content of that file is 2201000, right?
If so, I don't know why it's not working.
Have you tried the next lower freq 2200000 ?
edit:
Just seen you load the cpufreq daemon in rc.conf.
Have you tried it without that daemon?
Last edited by SiD (2008-04-03 18:11:23)
Offline
After setting the max_freq with
Code:echo 2201000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
the content of that file is 2201000, right?
No, it's not. I guess it's the same problem that I had when I tried to edit this file maually. When I tried to write the changes (as root) vi said:
"scaling_max_freq" E667: Fsync fehlgeschlagen
I just prevented loading the cpufreq deamon in my rc.conf and rebooted. No difference at all. (Why did I load the deamon in the first place then?? ) I still can't change the max frequency and the scaling_max_freq file still says 1200000. Trying some lower frequencies (2.2GHz, 1.6GHz) was my idea in the beginning as well, but it didn't work either. The scaling_max_freq file just can't be changed anymore. As I mentioned above: It once worked.
Offline
hmm,
I don't know why you can't change the scaling_max_freq file.
Are there any errors if you use the echo command (as root )?
echo 2201000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
Offline
Are there any errors if you use the echo command (as root wink )?
Nope, nothing. Some kind of reaction would be quite nice, so we'd know where to start. I think the whole problem is, that I am not able to edit this file.
Offline
I had the same problem on a Dell Inspiron 6000 laptop. The cpu ran @ 800MHz (1.6GHz mac) only. scaling_max_freq and scaling_min_freq had the same value, 800000. After spending hours checking the configuration files, I went into the BIOS and found the AC Adapter was not recognized. So, I changed the old adapter and everything is fine.
Offline
I had the same problem on a Dell Inspiron 6000 laptop. The cpu ran @ 800MHz (1.6GHz mac) only. scaling_max_freq and scaling_min_freq had the same value, 800000. After spending hours checking the configuration files, I went into the BIOS and found the AC Adapter was not recognized. So, I changed the old adapter and everything is fine.
Wow, I'm really impressed that you registered in the forum to actually help somebody instead of asking a question yourself. Welcome to the Arch Forum!
Haven't been here in a while. Still rocking Arch.
Offline
Hi.
I own a ThinkPad X61s with the same issue, but here it is definitely related to the battery. With the battery connected I can scale both CPUs up to 1601000KHz, but when I remove it then I can't get the frequency any higher than 1.2GHz. I also tried to play with some BIOS settings but yet without success.
I use acpi to auto adjust the frequency when AC is connected/disconnected (and also for suspend and some Fn+Fx keys). Everything works fine, except for when I unplug the battery.
...
btw: It was only necessary to give one cpu (e.g. cpu0) a new governor or frequency and it was changed on both of them.
...
Yes, same behaviour here.
Offline
Wow, I'm really impressed that you registered in the forum to actually help somebody instead of asking a question yourself.
Same here!
Unfortunately, changing the BIOS settings didn't help, but thanks for the suggestion!
Offline
@Sigi,
Thanks. That's very nice.
I am a long time Slackware/gentoo user. After having heard many good things about Arch, I recently decided to give it a try. Guess what? I am very glad I did it. I can see a lot similarities between Arch and gentoo, but less BS.
@quarK
Sorry. Maybe I said it wrong. What I actually did was to replace the 5-year old ac adapter with a new one. That resolved my problem. In my Dell laptop, It's not allowed to change settings for the ac adapter in BIOS. After reading the post from hannes, I am thinking maybe it's Thinkpad specific. I have a T61 and will try to see if it happens if I remove the battery. (never did that before )
Offline
@nuxrl: What you said was quite clear! I just couldn't find any issues in the BIOS with a 3-month-old notebook running on its original AC-adapter. I tried to achieve something by changing several "power" settings in the BIOS (those that deal with CPU-scaling). Well, without success, again.
Additionally, when using other distros (Kubuntu, I admit it! ) , scaling worked flawlessly, so i figure this is likely not a BIOS or hardware issue. But who knows... I'll keep on trying, googling and posing
Offline
Hi!
In my opinion it is a bug in all Kernel > 2.6.23. I have a Thinkpad R61.
That's what I think at the moment too. I tried several (live) distributions using Kernel 2.6.24 like slax (2.6.24.4), kubuntu 8.04 (2.6.24.??) and sidux (2.6.24.4) and with all of them I had the freqency scaling issue. Kubuntu 7.10 (2.6.22.??) worked just fine.
I guess the best thing to do is to just wait for 2.6.25. I guess chances are that the bug is known and will be fixed. Or should we file a bug report? And how and where do you do that??
cheers,
daniel
Offline
Same problem here as well.. I have an upstream bug open for it: http://bugzilla.kernel.org/show_bug.cgi?id=10564
I am a gated community.
Offline
You might want to have a look at my post concerning cpufreq + laptop-mode-utils. Maybe these are related?
Nothing is sacred
Offline
Hi!
An upgrade to 2.6.25 didn't change the situation, but a downgrade to 2.6.22 actually did. But because of the wirless drivers I need, keeping 2.6.22 was not an option. Did anyone experience any positive changes after the upgrade to 2.6.25 ??
Offline
I've had the same problem for a few months (Dell Latitude D610) - a while after booting my CPU would be stuck at 800MHz no matter what I did with cpufreq, etc.
A few days ago, Linus patched kernel to fix this bug:
http://git.kernel.org/?p=linux%2Fkernel … 36a75c7579
Yesterday I compiled 2.6.27-rc1-git4 snapshot (from kernel.org) and have been using it all day - finally the bug is gone.
compiling your own kernel is quite easy following the arch wiki - otherwise, you can wait for the 2.6.27 kernel
Offline
The latest Kernel-update (2.6.26-1, I think) fixed this problem. Scaling now goes up to full speed.
Also, my wireless-LED is now flashing, which is quite annoying. Some gaffa-tape should fix that, though.
cheers,
daniel
Offline
I still get this behavior under 2.2.26.2, although it's much less frequent than it used to be. Hopefully hippojazz's link fixes this bug for good. FWIW, I'm on a similar machine to hippojazz (Dell Latitude C400).
I am a gated community.
Offline