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

Not working on Apple Silicon macs #101

Open
Kakise opened this issue Dec 8, 2020 · 11 comments
Open

Not working on Apple Silicon macs #101

Kakise opened this issue Dec 8, 2020 · 11 comments

Comments

@Kakise
Copy link

Kakise commented Dec 8, 2020

While the install works perfectly fine on Apple Silicon, I have the following error when trying to run the gem:

(base)  ~/ /usr/local/bin/istats
Traceback (most recent call last):
7: from /usr/local/bin/istats:23:in <main>' 6: from /usr/local/bin/istats:23:in load'
5: from /Library/Ruby/Gems/2.6.0/gems/iStats-1.6.1/bin/istats:6:in <top (required)>' 4: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in require'
3: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in require' 2: from /Library/Ruby/Gems/2.6.0/gems/iStats-1.6.1/lib/iStats.rb:2:in <top (required)>'
1: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in require' /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in require': dlopen(/Library/Ruby/Gems/2.6.0/gems/iStats-1.6.1/lib/osx_stats.bundle, 0x0009): missing compatible arch in /Library/Ruby/Gems/2.6.0/gems/iStats-1.6.1/lib/osx_stats.bundle - /Library/Ruby/Gems/2.6.0/gems/iStats-1.6.1/lib/osx_stats.bundle (LoadError)

@snorkrat
Copy link

Just adding I have the exact same issue on a new 2020 Mac Mini with Apple M1

@darrenlin
Copy link

I am also using a M1 MacBook. Install Ruby3 using brew in x86 mode and use the gem installer in x86 mode worked for me. I am able to run it using the newer version of ruby3. However the information displayed is not 100% correct. See below:

➜  ~ iStats
--- CPU Stats ---
CPU temp:               0.0°C       ▁▂▃▅▆▇

--- Fan Stats ---
Total fans in system:   0           

--- Battery Stats ---
Battery health:         Check Battery
Cycle count:            1           ▁▂▃▅▆▇  0.1%
Max cycles:             1000        
Current charge:         70 mAh      ▁▂▃▅▆▇  70%
Maximum charge:         100 mAh     ▁▂▃▅▆▇  2.3%
Design capacity:        4382 mAh    
Battery temp:           0.0°C       

@Kakise
Copy link
Author

Kakise commented Jan 14, 2021

I am also using a M1 MacBook. Install Ruby3 using brew in x86 mode and use the gem installer in x86 mode worked for me. I am able to run it using the newer version of ruby3. However the information displayed is not 100% correct. See below:

➜  ~ iStats
--- CPU Stats ---
CPU temp:               0.0°C       ▁▂▃▅▆▇

--- Fan Stats ---
Total fans in system:   0           

--- Battery Stats ---
Battery health:         Check Battery
Cycle count:            1           ▁▂▃▅▆▇  0.1%
Max cycles:             1000        
Current charge:         70 mAh      ▁▂▃▅▆▇  70%
Maximum charge:         100 mAh     ▁▂▃▅▆▇  2.3%
Design capacity:        4382 mAh    
Battery temp:           0.0°C       

I have the same behavior when following your steps on the M1 MBP

@Casuallynoted
Copy link

Having the same issues here. Currently getting "missing compatible arch in /Library/Ruby/Gems/2.6.0/gems/iStats-1.6.1/lib/osx_stats.bundle"

@snorkrat
Copy link

snorkrat commented Mar 1, 2021

Just wondering if there are any plans to look at this and make it compatible with Apple Silicon?

@RNZ01
Copy link

RNZ01 commented Mar 25, 2021

Same here :(

@matthutchinson
Copy link

+1 me too

@shouryasaha
Copy link

shouryasaha commented Jul 7, 2022

I am having the same issue of incorrect stats displaying, viz CPU temp 0.

░▒▓    ~  istats all                                                                                            ✔  at 09:16:06 PM  ▓▒░
--- CPU Stats ---
CPU temp:               0.0°C       ▁▂▃▅▆▇

--- Fan Stats ---
Total fans in system:   2
Fan 0 speed:            0 RPM       ▁▂▃▅▆▇
Fan 1 speed:            0 RPM       ▁▂▃▅▆▇

--- Battery Stats ---
Battery health:         Check Battery
Cycle count:            19          ▁▂▃▅▆▇  1.9%
Max cycles:             1000
Current charge:         64 mAh      ▁▂▃▅▆▇  64%
Maximum charge:         100 mAh     ▁▂▃▅▆▇  1.2%
Design capacity:        8694 mAh
Battery temp:           0.0°C

@Artoria2e5
Copy link
Contributor

Expecting the Rosetta fake-sensor to work at all is futile. The only way here is to actually do native M1 support.

Incidentially, this issue is the only one that pastes the failed output! The paste isn't perfect (use a code block next time), but it's readable enough.

@Artoria2e5
Copy link
Contributor

Artoria2e5 commented Jan 12, 2023

Huh, this is interesting. The extconf.rb part says nothing about a hard-coded arch. Anyone care to upload a zipped copy of /Library/Ruby/Gems/2.6.0/gems/iStats-1.6.1/lib/osx_stats.bundle built on Arm64?

@PeterDaveHello
Copy link

The last commit of this project is almost five years ago, there are some pull requests will need @Chris911 to take a look first, so maybe someone who's interesting in helping iStats to work on Apple Silicon can send the patches here.

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

No branches or pull requests

9 participants