You are not logged in.

#1 2007-01-05 18:30:25

QuimaxW
Member
From: Papua New Guinea
Registered: 2006-12-03
Posts: 228
Website

30% CPU Usage when plugged in

This one is weird, and I'm having difficulty finding the culprit.  The system is a Centrino unit, based around the 915GM chipset (Pentium M 1.73, i915 graphics, 2915 wireless, e100 NIC...) 

What's happening is that when the system is plugged in to AC power, the CPU usage hovers between 25% & 45%.  When I unplug it, it drops to 3-8% (depending on the throttling).  CPU throttling is working fine.  It runs at 1733MHz when it's plugged in and automatically switches to 800MHz when I unplug it.  I'm looking through the user & system processes and am unable to find any process yeilding more than 2% usage.  This leads me to my guess that it's something in the kernel, but I don't know how to find out what it is.  I did try the beyond kernel, but it did the same thing.

The other troubleshooting done was to disable all the modules and daemons in rc.conf, which also yeilded no different results.

Just to muddy the waters, I don't recall having this problem before the kernel updated to 2.6.19.  Looking through the /var/log files, I don't see any distinct errors (to my eye at least), but I can post any of the files that people want.

Help?

rc.conf :
LOCALE="en_US.utf8"
HARDWARECLOCK="localtime"
TIMEZONE="America/Chicago"
KEYMAP="us"
CONSOLEFONT=
CONSOLEMAP=
USECOLOR="yes"
MOD_AUTOLOAD="yes"
MOD_BLACKLIST=()
MODULES=(e100 mii ipw2200 i915 speedstep_centrino sony_acpi) 
USELVM="no"
HOSTNAME="Sony"
lo="lo 127.0.0.1"
eth0="dhcp"
ech1="dhcp"
INTERFACES=(lo !eth0 !eth1)
gateway="default gw 192.168.0.1"
ROUTES=(!gateway)
DAEMONS=(syslog-ng 855resolution acpid hal dhcdbd networkmanager !network cups netfs crond portmap nfslock nfsd cpufreq)

"He is no fool who gives what he cannot keep to gain that which he cannot lose." -Jim Elliot

Offline

#2 2007-01-05 20:16:51

bones
Member
From: Brisbane
Registered: 2006-03-24
Posts: 322
Website

Re: 30% CPU Usage when plugged in

I have no idea but it maybe my eyes this time of morning but in your rc.conf is that a spelling boo boo in network, I see ech1="dhcp. but eth1 in the INTERFACES list

[edit] maybe if you start your system on bat then plug in your ac, then post your message log somebody may spot something that may help


"When once you have tasted flight, you will forever walk the earth with your eyes turned skyward, for there you have been, and there you will always long to return."

Offline

#3 2007-01-06 06:04:31

QuimaxW
Member
From: Papua New Guinea
Registered: 2006-12-03
Posts: 228
Website

Re: 30% CPU Usage when plugged in

Hmmm...despite the spelling, network manager still lets me use both.  Odd.  I'll have to change that anyways, thanks.

Is it like the /var/log/errors.log or something that I should post?


"He is no fool who gives what he cannot keep to gain that which he cannot lose." -Jim Elliot

Offline

#4 2007-01-06 06:39:52

QuimaxW
Member
From: Papua New Guinea
Registered: 2006-12-03
Posts: 228
Website

Re: 30% CPU Usage when plugged in

The results of /var/log/acpid :

Unplugged...plugging in....
[Sat Jan  6 00:36:00 2007] received event "battery BAT0 00000080 00000001"
[Sat Jan  6 00:36:00 2007] notifying client 2544[82:82]
[Sat Jan  6 00:36:00 2007] notifying client 2686[0:0]
[Sat Jan  6 00:36:00 2007] executing action "/etc/acpi/handler.sh battery BAT0 00000080 00000001"
[Sat Jan  6 00:36:00 2007] BEGIN HANDLER MESSAGES
[Sat Jan  6 00:36:00 2007] END HANDLER MESSAGES
[Sat Jan  6 00:36:00 2007] action exited with status 0
[Sat Jan  6 00:36:00 2007] executing action "/etc/acpi/actions/lm_battery.sh battery BAT0 00000080 00000001"
[Sat Jan  6 00:36:00 2007] BEGIN HANDLER MESSAGES
Laptop mode disabled, not active.
[Sat Jan  6 00:36:00 2007] END HANDLER MESSAGES
[Sat Jan  6 00:36:00 2007] action exited with status 0
[Sat Jan  6 00:36:00 2007] completed event "battery BAT0 00000080 00000001"
[Sat Jan  6 00:36:00 2007] received event "processor CPU0 00000080 00000000"
[Sat Jan  6 00:36:00 2007] notifying client 2544[82:82]
[Sat Jan  6 00:36:00 2007] notifying client 2686[0:0]
[Sat Jan  6 00:36:00 2007] executing action "/etc/acpi/handler.sh processor CPU0 00000080 00000000"
[Sat Jan  6 00:36:00 2007] BEGIN HANDLER MESSAGES
[Sat Jan  6 00:36:00 2007] END HANDLER MESSAGES
[Sat Jan  6 00:36:00 2007] action exited with status 0
[Sat Jan  6 00:36:00 2007] completed event "processor CPU0 00000080 00000000"
[Sat Jan  6 00:36:01 2007] received event "processor CPU0 00000081 00000000"
[Sat Jan  6 00:36:01 2007] notifying client 2544[82:82]
[Sat Jan  6 00:36:01 2007] notifying client 2686[0:0]
[Sat Jan  6 00:36:01 2007] executing action "/etc/acpi/handler.sh processor CPU0 00000081 00000000"
[Sat Jan  6 00:36:01 2007] BEGIN HANDLER MESSAGES
[Sat Jan  6 00:36:01 2007] END HANDLER MESSAGES
[Sat Jan  6 00:36:01 2007] action exited with status 0
[Sat Jan  6 00:36:01 2007] completed event "processor CPU0 00000081 00000000"
[Sat Jan  6 00:36:15 2007] received event "battery BAT0 00000080 00000001"
[Sat Jan  6 00:36:15 2007] notifying client 2544[82:82]
[Sat Jan  6 00:36:15 2007] notifying client 2686[0:0]
[Sat Jan  6 00:36:15 2007] executing action "/etc/acpi/handler.sh battery BAT0 00000080 00000001"
[Sat Jan  6 00:36:15 2007] BEGIN HANDLER MESSAGES
[Sat Jan  6 00:36:15 2007] END HANDLER MESSAGES
[Sat Jan  6 00:36:15 2007] action exited with status 0
[Sat Jan  6 00:36:15 2007] executing action "/etc/acpi/actions/lm_battery.sh battery BAT0 00000080 00000001"
[Sat Jan  6 00:36:15 2007] BEGIN HANDLER MESSAGES
Laptop mode disabled, not active [unchanged]
[Sat Jan  6 00:36:15 2007] END HANDLER MESSAGES
[Sat Jan  6 00:36:15 2007] action exited with status 0
[Sat Jan  6 00:36:15 2007] completed event "battery BAT0 00000080 00000001"

"He is no fool who gives what he cannot keep to gain that which he cannot lose." -Jim Elliot

Offline

#5 2007-01-06 07:51:42

bones
Member
From: Brisbane
Registered: 2006-03-24
Posts: 322
Website

Re: 30% CPU Usage when plugged in

Not sure but I found this link which sounds very similar to what your experiencing. From what I can make out it could have something to do with SMP in the kernel.
https://launchpad.net/ubuntu/+source/li … +bug/30570


"When once you have tasted flight, you will forever walk the earth with your eyes turned skyward, for there you have been, and there you will always long to return."

Offline

#6 2007-01-07 03:12:03

QuimaxW
Member
From: Papua New Guinea
Registered: 2006-12-03
Posts: 228
Website

Re: 30% CPU Usage when plugged in

From the link above, I found this instruction:

/etc/rc.local:
echo 1 > /sys/module/processor/parameters/max_cstate

I tried that and it seems to be adequately worked around.  I'm not completely sure what it does...but...it takes care of my problem.  Now when I'm plugged in, the cpu still stays scaled back to 800MHz, then only goes up to 1733 when there is a load, but I think I'm ok with that. smile

I don't know if it's 'fixed' or just adequately worked around though.  Thanks for the link though, I'd been searching for a few day for something that sounded right.


"He is no fool who gives what he cannot keep to gain that which he cannot lose." -Jim Elliot

Offline

#7 2007-02-06 13:15:54

genesis
Member
From: Italy
Registered: 2006-09-25
Posts: 3

Re: 30% CPU Usage when plugged in

I've got the same problem with my asus a6va (pentium-m 1.8) and a 2.6.19 kernel.
The problem is in the "processor" module, but it is built directly into the kernel and not as module.
You have to recompile the kernel with "processor" as module (the "thermal" module too).
Now you can load the "processor" module with the "max_cstate=1" option.
To do this you have to add this line to the /etc/modprobe.conf

options processor max_cstate=1

Now you can load  speedstep-centrino (this will automatically load the processor module)  and thermal (for the thermal control).
You can add them to the MODULES line in the /etc/rc.conf.
For the throttling of the cpu frequency you have to use the powersaved daemon.
It works perfecly for me in BATTERY mode and in AC mode too.

Offline

#8 2007-02-06 16:14:42

zeus
Member
From: Korolev / Russia
Registered: 2006-09-19
Posts: 117
Website

Re: 30% CPU Usage when plugged in

Observed a similar situation. Has found out that restart hal daemon helps after start of all other services = \.
Has added hal_restart in a starting script
I don't now how but it works =\

Offline

#9 2007-02-07 15:10:08

genesis
Member
From: Italy
Registered: 2006-09-25
Posts: 3

Re: 30% CPU Usage when plugged in

In my case, restart the hal daemon doesn't solve the problem.
The only way is to use the max_cstate=1 option for the processor module.
I've solt the problem reading this...
http://www.debianhelp.org/node/2565#comment-7514

Offline

#10 2007-02-14 14:29:21

genesis
Member
From: Italy
Registered: 2006-09-25
Posts: 3

Re: 30% CPU Usage when plugged in

Another way to solve the problem quickly.
You don't have to recompile the kernel.
You have to add the option " processor.max_cstate=1" to the boot command line.
For example, with grub I have this:

# (0) Arch Linux
title  Arch Linux  [2.6.19-Arch]
root   (hd0,4)
kernel /boot/vmlinuz26 root=/dev/hda5 vga=792 resume=/dev/hda6 processor.max_cstate=1 ro    <===== add here
initrd /boot/kernel26.img

Last edited by genesis (2007-02-14 14:32:14)

Offline

Board footer

Powered by FluxBB