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

CPU (Linux): fix CPU detection on some PPC platforms #1640

Merged
merged 1 commit into from
Mar 25, 2025

Conversation

techflashYT
Copy link
Contributor

On some PowerPC devices (notably the Nintendo Wii and Nintendo Wii U), fastfetch detects the CPU incorrectly. It goes down the code path of 'detectSocName()', and actually matches the model of the device itself... as the CPU model name. This is obviously incorrect, and leads to reporting such as 'CPU: wii'. Disable this code path alltogether on PPC to prevent this, and just let it pull from cpuinfo. This lets it have correct CPU reporting, such as on the Wii, giving 'CPU: 750CL @ 0.73GHz'.

I have confirmed that this does not cause any regressions in CPU detection on x86_64 (my PC), ARM (Raspberry Pi 4), and on other PPC devices (iBook G3).

There may be a more elegant way of doing this than disabling the codepath alltogether on PPC, but it didn't seem to have any useful reporing for PPC platforms in there anyways, so this is what I went with.

On some PowerPC devices (notably the Nintendo Wii and Nintendo Wii U),
fastfetch detects the CPU incorrectly.  It goes down the code path
of 'detectSocName()', and actually matches the model of the device
itself... as the CPU model name.  This is obviously incorrect, and
leads to reporting such as 'CPU: wii'.  Disable this code path
alltogether on PPC to prevent this, and just let it pull from cpuinfo.
This lets it have correct CPU reporting, such as on the Wii, giving
'CPU: 750CL @ 0.73GHz'.
@CarterLi CarterLi merged commit 7b5dc58 into fastfetch-cli:dev Mar 25, 2025
19 checks passed
@CarterLi
Copy link
Member

Thanks

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

Successfully merging this pull request may close these issues.

2 participants