Dr-Noob / cpufetch

Simple yet fancy CPU architecture fetching tool
GNU General Public License v2.0
1.83k stars 100 forks source link

Incorrect data for Qualcomm Snapdragon 730G using `termux`. #174

Closed arunsingh-me closed 1 year ago

arunsingh-me commented 1 year ago
Untitled

neofetch's output:

Untitled

Output of /proc/cpuinfo:

Processor   : AArch64 Processor rev 14 (aarch64)
processor   : 0
BogoMIPS    : 38.40
Features    : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp
CPU implementer : 0x51
CPU architecture: 8
CPU variant : 0xd
CPU part    : 0x805
CPU revision    : 14

processor   : 1
BogoMIPS    : 38.40
Features    : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp
CPU implementer : 0x51
CPU architecture: 8
CPU variant : 0xd
CPU part    : 0x805
CPU revision    : 14

processor   : 2
BogoMIPS    : 38.40
Features    : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp
CPU implementer : 0x51
CPU architecture: 8
CPU variant : 0xd
CPU part    : 0x805
CPU revision    : 14

processor   : 3
BogoMIPS    : 38.40
Features    : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp
CPU implementer : 0x51
CPU architecture: 8
CPU variant : 0xd
CPU part    : 0x805
CPU revision    : 14

processor   : 4
BogoMIPS    : 38.40
Features    : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp
CPU implementer : 0x51
CPU architecture: 8
CPU variant : 0xd
CPU part    : 0x805
CPU revision    : 14

processor   : 5
BogoMIPS    : 38.40
Features    : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp
CPU implementer : 0x51
CPU architecture: 8
CPU variant : 0xd
CPU part    : 0x805
CPU revision    : 14

processor   : 6
BogoMIPS    : 38.40
Features    : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp
CPU implementer : 0x51
CPU architecture: 8
CPU variant : 0xd
CPU part    : 0x804
CPU revision    : 14

processor   : 7
BogoMIPS    : 38.40
Features    : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp
CPU implementer : 0x51
CPU architecture: 8
CPU variant : 0xd
CPU part    : 0x804
CPU revision    : 14

Hardware    : Qualcomm Technologies, Inc SDM730G AIE
Dr-Noob commented 1 year ago

That's very weird. Can you compile and run this code:

#include <stdio.h>

#ifdef __ANDROID__
#include <sys/system_properties.h>

static inline int android_property_get(const char* key, char* value) {
  return __system_property_get(key, value);
}

void android_property_fetch_and_print(const char* key) {
  char tmp[100];
  int property_len = android_property_get(key, (char *) &tmp);
  if(property_len > 0) {
    printf("%s: %s\n", key, tmp);
  }
  else {
    printf("%s: (empty)\n", key);
  }
}
#endif

int main() {
#ifdef __ANDROID__
  android_property_fetch_and_print("ro.mediatek.platform");
  android_property_fetch_and_print("ro.product.board");
  android_property_fetch_and_print("ro.board.platform");
#else
  printf("Android includes not found, please compile the program in an Android device!\n");
#endif
}

and paste the output here? You can easily compile it with gcc program.c or clang program.c.

arunsingh-me commented 1 year ago

Here it is.

ro.mediatek.platform: (empty)
ro.product.board: sm6150
ro.board.platform: sm6150
Dr-Noob commented 1 year ago

Thanks.

This is extremely weird. Android says you have a Snapdragon 675 (that's why cpufetch says it's a 675). The Linux kernel says you have a Snapdragon 730G (that's what neofetch is showing). But according to the cores you have (Kyro 485, which is reported also by the Linux kernel), you should have a Snapdragon 855 (ref).

My question now is. Which phone do you have? I guess you have installed some hacked ROM in your phone because it is extremely confusing about what hardware you have...Maybe there's an explanation about what is going on but I currently don't understand it.

arunsingh-me commented 1 year ago

Well this is from Realme X2 (Indian variant) RMX1992 that ships with Snapdragon 730G. It doesn't have a hacked ROM or anything.

Dr-Noob commented 1 year ago

Ok, I have pushed a fix that should report your SoC as Snapdragon 730G. Please reopen the issue if it's not the case. Thanks for the report!