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

[BUG] Incorrect report of CPU frequency on Windows. #800

Closed
lostdusty opened this issue Apr 20, 2024 · 14 comments
Closed

[BUG] Incorrect report of CPU frequency on Windows. #800

lostdusty opened this issue Apr 20, 2024 · 14 comments
Labels
bug Something isn't working

Comments

@lostdusty
Copy link

General description of bug:

Fastfetch returns incorrect CPU frequency on Windows. No configuration used, installed from scoop, also happens on dev branch. The correct CPU frequency should be 3.5Ghz.
image

Often helpful information:

Screenshot:

image

Output of fastfetch -c ci.jsonc --format json:

Click to expand
�[18t�]10;?�\[
  {
    "type": "Title",
    "result": {
      "userName": "Mortix",
      "hostName": "desk",
      "homeDir": "C:/Users/Mortix/",
      "exePath": "D:/Downloads/fastfetch-windows-amd64/fastfetch-windows-amd64/fastfetch.exe",
      "userShell": "",
      "pageSize": 4096
    },
    "stat": 0
  },
  {
    "type": "Separator",
    "error": "Unsupported for JSON format",
    "stat": 0
  },
  {
    "type": "OS",
    "result": {
      "buildID": "",
      "codename": "",
      "id": "Windows 10",
      "idLike": "",
      "name": "Windows",
      "prettyName": "Windows",
      "variant": "Pro",
      "variantID": "",
      "version": "10",
      "versionID": ""
    },
    "stat": 2
  },
  {
    "type": "Host",
    "error": "neither product_family nor product_name is set by O.E.M.",
    "stat": 0
  },
  {
    "type": "Bios",
    "result": {
      "date": "12/19/2023",
      "release": "3.13",
      "vendor": "American Megatrends Inc.",
      "version": "4401",
      "type": "UEFI"
    },
    "stat": 0
  },
  {
    "type": "Board",
    "result": {
      "name": "H110M-K",
      "vendor": "ASUSTeK COMPUTER INC.",
      "version": "Rev X.0x",
      "serial": ""
    },
    "stat": 0
  },
  {
    "type": "Chassis",
    "result": {
      "type": "Desktop",
      "vendor": "",
      "version": "",
      "serial": ""
    },
    "stat": 0
  },
  {
    "type": "Kernel",
    "result": {
      "architecture": "x86_64",
      "name": "WIN32_NT",
      "release": "10.0.19045.4291",
      "version": "19041.1.amd64fre.vb_release.191206-1406",
      "displayVersion": "22H2"
    },
    "stat": 0
  },
  {
    "type": "Uptime",
    "result": {
      "uptime": 5191843,
      "bootTime": "2024-04-19T20:39:35.319-0300"
    },
    "stat": 1
  },
  {
    "type": "Processes",
    "result": 194,
    "stat": 2
  },
  {
    "type": "Packages",
    "result": {
      "all": 27,
      "apk": 0,
      "brew": 0,
      "brewCask": 0,
      "choco": 0,
      "dpkg": 0,
      "emerge": 0,
      "eopkg": 0,
      "flatpakSystem": 0,
      "flatpakUser": 0,
      "nixDefault": 0,
      "nixSystem": 0,
      "nixUser": 0,
      "pacman": 0,
      "paludis": 0,
      "pkg": 0,
      "pkgtool": 0,
      "macports": 0,
      "rpm": 0,
      "scoop": 27,
      "snap": 0,
      "winget": 0,
      "xbps": 0,
      "opkg": 0,
      "am": 0,
      "pacmanBranch": ""
    },
    "stat": 0
  },
  {
    "type": "Shell",
    "result": {
      "exe": "C:\\Windows\\System32\\cmd.exe",
      "exeName": "cmd.exe",
      "exePath": "C:\\Windows\\System32\\cmd.exe",
      "pid": 13872,
      "ppid": 2224,
      "processName": "cmd.exe",
      "prettyName": "CMD",
      "version": "10.0.19041.3636",
      "tty": null
    },
    "stat": 2
  },
  {
    "type": "Display",
    "result": [
      {
        "width": 1440,
        "height": 900,
        "id": 65537,
        "name": "SyncMaster",
        "primary": true,
        "refreshRate": 74.984,
        "rotation": 0,
        "scaledHeight": 900,
        "scaledWidth": 1440,
        "type": "External"
      }
    ],
    "stat": 1
  },
  {
    "type": "Brightness",
    "result": [
      {
        "name": "SyncMaster",
        "max": 100.0,
        "min": 0.0,
        "current": 0.0
      }
    ],
    "stat": 69
  },
  {
    "type": "Monitor",
    "result": [
      {
        "hdrCompatible": false,
        "name": "SyncMaster",
        "resolution": {
          "width": 1440,
          "height": 900
        },
        "physical": {
          "height": 255,
          "width": 408
        },
        "manufactureDate": {
          "year": 2009,
          "week": 13
        },
        "serial": 1129132345
      }
    ],
    "stat": 2
  },
  {
    "type": "LM",
    "error": "Not supported on this platform",
    "stat": 0
  },
  {
    "type": "DE",
    "result": {
      "processName": "",
      "prettyName": "Fluent",
      "version": ""
    },
    "stat": 0
  },
  {
    "type": "WM",
    "result": {
      "processName": "dwm.exe",
      "prettyName": "Desktop Window Manager",
      "protocolName": "",
      "pluginName": ""
    },
    "stat": 0
  },
  {
    "type": "WMTheme",
    "result": "Custom - Black (System: Dark, Apps: Dark)",
    "stat": 0
  },
  {
    "type": "Theme",
    "error": "Not supported on this platform",
    "stat": 0
  },
  {
    "type": "Icons",
    "result": "Recycle Bin",
    "stat": 1
  },
  {
    "type": "Font",
    "result": {
      "display": "Segoe UI (12pt) [Caption / Menu / Message / Status]",
      "fonts": [
        "Segoe UI (12pt)",
        "Segoe UI (12pt)",
        "Segoe UI (12pt)",
        "Segoe UI (12pt)"
      ]
    },
    "stat": 0
  },
  {
    "type": "Cursor",
    "result": {
      "theme": "Windows em Preto",
      "size": "32"
    },
    "stat": 0
  },
  {
    "type": "Wallpaper",
    "result": "D:\\Downloads\\IMG_3331.jpg",
    "stat": 0
  },
  {
    "type": "Terminal",
    "result": {
      "processName": "conhost.exe",
      "exe": "C:\\Windows\\System32\\conhost.exe",
      "exeName": "conhost.exe",
      "exePath": "",
      "pid": 0,
      "ppid": 0,
      "prettyName": "Windows Console",
      "version": "10.0.19041.3636",
      "tty": ""
    },
    "stat": 1
  },
  {
    "type": "TerminalFont",
    "error": "GetCurrentConsoleFontEx() failed",
    "stat": 0
  },
  {
    "type": "TerminalSize",
    "error": "Failed to detect terminal size",
    "stat": 101
  },
  {
    "type": "TerminalTheme",
    "error": "Failed to detect terminal theme",
    "stat": 108
  },
  {
    "type": "CPU",
    "result": {
      "cpu": "Intel(R) Pentium(R) G4560",
      "vendor": "GenuineIntel",
      "cores": {
        "physical": 2,
        "logical": 4,
        "online": 4
      },
      "frequency": {
        "base": 3.504,
        "max": 8.3,
        "min": null
      },
      "temperature": null
    },
    "stat": 0
  },
  {
    "type": "CPUUsage",
    "result": [
      15.384615384615385,
      0.0,
      23.076923076923077,
      0.0
    ],
    "stat": 204
  },
  {
    "type": "GPU",
    "result": [
      {
        "coreCount": null,
        "memory": {
          "dedicated": {
            "total": 4198498304,
            "used": null
          },
          "shared": {
            "total": 6376931328,
            "used": null
          }
        },
        "driver": "31.0.15.5161",
        "name": "NVIDIA GeForce GTX 1050 Ti",
        "temperature": null,
        "type": "Discrete",
        "vendor": "NVIDIA",
        "platformApi": "Direct3D 12.1",
        "frequency": null
      },
      {
        "coreCount": null,
        "memory": {
          "dedicated": {
            "total": 134217728,
            "used": null
          },
          "shared": {
            "total": 6376931328,
            "used": null
          }
        },
        "driver": "25.20.100.6471",
        "name": "Intel(R) HD Graphics 610",
        "temperature": null,
        "type": "Integrated",
        "vendor": "Intel",
        "platformApi": "Direct3D 12.1",
        "frequency": null
      }
    ],
    "stat": 1
  },
  {
    "type": "Memory",
    "result": {
      "total": 12753862656,
      "used": 8066469888
    },
    "stat": 0
  },
  {
    "type": "Swap",
    "result": {
      "total": 6442450944,
      "used": 109780992
    },
    "stat": 0
  },
  {
    "type": "Disk",
    "result": [
      {
        "bytes": {
          "available": 15110877184,
          "free": 15110877184,
          "total": 119399088128,
          "used": 104288210944
        },
        "files": {
          "total": null,
          "used": null
        },
        "filesystem": "NTFS",
        "mountpoint": "C:\\",
        "mountFrom": "\\Device\\HarddiskVolume3",
        "name": "Windows",
        "volumeType": [
          "Regular"
        ],
        "createTime": "2019-12-07T06:03:44.460-0300"
      },
      {
        "bytes": {
          "available": 109652541440,
          "free": 109652541440,
          "total": 453999247360,
          "used": 344346705920
        },
        "files": {
          "total": null,
          "used": null
        },
        "filesystem": "NTFS",
        "mountpoint": "D:\\",
        "mountFrom": "\\Device\\HarddiskVolume6",
        "name": "Programs",
        "volumeType": [
          "Regular"
        ],
        "createTime": "2022-12-06T19:43:01.510-0300"
      },
      {
        "bytes": {
          "available": 592290017280,
          "free": 592290017280,
          "total": 1439291568128,
          "used": 847001550848
        },
        "files": {
          "total": null,
          "used": null
        },
        "filesystem": "NTFS",
        "mountpoint": "E:\\",
        "mountFrom": "\\Device\\HarddiskVolume8",
        "name": "Files",
        "volumeType": [
          "Regular"
        ],
        "createTime": "2013-02-20T11:46:15.780-0300"
      },
      {
        "bytes": {
          "available": 0,
          "free": 0,
          "total": 0,
          "used": 0
        },
        "files": {
          "total": null,
          "used": null
        },
        "filesystem": "",
        "mountpoint": "F:\\",
        "mountFrom": "\\Device\\CdRom0",
        "name": "",
        "volumeType": [
          "External"
        ],
        "createTime": null
      }
    ],
    "stat": 9
  },
  {
    "type": "Battery",
    "error": "NtPowerInformation(SystemBatteryState) failed",
    "stat": 0
  },
  {
    "type": "PowerAdapter",
    "error": "Not supported on this platform",
    "stat": 0
  },
  {
    "type": "Player",
    "error": "Not supported on this platform",
    "stat": 0
  },
  {
    "type": "Media",
    "error": "Not supported on this platform",
    "stat": 0
  },
  {
    "type": "PublicIp",
    "result": {
      "ip": "[Removed]",
      "location": "Blumenau, BR"
    },
    "stat": 0
  },
  {
    "type": "LocalIp",
    "result": [
      {
        "defaultRoute": true,
        "ipv4": "192.168.15.2/24",
        "ipv6": "",
        "mac": "",
        "name": "Ethernet"
      }
    ],
    "stat": 3
  },
  {
    "type": "Wifi",
    "error": "No Wifi interfaces found",
    "stat": 2
  },
  {
    "type": "DateTime",
    "result": 1713575167669,
    "stat": 0
  },
  {
    "type": "Locale",
    "result": "en-CA",
    "stat": 0
  },
  {
    "type": "Vulkan",
    "result": {
      "apiVersion": "1.3.277",
      "conformanceVersion": "1.3.2",
      "driver": "NVIDIA [551.61]",
      "gpus": [
        {
          "type": "Discrete",
          "vendor": "NVIDIA",
          "name": "NVIDIA GeForce GTX 1050 Ti",
          "driver": "551.61",
          "platformApi": "Vulkan 1.3.277",
          "memory": {
            "dedicated": {
              "total": 4422893568,
              "used": null
            },
            "shared": {
              "total": 6376931328,
              "used": null
            }
          },
          "deviceId": 7298
        },
        {
          "type": "Integrated",
          "vendor": "Intel",
          "name": "Intel(R) HD Graphics 610",
          "driver": "Intel driver",
          "platformApi": "Vulkan 1.1.93",
          "memory": {
            "dedicated": {
              "total": 0,
              "used": null
            },
            "shared": {
              "total": 140715698319439,
              "used": null
            }
          },
          "deviceId": 22786
        }
      ]
    },
    "stat": 225
  },
  {
    "type": "OpenGL",
    "result": {
      "version": "4.6.0 NVIDIA 551.61",
      "renderer": "NVIDIA GeForce GTX 1050 Ti/PCIe/SSE2",
      "vendor": "NVIDIA Corporation",
      "slv": "4.60 NVIDIA"
    },
    "stat": 198
  },
  {
    "type": "OpenCL",
    "result": {
      "version": "3.0 CUDA",
      "device": "NVIDIA GeForce GTX 1050 Ti",
      "vendor": "NVIDIA Corporation"
    },
    "stat": 152
  },
  {
    "type": "Users",
    "result": [
      {
        "name": "Mortix",
        "hostName": "",
        "sessionName": "Console",
        "clientIp": "",
        "loginTime": "2024-04-19T20:45:26.018-0300"
      }
    ],
    "stat": 1
  },
  {
    "type": "Bluetooth",
    "error": "BluetoothFindFirstDevice() failed",
    "stat": 3
  },
  {
    "type": "Sound",
    "result": [
      {
        "active": true,
        "main": true,
        "volume": 14,
        "name": "Alto-falantes (Realtek(R) Audio)",
        "identifier": "{0.0.0.00000000}.{0096fd15-1112-433c-b723-f52851e62e3b}"
      },
      {
        "active": true,
        "main": false,
        "volume": 100,
        "name": "Realtek Digital Output (Realtek(R) Audio)",
        "identifier": "{0.0.0.00000000}.{4bc74bcc-0e14-45a8-8174-c3d2ef51ab60}"
      }
    ],
    "stat": 10
  },
  {
    "type": "Camera",
    "result": [],
    "stat": 5
  },
  {
    "type": "Gamepad",
    "error": "No devices detected",
    "stat": 0
  },
  {
    "type": "Weather",
    "result": "+26°C - Shower in vicinity ([Removed], Brazil)",
    "stat": 0
  },
  {
    "type": "NetIO",
    "result": [
      {
        "name": "Ethernet",
        "defaultRoute": true,
        "txBytes": 654,
        "rxBytes": 3499,
        "txPackets": 10,
        "rxPackets": 11,
        "rxErrors": 0,
        "txErrors": 0,
        "rxDrops": 0,
        "txDrops": 0
      }
    ],
    "stat": 4
  },
  {
    "type": "DiskIO",
    "result": [
      {
        "name": "KINGSTON SA400S37120GB",
        "devPath": "\\\\.\\PhysicalDrive0",
        "bytesRead": 32768,
        "bytesWritten": 124416,
        "readCount": 1,
        "writeCount": 8
      },
      {
        "name": "ST2000DM001-9YN164",
        "devPath": "\\\\.\\PhysicalDrive1",
        "bytesRead": 0,
        "bytesWritten": 24576,
        "readCount": 0,
        "writeCount": 3
      }
    ],
    "stat": 0
  },
  {
    "type": "PhysicalDisk",
    "result": [
      {
        "name": "KINGSTON SA400S37120GB",
        "devPath": "\\\\.\\PhysicalDrive0",
        "interconnect": "SATA",
        "kind": "SSD",
        "size": 120034123776,
        "serial": "AA20220800002827",
        "removable": false,
        "readOnly": false,
        "revision": "HPS2227I",
        "temperature": null
      },
      {
        "name": "ST2000DM001-9YN164",
        "devPath": "\\\\.\\PhysicalDrive1",
        "interconnect": "SATA",
        "kind": "HDD",
        "size": 2000398934016,
        "serial": "W2F0MSYY",
        "removable": false,
        "readOnly": false,
        "revision": "CC4B",
        "temperature": null
      },
      {
        "name": "TSSTcorp CDDVDW SH-S223C",
        "devPath": "\\\\.\\CDROM0",
        "interconnect": "SATA",
        "kind": null,
        "size": 4194304,
        "serial": "",
        "removable": true,
        "readOnly": true,
        "revision": "SB07",
        "temperature": null
      }
    ],
    "stat": 6
  },
  {
    "type": "Version",
    "result": {
      "projectName": "fastfetch",
      "architecture": "x86_64",
      "version": "2.9.2",
      "versionTweak": "",
      "cmakeBuiltType": "RelWithDebInfo",
      "compileTime": "Apr 19 2024, 07:28:30",
      "compiler": "clang 18.1.4",
      "debugMode": false,
      "libc": "ucrt 14.0"
    },
    "stat": 0
  },
  {
    "type": "Break",
    "error": "Unsupported for JSON format",
    "stat": 0
  },
  {
    "type": "Colors",
    "error": "Unsupported for JSON format",
    "stat": 0
  }
]

Output of fastfetch --list-features:

threads
vulkan
zlib
opencl
Proprietary GPU driver API
@lostdusty lostdusty added the bug Something isn't working label Apr 20, 2024
@CarterLi
Copy link
Member

CarterLi commented Apr 20, 2024

Seems that SMBIOS reports some invalid data. Can you please try this program and upload its output?

DumpSMBIOS.zip

Note: The binary was compiled from https://github.com/KunYi/DumpSMBIOS. If not sure, you may compile it yourself.

@lostdusty
Copy link
Author

We need prepare 4028 bytes for recevie SMBIOS/DMI Table
SMBIOS version:3.0
DMI Revision:0
Total length: 4020
DMI at address 000001767580AF78
-=======================================================-
==========          BIOS information           ==========
Vendor: American Megatrends Inc.
Version: 4401
BIOS Starting Segment: 0xF000
Release Date: 12/19/2023
Image Size: 16384K
System BIOS version: 5.12
EC Firmware version: 255.255
-=======================================================-
==========         System information          ==========
Manufacturer: System manufacturer
Product Name: System Product Name
Version: System Version
Serial Number: System Serial Number
UUID: 8C7E976B-C597-CFD9-24B1-2C4D54669E2A
Wake-up Type: Power Switch
SKU Number: SKU
Family: To be filled by O.E.M.
-=======================================================-
==========       Base Board information        ==========
Length: 0xF
Manufacturer: ASUSTeK COMPUTER INC.
Product Name: H110M-K
Version: Rev X.0x
Serial Number: 161189556405178
Asset Tag Number: Default string
Feature Flag: 0x9
Location in Chassis: Default string
Board Type: Processor/Memory Module
Number of Contained Object Handles: 0
Object Handles:

-=======================================================-
==========    System Enclosure information     ==========
Length: 0x16
Manufacturer: Default string
Version: Default string
Serial Number: Default string
Asset Tag Number: Default string
-=======================================================-
==========             OEM String              ==========
Count: 8
OEM String1: Default string
OEM String2: Default string
OEM String3: Default string
OEM String4: Default string
OEM String5: FFFFFFFFFFFFF
OEM String6: FFFFFFFFFFFFF
OEM String7: FFFFFFFFFFFFF
OEM String8: Default string
-=======================================================-
==========            Memory Device            ==========
Length: 0x28
Total Width: 64bits
Data Width: 64bits
Device Locator: DIMM_A1
Bank Locator: BANK 0
Speed: 2400
Manufacturer: CRUCIAL
Serial Number: E757C969
Asset Tag Number: 9876543210
Part Number: CB8GU2666.C8RT
-=======================================================-
==========            Memory Device            ==========
Length: 0x28
Total Width: 64bits
Data Width: 64bits
Device Locator: DIMM_B1
Bank Locator: BANK 2
Speed: 2400
Manufacturer: CRUCIAL
Serial Number: AD0643E0
Asset Tag Number: 9876543210
Part Number: BLS4G4D240FSA.8FAR
-=======================================================-
==========     Memory Array Mapped Address     ==========
Length: 0x1F
Starting Address: 0x00000000
Ending Address: 0x00BFFFFF
Memory Array Handle: 0x37
Partition Width: 0x2
-=======================================================-
==========           Cache information         ==========
Length: 0x13
Socket Designation: L1 Cache
-=======================================================-
==========           Cache information         ==========
Length: 0x13
Socket Designation: L2 Cache
-=======================================================-
==========           Cache information         ==========
Length: 0x13
Socket Designation: L3 Cache
-=======================================================-
==========        Processor information        ==========
Length: 0x30
Socket Designation: LGA1151
Processor Type: Central Processor
Processor Family:
Processor ID:
Processor Manufacturer: Intel(R) Corporation
Processor Version: Intel(R) Pentium(R) CPU G4560 @ 3.50GHz
External Clock: 100MHz, 0MHz is unknown clock
Max Speed: 8300MHz
Current Speed: 3500MHz
Status: 0x41

///////////////////////////////////////////////////////////
BIOS Vendor: American Megatrends Inc.
BIOS Version: 4401
BIOS Release Data: 12/19/2023
Board Manaufactor: ASUSTeK COMPUTER INC.
Board Product Name: H110M-K
System Manufactor: System manufacturer
System Product Name: System Product Name

@lostdusty
Copy link
Author

If more additional info is needed, here are few screenshots i took on my bios, and winfetch/neofetch:
240420202618
240420202703

Winfetch:
image

Neofetch:
image

If necessary, I can also rollback my bios.

CarterLi added a commit that referenced this issue Apr 21, 2024
@CarterLi
Copy link
Member

CarterLi commented Apr 21, 2024

If necessary, I can also rollback my bios.

Big thanks for your kind help! But you don't need to do that.

I have made a work around ( assume that @KunYi and I implemented SMBIOS detection code correctly ). Please test if the latest dev build work for you

If you'd like to help more, you may try this command in native Linux and paste the output here ( live image should be enough, but not in WSL or a VM )

sudo dmidecode -t processor

Example output for my laptop ( see Max Speed section )

# dmidecode 3.5
Getting SMBIOS data from sysfs.
SMBIOS 3.4.0 present.

Handle 0x004F, DMI type 4, 48 bytes
Processor Information
        Socket Designation: U3E1
        Type: Central Processor
        Family: Core i7
        Manufacturer: Intel(R) Corporation
        ID: A3 06 09 00 FF FB EB BF
        Signature: Type 0, Family 6, Model 154, Stepping 3
        Flags:
                FPU (Floating-point unit on-chip)
                VME (Virtual mode extension)
                DE (Debugging extension)
                PSE (Page size extension)
                TSC (Time stamp counter)
                MSR (Model specific registers)
                PAE (Physical address extension)
                MCE (Machine check exception)
                CX8 (CMPXCHG8 instruction supported)
                APIC (On-chip APIC hardware supported)
                SEP (Fast system call)
                MTRR (Memory type range registers)
                PGE (Page global enable)
                MCA (Machine check architecture)
                CMOV (Conditional move instruction supported)
                PAT (Page attribute table)
                PSE-36 (36-bit page size extension)
                CLFSH (CLFLUSH instruction supported)
                DS (Debug store)
                ACPI (ACPI supported)
                MMX (MMX technology supported)
                FXSR (FXSAVE and FXSTOR instructions supported)
                SSE (Streaming SIMD extensions)
                SSE2 (Streaming SIMD extensions 2)
                SS (Self-snoop)
                HTT (Multi-threading)
                TM (Thermal monitor supported)
                PBE (Pending break enabled)
        Version: 12th Gen Intel(R) Core(TM) i7-12700H
        Voltage: 1.2 V
        External Clock: 100 MHz
        Max Speed: 4700 MHz
        Current Speed: 4059 MHz
        Status: Populated, Enabled
        Upgrade: Other
        L1 Cache Handle: 0x0048
        L2 Cache Handle: 0x0049
        L3 Cache Handle: 0x004A
        Serial Number: To Be Filled By O.E.M.
        Asset Tag: To Be Filled By O.E.M.
        Part Number: To Be Filled By O.E.M.
        Core Count: 14
        Core Enabled: 14
        Thread Count: 20
        Characteristics:
                64-bit capable
                Multi-Core
                Hardware Thread
                Execute Protection
                Enhanced Virtualization
                Power/Performance Control

@KunYi
Copy link

KunYi commented Apr 21, 2024

maybe check https://devblogs.microsoft.com/scripting/use-powershell-and-wmi-to-get-processor-information/ first and use script to check SMBIOS information first

@CarterLi
Copy link
Member

CarterLi commented Apr 21, 2024

@KunYi WMI won't report max / boost CPU frequency in newer system (Win10 or newer), only base frequency.

Get-WmiObject Win32_Processor | Select Name,MaxClockSpeed,CurrentClockSpeed

Name                                 MaxClockSpeed CurrentClockSpeed
----                                 ------------- -----------------
12th Gen Intel(R) Core(TM) i7-12700H          2700              2700

There are only two known methods to acquire max CPU frequency without admin privileges: fetching SMBIOS data or using x86 instruction CPUID. SMBIOS sometimes reports incorrect data. CPUID is only usable in x86 platforms but doesn't work if Hyper-V is enabled. Neither seems reliable.

@KunYi
Copy link

KunYi commented Apr 21, 2024

Yes, the SMBIOS (System Management BIOS) Table is filled by the BIOS code. So, if the BIOS provides an error related to the SMBIOS, the WMI (Windows Management Instrumentation) code merely reports the SMBIOS information to check the status reported by the BIOS.

Perhaps you can ask the motherboard or computer vendor to fix these issues.

The WMI is for vendors to identify and address duplication issues.

@CarterLi
Copy link
Member

CarterLi commented Apr 21, 2024

No. Microsoft said WMI uses data from SMBIOS, but it doesnt. WMI reports everything as base freq (2700), while SMBIOS reports correct data (4700) in my laptop.

@KunYi
Copy link

KunYi commented Apr 21, 2024

okay, maybe to try RWEverything for check SMBIOS
you can get it from http://rweverything.com/download/

@lostdusty
Copy link
Author

okay, maybe to try RWEverything for check SMBIOS you can get it from http://rweverything.com/download

image
:/

Dump - SMBIOS.zip

@lostdusty
Copy link
Author

lostdusty commented Apr 21, 2024

I have made a work around ( assume that @KunYi and I implemented SMBIOS detection code correctly ). Please test if the latest dev build work for you

image
Works now! Should I close the issue?

@lostdusty
Copy link
Author

dmidecode output:

# dmidecode 3.2
Getting SMBIOS data from sysfs.
SMBIOS 3.0.0 present.

Handle 0x003E, DMI type 4, 48 bytes
Processor Information
	Socket Designation: LGA1151
	Type: Central Processor
	Family: Pentium
	Manufacturer: Intel(R) Corporation
	ID: E9 06 09 00 FF FB EB BF
	Signature: Type 0, Family 6, Model 158, Stepping 9
	Flags:
		FPU (Floating-point unit on-chip)
		VME (Virtual mode extension)
		DE (Debugging extension)
		PSE (Page size extension)
		TSC (Time stamp counter)
		MSR (Model specific registers)
		PAE (Physical address extension)
		MCE (Machine check exception)
		CX8 (CMPXCHG8 instruction supported)
		APIC (On-chip APIC hardware supported)
		SEP (Fast system call)
		MTRR (Memory type range registers)
		PGE (Page global enable)
		MCA (Machine check architecture)
		CMOV (Conditional move instruction supported)
		PAT (Page attribute table)
		PSE-36 (36-bit page size extension)
		CLFSH (CLFLUSH instruction supported)
		DS (Debug store)
		ACPI (ACPI supported)
		MMX (MMX technology supported)
		FXSR (FXSAVE and FXSTOR instructions supported)
		SSE (Streaming SIMD extensions)
		SSE2 (Streaming SIMD extensions 2)
		SS (Self-snoop)
		HTT (Multi-threading)
		TM (Thermal monitor supported)
		PBE (Pending break enabled)
	Version: Intel(R) Pentium(R) CPU G4560 @ 3.50GHz
	Voltage: 0.9 V
	External Clock: 100 MHz
	Max Speed: 8300 MHz
	Current Speed: 3500 MHz
	Status: Populated, Enabled
	Upgrade: Other
	L1 Cache Handle: 0x003B
	L2 Cache Handle: 0x003C
	L3 Cache Handle: 0x003D
	Serial Number: To Be Filled By O.E.M.
	Asset Tag: To Be Filled By O.E.M.
	Part Number: To Be Filled By O.E.M.
	Core Count: 2
	Core Enabled: 2
	Thread Count: 4
	Characteristics:
		64-bit capable
		Multi-Core
		Hardware Thread
		Execute Protection
		Enhanced Virtualization
		Power/Performance Control

@CarterLi
Copy link
Member

Thanks for your information. So that SMBIOS does report 8300 MHz

Let's close this issue for now. If more people report the same issue, I will remove the method of SMBIOS detection code

@CarterLi
Copy link
Member

Note that the default information displayed by fastfetch was designed for linux and may not be useful for Windows. Fastfetch supports a lot more features than neofetch and winfetch. You can find information you interests in with fastfetch -c all.jsonc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants