Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect/missing detection for CPU (Mediatek Dimensity 9300) #288

Closed
replikvlt opened this issue Sep 16, 2024 · 10 comments
Closed

Incorrect/missing detection for CPU (Mediatek Dimensity 9300) #288

replikvlt opened this issue Sep 16, 2024 · 10 comments
Labels
enhancement New feature or request

Comments

@replikvlt
Copy link

Hello,
I'm getting errors when running cpufetch, it says "Unknown microarchitecture detected"

CPU: 3.25GHz Mediatek Dimensity 9300 (Octa Core)
OS: Android 14 (and Termux 0.118.1)
Version: cpufetch v1.06 (Android ARM build)
Note: this CPU is 64 bit only

The output of cpufetch:

u0_a298@localhost:~$ cpufetch
[ERROR]: Unknown microarchitecture detected: IM=0x41 P=0xD81 V=0x0 R=0x1
[VERSION]: cpufetch v1.06 (Android ARM build)
Please, create a new issue with this error message, your smartphone/computer model, the output of 'cpufetch --verbose' and 'cpufetch --debug' on https://github.com/Dr-Noob/cpufetch/issues
[ERROR]: Unknown microarchitecture detected: IM=0x41 P=0xD82 V=0x0 R=0x1
[VERSION]: cpufetch v1.06 (Android ARM build)
Please, create a new issue with this error message, your smartphone/computer model, the output of 'cpufetch --verbose' and 'cpufetch --debug' on https://github.com/Dr-Noob/cpufetch/issues
[ERROR]: Unknown microarchitecture detected: IM=0x41 P=0xD82 V=0x0 R=0x1
[VERSION]: cpufetch v1.06 (Android ARM build)
Please, create a new issue with this error message, your smartphone/computer model, the output of 'cpufetch --verbose' and 'cpufetch --debug' on https://github.com/Dr-Noob/cpufetch/issues







    ##  ## ######  ######  #     ### @@@@@@ @@@@@@ @@  @@
   ### ### #       #    #  #    ####   @@   @      @@ @@
  ######## # ###   #    #  #   ## ##   @@   @ @@@  @@@@
 ## ### ## #       #    #  #  ##  ##   @@   @      @@ @@
##  ##  ## ######  #####   # ##   ##   @@   @@@@@@ @@  @@

The output of cpufetch --debug:

u0_a298@localhost:~$ cpufetch --debug
[ERROR]: Unknown microarchitecture detected: IM=0x41 P=0xD81 V=0x0 R=0x1
[VERSION]: cpufetch v1.06 (Android ARM build)
Please, create a new issue with this error message, your smartphone/computer model, the output of 'cpufetch --verbose' and 'cpufetch --debug' on https://github.com/Dr-Noob/cpufetch/issues
[ERROR]: Unknown microarchitecture detected: IM=0x41 P=0xD82 V=0x0 R=0x1
[VERSION]: cpufetch v1.06 (Android ARM build)
Please, create a new issue with this error message, your smartphone/computer model, the output of 'cpufetch --verbose' and 'cpufetch --debug' on https://github.com/Dr-Noob/cpufetch/issues
[ERROR]: Unknown microarchitecture detected: IM=0x41 P=0xD82 V=0x0 R=0x1
[VERSION]: cpufetch v1.06 (Android ARM build)
Please, create a new issue with this error message, your smartphone/computer model, the output of 'cpufetch --verbose' and 'cpufetch --debug' on https://github.com/Dr-Noob/cpufetch/issues
cpufetch v1.06 (Android ARM build)
[Core 0] 0x410FD811 2000 MHz
[Core 1] 0x410FD811 2000 MHz
[Core 2] 0x410FD811 2000 MHz
[Core 3] 0x410FD811 2000 MHz
[Core 4] 0x410FD821 2850 MHz
[Core 5] 0x410FD821 2850 MHz
[Core 6] 0x410FD821 2850 MHz
[Core 7] 0x410FD821 3250 MHz

Some more details generated by Android Hardware info apps:
CPU-Z debug info:

CPUs : 8
SoCs : 1

CPU 0 : 
Name : ARM 0xd81+ARM 0xd82
Model : MT6989W/CZA
CPUs : 8
Max Frequency : 3250 MHz

 Core set 0 : ARM 0xd81
 Core set 0 Nb Cores : 4
 Core set 0 Max Clock : 2000 MHz
Core set 0 Impl.id : 0x41
Core set 0 Arch.id : 0x8
Core set 0 Var.id : 0
Core set 0 Part.id : 0xd81
Core set 0 Rev.id : 1
Core set 0 Revision : r0p1

 Core set 1 : ARM 0xd82
 Core set 1 NbCores : 4
 Core set 1 Max Clock : 2850 MHz
Core set 1 Impl.id : 0x41
Core set 1 Arch.id : 0x8
Core set 1 Part.id : 0xd82

Arch : 4x ARM 0xd81 @2.00 GHz+4x ARM 0xd82 @2.85 GHz
Codename : 
GPU Vendor : ARM
GPU Renderer : Mali-G720-Immortalis MC12

Model : V2339A (PD2339)
Manufacturer : vivo
Board : k6989v1_64
Hardware : mt6989
Android Ver. : 14
Kernel Arch. : aarch64
Soc #1 : MT6989
Soc #2 : MT6989W/CZA
Soc #3 : 
Platform : mt6989

Battery capacity : 5160

--- CPUInfos ---
abi : arm64-v8a
abi2 : 
supported abis : [arm64-v8a]
supported 32-bit abis : []
supported 64-bit abis : [arm64-v8a]
processor : 0
BogoMIPS : 26.00
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 asimdfhm dit uscat ilrcpc flagm ssbs sb dcpodp flagm2 frint i8mm bf16 dgh bti ecv afp wfxt
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd81
CPU revision : 1

processor : 1
BogoMIPS : 26.00
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 asimdfhm dit uscat ilrcpc flagm ssbs sb dcpodp flagm2 frint i8mm bf16 dgh bti ecv afp wfxt
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd81
CPU revision : 1

processor : 2
BogoMIPS : 26.00
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 asimdfhm dit uscat ilrcpc flagm ssbs sb dcpodp flagm2 frint i8mm bf16 dgh bti ecv afp wfxt
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd81
CPU revision : 1

processor : 3
BogoMIPS : 26.00
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 asimdfhm dit uscat ilrcpc flagm ssbs sb dcpodp flagm2 frint i8mm bf16 dgh bti ecv afp wfxt
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd81
CPU revision : 1

processor : 4
BogoMIPS : 26.00
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 asimdfhm dit uscat ilrcpc flagm ssbs sb dcpodp flagm2 frint i8mm bf16 dgh bti ecv afp wfxt
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd82
CPU revision : 1

processor : 5
BogoMIPS : 26.00
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 asimdfhm dit uscat ilrcpc flagm ssbs sb dcpodp flagm2 frint i8mm bf16 dgh bti ecv afp wfxt
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd82
CPU revision : 1

processor : 6
BogoMIPS : 26.00
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 asimdfhm dit uscat ilrcpc flagm ssbs sb dcpodp flagm2 frint i8mm bf16 dgh bti ecv afp wfxt
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd82
CPU revision : 1

processor : 7
BogoMIPS : 26.00
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 asimdfhm dit uscat ilrcpc flagm ssbs sb dcpodp flagm2 frint i8mm bf16 dgh bti ecv afp wfxt
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd82
CPU revision : 1


--- Debug Infos ---

20=battery=26800
21=mtk_battery=25000
22=bq_bms=27500
23=soc_max=37963
24=cpu-little-core0=34373
25=cpu-little-core1=34667
26=cpu-little-core2=34465
27=cpu-little-core3=34405
28=cpu-medium-core4-0=34586
29=cpu-medium-core4-1=34408
30=cpu-medium-core5-0=35524
31=cpu-medium-core5-1=35071
32=cpu-medium-core6-0=34206
33=cpu-medium-core6-1=33897
34=cpu-big-core7-0=35090
35=cpu-big-core7-1=34460
36=cpu-dsu0=34588
37=cpu-dsu1=34853

clock 0=2000000
clock2 0=200000
clock 1=2000000
clock2 1=200000
clock 2=2000000
clock2 2=200000
clock 3=2000000
clock2 3=200000
clock 4=2850000
clock2 4=285000
clock 5=2850000
clock2 5=285000
clock 6=2850000
clock2 6=285000
clock 7=3250000
clock2 7=325000
DeviceInfo (by liuzh) CPU block extract
---------CPU---------
Hardware: MT6989
Cores: 8
CPU frequency: 300MHz - 3250MHz
Core 1: 1700 Mhz
Core 2: 1700 Mhz
Core 3: 1700 Mhz
Core 4: 1700 Mhz
Core 5: 2400 Mhz
Core 6: 2400 Mhz
Core 7: 2400 Mhz
Core 8: 2400 Mhz
SOC: Mediatek Dimensity 9300
Processor: Unknown
Supported ABIs: arm64-v8a
CPU hardware: MT6989
CPU governor: Unknown

GPU renderer: 
GPU vendor: 
GPU version: 
@Dr-Noob
Copy link
Owner

Dr-Noob commented Sep 17, 2024

Hey, thanks for the report. Can you please check with the latest version? (you can find how to compile it here). It should give you the right microarchitecture and still unknown SoC. In such case, can you please share the output of:

  • cat /proc/cpuinfo
  • hexdump -C /proc/device-tree/compatible

Thanks!

@replikvlt
Copy link
Author

Hey, cpuinfo is shared here hrw/arm-socs-table#108
Can't run hexdump -C /proc/device-tree/compatible as I have no root and get Permission denied :(
I built latest cpuinfo from git as per instruction, here is the output:

u0_a298@localhost:~/git/cpufetch$ ./cpufetch

                                                           SoC:                 Unknown
                                                           Technology:          Unknown
                                                           CPU 1:
                                                             Microarchitecture: Cortex-A720
                                                             Max Frequency:     2.000 GHz
                                                             Cores:             4 cores
    ##  ## ######  ######  #     ### @@@@@@ @@@@@@ @@  @@    Features:          NEON,SHA1,SHA2,AES,CRC32
   ### ### #       #    #  #    ####   @@   @      @@ @@   CPU 2:
  ######## # ###   #    #  #   ## ##   @@   @ @@@  @@@@      Microarchitecture: Cortex-X4
 ## ### ## #       #    #  #  ##  ##   @@   @      @@ @@     Max Frequency:     2.850 GHz
##  ##  ## ######  #####   # ##   ##   @@   @@@@@@ @@  @@    Cores:             3 cores
                                                             Features:          NEON,SHA1,SHA2,AES,CRC32
                                                           CPU 3:
                                                             Microarchitecture: Cortex-X4
                                                             Max Frequency:     3.250 GHz
                                                             Cores:             1 cores
                                                             Features:          NEON,SHA1,SHA2,AES,CRC32
                                                           Peak Performance:    505.60 GFLOP/s
u0_a298@localhost:~/git/cpufetch$ ./cpufetch --debug
cpufetch v1.06-32-g2e2e (Android ARM build)
[Core 0] 0x410FD811 2000 MHz
[Core 1] 0x410FD811 2000 MHz
[Core 2] 0x410FD811 2000 MHz
[Core 3] 0x410FD811 2000 MHz
[Core 4] 0x410FD821 2850 MHz
[Core 5] 0x410FD821 2850 MHz
[Core 6] 0x410FD821 2850 MHz
[Core 7] 0x410FD821 3250 MHz

@Dr-Noob
Copy link
Owner

Dr-Noob commented Sep 17, 2024

My bad, ./cpufetch --verbose should be enough, thanks!

@replikvlt
Copy link
Author

Output of ./cpufetch --verbose

u0_a298@localhost:~/git/cpufetch$ ./cpufetch --verbose
[WARNING]: SoC detection failed using /proc/cpuinfo: No string found

                                                           SoC:                 Unknown
                                                           Technology:          Unknown
                                                           CPU 1:
                                                             Microarchitecture: Cortex-A720
                                                             Max Frequency:     2.000 GHz
                                                             Cores:             4 cores
    ##  ## ######  ######  #     ### @@@@@@ @@@@@@ @@  @@    Features:          NEON,SHA1,SHA2,AES,CRC32
   ### ### #       #    #  #    ####   @@   @      @@ @@   CPU 2:
  ######## # ###   #    #  #   ## ##   @@   @ @@@  @@@@      Microarchitecture: Cortex-X4
 ## ### ## #       #    #  #  ##  ##   @@   @      @@ @@     Max Frequency:     2.850 GHz
##  ##  ## ######  #####   # ##   ##   @@   @@@@@@ @@  @@    Cores:             3 cores
                                                             Features:          NEON,SHA1,SHA2,AES,CRC32
                                                           CPU 3:
                                                             Microarchitecture: Cortex-X4
                                                             Max Frequency:     3.250 GHz
                                                             Cores:             1 cores
                                                             Features:          NEON,SHA1,SHA2,AES,CRC32
                                                           Peak Performance:    505.60 GFLOP/s

@Dr-Noob
Copy link
Owner

Dr-Noob commented Sep 18, 2024

It does not seem to be fetching the android properties (at least it's not shown in the output...), which is extremely odd. Have you compiled in Linux then copied the binary to your phone, or compiled directly in your phone?

I have added support for your SoC in the branch i288 so you can give it a try but I think it's unlikely it'll work since it's not able to get the SoC identifier anywhere.

@replikvlt
Copy link
Author

replikvlt commented Sep 18, 2024

Hey, thanks for prompt response. I have compiled cpufetch directly in termux on my phone.
I will try the i228 branch.

UPDATE
Seems to work on i288 branch and show the name, but verbose still shows it couldn't read cpuinfo.
Here's output:

u0_a298@localhost:~/git/cpufetch$ ./cpufetch --verbose
[WARNING]: SoC detection failed using /proc/cpuinfo: No string found

                                                           SoC:                 MediaTek Dimensity 9300
                                                           Technology:          4nm
                                                           CPU 1:
                                                             Microarchitecture: Cortex-A720
                                                             Max Frequency:     2.000 GHz
                                                             Cores:             4 cores
    ##  ## ######  ######  #     ### @@@@@@ @@@@@@ @@  @@    Features:          NEON,SHA1,SHA2,AES,CRC32
   ### ### #       #    #  #    ####   @@   @      @@ @@   CPU 2:
  ######## # ###   #    #  #   ## ##   @@   @ @@@  @@@@      Microarchitecture: Cortex-X4
 ## ### ## #       #    #  #  ##  ##   @@   @      @@ @@     Max Frequency:     2.850 GHz
##  ##  ## ######  #####   # ##   ##   @@   @@@@@@ @@  @@    Cores:             3 cores
                                                             Features:          NEON,SHA1,SHA2,AES,CRC32
                                                           CPU 3:
                                                             Microarchitecture: Cortex-X4
                                                             Max Frequency:     3.250 GHz
                                                             Cores:             1 cores
                                                             Features:          NEON,SHA1,SHA2,AES,CRC32
                                                           Peak Performance:    505.60 GFLOP/s

@replikvlt
Copy link
Author

Android has this thing called build or system properties. They can be read using termux or adb shell using getprop utility. I wonder if that can be used for reading and identifying SOC on Android.

For instance when I executed getprop with no more arguments in termux it gave me (probably) full list of properties. Among them I saw few which seemed like SoC identifier. After filtering a bit I got the following list for example:

u0_a298@localhost:~$ getprop | grep -Pi ': (?=.*(mt|mediatek|dimensity|9300|6989).*)'
[Build.BRAND]: [MTK]
[dalvik.vm.mtk-stack-trace-file]: [/data/anr/mtk_traces.txt]
[persist.vendor.connsys.chipid]: [0x6989]
[persist.vivo.voicewakeup.chip.type]: [mtk]
[ro.board.platform]: [mt6989]
[ro.boot.hardware]: [mt6989]
[ro.gfx.driver.0]: [com.mediatek.mt6989.gamedriver]
[ro.hardware]: [mt6989]
[ro.hardware.hwcomposer]: [mtk_common]
[ro.netflix.bsp_rev]: [MTK6989-37732-1]
[ro.product.board]: [k6989v1_64]
[ro.soc.manufacturer]: [Mediatek]
[ro.soc.model]: [MT6989]
[ro.sys.usb.storage.type]: [mtp]
[ro.vendor.mediatek.platform]: [MT6989]
[ro.vendor.soc.manufacturer]: [Mediatek]
[ro.vendor.soc.model]: [MT6989]
[ro.vendor.soc.model.external_name]: [MT6989W/CZA]
[ro.vendor.soc.model.part_name]: [MT6989W/CZA]
[ro.vivo.product.platform]: [MTK6989]
[ro.vivo.product.solution]: [MTK]
[vendor.connsys.bt_fw_ver]: [t-neptune-mp-mt6639-2338-tc19sp-MT6639_E1_ASIC_ROM_RAM_MOBILE_DX3_BT-20240412113624]
[vendor.gsm.project.baseband]: [BBK_U0MP1_K6989V1_64(NLWCG_FR1_CUSTOM)]
[vendor.wlan.firmware.version]: [t-neptune-mp-mt6639-2338-tc19sp-MT6639_E1_ASIC_ROM_RAM_MOBILE_DX3_WF-20240408100107]

Maybe there properties can somehow be used for identification, for example ro.vendor.soc.model?

@Dr-Noob
Copy link
Owner

Dr-Noob commented Sep 19, 2024

It's fine if it shows a warning when running with --verbose (that's why it's verbose mode), the good news is it shows the correct SoC. I'll merge it into master soon, thanks 👍

@replikvlt
Copy link
Author

Thank you!
Let me know if you need any other details.

@Dr-Noob
Copy link
Owner

Dr-Noob commented Sep 22, 2024

Everything alright, thanks! Just merged into master, closing.

@Dr-Noob Dr-Noob closed this as completed Sep 22, 2024
@Dr-Noob Dr-Noob added the enhancement New feature or request label Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants