You are not logged in.

#1 2008-11-09 16:09:08

hiob
Member
Registered: 2007-12-15
Posts: 21

cpu frequency gets lowered when cord is pulled (cpufreq, powernow-k8)

Hello,

My cpu frequency gets lowered when the cord is pulled.
I'm using cpufreq and powernow-k8 with an "AMD Sempron Mobile 3600+"-processor on a MSI Megabook VR610.
With the cord plugged in everything works.

I get the following output when typing 'cpufreq-info' while my cord is pulled:

analyzing CPU 0:
  driver: powernow-k8
  CPUs which need to switch frequency at the same time: 0
  hardware limits: 800 MHz - 2.00 GHz
  available frequency steps: 2.00 GHz, 1.60 GHz, 800 MHz
  available cpufreq governors: ondemand, powersave, performance
  current policy: frequency should be within 800 MHz and 800 MHz.          # <- "should be within 800 MHz and 2.00 GHz" would make sense
                  The governor "ondemand" may decide which speed to use          # it does not matter which governor is used
                  within this range.
  current CPU frequency is 800 MHz (asserted by call to hardware).

the only way to avoid this error is to boot without the powernow-k8-modul or to boot in battary-mode.

I tried the following:

bash-3.2# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
800000
bash-3.2# echo "2000000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
bash-3.2# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
800000

That's what I found out by now - if you need more Information please ask.

Thank you in advance
hiob

P.S.: Excuse my poor English, please. smile

Last edited by hiob (2008-11-09 16:14:28)

Offline

#2 2008-11-09 17:42:07

idosh
Member
Registered: 2008-11-07
Posts: 42

Re: cpu frequency gets lowered when cord is pulled (cpufreq, powernow-k8)

The cpufreq-info output doesn't really make sense.

Edit the /etc/conf.d/cpufreq file and make sure the min and max frequencies are set correctly.
It's also more convenient to use cpufreq-set instead of '/sys/devices/system/cpu/cpu0/cpufreq'.

Hope that helps.

Offline

#3 2008-11-10 22:24:52

Cheesebaron
Member
From: Denmark
Registered: 2008-10-31
Posts: 65
Website

Re: cpu frequency gets lowered when cord is pulled (cpufreq, powernow-k8)

Do you use acpid? If so try look in /etc/acpi/handler.sh for what actions are done when pulling the power.

Offline

#4 2008-11-11 07:40:10

hiob
Member
Registered: 2007-12-15
Posts: 21

Re: cpu frequency gets lowered when cord is pulled (cpufreq, powernow-k8)

Thank you for the quick answers!
I'm not at my laptop now, so will take a look at the mentioned files today afternoon.
But I would gess, that there are no mistakes in my /etc/conf.d/cpufeq, because everything works if I boot with the cord plugged.
Yes, I use acpid - more infos follow.

P.S.: I thought you can only change the  governour with cpufreg-set?

Last edited by hiob (2008-11-11 07:44:09)

Offline

#5 2008-11-11 11:11:00

Cheesebaron
Member
From: Denmark
Registered: 2008-10-31
Posts: 65
Website

Re: cpu frequency gets lowered when cord is pulled (cpufreq, powernow-k8)

Afaik you can just echo the govenor you want into the right file in /proc or /sys.

Offline

#6 2008-11-11 18:40:28

hiob
Member
Registered: 2007-12-15
Posts: 21

Re: cpu frequency gets lowered when cord is pulled (cpufreq, powernow-k8)

Well there are some strange lines in the handler.sh - but the problem is the same after deactivating them.
(Yes, you can set all the cpufreq-settings with echo and cpufreq-set cool )

my /etc/acpi/handler.sh (the importend lines) :

        ac_adapter)
                case "$2" in
                        AC)
                                case "$4" in
                                        00000000)
                                                #echo -n $minspeed >$setspeed
                                                #/etc/laptop-mode/laptop-mode start
                                        ;;
                                        00000001)
                                                #echo -n $maxspeed >$setspeed
                                                #/etc/laptop-mode/laptop-mode stop
                                        ;;
                                esac
                                ;;
                        *) logger "ACPI action undefined: $2" ;;
                esac
                ;;
        battery)
                case "$2" in
                        BAT0)
                                case "$4" in
                                        00000000)       #echo "offline" >/dev/tty5
                                        ;;
                                        00000001)       #echo "online"  >/dev/tty5
                                        ;;
                                esac
                                ;;
                        CPU0)
                                ;;
                        *) logger "ACPI action undefined: $2" ;;
                esac
                ;;

my /etc/conf.d/cpufreq:

governor="ondemand"
min_freq="800MHz"
max_freq="2GHz"

Last edited by hiob (2008-11-11 18:41:02)

Offline

#7 2008-11-12 04:00:00

SnapShot
Member
Registered: 2008-08-26
Posts: 43

Re: cpu frequency gets lowered when cord is pulled (cpufreq, powernow-k8)

Check the /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies to see the available frequencies.

Offline

#8 2008-11-12 15:18:15

hiob
Member
Registered: 2007-12-15
Posts: 21

Re: cpu frequency gets lowered when cord is pulled (cpufreq, powernow-k8)

It is the same output with and without the cord plugged (cpufreq-info was right at this point):

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
2000000 1800000 1600000 800000

Offline

#9 2008-11-14 17:09:37

hiob
Member
Registered: 2007-12-15
Posts: 21

Re: cpu frequency gets lowered when cord is pulled (cpufreq, powernow-k8)

Has anybody an Idea?
No? Then I would have to file a bug at kernel.org, right?
thx hiob

Offline

#10 2008-11-15 12:25:18

Cheesebaron
Member
From: Denmark
Registered: 2008-10-31
Posts: 65
Website

Re: cpu frequency gets lowered when cord is pulled (cpufreq, powernow-k8)

Do you use hald? I recently discovered a hald-addon-cpufreq deamon running on my machine, maybe that one is changing something.

Offline

#11 2008-11-17 16:43:12

hiob
Member
Registered: 2007-12-15
Posts: 21

Re: cpu frequency gets lowered when cord is pulled (cpufreq, powernow-k8)

Yes that is also running on my machine, it is a part of hal (/usr/lib/hal/hald-addon-cpufreq).
But it does not have an effect on the cpu-frequency weather hal is running or not - I would guess this tool just informs the system about it.

Thank you for the answer.

Offline

Board footer

Powered by FluxBB