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] fastfetch displays wrong CPU frequency #947

Closed
Zennwah opened this issue May 19, 2024 · 8 comments
Closed

[BUG] fastfetch displays wrong CPU frequency #947

Zennwah opened this issue May 19, 2024 · 8 comments
Labels
bug Something isn't working

Comments

@Zennwah
Copy link

Zennwah commented May 19, 2024

Be sure to read FAQ before submitting a new issue.

General description of bug: I installed fastfetch as an alternative for neofetch, but it displays the wrong frequency for my CPU, doesn't happen in neofetch or screenfetch and I even double checked my BIOS to see if it was set to the default value.

  • What happened: displays "AMD Ryzen 7 3700X (16) @ 4,43 GHz"
  • What should happen: it should be "AMD Ryzen 7 3700X (16) @ 3,60 GHz"
  • Fastfetch version used: 2.12.0-debug
  • Did it work in an older version: never used it previously
  • Where did you get the binary: installed with pacman on EndeavourOS
  • Does this issue still occurs in the latest dev build? yes

Often helpful information:

Screenshot:

obraz
obraz
obraz

The content of the configuration file you use (if any):

//paste here

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

[
  {
    "type": "Title",
    "result": {
      "userName": "zenwah",
      "hostName": "GrajMaszyna5000",
      "homeDir": "/home/zenwah/",
      "exePath": "/usr/bin/fastfetch",
      "userShell": "/usr/bin/zsh",
      "pageSize": 4096
    },
    "stat": 0
  },
  {
    "type": "Separator",
    "error": "Unsupported for JSON format",
    "stat": 0
  },
  {
    "type": "OS",
    "result": {
      "buildID": "rolling",
      "codename": "rolling",
      "id": "EndeavourOS",
      "idLike": "arch",
      "name": "EndeavourOS",
      "prettyName": "EndeavourOS Linux",
      "variant": "",
      "variantID": "",
      "version": "",
      "versionID": ""
    },
    "stat": 0
  },
  {
    "type": "Host",
    "result": {
      "family": "B450 MB",
      "name": "B450 AORUS ELITE V2",
      "version": "",
      "sku": "",
      "vendor": "Gigabyte Technology Co., Ltd.",
      "serial": "",
      "uuid": ""
    },
    "stat": 0
  },
  {
    "type": "Bios",
    "result": {
      "date": "12/25/2023",
      "release": "5.17",
      "vendor": "American Megatrends International, LLC.",
      "version": "F66c",
      "type": "UEFI"
    },
    "stat": 0
  },
  {
    "type": "Board",
    "result": {
      "name": "B450 AORUS ELITE V2",
      "vendor": "Gigabyte Technology Co., Ltd.",
      "version": "",
      "serial": ""
    },
    "stat": 0
  },
  {
    "type": "Chassis",
    "result": {
      "type": "Desktop",
      "vendor": "",
      "version": "",
      "serial": ""
    },
    "stat": 0
  },
  {
    "type": "Kernel",
    "result": {
      "architecture": "x86_64",
      "name": "Linux",
      "release": "6.6.31-1-lts",
      "version": "#1 SMP PREEMPT_DYNAMIC Fri, 17 May 2024 11:49:30 +0000",
      "displayVersion": ""
    },
    "stat": 0
  },
  {
    "type": "Uptime",
    "result": {
      "uptime": 1569000,
      "bootTime": "2024-05-20T00:27:10.057+0200"
    },
    "stat": 0
  },
  {
    "type": "Loadavg",
    "result": [
      0.33349609375,
      0.2998046875,
      0.345703125
    ],
    "stat": 0
  },
  {
    "type": "Processes",
    "result": 374,
    "stat": 1
  },
  {
    "type": "Packages",
    "result": {
      "all": 1329,
      "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": 1329,
      "paludis": 0,
      "pkg": 0,
      "pkgtool": 0,
      "macports": 0,
      "rpm": 0,
      "scoop": 0,
      "snap": 0,
      "winget": 0,
      "xbps": 0,
      "opkg": 0,
      "am": 0,
      "sorcery": 0,
      "pacmanBranch": ""
    },
    "stat": 0
  },
  {
    "type": "Shell",
    "result": {
      "exe": "/usr/bin/zsh",
      "exeName": "zsh",
      "exePath": "/usr/bin/zsh",
      "pid": 3951,
      "ppid": 1178,
      "processName": "zsh",
      "prettyName": "zsh",
      "version": "5.9",
      "tty": 0
    },
    "stat": 2
  },
  {
    "type": "Display",
    "result": [
      {
        "width": 1920,
        "height": 1080,
        "id": 0,
        "name": "C24F390",
        "primary": true,
        "refreshRate": 71.91043363103056,
        "rotation": 0,
        "scaledHeight": 1080,
        "scaledWidth": 1920,
        "type": "Unknown"
      }
    ],
    "stat": 1
  },
  {
    "type": "Brightness",
    "result": [],
    "stat": 1547
  },
  {
    "type": "Monitor",
    "result": [
      {
        "hdrCompatible": false,
        "name": "C24F390",
        "resolution": {
          "width": 1920,
          "height": 1080
        },
        "physical": {
          "height": 293,
          "width": 521
        },
        "manufactureDate": {
          "year": 2020,
          "week": 39
        },
        "serial": 1113215821
      }
    ],
    "stat": 0
  },
  {
    "type": "LM",
    "result": {
      "service": "sddm",
      "type": "X11",
      "version": "0.21.0"
    },
    "stat": 0
  },
  {
    "type": "DE",
    "result": {
      "processName": "plasmashell",
      "prettyName": "KDE Plasma",
      "version": "6.0.4"
    },
    "stat": 0
  },
  {
    "type": "WM",
    "result": {
      "processName": "KWin",
      "prettyName": "KWin",
      "protocolName": "X11",
      "pluginName": ""
    },
    "stat": 0
  },
  {
    "type": "WMTheme",
    "result": "plastik",
    "stat": 0
  },
  {
    "type": "Theme",
    "result": "Breeze (LavenderLightly) [QT], Breeze-Dark [GTK2], Breeze [GTK3/4]",
    "stat": 0
  },
  {
    "type": "Icons",
    "result": "candy-icons [QT], candy-icons [GTK2/3/4]",
    "stat": 0
  },
  {
    "type": "Font",
    "result": {
      "display": "Noto Sans (10pt) [QT], Noto Sans (10pt) [GTK2/3/4]",
      "fonts": [
        "Noto Sans (10pt)",
        "Noto Sans (10pt)",
        "Noto Sans (10pt)",
        "Noto Sans (10pt)"
      ]
    },
    "stat": 0
  },
  {
    "type": "Cursor",
    "result": {
      "theme": "Layan-white-cursors",
      "size": "24"
    },
    "stat": 0
  },
  {
    "type": "Wallpaper",
    "result": "/usr/share/wallpapers/Next/",
    "stat": 0
  },
  {
    "type": "Terminal",
    "result": {
      "processName": "yakuake",
      "exe": "/usr/bin/yakuake",
      "exeName": "yakuake",
      "exePath": "/usr/bin/yakuake",
      "pid": 1178,
      "ppid": 829,
      "prettyName": "yakuake",
      "version": "24.02.2",
      "tty": ""
    },
    "stat": 276
  },
  {
    "type": "TerminalFont",
    "result": {
      "font": {
        "name": "Terminus",
        "size": "11",
        "styles": [
          "Bold"
        ],
        "pretty": "Terminus (11pt, Bold)"
      },
      "fallback": {
        "name": "",
        "size": "",
        "styles": [],
        "pretty": ""
      }
    },
    "stat": 0
  },
  {
    "type": "TerminalSize",
    "error": "Failed to detect terminal size",
    "stat": 0
  },
  {
    "type": "TerminalTheme",
    "result": {
      "fg": {
        "r": 255,
        "g": 255,
        "b": 255,
        "dark": false
      },
      "bg": {
        "r": 0,
        "g": 0,
        "b": 0,
        "dark": true
      }
    },
    "stat": 0
  },
  {
    "type": "CPU",
    "result": {
      "cpu": "AMD Ryzen 7 3700X",
      "vendor": "AuthenticAMD",
      "cores": {
        "physical": 8,
        "logical": 32,
        "online": 16
      },
      "frequency": {
        "base": 2.2,
        "max": 4.426171,
        "min": 2.2
      },
      "temperature": null
    },
    "stat": 1
  },
  {
    "type": "CPUUsage",
    "result": [
      0.0,
      4.761904761904762,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0,
      0.0
    ],
    "stat": 200
  },
  {
    "type": "GPU",
    "result": [
      {
        "coreCount": null,
        "memory": {
          "dedicated": {
            "total": null,
            "used": null
          },
          "shared": {
            "total": null,
            "used": null
          }
        },
        "driver": "nvidia 550.78",
        "name": "GeForce GTX 1060 6GB",
        "temperature": null,
        "type": "Discrete",
        "vendor": "NVIDIA",
        "platformApi": "",
        "frequency": null
      }
    ],
    "stat": 1
  },
  {
    "type": "Memory",
    "result": {
      "total": 16684396544,
      "used": 4897685504
    },
    "stat": 0
  },
  {
    "type": "PhysicalMemory",
    "error": "Failed to get SMBIOS data",
    "stat": 0
  },
  {
    "type": "Swap",
    "result": {
      "total": 0,
      "used": 0
    },
    "stat": 1
  },
  {
    "type": "Disk",
    "result": [
      {
        "bytes": {
          "available": 399223808000,
          "free": 424792088576,
          "total": 501859205120,
          "used": 77067116544
        },
        "files": {
          "total": 31195136,
          "used": 756224
        },
        "filesystem": "ext4",
        "mountpoint": "/",
        "mountFrom": "/dev/nvme0n1p2",
        "name": "endeavouros",
        "volumeType": [
          "Regular"
        ],
        "createTime": "2024-05-18T00:51:08.000+0200"
      },
      {
        "bytes": {
          "available": 1071325184,
          "free": 1071325184,
          "total": 1071628288,
          "used": 303104
        },
        "files": {
          "total": null,
          "used": null
        },
        "filesystem": "vfat",
        "mountpoint": "/boot/efi",
        "mountFrom": "/dev/nvme0n1p1",
        "name": "EFI",
        "volumeType": [
          "Hidden"
        ],
        "createTime": null
      },
      {
        "bytes": {
          "available": 964399116288,
          "free": 964399116288,
          "total": 1678275244032,
          "used": 713876127744
        },
        "files": {
          "total": 942025388,
          "used": 196729
        },
        "filesystem": "fuseblk",
        "mountpoint": "/mnt/automnt-twardziel",
        "mountFrom": "/dev/sdb1",
        "name": "TWARDZIEL",
        "volumeType": [
          "Regular"
        ],
        "createTime": null
      }
    ],
    "stat": 0
  },
  {
    "type": "Battery",
    "result": [],
    "stat": 0
  },
  {
    "type": "PowerAdapter",
    "result": [],
    "stat": 0
  },
  {
    "type": "Player",
    "error": "No media found",
    "stat": 2
  },
  {
    "type": "Media",
    "error": "No media found",
    "stat": 0
  },
  {
    "type": "PublicIp",
    "result": {
      "ip": "redacted :)",
      "location": "Gdańsk, PL"
    },
    "stat": 0
  },
  {
    "type": "LocalIp",
    "result": [
      {
        "defaultRoute": true,
        "ipv4": "10.0.0.10/24",
        "ipv6": "",
        "mac": "",
        "name": "eno1"
      }
    ],
    "stat": 0
  },
  {
    "type": "Wifi",
    "result": [],
    "stat": 9
  },
  {
    "type": "DateTime",
    "result": "2024-05-20T00:01:03.097+0200",
    "stat": 0
  },
  {
    "type": "Locale",
    "result": "pl_PL.UTF-8",
    "stat": 0
  },
  {
    "type": "Vulkan",
    "result": {
      "apiVersion": "1.3.277",
      "conformanceVersion": "1.3.2",
      "driver": "NVIDIA [550.78]",
      "gpus": [
        {
          "type": "Discrete",
          "vendor": "NVIDIA",
          "name": "NVIDIA GeForce GTX 1060 6GB",
          "driver": "550.78",
          "platformApi": "Vulkan 1.3.277",
          "memory": {
            "dedicated": {
              "total": 6700400640,
              "used": null
            },
            "shared": {
              "total": 12513297408,
              "used": null
            }
          },
          "deviceId": 7043
        }
      ]
    },
    "stat": 45
  },
  {
    "type": "OpenGL",
    "result": {
      "version": "4.6.0 NVIDIA 550.78",
      "renderer": "NVIDIA GeForce GTX 1060 6GB/PCIe/SSE2",
      "vendor": "NVIDIA Corporation",
      "slv": "4.60 NVIDIA"
    },
    "stat": 40
  },
  {
    "type": "OpenCL",
    "error": "clGetPlatformIDs returned 0 platforms",
    "stat": 0
  },
  {
    "type": "Users",
    "result": [
      {
        "name": "zenwah",
        "hostName": ":0",
        "sessionName": "tty2",
        "clientIp": "0.0.0.0",
        "loginTime": "2024-05-19T23:35:07.749+0200"
      }
    ],
    "stat": 0
  },
  {
    "type": "Bluetooth",
    "result": [
      {
        "address": "68:6C:E6:51:B6:A5",
        "battery": 0,
        "connected": false,
        "name": "Xbox Wireless Controller",
        "type": "input-gaming"
      }
    ],
    "stat": 0
  },
  {
    "type": "Sound",
    "result": [
      {
        "active": true,
        "main": false,
        "volume": 100,
        "name": "GP104 High Definition Audio Controller Cyfrowe stereo (HDMI)",
        "identifier": "alsa_output.pci-0000_07_00.1.hdmi-stereo"
      },
      {
        "active": true,
        "main": false,
        "volume": 39,
        "name": "Starship/Matisse HD Audio Controller Cyfrowe stereo (IEC958)",
        "identifier": "alsa_output.pci-0000_09_00.4.iec958-stereo"
      },
      {
        "active": true,
        "main": true,
        "volume": 100,
        "name": "PCM2902 Audio Codec Analogowe stereo",
        "identifier": "alsa_output.usb-Burr-Brown_from_TI_USB_Audio_CODEC-00.analog-stereo-output"
      }
    ],
    "stat": 3
  },
  {
    "type": "Camera",
    "result": [],
    "stat": 0
  },
  {
    "type": "Gamepad",
    "result": [],
    "stat": 0
  },
  {
    "type": "Weather",
    "result": "+14°C - Clear (Gdansk, Poland)",
    "stat": 1
  },
  {
    "type": "NetIO",
    "result": [
      {
        "name": "eno1",
        "defaultRoute": true,
        "txBytes": 666,
        "rxBytes": 876,
        "txPackets": 8,
        "rxPackets": 6,
        "rxErrors": 0,
        "txErrors": 0,
        "rxDrops": 0,
        "txDrops": 0
      }
    ],
    "stat": 0
  },
  {
    "type": "DiskIO",
    "result": [
      {
        "name": "ADATA SX8200PNP",
        "devPath": "/dev/nvme0n1",
        "bytesRead": 1239040,
        "bytesWritten": 444416,
        "readCount": 11,
        "writeCount": 21
      },
      {
        "name": "ATA TOSHIBA DT01ACA2",
        "devPath": "/dev/sdb",
        "bytesRead": 0,
        "bytesWritten": 0,
        "readCount": 0,
        "writeCount": 0
      },
      {
        "name": "ATA KINGSTON SA400S3",
        "devPath": "/dev/sdc",
        "bytesRead": 0,
        "bytesWritten": 0,
        "readCount": 0,
        "writeCount": 0
      },
      {
        "name": "ATA KINGSTON SH103S3",
        "devPath": "/dev/sda",
        "bytesRead": 0,
        "bytesWritten": 0,
        "readCount": 0,
        "writeCount": 0
      }
    ],
    "stat": 0
  },
  {
    "type": "PhysicalDisk",
    "result": [
      {
        "name": "ADATA SX8200PNP",
        "devPath": "/dev/nvme0n1",
        "interconnect": "NVMe",
        "kind": "SSD",
        "size": 512110190592,
        "serial": "2K5229CJ7NEU",
        "removable": false,
        "readOnly": false,
        "revision": "32B3T8EB",
        "temperature": null
      },
      {
        "name": "ATA TOSHIBA DT01ACA2",
        "devPath": "/dev/sdb",
        "interconnect": "ATA",
        "kind": "HDD",
        "size": 2000398934016,
        "serial": "",
        "removable": false,
        "readOnly": false,
        "revision": "",
        "temperature": null
      },
      {
        "name": "ATA KINGSTON SA400S3",
        "devPath": "/dev/sdc",
        "interconnect": "ATA",
        "kind": "SSD",
        "size": 240057409536,
        "serial": "",
        "removable": false,
        "readOnly": false,
        "revision": "",
        "temperature": null
      },
      {
        "name": "ATA KINGSTON SH103S3",
        "devPath": "/dev/sda",
        "interconnect": "ATA",
        "kind": "SSD",
        "size": 120034123776,
        "serial": "",
        "removable": false,
        "readOnly": false,
        "revision": "",
        "temperature": null
      }
    ],
    "stat": 1
  },
  {
    "type": "Version",
    "result": {
      "projectName": "fastfetch",
      "architecture": "x86_64",
      "version": "2.12.0",
      "versionTweak": "",
      "cmakeBuiltType": "None",
      "compileTime": "May 14 2024, 09:51:31",
      "compiler": "gcc 14.1.1",
      "debugMode": true,
      "libc": "glibc 2.39"
    },
    "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
wayland
xcb-randr
xcb
xrandr
x11
drm
gio
dconf
dbus
imagemagick7
chafa
zlib
xfconf
egl
glx
osmesa
opencl
libpulse
libnm
libddcutil
Directx Headers
Proprietary GPU driver API
System yyjson
linux/videodev2
linux/wireless

@Zennwah Zennwah added the bug Something isn't working label May 19, 2024
@CarterLi
Copy link
Member

CarterLi commented May 20, 2024

and I even double checked my BIOS to see if it was set to the default value.

Fastfetch always shows the maximum boost frequency, while neofetch shows BIOS limited frequency if set. Seems you set the CPU frequency to 3.6 GHz explicitly in BIOS. If true, this behavior is expected.

Explanation: https://wiki.archlinux.org/title/CPU_frequency_scaling#BIOS_frequency_limitation

Please paste the output of

cat /sys/devices/system/cpu/cpu*/cpufreq/bios_limit
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_max_freq
cat /sys/devices/system/cpu/cpu*/cpufreq/base_frequency

The AMD official CPU spec reads Max. Boost Clock: Up to 4.4GHz and Base Clock: 3.6GHz

It's worth noting that neofetch always shows the frequency of first core. For CPU that uses performance / efficiency core (not the case for AMD CPUs), the first core is usually, but not necessarily the performance core.

@Zennwah
Copy link
Author

Zennwah commented May 20, 2024

cat /sys/devices/system/cpu/cpu*/cpufreq/bios_limit       
3600000
3600000
3600000
3600000
3600000
3600000
3600000
3600000
3600000
3600000
3600000
3600000
3600000
3600000
3600000
3600000
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_max_freq
3600000
3600000
3600000
3600000
3600000
3600000
3600000
3600000
3600000
3600000
3600000
3600000
3600000
3600000
3600000
3600000

There's no base_frequency file in my case.

@Zennwah
Copy link
Author

Zennwah commented May 20, 2024

Is there any way I can edit the config file to display the BIOS limited frequency?

@CarterLi
Copy link
Member

Not yet. Can I ask why did you limit the max CPU frequency?

@Zennwah
Copy link
Author

Zennwah commented May 20, 2024

I was trying to see if it changed anything in fastfetch since my BIOS config was reset. I must've accidentally pressed the power button for too long recently when emergency powering off at a freeze. At first I thought it bugged out because of that reset and displayed the wrong numbers, but now that I know it displays the max frequency and other programs show the bios limit, I'll change it back to Auto or 4,0. I played around with the config file a bit to display the current and max freqs. I'm trying to wrap my head around on how to add freqNdigits in there to limit the decimal numbers, could you give me a hint? I appreciate your help and time. Other than that you can consider the issue closed.
obraz

@Zennwah
Copy link
Author

Zennwah commented May 20, 2024

It seems that the format option overrides freqNdigits. It works when I cut the whole format line out and displays, for example, 3 decimal numbers. But when I put format back in, it displays the full frequencies. I'll close the issue with this comment since there's nothing I can do about it.

@Zennwah Zennwah closed this as completed May 20, 2024
@CarterLi
Copy link
Member

It was just fixed yesterday

3571d92

CarterLi added a commit that referenced this issue May 20, 2024
@Zennwah
Copy link
Author

Zennwah commented May 20, 2024

Thanks, I installed fastfetch-git with yay and it's all working now.

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

2 participants