GNOME Bugzilla – Bug 606769
System Monitor on ARM shows "Unknown CPU Model"
Last modified: 2012-12-06 10:13:18 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
Created attachment 151278 [details] Screenshot of System tab showing "Unknown CPU model"
Created attachment 151279 [details] [review] Patch for reference only (not generic)
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 ================================================================================
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.
Created attachment 182395 [details] [review] Fix to show cpu model on ARM.
Pushed to master after fixing the overly long subject lines. Thanks.
Sorry, didn't actually fix it in gnome-system-monitor but in the Details panel from the System Settings.
And it looks like it was already fixed anyway. Sigh, sorry about the spam.