You are not logged in.

#1 2011-12-23 11:34:15

aash29
Member
Registered: 2011-09-28
Posts: 16

cpu frequency dropping after unplugging AC cable

Greetings,
I was experiencing sluggish performance on my HP 625 laptop under Arch sometimes. After I examined cpu frequencies, it became clear that they were lowered substantially all the time.
Normally I would just use cpufreq-set or somesuch to modify them, but strange thing occurs now:
a couple of minutes after unplugging AC cable, current cpu frequencies and their upper bounds are lowered (usually 2/3 of maximum) for some reason. Replugging AC doesn't change this, and any settings (cpufreq-set, directly writing to cpureq files) are ineffective. Nothing can change this short of reboot.
I tried changing /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq, but it is immediately reverted. Is there a way to see which process changes a file?

Offline

#2 2011-12-23 12:47:40

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,394

Re: cpu frequency dropping after unplugging AC cable

Why dont you kill them one by one in a "as simple as possible" environment and check /var/log/everything.log for hints?


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#3 2011-12-23 13:04:20

aash29
Member
Registered: 2011-09-28
Posts: 16

Re: cpu frequency dropping after unplugging AC cable

kill who?

Offline

#4 2011-12-23 13:19:57

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,394

Re: cpu frequency dropping after unplugging AC cable

I'd begin without even starting X and kill processes owned by you


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#5 2011-12-23 13:56:22

aash29
Member
Registered: 2011-09-28
Posts: 16

Re: cpu frequency dropping after unplugging AC cable

there are virtually no processes run by me. Or you mean root also?

Offline

#6 2011-12-23 18:48:56

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,394

Re: cpu frequency dropping after unplugging AC cable

Yes, also root, try to track down the root of the issue, isolate the problem!


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#7 2011-12-29 19:42:25

aash29
Member
Registered: 2011-09-28
Posts: 16

Re: cpu frequency dropping after unplugging AC cable

Strange enough, even doing killall -u root didn't allow me to change cpu frequency afterwards.
I must say the issue is dodgy, I cannot point out a 100% way to reproduce it. Is there a way to covpletely disable frequency scaling? I tried adding processor.ignore_ppc=1 to menu.lst, but problem persists.

Offline

#8 2011-12-30 06:18:53

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,394

Re: cpu frequency dropping after unplugging AC cable

What if you "rmod" cpufreq-related modules? (including lsmod|grep -i cpufreq) and load them again, any effect?
Keep in mind that i'm shooting in the dark smile


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#9 2011-12-30 12:51:52

aash29
Member
Registered: 2011-09-28
Posts: 16

Re: cpu frequency dropping after unplugging AC cable

I only found powernow-k8 module, and disabling it makes it impossible to see current frequency (but judging by lag it's still underscaled).

So far this is what I discovered:
1) turn on PC with AC plugged in.
frequency is controllable, everything ok.
2)unplug AC
still good
3) start X (gnome)
frequency goes down, nothing but reboot brings it to order.

I tried making cpufreq files read-only, but the are overwritten nonetheless.

I also tried Ubuntu LiveCD, same problem (but only tried with X running there).

Offline

#10 2011-12-30 16:42:05

MadCat_X
Member
Registered: 2009-10-08
Posts: 189

Re: cpu frequency dropping after unplugging AC cable

https://bbs.archlinux.org/viewtopic.php?id=132709

This looks a bit like a bug in the CPU governing system, even though I didn't have any problems with it on 3.1 kernel series

EDIT: Does this help?

modprobe cpufreq_performance (if not loaded already)
cpufreq-set -g performance
rmmod cpufreq_ondemand
modprobe cpufreq_ondemand
cpufreq-set -g ondemand

If not, try repeating this but this time remove the whole acpi_cpufreq module chain.

Last edited by MadCat_X (2011-12-30 16:51:16)

Offline

#11 2011-12-30 18:04:28

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 849

Re: cpu frequency dropping after unplugging AC cable

sorry if i made a new thread, but i thought my problem was a little bit different... right now performance on ac power runs perfectly...only ondemand set itself on the lowest freq possible. I think may be a bug related to pm-utils?(always occurrs after suspend in ondemand, or when plug in and out ac cable) I'll try now with granola to understand if it's a cpu scaling bug or ondemand governor one.
EDIT: tried to remove ondeman then modprobe it, but nothing change, always 1ghz and it will stay there...

Last edited by nierro (2011-12-30 18:08:20)

Offline

#12 2011-12-30 18:20:09

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 849

Re: cpu frequency dropping after unplugging AC cable

granola too isn't working(granola as i said uses userspace governor)...so the bug might be related to cpu frequency scaling, that after acpid events (lid close, suspend, ac cable plugged in and out) losts its capacity and locks freq to the lowest possible...
I think only performance and conservative will works 100%, because they don't need any cpu scaling.
What do you think about?any workaround?
EDIT: well i tried booting my -ARCH kernel and i found out that no /proc/acpi/ac_adapter/*/state is there... what can i do?(anyway i tried yesterday, while using cpufreq daemon, and I had the same problem.
EDIT2: tried on my other laptop with arch kernel 3.1.5 and there everything works well...in that laptop i have gnome3.2(but i don't think it really matters) and i have no acpi and acpid installed...may be something wrong with them?

Last edited by nierro (2011-12-30 19:09:17)

Offline

#13 2011-12-30 19:38:15

aash29
Member
Registered: 2011-09-28
Posts: 16

Re: cpu frequency dropping after unplugging AC cable

MadCat_X wrote:

EDIT: Does this help?

modprobe cpufreq_performance (if not loaded already)
cpufreq-set -g performance
rmmod cpufreq_ondemand
modprobe cpufreq_ondemand
cpufreq-set -g ondemand

If not, try repeating this but this time remove the whole acpi_cpufreq module chain.

ondemand governor more or less works. However I'd rather just nail frequency to maximum, but cannot achieve that.

nierro wrote:

sorry if i made a new thread, but i thought my problem was a little bit different..

Yes, it looks like your problem is somewhat different

Offline

#14 2011-12-30 20:12:53

MadCat_X
Member
Registered: 2009-10-08
Posts: 189

Re: cpu frequency dropping after unplugging AC cable

aash29 wrote:

ondemand governor more or less works. However I'd rather just nail frequency to maximum, but cannot achieve that.

In that case, wouldn't the performance governor suit your needs?

Offline

#15 2011-12-31 06:36:48

aash29
Member
Registered: 2011-09-28
Posts: 16

Re: cpu frequency dropping after unplugging AC cable

I suppose it would, but when I try to use performace or userspace, things that I described in the first post happen.

EDIT: ondemand is now behaving the same way. It seems that this is due to min and max scaling frequencies changing unexpectedly. At the moment, " current policy: frequency should be within 840 MHz and 1.50 GHz." which apparently leads to frequency being stuck at 1.5.

Is there a way to prevent  scaling_max_frequency and  scaling_min_frequency files from changing? Or they are merely indicating the change?

Last edited by aash29 (2011-12-31 10:01:52)

Offline

#16 2011-12-31 15:12:54

MadCat_X
Member
Registered: 2009-10-08
Posts: 189

Re: cpu frequency dropping after unplugging AC cable

This time I actually read what your problem is and it made me thinking if it's the BIOS that's in fault. It would be interesting to check if there's an update available or try to boot Windows on your laptop. From time to time I have to boot into Win7 on my laptop to reinstall certain Toshiba ACPI driver to switch the cooling policy from "throttle CPU down and keep fan at low speed" to "run CPU and fan at full speed if needed".

Offline

#17 2011-12-31 15:44:30

aash29
Member
Registered: 2011-09-28
Posts: 16

Re: cpu frequency dropping after unplugging AC cable

I have Windows 7 on this laptop, but don't know which driver (if any) I should install. Settings in BIOS itself are VERY limited, and this laptop model is said to brick even when updating with certified vendor BIOS updates.

Offline

#18 2011-12-31 16:05:11

MadCat_X
Member
Registered: 2009-10-08
Posts: 189

Re: cpu frequency dropping after unplugging AC cable

That's rather unfortunate as the HP website for your laptop suggests that there have been at least 2 BIOS updates that dealt with various weird issues. Does Win7 work OK on your machine? You can check the min, max and current clock using CPU-Z.

Offline

#19 2012-01-01 11:50:11

aash29
Member
Registered: 2011-09-28
Posts: 16

Re: cpu frequency dropping after unplugging AC cable

I didn't find any power management problems in bios updates descriptions.

There are "bios_limit" files in cpureq directory, and they contain "2100000", as expected. I also tested under Windows with CPU-Z, but didn't find max and min scaling options. However, frequency was maxed almost all the time (as I set in power management options), so this _seems_ to be a linux-specific problem (maybe even X-specific, as it begins to occur after loading X).

Offline

Board footer

Powered by FluxBB