fastfetch icon indicating copy to clipboard operation
fastfetch copied to clipboard

[BUG] Wifi SSID does not show up on MacOS sequoia

Open oglassdev opened this issue 2 years ago • 7 comments

Be sure to read the FAQ before submitting a new issue.

General description of bug:

  • What happened: Wifi SSID is not showing up
  • What should happen: Show the SSID of the current network
  • Fastfetch version used: fastfetch 2.23.0 (aarch64)
  • Did it work in an older version: no idea
  • Where did you get the binary: homebrew
  • Does this issue still occur in the latest dev build? It hangs when finding the ssid, then skips displaying it.

Often helpful information:

This only happens on MacOS Sequoia (15)

Screenshot: Screenshot 2024-09-18 at 9 40 08 AM

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

{
  "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
  "logo": {
    "type": "kitty-direct",
    "source": "~/.config/fastfetch/apple.png",
    "padding": {
      "left": 1,
      "right": 2,
      "top": 1
    },
    "height": 8,
    "width": 16
  },
  "display": {
    "separator": "  ",
    "constants": [
      "─────────────────" // {$1}, used in Custom module
    ],
    "key": {
      "type": "icon",
      "paddingLeft": 2
    }
  },
  "modules": [
    {
      "type": "custom", // HardwareStart
      // {#1} is equivalent to `\u001b[1m`. {#} is equivalent to `\u001b[m`
      "format": "┌{$1} {#1}Hardware Information{#} {$1}┐"
    },
    "host",
    "cpu",
    "gpu",
    "disk",
    "memory",
    "swap",
    "display",
    "battery",
    "poweradapter",
    "bluetooth",
    {
      "type": "custom", // SoftwareStart
      "format": "├{$1} {#1}Software Information{#} {$1}┤"
    },
    {
      "type": "title",
      "keyIcon": "",
      "key": "Title", // Title module has no key by default, so that icon is not displayed
      "format": "{user-name}"
    },
    "os",
    "shell",
    "terminal",
    "terminalfont",
    "icons",
    "packages",
    "uptime",
    "media",
    {
      "type": "localip",
      "compact": true
    },
    {
      "type": "wifi",
      "format": "{ssid}"
    },
    {
      "type": "custom", // InformationEnd
      "format": "└{$1}──────────────────────{$1}┘"
    },
    {
      "type": "colors",
      "paddingLeft": 2,
      "symbol": "circle"
    }
  ]
}

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

// relevant info only
  {
    "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": 173.0
        }
      }
    ],
    "stat": 33.83100000023842
  },

Output of fastfetch --list-features:

threads
vulkan
imagemagick7
chafa
zlib
sqlite3

oglassdev avatar Sep 18 '24 13:09 oglassdev

756865855b111d835f1ee1002f88ecf7b83eb5b7

CarterLi avatar Sep 18 '24 14:09 CarterLi

After this bug is fixed, Fastfetch takes around 3–4 seconds to load Wi-Fi information. Is this expected? The command system_profiler SPAirPortDataType -xml -detailLevel basic takes the same time for me, so the delay is likely caused by the System Profiler. If it is not just my system that slows down that bad, maybe there is another way for Fastfetch to obtain that information?

marvinruder avatar Sep 23 '24 18:09 marvinruder

maybe is meaningless. If you find a better method, let me know.

CarterLi avatar Sep 24 '24 02:09 CarterLi

@CarterLi This does require sudo, but takes 238 ms on my machine. sudo wdutil info | awk '/SSID/ {print $3 | "head -n 1"}'

realhackcraft avatar Oct 15 '24 20:10 realhackcraft

sudo wdutil info | awk '/SSID/ {print $3 | "head -n 1"}'

I got <redacted>

CarterLi avatar Oct 16 '24 02:10 CarterLi

Interesting, because it worked on my machine.

Screenshot 2024-10-16 at 09 15 27

Are you on macOS 14 or 15?

You can try just running sudo wdutil info to see if wdutil is printing anything useful at all.

If that doesn't work for some reason, maybe run the wdutil info method first, and if it returns <redacted>, then run the slower 3 second command.

realhackcraft avatar Oct 16 '24 13:10 realhackcraft

I think sudo wdutil info works for SSID in 14.4 and at least also 15.1 beta.

https://community.jamf.com/t5/jamf-pro/collecting-active-ssid-with-macos-sonoma-14-4-and-later/m-p/311680

They say its disabled in 14.5 though.

realhackcraft avatar Oct 16 '24 13:10 realhackcraft