fastfetch-cli / fastfetch

An actively maintained, feature-rich and performance oriented, neofetch like system information tool.
MIT License
9.62k stars 387 forks source link

[FEAT] macOS Sequoia 15.0 cannot obtain Wi-Fi information #1194

Open Aoang opened 1 month ago

Aoang commented 1 month ago

Be sure to read FAQ before submitting a new issue.

Wanted features:

> fastfetch -s wifi --format json
[
  {
    "type": "Wifi",
    "result": [
      {
        "inf": {
          "description": "en0",
          "status": "Power On"
        },
        "conn": {
          "status": "Active",
          "ssid": "<unknown ssid>",
          "bssid": "",
          "protocol": "Unknown (32)",
          "security": "Insecure",
          "signalQuality": 100.0,
          "rxRate": null,
          "txRate": 866.0
        }
      }
    ]
  }
]

Motivation:

CarterLi commented 4 weeks ago

Let's wait the stable version

Princess-Sunset-Shimmer commented 4 weeks ago

Let's wait the stable version

When's stable version? And help: 1). after new fastfetch update; it print 8 colors instead of 16 colors in tmux 2). Question --> what is freq-base of CPU that fastfetch fetching? Why my Base-frequency is higher than freq-max? 1.89 GHz ~ 1.80 GHz image

CarterLi commented 4 weeks ago

after new fastfetch update; it print 8 colors instead of 16 colors in tmux

Well, yeah. Will fix it in the next version

Question --> what is freq-base of CPU that fastfetch fetching? Why my Base-frequency is higher than freq-max? 1.89 GHz ~ 1.80 GHz

freq-max is max / turbo / boost frequency (/sys/devices/system/cpu/cpufreq/policy?/cpuinfo_max_freq). freq-base is base frequency set by manufacturer (/sys/devices/system/cpu/cpufreq/policy?/base_frequency). For Ryzen 7 4800U, the freq-max should be 4.2 GHz, freq-base should be 1.8 GHz.

The problem is that not all data are available in some platforms. I don't have AMD CPUs, an AMD user told me that AMD doesn't report base frequency (/sys/devices/system/cpu/cpufreq/policy?/base_frequency). In VM such as WSL, none of them are available. In this case, real-time current frequency is used as freq-base (reported in /proc/cpuinfo)

Please check if /sys/devices/system/cpu/cpufreq/policy?/* reports correct data. If they doesn't match results reported by fastfetch (fastfetch -s cpu --format json), it's a fastfetch bug.

Princess-Sunset-Shimmer commented 4 weeks ago

of course it mismatched;


Originally i was trying to dig into getFrequency and detectFrequency functions for finding out what cause the problem. because i guess probably they cause it. Then i think i'd ask someone more knowledgeable about this before i dig into it by myself -- seems do asking is very correct way to go that now i know what Causes that mismatched base-frequency report.


The AMD base-frequency file is /sys/devices/system/cpu/cpufreq/policy?/cpuinfo_min_freq NOT is base_frequency. Such as Below pic shows base-frequency is 1.4GHz image And mismatched base-frequency is caused by mistakenly report cpuinfo_cur_freq file as base-frequency, such here shows 3.44GHz image


CarterLi commented 4 weeks ago

cpuinfo_min_freq is min frequency, not base frequency. According to https://www.cpubenchmark.net/cpu.php?id=3721&cpu=AMD+Ryzen+7+4800U, base freq should be 1.8GHz and max freq should be 4.2GHz

CarterLi commented 4 weeks ago

It's getting off topic. Lets open a new issue.

Princess-Sunset-Shimmer commented 4 weeks ago

It's getting off topic. Lets open a new issue.

Okay, roger that (edit) and no necessary to open new one, because i found what cause the issue, and this issue cannot be fixed by checking fastfetch source-code at all. fastfetch isn't causing mismatched frequency reports. is AMD's fault, or related developer's fault. In AMD, the cpuinfo_max_freq isn't max/turbo/boost frequency and neither do scaling_max_freq; they correspond the base frequency, So it mismatched surely

CarterLi commented 4 weeks ago

@Princess-Sunset-Shimmer Please try the dev build

Princess-Sunset-Shimmer commented 4 weeks ago

@Princess-Sunset-Shimmer Please try the dev build dev build?\ received: and i just now git cloned current newest fastfetch repo [__> and i'd like to confirm that is run.sh pkg-building-script? [Y/n] image

Princess-Sunset-Shimmer commented 4 weeks ago

Wait, seems i just have a tiny teeny problem while building this pkg at [ 26%] image What is that?

Princess-Sunset-Shimmer commented 4 weeks ago

Now i goto 😴 💤

CarterLi commented 4 weeks ago

You can download artifacts here: https://github.com/fastfetch-cli/fastfetch/actions/runs/10440218362#artifacts

Princess-Sunset-Shimmer commented 3 weeks ago

i installed: image And fastfetched the freq-base is 2.50 GHz, freq-max is 1.80GHz image So ... ?

CarterLi commented 3 weeks ago

Please take screenshot of fastfetch -s cpu --format json

Princess-Sunset-Shimmer commented 3 weeks ago

Please take screenshot of fastfetch -s cpu --format json

image

CarterLi commented 3 weeks ago

Seems your AMD CPU doesn't support CPUID(0x16)

Please try this C program:

#include <cpuid.h>

int main(void)
{
    uint32_t base = 0, max = 0, bus = 0, unused = 0;
    if (!__get_cpuid(0x16, &base, &max, &bus, &unused))
        puts("CPUID(0x16) failed");
    else
        printf("CPUID(0x16) = %u %u %u %u\n", base, max, bus, unused);
    return 0;
}
Princess-Sunset-Shimmer commented 3 weeks ago

Okay, wait a sec

Princess-Sunset-Shimmer commented 3 weeks ago

Yeah, the testing result confirms the CPUID(0x16) is not supported: image

CarterLi commented 3 weeks ago

I have no other ideas. Let's leave as it was.

Princess-Sunset-Shimmer commented 3 weeks ago

So that very explained why cpu_freq_info cannot be fetched correctly. Mystery declassified

Princess-Sunset-Shimmer commented 3 weeks ago

I have no other ideas. Let's leave as it was.

Yeah, the PFI-leaf is not supported; sort of as early said, this problem cannot be solved by dig into fastfetch source-code; is not fastfetch caused; is AMD's fault. (but earlier also got very wrong idea about what cause it too, now i knows is caused by no PFI-leaf returns needed info. Leans a lot) (edit) also thanks a lot for helping