Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Improving MacOS M1 CPU/GPU prints #2038

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

GustavoSilvera
Copy link

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

Copy link

@glyph glyph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For what it's worth, this works for me! I see Apple M1 Max (10) now.

@glyph
Copy link

glyph commented Feb 8, 2022

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

@GustavoSilvera
Copy link
Author

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 :)

@glyph
Copy link

glyph commented Mar 23, 2022

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

hykilpikonna added a commit to hykilpikonna/hyfetch that referenced this pull request Jul 31, 2022
…1 CPU/GPU prints

Upstream PR: dylanaraps/neofetch#2038
Thanks to @GustavoSilvera

Co-authored-by: Gustavo Silvera <grs5382@gmail.com>
@hykilpikonna
Copy link

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!

@juanra
Copy link

juanra commented Nov 27, 2022

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

SCR-20221127-l6b

Any idea why I'm not seeing core count?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants