CPU Frequency Scaling broken ?

Bug #951673 reported by Alexx Roche
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

After last nights update (update-manager) old laptop was no longer able to play video or flash-video fast enough, (looked like a slid-show at best) though the audio worked fine.

Booting into 2.6.32-38-generic fixed the issue, but

echo $(uname -r) $(cpufreq-info |grep 'current policy'|sed 's/.*within//')
2.6.32-38-generic 800 MHz and 800 MHz. 800 MHz and 800 MHz.

(though this may be /etc/init.d/ondemand kicking in.)

(Lucid Linx on Intel Centrino Duo Dell Latitude D420 with 2Gig of RAM)

I have checked the BIOS and SpeedStep is enabled.

If I boot into 2.6.31-14-generic then the 'current policy' is "800 MHz and 1.20 GHz"

cat /proc/version_signature
Ubuntu 2.6.32-38.83-generic 2.6.32.52+drm33.21

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: linux-generic 2.6.32.39.46
Regression: Yes
Reproducible: Yes
ProcVersionSignature: Ubuntu 2.6.32-38.83-generic 2.6.32.52+drm33.21
Uname: Linux 2.6.32-38-generic i686
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.21.
Architecture: i386
ArecordDevices:
 **** List of CAPTURE Hardware Devices ****
 card 0: Intel [HDA Intel], device 0: STAC92xx Analog [STAC92xx Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: alexx 2248 F.... pulseaudio
Card0.Amixer.info:
 Card hw:0 'Intel'/'HDA Intel at 0xefebc000 irq 21'
   Mixer name : 'SigmaTel STAC9200'
   Components : 'HDA:83847690,102801d6,00102201'
   Controls : 13
   Simple ctrls : 8
Date: Sat Mar 10 18:10:15 2012
HibernationDevice: RESUME=UUID=18512727-1247-4647-a30d-b358cc4f852f
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release i386 (20091028.5)
MachineType: Dell Inc. Latitude D420
PccardctlIdent:
 Socket 0:
   no product info available
PccardctlStatus:
 Socket 0:
   no card
ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.32-38-generic root=UUID=12451b00-83c2-4c8f-978e-12f5b9602f1e ro quiet splash
ProcEnviron:
 LANGUAGE=en_GB:en
 PATH=(custom, user)
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
RelatedPackageVersions: linux-firmware 1.34.7
SourcePackage: linux
dmi.bios.date: 12/18/2006
dmi.bios.vendor: Dell Inc.
dmi.bios.version: A03
dmi.board.asset.tag: 9004588
dmi.board.name: 0TJ984
dmi.board.vendor: Dell Inc.
dmi.chassis.asset.tag: 9004588
dmi.chassis.type: 8
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvrA03:bd12/18/2006:svnDellInc.:pnLatitudeD420:pvr:rvnDellInc.:rn0TJ984:rvr:cvnDellInc.:ct8:cvr:
dmi.product.name: Latitude D420
dmi.sys.vendor: Dell Inc.

Revision history for this message
Alexx Roche (ubuntu-one-alexx) wrote :
Brad Figg (brad-figg)
Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Would it be possible for you to test the latest upstream kernel? Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest v3.3 kernel[1] (Not a kernel in the daily directory). Once you've tested the upstream kernel, please remove the 'needs-upstream-testing' tag(Only that one tag, please leave the other tags). This can be done by clicking on the yellow pencil icon next to the tag located at the bottom of the bug description and deleting the 'needs-upstream-testing' text.

If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

If you are unable to test the mainline kernel, for example it will not boot, please add the tag: 'kernel-unable-to-test-upstream'.
Once testing of the upstream kernel is complete, please mark this bug as "Confirmed".

Thanks in advance.

[1] http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.3-rc7-precise/

Changed in linux (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Incomplete
Revision history for this message
Alexx Roche (ubuntu-one-alexx) wrote :

I would be delighted to try the upstream kernel as I have finished testing 2.6.32-38 (with the following result):

uname -r
2.6.32-38-generic
grep -i fail /var/log/boot/log
 * CPUFreq Utilities: Setting ondemand CPUFreq governor... [fail] * CPU1.

I have made no changes to the hardware, (or even the BIOS) and have checked that the temperature of the CPU is no higher than normal. Even when I find a kernel that does manage to boot with CPUFreq it is as if something is deciding to disable it after a few seconds or minutes, and I can see that cpufreq-info has changed to
current policy: frequency should be within 800 MHz and 800 MHz.

Revision history for this message
Alexx Roche (ubuntu-one-alexx) wrote :

hmm, not a great start to testing upstream. The well written document at
https://wiki.ubuntu.com/Kernel/MainlineBuilds?action=show&redirect=KernelMainlineBuilds#Installing_Mainline_Kernels
did not match the archive at http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.3-rc7-precise/

When I guessed and downloaded
linux-headers-3.3.0-030300rc7-generic_3.3.0-030300rc7.201203101735_i386.deb
rather than
linux-headers-3.3.0-030300rc7-generic-pae_3.3.0-030300rc7.201203101735_i386.deb
I got (from the GUI installer)
Error: Dependency is not satisfiable: linux-headers-3.3.0-030300rc7
so I tried the command line and got:

dpkg -i *.deb
Selecting previously deselected package linux-headers-3.3.0-030300rc7-generic.
(Reading database ... 402277 files and directories currently installed.)
Unpacking linux-headers-3.3.0-030300rc7-generic (from linux-headers-3.3.0-030300rc7-generic_3.3.0-030300rc7.201203101735_i386.deb) ...
Selecting previously deselected package linux-image-3.3.0-030300rc7-generic.
Unpacking linux-image-3.3.0-030300rc7-generic (from linux-image-3.3.0-030300rc7-generic_3.3.0-030300rc7.201203101735_i386.deb) ...
Done.

dpkg: dependency problems prevent configuration of linux-headers-3.3.0-030300rc7-generic:
 linux-headers-3.3.0-030300rc7-generic depends on linux-headers-3.3.0-030300rc7; however:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ? (Seems hard to resolve!)
  Package linux-headers-3.3.0-030300rc7 is not installed.
dpkg: error processing linux-headers-3.3.0-030300rc7-generic (--install):
 dependency problems - leaving unconfigured
Setting up linux-image-3.3.0-030300rc7-generic (3.3.0-030300rc7.201203101735) ...
Running depmod.
update-initramfs: Generating /boot/initrd.img-3.3.0-030300rc7-generic

(but I now have Ubuntu, with Linux 3.3.0-030300rc7-generic in my grub so I'm off to reboot)

Revision history for this message
Alexx Roche (ubuntu-one-alexx) wrote :

No better:
3.3.0-030300rc7-generic
$ cpufreq-info
cpufrequtils 006: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to <email address hidden>, please.
analyzing CPU 0:
  driver: acpi-cpufreq
  CPUs which run at the same hardware frequency: 0 1
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 10.0 us.
  hardware limits: 800 MHz - 1.20 GHz
  available frequency steps: 1.20 GHz, 800 MHz
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance
  current policy: frequency should be within 800 MHz and 800 MHz.
                  The governor "performance" may decide which speed to use
                  within this range.
  current CPU frequency is 800 MHz.
  cpufreq stats: 1.20 GHz:2.98%, 800 MHz:97.02% (1)
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 - 1.20 GHz
  available frequency steps: 1.20 GHz, 800 MHz
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance
  current policy: frequency should be within 800 MHz and 800 MHz.
                  The governor "performance" may decide which speed to use
                  within this range.
  current CPU frequency is 800 MHz.
  cpufreq stats: 1.20 GHz:2.98%, 800 MHz:97.02% (1)
$ uptime
 11:30:36 up 2 min, 2 users, load average: 5.77, 2.79, 1.08

# I'll try to fix the headers using synaptic or aptitude.

Revision history for this message
Alexx Roche (ubuntu-one-alexx) wrote :

synaptic just wanted to remove the "broken" linux headers for the 3.3 kernel... so I let it and rebooted. Scaling still not working.

I've booted into another old kernel and for now it seems to be working, (though in this case working means "going at full power and never backing down" which is better for me than trying to run on half my CPU's cores.
(for ref:)

uptime; uname -r; cpufreq-info
 11:54:03 up 6 min, 2 users, load average: 5.50, 4.39, 2.10
2.6.31-23-generic
cpufrequtils 006: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to <email address hidden>, please.
analyzing CPU 0:
  driver: acpi-cpufreq
  CPUs which run at the same hardware frequency: 0 1
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 10.0 us.
  hardware limits: 800 MHz - 1.20 GHz
  available frequency steps: 1.20 GHz, 800 MHz
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance
  current policy: frequency should be within 800 MHz and 1.20 GHz.
                  The governor "performance" may decide which speed to use
                  within this range.
  current CPU frequency is 1.20 GHz (asserted by call to hardware).
  cpufreq stats: 1.20 GHz:100.00%, 800 MHz:0.00% (1)
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 - 1.20 GHz
  available frequency steps: 1.20 GHz, 800 MHz
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance
  current policy: frequency should be within 800 MHz and 1.20 GHz.
                  The governor "performance" may decide which speed to use
                  within this range.
  current CPU frequency is 1.20 GHz (asserted by call to hardware).
  cpufreq stats: 1.20 GHz:100.00%, 800 MHz:0.00%

Revision history for this message
Alexx Roche (ubuntu-one-alexx) wrote :

I would update the tag, but I don't seem to have rights to edit them, (no pencil icon for me).

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Alexx Roche (ubuntu-one-alexx) wrote :

not sure if this is relevant. I tried to set the governor by hand using

root@laptop:~# cpufreq-selector -g ondemand

the CPU dipped down to half and cpufreq-info reported "ondemand" for about a second before the CPU was set back to performance.

uname -r
2.6.31-23-generic

Revision history for this message
Alexx Roche (ubuntu-one-alexx) wrote :

Firefox has been crashing on me since this update. (I found http://askubuntu.com/questions/100730/how-to-upgrade-to-glx-1-3-on-ubuntu-10-04 and that feels like my problem.) So I'm going to try upgrading xserver-xorg-core to the bleeding edge. If this fixes my problem, (because Xorg is no longer eating into CPU leaving space for actual programs) then I'll report back, otherwise my system is still running slower than normal.

Revision history for this message
Alexx Roche (ubuntu-one-alexx) wrote :

I followed the advice on http://askubuntu.com/questions/100730/how-to-upgrade-to-glx-1-3-on-ubuntu-10-04 and ended up with a broken X11 environment, (which, to be honest, the Xorg ppl said would happen.) I just applied last nights updates and am going for a reboot.

Revision history for this message
Alexx Roche (ubuntu-one-alexx) wrote :

At the risk of this report turning into a blog, I have an update. Firefox has not crashed in the last four hours, (so I think that problem is fixed.) I have been unable to determine a dependable kernel or pattern that would enable me to boot into a working system where the cores of my CPU are scaling. I wondered if rebooting into a different kernel and then back would somehow toggle the original kernel, but the two tests, (two reboots each) did not get me back to a "800MHz, 1.2GHz" policy.

Revision history for this message
Alexx Roche (ubuntu-one-alexx) wrote :

with 2.6.32-40-generic #87-Ubuntu SMP I can change /etc/init.d/ondemand to performance and then I get the full CPU, (though it does not scale.) I have not tried compiling my own kernel to see if this is a debian/ubuntu issue.

Revision history for this message
Alexx Roche (ubuntu-one-alexx) wrote :

2.6.32-41 installed and still not fixed. I've tried all of the kernels that I have, ( 2.6.31-14 2.6.31-20 2.6.31-21 2.6.31-22 2.6.31-23 2.6.32-38 2.6.32-39 2.6.32-40 2.6.32-41) and still get, (seemingly) random jumps down from 1.2 to 800 even though it is still set to performance. Sometimes they start at 800 and won't scale at all. I've checked again that it is still enabled in the BIOS, (which it is). 2.6.31-14 still /seems/ to be the most reliable, but even with that running both CPUs at 1.2 GHz youtube still seems to have problems with video, (guess I'll have to do more working and less "research" ;-)

Revision history for this message
Alexx Roche (ubuntu-one-alexx) wrote :

I really am starting to wonder if something has broken in my hardware, (am I the only one with this problem?) I thought that my CPU fan might be having problems but graphing that using ipmi and munin shows that the CPU seems ok, (though obviously the reporting could be bogus - that said just feeling the laptop and listening to it, it just feels the same as it has all these years.
  I guess the next step is to install a nice stripped down version of Slackware and see if it is a debian 'thing'.

Revision history for this message
Alexx Roche (ubuntu-one-alexx) wrote :

I've installed 2.6.32-41-generic and replaced the fan on the motherboard, and performance has returned to normal.
I've moved the CPU back to on-demand and scaling seems to be working again.

So if someone else has an old laptop and all signs point to the CPU playing up... it might be the fan, (though if, like me, you spend all of your time with headphones on you might not notice the fan stop.)

alexx

--
"I'm not doing nothing; I'm actively waiting for the problem to go away."

Revision history for this message
penalvch (penalvch) wrote :

Alexx Roche, this bug report is being closed due to your last comment https://bugs.launchpad.net/ubuntu/+source/linux/+bug/951673/comments/15 regarding this being fixed with a motherboard fan replacement. For future reference you can manage the status of your own bugs by clicking on the current status in the yellow line and then choosing a new status in the revealed drop down box. You can learn more about bug statuses at https://wiki.ubuntu.com/Bugs/Status. Thank you again for taking the time to report this bug and helping to make Ubuntu better. Please submit any future bugs you may find.

Changed in linux (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.