After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 606769 - System Monitor on ARM shows "Unknown CPU Model"
System Monitor on ARM shows "Unknown CPU Model"
Status: RESOLVED FIXED
Product: system-monitor
Classification: Core
Component: sysinfo
git master
Other Linux
: Normal normal
: ---
Assigned To: System-monitor maintainers
System-monitor maintainers
Depends on:
Blocks:
 
 
Reported: 2010-01-12 19:41 UTC by Debbie Beliveau
Modified: 2012-12-06 10:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot of System tab showing "Unknown CPU model" (36.95 KB, image/png)
2010-01-12 19:42 UTC, Debbie Beliveau
  Details
Patch for reference only (not generic) (975 bytes, patch)
2010-01-12 19:45 UTC, Debbie Beliveau
none Details | Review
Fix to show cpu model on ARM. (822 bytes, patch)
2011-03-03 19:56 UTC, Chris Kühl
committed Details | Review

Description Debbie Beliveau 2010-01-12 19:41:25 UTC
On Freescale MX51 ARM devices, the System Monitor application's System tab displays "Unknown CPU Model" for the Processor. Screenshot attached as unknownCpuScreenshot.png.

The attached detect-cpu-info-on-arm.patch fixes the issue on ARM.  However, it is not a generic patch (it is specific to ARM) so cannot be applied to gnome-system-monitor as is.  I'm attaching the patch simply for reference.

The Ubuntu bug for this issue is: https://bugs.launchpad.net/ubuntu/+source/gnome-system-monitor/+bug/506529
Comment 1 Debbie Beliveau 2010-01-12 19:42:29 UTC
Created attachment 151278 [details]
Screenshot of System tab showing "Unknown CPU model"
Comment 2 Debbie Beliveau 2010-01-12 19:45:13 UTC
Created attachment 151279 [details] [review]
Patch for reference only (not generic)
Comment 3 Debbie Beliveau 2010-01-12 23:13:08 UTC
Some background on the 2nd change in the patch file:

@@ -114,8 +114,8 @@ namespace {
 
 	if (!model)
 	  model = _("Unknown CPU model");
-
-	this->processors.push_back(model);
+	else
+	  this->processors.push_back(model);
       }
     }


This change was needed for ARM because gnome-system-monitor assumes the number of additional processors matches the number of blanks lines in /proc/cpuinfo and on an ARM system this is not always the case.  For example, the following is /proc/cpuinfo from an ARM system:

================================================================================
ubuntu@ubuntu:/proc$ cat cpuinfo 
Processor	: ARMv7 Processor rev 1 (v7l)
BogoMIPS	: 799.53
Features	: swp half thumb fastmult vfp edsp neon 
CPU implementer	: 0x41
CPU architecture: 7
CPU variant	: 0x2
CPU part	: 0xc08
CPU revision	: 1

Hardware	: Freescale MX51 Foo Board
Revision	: 51025
Serial		: 0000000000000000
================================================================================

There is a blank line between the "CPU revision" and "Hardware" lines but the system actually only has 1 processor.  Some more details about this:
 * gnome-system-monitor relies on libgtop2 to determine the number of processors so, actually, libgtop2 is the one that calculates the number of processors based on number of blank lines in /proc/cpuinfo
 * Because libgtop2 has informed gnome-system-monitor that there are 2 processors, gnome-system-monitor treats the 2nd section (the section beginning with "Hardware") as info about a 2nd processor.  Since it can't find a "Processor" field for this 2nd processor, it displays "Processor 1: Unknown CPU model"
 * The 2nd change in the attached patch is simply the most direct way to fix the issue on a specific ARM system.  A more generic approach would probably involve a change to libgtop2.
 * It does not seem that all ARM systems have the separate Hardware, Revision, Serial section and therefore not all ARM systems will have the additional blank line.  For example, the following is /proc/cpuinfo from Sharp's Netwalker system:
================================================================================
ubuntu@ubuntu:~$ cat /proc/cpuinfo 
Processor	: ARMv7 Processor rev 1 (v7l)
BogoMIPS	: 159.90
Features	: swp half thumb fastmult vfp edsp 
CPU implementer	: 0x41
CPU architecture: 7
CPU variant	: 0x2
CPU part	: 0xc08
CPU revision	: 1
Hardware	: SHARP PC-Z1
Revision	: 51020
Serial		: 0000000000000000
================================================================================
Comment 4 Chris Kühl 2011-03-03 19:56:48 UTC
I've very slightly reworked the patch and applied it. Thanks.

The following fix has been pushed:
a84ed33 Fix to show cpu model on ARM.
Comment 5 Chris Kühl 2011-03-03 19:56:52 UTC
Created attachment 182395 [details] [review]
Fix to show cpu model on ARM.
Comment 6 Bastien Nocera 2012-12-06 10:07:51 UTC
Pushed to master after fixing the overly long subject lines. Thanks.
Comment 7 Bastien Nocera 2012-12-06 10:09:45 UTC
Sorry, didn't actually fix it in gnome-system-monitor but in the Details panel from the System Settings.
Comment 8 Bastien Nocera 2012-12-06 10:13:18 UTC
And it looks like it was already fixed anyway. Sigh, sorry about the spam.