LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Laptop and Netbook (https://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/)
-   -   Processor load high when laptop is idle for hours (https://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/processor-load-high-when-laptop-is-idle-for-hours-596752/)

replica9000 11-02-2007 10:18 PM

Processor load high when laptop is idle for hours
 
I've noticed that when I don't touch my laptop for a few hours, the processor load is usually at 100%. It has been doing this since kernel 2.6.21 and higher (currently 2.6.22-3-k7). Most of the time it doesn't cause a problem, but sometimes after I exit my screensaver (blank screensaver) KDE will freeze up when I click on something, causing me to CTRL+ALT+BACKSPACE to restart X.

Anyone have an idea what might cause this?

syg00 11-02-2007 10:39 PM

Logs ???.
Try running top in batch and write to a file every so often; say every 5-10 minutes. See what trickles to the top of the CPU usage. If nothing, that might indicate a kernel/driver issue.

replica9000 11-02-2007 10:53 PM

Quote:

Originally Posted by syg00 (Post 2946427)
Logs ???.
Try running top in batch and write to a file every so often; say every 5-10 minutes. See what trickles to the top of the CPU usage. If nothing, that might indicate a kernel/driver issue.

Ok I ran the command top, but I'm not sure how to make it save a log every 5-10 minutes.

syg00 11-02-2007 11:09 PM

Try something like this - should be self-explanatory, or see the man page(s)
Code:

while true ;  do top -b -n 1 | head -n 25  > topdata.`date +%F_%H:%M:%S` ; sleep 600 ; done &
Edit: by logs, I was querying whether you had checked your logs; have a look in /var/log/*, and "dmesg"

replica9000 11-03-2007 01:42 PM

So far it hasn't frozen on me yet, doesn't always happen, but according to the top data Xorg is at the top of the list.

When I say KDE freezes, it doesn't totally freeze up. Stuff like SuperKaramba and the clock still work fine, and I can still move the mouse pointer, but tooltips don't go away and I loose the ability to click on stuff or use the keyboard other than ALT+CTRL+BACKSPACE.

Using SuperKaramba to monitor HDD space is usually the cause of this problem, though rarely it hasppens without SuperKaramba.

syg00 11-03-2007 04:28 PM

X is a facilitator - generally it shows up as a symptom, not the real problem.
Something else is demanding services - if it's the screen saver, stop using it, or go looking for bug reports.

replica9000 11-03-2007 04:36 PM

I have tried different screen savers, doesn't change anything.

replica9000 11-04-2007 01:41 AM

Ok I left it alone for hours, and X stopped responding. This is one of the saved top logs from about 10 minutes before I opened up my laptop:

Code:

top - 01:36:59 up 1 day,  8:22,  1 user,  load average: 1.00, 1.00, 1.00
Tasks: 121 total,  3 running, 117 sleeping,  1 stopped,  0 zombie
Cpu(s): 46.9%us,  3.9%sy,  0.0%ni, 49.1%id,  0.1%wa,  0.1%hi,  0.0%si,  0.0%st
Mem:    970068k total,  834244k used,  135824k free,      316k buffers
Swap:  2048276k total,        0k used,  2048276k free,  402268k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND           
 3366 root      25  0  231m  85m 7464 R 99.2  9.0 810:26.19 Xorg             
 6184 replica  15  0  2288 1016  760 R  2.0  0.1  0:00.01 top               
    1 root      15  0  2064  708  604 S  0.0  0.1  0:01.12 init             
    2 root      10  -5    0    0    0 S  0.0  0.0  0:00.00 kthreadd         
    3 root      RT  -5    0    0    0 S  0.0  0.0  0:00.00 migration/0       
    4 root      34  19    0    0    0 S  0.0  0.0  0:00.29 ksoftirqd/0       
    5 root      RT  -5    0    0    0 S  0.0  0.0  0:00.00 watchdog/0       
    6 root      10  -5    0    0    0 S  0.0  0.0  0:01.21 events/0         
    7 root      10  -5    0    0    0 S  0.0  0.0  0:00.00 khelper           
  25 root      15  -5    0    0    0 S  0.0  0.0  0:00.08 kblockd/0         
  26 root      10  -5    0    0    0 S  0.0  0.0  0:01.72 kacpid           
  27 root      10  -5    0    0    0 S  0.0  0.0  0:01.45 kacpi_notify     
  123 root      10  -5    0    0    0 S  0.0  0.0  0:00.01 kseriod           
  145 root      15  0    0    0    0 S  0.0  0.0  0:00.56 pdflush           
  146 root      15  0    0    0    0 S  0.0  0.0  0:00.26 pdflush           
  147 root      10  -5    0    0    0 S  0.0  0.0  0:00.03 kswapd0           
  148 root      15  -5    0    0    0 S  0.0  0.0  0:00.00 aio/0             
  590 root      10  -5    0    0    0 S  0.0  0.0  0:00.00 ksuspend_usbd


syg00 11-04-2007 05:26 PM

Do you have 2 CPUs (hiperthread maybe) ???.
If it's just come in as a problem, try running as a uniprocessor and see if the problem still occurs. Keep an eye out for fixes, or go back to the previous kernel level.

PETROSHP 11-04-2007 07:49 PM

similar problem here, although that happens from the begining... yesterday i finished configuring my CF and it was working just great although i started noticing a slow down on Super+Z function.. during the night while i was listening to Amarok my gnome freezed although music was keep running. I forced a shutdown and after a reboot I got no sound (even if I tried to run PuppyOS just to keep on with the music, unfortunately still no sound!!!) and my processor says 50% in use and when i go and click on something, it goes full and i got no action. (clock indeed keeps working properly and mouse too). My hd blinks once every 3 seconds... Any idea what´s wrong?
a suggestion above from replica9000 to try running "top in batch" does not ring a bell to me as I am new in linux world... Also by downgarding kernel would not be easy for me as well..

can u pls give me some light here??

replica9000 11-04-2007 11:06 PM

Quote:

Originally Posted by syg00 (Post 2948201)
Do you have 2 CPUs (hiperthread maybe) ???.
If it's just come in as a problem, try running as a uniprocessor and see if the problem still occurs. Keep an eye out for fixes, or go back to the previous kernel level.

My processor is a single core AMD Turion64 ML-34

replica9000 11-05-2007 02:43 PM

I think I found that it's a APIC error causing this problem. Not sure how to fix it though. I don't think my BIOS lets me disable APIC.

Code:

$ dmesg | grep apic
ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled)
IOAPIC[0]: apic_id 1, version 33, address 0xfec00000, GSI 0-23
..TIMER: vector=0x31 apic1=0 pin1=2 apic2=-1 pin2=-1
replica@Debsidian:~$ dmesg | grep APIC
ACPI: APIC 3BEB7F6A, 005A (r1 GATEWA M300    20060124  LTP        0)
ACPI: Local APIC address 0xfee00000
ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled)
Processor #0 15:4 APIC version 16
ACPI: LAPIC_NMI (acpi_id[0x00] high edge lint[0x1])
ACPI: IOAPIC (id[0x01] address[0xfec00000] gsi_base[0])
IOAPIC[0]: apic_id 1, version 33, address 0xfec00000, GSI 0-23
Enabling APIC mode:  Flat.  Using 1 I/O APICs
mapped APIC to ffffd000 (fee00000)
mapped IOAPIC to ffffc000 (fec00000)
ENABLING IO-APIC IRQs
..MP-BIOS bug: 8254 timer not connected to IO-APIC
ACPI: Using IOAPIC for interrupt routing
APIC error on CPU0: 00(40)


syg00 11-05-2007 03:22 PM

No need - add "noapic" to the kernel line in your boot-loader. Maybe (separately) look at nolapic as well. Try the minimum set necessary, and "mix and match" if necessary to see what works. Should be plenty of threads on LQ about how to do this.

replica9000 11-05-2007 03:27 PM

yeah I just tried adding noioapic to grub, but IO-APIC was still enabled.
Code:

kernel                /vmlinuz-2.6.22-3-k7 root=/dev/hda5 ro quiet noioapic vga=791
so I'm gonna try noapic now.

replica9000 11-05-2007 03:37 PM

Ok booted up with the noapic option, here what dmesg outputs:
Code:

$ dmesg | grep APIC
ACPI: APIC 3BEB7F6A, 005A (r1 GATEWA M300    20060124  LTP        0)
ACPI: Local APIC address 0xfee00000
ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled)
Processor #0 15:4 APIC version 16
ACPI: LAPIC_NMI (acpi_id[0x00] high edge lint[0x1])
ACPI: Skipping IOAPIC probe due to 'noapic' option.
Using ACPI for processor (LAPIC) configuration information
OEM ID:          Product ID:              APIC at: 0xFEE00000
I/O APIC #1 Version 33 at 0xFEC00000.
Enabling APIC mode:  Flat.  Using 1 I/O APICs
mapped APIC to ffffd000 (fee00000)
mapped IOAPIC to ffffc000 (fec00000)

So I don't see
"..MP-BIOS bug: 8254 timer not connected to IO-APIC"
anymore so the test now is to let the laptop sit idle for a while, which usually takes 3+ hours to reproduce the problem.


All times are GMT -5. The time now is 01:17 PM.