Created attachment 139838 [details] KInfoCenter Running on POWER SUMMARY When running KInfoCenter on my AArch64 and POWER (ppc64el) devices, KInfoCenter fails to show processor model information, only displaying a multiplier of processor cores, "16 ×" in the case of the POWER machine. This happens even though in the case of the POWER machine, /proc/cpuinfo shows "POWER9, altivec supported." On AArch64, as there is no such thing as a processor branding or "pretty name," this is probably understandable (though from a UI standpoint, this is still off). I have attached a screenshot to demonstrate the issue. STEPS TO REPRODUCE 1. Fetch an AArch64 or POWER device (I assume ARMv7 or something will have the same issue). 2. Launch KInfoCenter. OBSERVED RESULT KInfoCenter only shows "core count" but not processor model. EXPECTED RESULT SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: (available in About System) KDE Plasma Version: KDE Frameworks Version: Qt Version: ADDITIONAL INFORMATION
> On AArch64, as there is no such thing as a processor branding or "pretty name," what do you expect to happen then? hide the entry?
(In reply to Harald Sitter from comment #1) > > On AArch64, as there is no such thing as a processor branding or "pretty name," > > what do you expect to happen then? hide the entry? Well, truthfully I don't have a straight answer to this (hence this bug report, but maybe I didn't write my report in the most... affirming way?). For AArch64, there's actually a way to generate a "pretty name," checking /proc/cpuinfo... CPU implementer : 0x41 CPU architecture: 8 CPU variant : 0x0 CPU part : 0xd08 CPU revision : 2 If we refer to "implementer" and "part," this translates into Cortex-A72 r0p2 (Implementer 0x41: ARM Ltd.; Part 0xd08: A72; ...). But then there are asymmetric (big.LITTLE) ARM SoCs with different cores for different performance characteristics, so this may not work in the end. There's also another way, I suppose. If we couldn't detect an exact processor model, would it be possible to simply display something like "16 × AArch64 Processors"? In Cinnamon, in case of undetected CPU model, it displays "unknown processor" as a fallback. Just to restate why I opened this report in the first place - KInfoCenter simply leaves the model part empty, leaving "16 ×" which simply seems like a bug.
util-linux' lscpu does map the cpuinfo codes to a number of different values (lscpu-arm.c) that comes from a number of sources but isn't available as a library. There is linux' include/asm/cputype.h but that seems not nearly as comprehensive and doesn't provide strings so that one would still have to manually map stuff on our end. The architecture value as best I can tell would only be available from uname and that is not exactly well defined as to what it contains in the machine value. So best case that is aarch64, worst case it's a long sentence that makes no sense given the context. All in all a bit of a disappointing situation since we most definitely do not want to maintain pretty string mappings on our end. I suspect simply rendering the value as `N x Unknown Processor` when there is no name is the most attractive solution by far. # solid udi = '/org/kde/solid/udev/sys/devices/system/cpu/cpu0' parent = '/org/kde/solid/udev' (string) vendor = '' (string) product = '' (string) description = 'Processor' (string) icon = 'cpu' (string) Processor.number = 0 (0x0) (int) Processor.maxSpeed = 0 (0x0) (qulonglong) Processor.canChangeFrequency = false (bool) Processor.instructionSets = 'NoExtensions' (0x0) (flag) # lscpu Architecture: aarch64 CPU op-mode(s): 64-bit Byte Order: Little Endian CPU(s): 96 On-line CPU(s) list: 0-95 Thread(s) per core: 1 Core(s) per socket: 48 Socket(s): 2 NUMA node(s): 2 Vendor ID: Cavium Model: 1 Model name: ThunderX 88XX Stepping: 0x1 BogoMIPS: 200.00 NUMA node0 CPU(s): 0-47 NUMA node1 CPU(s): 48-95 Flags: fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kinfocenter/-/merge_requests/39
Git commit 0e5e4567141b814f67ef4e6971121ba9b922b265 by Harald Sitter. Committed on 09/07/2021 at 10:31. Pushed by sitter into branch 'master'. unbreak about CPU value when solid is missing a product string instead of `Processors: 4 x` one now gets `Processors: 4`, or `Processors: 4 x Unknown Type, 12 x AMD Ryzen 5 3600X 6-Core Processor` when some of the cores have a product and the others do not. The latter is an incredible edge case but I suppose we best handle it properly. It did require reshuffling of the entry though. We now list the cores in the ctor to generate the label but only generate the values at call time so as to localize this potential placeholder accordingly. Meanwhile the former case ultimately lumps all processors together even when they are actually different from a physical POV (such as the heterogenous CPU set up of "ARM big.LITTLE"), but given the high level overview this KCM provides there is no point in expansively trying to figure out what the actual topology is (we do indeed not concern ourselves with topology at all in this entry). FIXED-IN: 5.22.4 M +19 -7 Modules/about-distro/src/CPUEntry.cpp M +7 -1 Modules/about-distro/src/CPUEntry.h https://invent.kde.org/plasma/kinfocenter/commit/0e5e4567141b814f67ef4e6971121ba9b922b265
Git commit 4cfd889c6fe3aa27b8eb99ebc104d4eb2fb39b10 by Harald Sitter. Committed on 09/07/2021 at 10:32. Pushed by sitter into branch 'Plasma/5.22'. unbreak about CPU value when solid is missing a product string instead of `Processors: 4 x` one now gets `Processors: 4`, or `Processors: 4 x Unknown Type, 12 x AMD Ryzen 5 3600X 6-Core Processor` when some of the cores have a product and the others do not. The latter is an incredible edge case but I suppose we best handle it properly. It did require reshuffling of the entry though. We now list the cores in the ctor to generate the label but only generate the values at call time so as to localize this potential placeholder accordingly. Meanwhile the former case ultimately lumps all processors together even when they are actually different from a physical POV (such as the heterogenous CPU set up of "ARM big.LITTLE"), but given the high level overview this KCM provides there is no point in expansively trying to figure out what the actual topology is (we do indeed not concern ourselves with topology at all in this entry). FIXED-IN: 5.22.4 (cherry picked from commit 0e5e4567141b814f67ef4e6971121ba9b922b265) M +19 -7 Modules/about-distro/src/CPUEntry.cpp M +7 -1 Modules/about-distro/src/CPUEntry.h https://invent.kde.org/plasma/kinfocenter/commit/4cfd889c6fe3aa27b8eb99ebc104d4eb2fb39b10