istats.widget icon indicating copy to clipboard operation
istats.widget copied to clipboard

iStats returns an error on ARM processors (M1)

Open yuvalgrofman opened this issue 4 years ago • 4 comments

Screen Shot 2021-06-26 at 11 52 15

yuvalgrofman avatar Jun 26 '21 08:06 yuvalgrofman

The error mach-o, but wrong architecture indicates that the iStats Ruby gem expects another chip architecture. I assume you're using a new M1 chip?

Looks like the iStats gem does not yet support M1 (see #107).

roele avatar Jun 26 '21 10:06 roele

Prepending the command with arch -arm64 in the index.jsx seems to resolve the issue but iStats does not work 100%. Fan and battery stats seem to work but others return no values or are missing.

roele avatar Oct 30 '21 15:10 roele

I was able to resolve this issue by installing Ruby 2.7 from Homebrew and updating the path to Ruby to ensure the homebrew version preceeded the Apple version. The homebrew version of Ruby is not a universal binary. Its specific to aarm which resolves this issue.

However, once past this issue, you'll likely run into others. Specifically, battery and fan info is incomplete. Screen Shot 2021-11-03 at 9 20 05 PM

stevespringett avatar Nov 04 '21 02:11 stevespringett

Thanks for that workaround @stevespringett. Unfortunately istats does not support M1 (yet) and my C and SMC knowledge are inexistent.

roele avatar Nov 04 '21 17:11 roele