indicator-cpufreq 0.2-0ubuntu1: 2.20 frequency shows up twice [raring/quantal]

Bug #1110429 reported by Alin Andrei
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
indicator-cpufreq
Fix Released
Undecided
Unassigned
indicator-cpufreq (Ubuntu)
Fix Released
Wishlist
Unassigned

Bug Description

I'm using the latest indicator-cpufreq 0.2-0ubuntu1 in Ubuntu 13.04 Raring Ringtail, and the 2.20 CPU frequency shows up twice for my Intel(R) Core(TM) i7-2670QM @ 2.20GHz CPU. Screenshot: http://i.imgur.com/iMjYkLY.png

ProblemType: Bug
DistroRelease: Ubuntu 13.04
Package: indicator-cpufreq 0.2-0ubuntu1
ProcVersionSignature: Ubuntu 3.8.0-2.6-generic 3.8.0-rc4
Uname: Linux 3.8.0-2-generic x86_64
ApportVersion: 2.8-0ubuntu2
Architecture: amd64
Date: Wed Jan 30 15:50:15 2013
InstallationDate: Installed on 2012-12-30 (31 days ago)
InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Release amd64 (20121017.5)
MarkForUpload: True
PackageArchitecture: all
SourcePackage: indicator-cpufreq
UpgradeStatus: Upgraded to raring on 2013-01-12 (17 days ago)

Revision history for this message
Alin Andrei (nilarimogard) wrote :
summary: - 2.20 frequency shows up twice
+ indicator-cpufreq 0.2-0ubuntu1: 2.20 frequency shows up twice [raring]
Revision history for this message
Artem Popov (artfwo) wrote : Re: indicator-cpufreq 0.2-0ubuntu1: 2.20 frequency shows up twice [raring]

Strange, I thought I fixed this in this version.

Andrei, can you tell me the output of cpufreq-info | grep stats on your machine?

Revision history for this message
Alin Andrei (nilarimogard) wrote :

"cpufrequtils" wasn't installed on my system so I've installed it and here's the "cpufreq-info | grep stats" output:

  cpufreq stats: 2.20 GHz:14.19%, 2.20 GHz:0.21%, 2.00 GHz:0.10%, 1.90 GHz:0.10%, 1.80 GHz:0.11%, 1.70 GHz:0.12%, 1.60 GHz:0.14%, 1.50 GHz:0.16%, 1.40 GHz:0.18%, 1.30 GHz:0.16%, 1.20 GHz:0.17%, 1.10 GHz:0.20%, 1000 MHz:0.23%, 900 MHz:0.27%, 800 MHz:83.67% (15905)
  cpufreq stats: 2.20 GHz:18.66%, 2.20 GHz:0.11%, 2.00 GHz:0.14%, 1.90 GHz:0.04%, 1.80 GHz:0.05%, 1.70 GHz:0.11%, 1.60 GHz:0.07%, 1.50 GHz:0.12%, 1.40 GHz:0.13%, 1.30 GHz:0.09%, 1.20 GHz:0.06%, 1.10 GHz:0.20%, 1000 MHz:0.14%, 900 MHz:0.17%, 800 MHz:79.92% (6572)
  cpufreq stats: 2.20 GHz:15.45%, 2.20 GHz:0.18%, 2.00 GHz:0.09%, 1.90 GHz:0.11%, 1.80 GHz:0.08%, 1.70 GHz:0.11%, 1.60 GHz:0.13%, 1.50 GHz:0.15%, 1.40 GHz:0.17%, 1.30 GHz:0.16%, 1.20 GHz:0.17%, 1.10 GHz:0.26%, 1000 MHz:0.24%, 900 MHz:0.22%, 800 MHz:82.48% (14696)
  cpufreq stats: 2.20 GHz:7.55%, 2.20 GHz:0.11%, 2.00 GHz:0.02%, 1.90 GHz:0.08%, 1.80 GHz:0.04%, 1.70 GHz:0.05%, 1.60 GHz:0.04%, 1.50 GHz:0.06%, 1.40 GHz:0.09%, 1.30 GHz:0.11%, 1.20 GHz:0.07%, 1.10 GHz:0.14%, 1000 MHz:0.10%, 900 MHz:0.07%, 800 MHz:91.47% (5061)
  cpufreq stats: 2.20 GHz:14.50%, 2.20 GHz:0.18%, 2.00 GHz:0.09%, 1.90 GHz:0.11%, 1.80 GHz:0.12%, 1.70 GHz:0.11%, 1.60 GHz:0.11%, 1.50 GHz:0.21%, 1.40 GHz:0.14%, 1.30 GHz:0.17%, 1.20 GHz:0.16%, 1.10 GHz:0.20%, 1000 MHz:0.21%, 900 MHz:0.24%, 800 MHz:83.46% (14024)
  cpufreq stats: 2.20 GHz:10.02%, 2.20 GHz:0.12%, 2.00 GHz:0.04%, 1.90 GHz:0.04%, 1.80 GHz:0.03%, 1.70 GHz:0.07%, 1.60 GHz:0.12%, 1.50 GHz:0.16%, 1.40 GHz:0.06%, 1.30 GHz:0.10%, 1.20 GHz:0.09%, 1.10 GHz:0.17%, 1000 MHz:0.27%, 900 MHz:0.16%, 800 MHz:88.55% (5206)
  cpufreq stats: 2.20 GHz:16.40%, 2.20 GHz:0.20%, 2.00 GHz:0.08%, 1.90 GHz:0.12%, 1.80 GHz:0.11%, 1.70 GHz:0.10%, 1.60 GHz:0.12%, 1.50 GHz:0.17%, 1.40 GHz:0.17%, 1.30 GHz:0.16%, 1.20 GHz:0.24%, 1.10 GHz:0.22%, 1000 MHz:0.22%, 900 MHz:0.28%, 800 MHz:81.40% (14897)
  cpufreq stats: 2.20 GHz:9.98%, 2.20 GHz:0.10%, 2.00 GHz:0.03%, 1.90 GHz:0.09%, 1.80 GHz:0.18%, 1.70 GHz:0.08%, 1.60 GHz:0.17%, 1.50 GHz:0.10%, 1.40 GHz:0.07%, 1.30 GHz:0.15%, 1.20 GHz:0.09%, 1.10 GHz:0.13%, 1000 MHz:0.15%, 900 MHz:0.26%, 800 MHz:88.43% (6078)

Revision history for this message
Artem Popov (artfwo) wrote :

Right. However, cpufrequtils (cpufreqd) may conflict with the indicator, so I suggest it's okay to remove cpufrequtils now.

Apparently, the frequencies are wrongly convolved into a set in Python, so can you also do the following? Run python3 in a terminal and run the following commands within the python3 interpreter?

>>> from indicator_cpufreq import cpufreq
>>> cpufreq.get_available_frequencies(0)

Here's an example output from mine machine:

~$ python3
Python 3.3.0 (default, Jan 26 2013, 15:44:18)
[GCC 4.7.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from indicator_cpufreq import cpufreq
>>> cpufreq.get_available_frequencies(0)
[2200000, 1600000, 1200000]

Revision history for this message
Alin Andrei (nilarimogard) wrote :

Here it is for me:

Python 3.3.0 (default, Jan 26 2013, 15:44:18)
[GCC 4.7.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from indicator_cpufreq import cpufreq
>>> cpufreq.get_available_frequencies(0)
[2201000, 2200000, 2000000, 1900000, 1800000, 1700000, 1600000, 1500000, 1400000, 1300000, 1200000, 1100000, 1000000, 900000, 800000]

Revision history for this message
Artem Popov (artfwo) wrote :

So, you've got a frequency of 2201000 KHz, which is roughly equal to 2.20 GHz. Hmm, is this some kind 'slightly overclocked' CPU option or some other special processor feature?

Revision history for this message
Artem Popov (artfwo) wrote :

I also wonder what happens if you clock the CPU to either frequency and run a benchmark. Andrei, would you be willing to perform such a test?

Revision history for this message
Alin Andrei (nilarimogard) wrote :

I didn't overclock or tweak anything. Sure, I'll do whatever it takes, just let me know exactly what I must do.

Revision history for this message
Andrea Corbellini (andrea.corbellini) wrote :

Marking as wishlist, as this seems just an issue with rounding.

Changed in indicator-cpufreq (Ubuntu):
importance: Undecided → Wishlist
status: New → Triaged
Revision history for this message
Artem Popov (artfwo) wrote :

Hmm, I'm still considering this a bug and a pretty confusing one. But unfortunately, I can't change the importance for the Ubuntu task back from Wishlist, because I'm not in bugcontrol :)

Anyway. I haven't done any CPU benchmarking on Linux and I am still unsure how to do it, but nbench (no package, had to compile it manually) looks like a good tool for this kind of job.

If we find that there is no difference in performance when either frequency is chosen, we can just filter them out by comparison and if difference <= 1000..., then drop the lesser one. Well, this is a solution I'm currently pondering. More ideas?

Revision history for this message
Alin Andrei (nilarimogard) wrote :

I think it's better in such cases to exclude the smaller one so here, between 2201000 and 2200000 you'd exclude 2200000. I don't see a reason why someone would want to switch between 2 so close frequencies...

Revision history for this message
Artem Popov (artfwo) wrote :

Well, in your case the system uses 2201000 quite often judging by the cpufreq-info output, so by "dropping lesser one" I actually meant to exclude the smaller one, which is 2200000. However, I'd like to make sure that there is no real world performance difference, that's what nbench is for.

Revision history for this message
Alin Andrei (nilarimogard) wrote :

Is this the tool you're talking about: http://www.tux.org/~mayer/linux/bmark.html ? If so, the compilation fails unfortunately with "nmglobal.h:29:21: fatal error: pointer.h: No such file or directory"...

Revision history for this message
Artem Popov (artfwo) wrote :

oh, that file is found in linux-headers package: linux-headers-3.8.0-3-generic seems to be the latest one for raring.

Revision history for this message
Alin Andrei (nilarimogard) wrote :

It's already installed...

Revision history for this message
Artem Popov (artfwo) wrote :

Hmm, I see. It's got it's own pointer.h. The solution seems to run:

echo "#define LONG64" >pointer.h

and rerun 'make'. Not sure why make didn't create the file for you.

Revision history for this message
Alin Andrei (nilarimogard) wrote :
Download full text (5.6 KiB)

It worked now, thanks!

Here are the results, although I for one don't understand anything here. I wasn't sure how to run the benchmarks so I ran it once for 2201000 and once for 2200000.

2201000:

BYTEmark* Native Mode Benchmark ver. 2 (10/95)
Index-split by Andrew D. Balsa (11/97)
Linux/Unix* port by Uwe F. Mayer (12/96,11/97)

TEST : Iterations/sec. : Old Index : New Index
                    : : Pentium 90* : AMD K6/233*
--------------------:------------------:-------------:------------
NUMERIC SORT : 1533.6 : 39.33 : 12.92
STRING SORT : 991.8 : 443.16 : 68.59
BITFIELD : 4.7385e+08 : 81.28 : 16.98
FP EMULATION : 504.84 : 242.25 : 55.90
FOURIER : 22431 : 25.51 : 14.33
ASSIGNMENT : 49.221 : 187.29 : 48.58
IDEA : 9584.3 : 146.59 : 43.52
HUFFMAN : 4348.5 : 120.58 : 38.51
NEURAL NET : 81.8 : 131.41 : 55.27
LU DECOMPOSITION : 2360.6 : 122.29 : 88.31
==========================ORIGINAL BYTEMARK RESULTS==========================
INTEGER INDEX : 141.507
FLOATING-POINT INDEX: 74.284
Baseline (MSDOS*) : Pentium* 90, 256 KB L2-cache, Watcom* compiler 10.0
==============================LINUX DATA BELOW===============================
CPU : 8 CPU GenuineIntel Intel(R) Core(TM) i7-2670QM CPU @ 2.20GHz 2201MHz
L2 Cache : 6144 KB
OS : Linux 3.8.0-3-generic
C compiler : gcc version 4.7.2 (Ubuntu/Linaro 4.7.2-20ubuntu1)
libc : libc-2.17.so
MEMORY INDEX : 38.389
INTEGER INDEX : 33.167
FLOATING-POINT INDEX: 41.201
Baseline (LINUX) : AMD K6/233*, 512 KB L2-cache, gcc 2.7.2.3, libc-5.4.38
* Trademarks are property of their respective holder.

2200000:

BYTEmark* Native Mode Benchmark ver. 2 (10/95)
Index-split by Andrew D. Balsa (11/97)
Linux/Unix* port by Uwe F. Mayer (12/96,11/97)

TEST : Iterations/sec. : Old Index : New Index
                    : : Pentium 90* : AMD K6/233*
--------------------:------------------:-------------:------------
NUMERIC SORT : 1149.6 : 29.48 : 9.68
STRING SORT : 734.24 : 328.08 : 50.78
BITFIELD : 3.5834e+08 : 61.47 : 12.84
FP EMULATION : 373.76 : 179.35 : 41.38
FOURIER : 16813 : 19.12 : 10.74
ASSIGNMENT : 36.85 : 140.22 : 36.37
IDEA : 7122.3 : 108.93 : 32.34
HUFFMAN : 3246.9 : 90.04 : 28.75
NEURAL NET : 60.512 : 97.21 : 40.89
LU DECOMPOSITION : 1757.9 : 91.07 : 65.76
==========================ORIGINAL BYTEMARK RESULTS==========================
INTEGER INDEX : 105.622
FLOATING-POINT INDEX: 55.315
Baseline (MSDOS*) : Pentium* 90, 256 KB L2-cache, Watcom* compiler 10.0
=========...

Read more...

Revision history for this message
Michael Tanner (thonixx) wrote :

Unfortunately the double bug remains :/

Revision history for this message
Artem Popov (artfwo) wrote :

This is something I found by quick Googling:

http://lkml.indiana.edu/hypermail/linux/kernel/0812.1/02670.html

> (btw why do I have two states - 2201000 and 2200000 ??)

2201000 is the marketing speed of your processor, plus 1MHz.
This is used by the ACPI BIOS to enable "Turbo Mode",
aka Intel Dynamic Acceleration Technology --
which gives the harware license to run faster than
2.2GHz if the conditions are right.
ie. when there is still no idle time available at 2.2GHz,
ondemand chooses 2.21 Ghz, and the HW may give it more...

Looking further...

Revision history for this message
Alin Andrei (nilarimogard) wrote :

I actually thought that might be it after seeing the results. Maybe you can make the appindicator reflect this, like: if there are two values: 2201000 and 2200000, for the first one use: "2.20 GHz (turbo mode)" in the indicator menu...?

Revision history for this message
Artem Popov (artfwo) wrote :

Word. I've been too thinking of doing this very thing.

Revision history for this message
Michael Tanner (thonixx) wrote :
summary: - indicator-cpufreq 0.2-0ubuntu1: 2.20 frequency shows up twice [raring]
+ indicator-cpufreq 0.2-0ubuntu1: 2.20 frequency shows up twice
+ [raring/quantal]
Revision history for this message
Michael Tanner (thonixx) wrote :
Changed in indicator-cpufreq (Ubuntu):
status: Triaged → Confirmed
Changed in indicator-cpufreq:
status: New → Confirmed
Revision history for this message
Andrea Corbellini (andrea.corbellini) wrote :

Hi there. 'Triaged' here means that this bug report contains enough information for a developer to work on a fix, and that's the right status for this bug. See https://wiki.ubuntu.com/Bugs/Status for more details.

Changed in indicator-cpufreq (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Michael Tanner (thonixx) wrote :

Andrea, sorry, my mistake, I had the wrong state in my mind ;)

Artem Popov (artfwo)
Changed in indicator-cpufreq:
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package indicator-cpufreq - 0.2.1-0ubuntu1

---------------
indicator-cpufreq (0.2.1-0ubuntu1) raring; urgency=low

  * New upstream bugfix release (LP: #1130508):
    - Correctly display turbo mode option in menu (LP: #1110429).
    - Install hicolor icons (LP: #1125598).
 -- Artem Popov <email address hidden> Wed, 20 Feb 2013 10:39:05 +0700

Changed in indicator-cpufreq (Ubuntu):
status: Triaged → Fix Released
Artem Popov (artfwo)
Changed in indicator-cpufreq:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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