neofetch icon indicating copy to clipboard operation
neofetch copied to clipboard

Improving MacOS M1 CPU/GPU prints

Open GustavoSilvera opened this issue 4 years ago • 4 comments

Description

Adding better support for Apple Silicon (M1) CPU and GPU prints OLD:

CPU: Apple M1 Max
GPU: Apple M1 Max

NEW:

CPU: Apple M1 Max (10)
GPU: Apple M1 Max (24)

This is accurate for me as I have the 10c CPU and 24c GPU model

Features

  • Fix core-count not displaying on Apple Silicon (M1) devices (arm64)
  • Add GPU core count for Apple Silicon (M1) devices

Issues

TODO

GustavoSilvera avatar Jan 27 '22 23:01 GustavoSilvera

(Although… for "GPU", I just see GPU: Apple M1 Max by default. Is there an option to test GPU core counts?)

glyph avatar Feb 08 '22 22:02 glyph

Hmm... Interesting, it works for me to highlight the core count. You should be able to run this simple command and see what your machine returns:

chipset=$(system_profiler SPDisplaysDataType | awk '/Chipset Model/ { printf "%s %s %s", $3, $4, $5 }') && cores=$(system_profiler SPDisplaysDataType | awk '/Total Number of Cores/ { printf "%d", $5 }') && gpu="${chipset} (${cores})" && echo $gpu

For me, this returns Apple M1 Max (24)

Once this (pretty heavy) command gets run the first time, it gets cached into /Library/Caches/neofetch/gpu so the command doesn't need to be run again. So also try deleting this file and running ./neofetch again :)

GustavoSilvera avatar Feb 08 '22 22:02 GustavoSilvera

Once this (pretty heavy) command gets run the first time, it gets cached into /Library/Caches/neofetch/gpu so the command doesn't need to be run again. So also try deleting this file and running ./neofetch again :)

Re-tested just now and this works great. Seems like the cache ought to be invalidated automatically in some cases (the neofetch script timestamp is greater than the cached value, so bugfixes actually take effect?) but I do in fact have 32 GPU cores:

image

glyph avatar Mar 23 '22 09:03 glyph

Thank you for your contribution!

This PR is merged into hyfetch since this repo (dylanaraps/neofetch) seems no longer maintained.

HyFetch is a fork of neofetch with LGBTQ pride flags, but the repo also maintains an updated version of the original neofetch, addressing many pull requests that are not merged in the original repo.

Read the "Running Updated Original Neofetch" section for more info!

hykilpikonna avatar Jul 31 '22 19:07 hykilpikonna

For some reason this is not working in my Mac :(

SCR-20221127-l6b

Any idea why I'm not seeing core count?

juanra avatar Nov 27 '22 20:11 juanra