You are not logged in.

#1 2010-09-12 09:03:42

samhain
Member
Registered: 2007-07-19
Posts: 39

Flashplugin freezing your system? Maybe it's not what it seems...

I'm posting this detective story in this subforum because the issue discussed seems to be happening mostly with laptops.

The symptoms:

You are happily surfing the internet with your laptop when you decide to watch a flash video. After some minutes, your nightmare begins: suddenly the video playback becomes choppy, your browser slows down and the whole system becomes painfully slow and unresponsive. You check cpu usage and it seems that both firefox and flashplugin are wreaking havoc. You close/kill the processes but to no avail. It seems as if flashplugin is haunting your laptop from beyond the grave, leaving you no other option but to reboot.

You then start a pilgrimage through Google and linux forums to seek a solution, but none of the answers provided  seem to fix this annoying behavior. It turns out that something more subtle is going on...

The real deal:

Flashplugin is not the cause of your problem, it's just the trigger. I came across this revelation while gzipping several dozens of big (4Gig+) files: exactly the same behavior emerged and flashplugin had nothing to do with it.
A hunch told me to check the cpu behaviour and after running "cpufreq-info" I find out the real problem:

analyzing CPU 1:
  driver: acpi-cpufreq
  CPUs which run at the same hardware frequency: 0 1
  CPUs which need to have their frequency coordinated by software: 1
  maximum transition latency: 10.0 us.
  hardware limits: 800 MHz - 2.20 GHz
  available frequency steps: 2.20 GHz, 2.20 GHz, 1.60 GHz, 1.20 GHz, 800 MHz
  available cpufreq governors: ondemand, performance
  current policy: frequency should be within 800 MHz and 800 MHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 800 MHz.

Notice the cpu stuck at the lowest frequency?
It seems that there is some widespread problem in linux with some combinations of hardware and kernel/cpufreq-utils that causes the cpu-throtling to misbehave whenever the cpu is subject to some stress. As soon as the cpu usage goes 100% for some prolonged period of time, the cpu gets stuck at the the lowest frequency and any cpufreq command issued trying to fix it will be ignored by the system.

The solution:

Until this gets fixed in kernel26 and/or cpufreq-utils, there is a simple workaround to the problem:

Issuing the following command will ease the pain while your system is running:
echo 1 > /sys/module/processor/parameters/ignore_ppc
(You might need to restart whatever cpu-throttling daemon you are using, and you might also need to do some easy voodoo with cpufreq-set to reset the cpu maximum frequency and/or governor.)

To fix it permanently, add this boot parameter to your kernel line in /boot/grub/menu.lst :
processor.ignore_ppc=1

Final considerations:

While researching this problem in different forums, I found out that a lot of users are incorrectly blaming flashplugin and don't know what's really going on with their cpus. For average/everyday computer usage, flash video is probably the only thing that will subject the cpu to a 100% usage for enough time to trigger the problem; therefore causing the incorrect diagnostic and subsequent frustration.

I'm pretty sure that this is not a hardware problem, as it has been reported in different laptop models. Although it does seem to be more frequent in Dell laptops.

I know that my cpu-throtling used to be fine some time ago, I'm sure because is one of the first things I always make sure to set it up correctly the first time I install linux on a new laptop. Sadly, I can't pinpoint the exact version change of kernel26 and/or cpufreq-utils that started this whole mess. I took me quite time to narrow down the problem and rule out flashplugin or firefox as the causes.

If you check with Google, it seems that this issue is not only limited to Archlinux, several other distros are experiencing the same problem. For us, Archers, the bug (or something quite similar) is reported already here.

One final call: if you happen to suffer this issue and you thought it was a case of flashplugin misbehavior, please take some time to report or confirm the cpu-throttling bug. It seems to be really widespread but poorly reported, and without proper understanding of the large number of users suffering it, it will not be fixed as soon as is desirable.

Something related to cpu-throtling is awry in cpufreq-utils or kernel26 , and without your support it will pass unnoticed and blame will fall unto poor flashplugin.

Cheers


Arch is to Linux as Jeet Kune Do is to martial arts.

Offline

#2 2010-09-12 20:20:41

xvello
Member
Registered: 2010-05-15
Posts: 81
Website

Re: Flashplugin freezing your system? Maybe it's not what it seems...

Thanks a lot for this detailled post. I already fixed the issue on my laptop in july, but it's good to spread the word.

Regards

Offline

Board footer

Powered by FluxBB