fvalle1 / macOS-temperature

Simple App to monitor temperature of a Mac's CPU
GNU General Public License v3.0
16 stars 3 forks source link

cannot run the code on M1 new versions #1

Open thegodone opened 3 years ago

thegodone commented 3 years ago

After starting Xcode 12 I have those errors:

2021-02-19 10:30:10.855012+0100 Temperature[23779:2995066] [Nib Loading] Failed to connect (BetteryTempLabel) outlet from (Temperature.ViewController) to (NSTextField): missing setter or instance variable 2021-02-19 10:30:10.855081+0100 Temperature[23779:2995066] [Nib Loading] Failed to connect (TempLabel) outlet from (Temperature.ViewController) to (NSTextField): missing setter or instance variable 2021-02-19 10:30:10.855113+0100 Temperature[23779:2995066] [Nib Loading] Failed to connect (aa) outlet from (Temperature.ViewController) to (NSTextField): missing setter or instance variable 2021-02-19 10:30:12.072344+0100 Temperature[23779:2995066] +[NSSavePanel _warmUp] attempted warmup 2021-02-19 10:30:15.746830+0100 Temperature[23779:2995066] Metal API Validation Enabled 2021-02-19 10:30:15.791948+0100 Temperature[23779:2995066] fopen failed for data file: errno = 2 (No such file or directory) 2021-02-19 10:30:15.792019+0100 Temperature[23779:2995066] Errors found! Invalidating cache... 2021-02-19 10:30:15.882704+0100 Temperature[23779:2995631] fopen failed for data file: errno = 2 (No such file or directory) 2021-02-19 10:30:15.882756+0100 Temperature[23779:2995631] Errors found! Invalidating cache... 2021-02-19 10:30:38.246460+0100 Temperature[23779:2995066] [Nib Loading] Failed to connect (messagesArea) outlet from (Temperature.UpdateViewController) to (NSTextField): missing setter or instance variable

Any idea to fix this ?

BR

Guillaume

fvalle1 commented 3 years ago

Hello,

I have not any idea about why this happens. Maybe the API to read the sensors is not available on M1.

I will try to investigate this, but I don't have an Apple Silicon machine so it could be difficult for me to reproduce this issue

shuangwei-Ye commented 3 years ago

hello, if the app is sandboxed, how to get the temperature ? now show: IOServiceOpen will open fail

dehydratedpotato commented 3 years ago

@fvalle1 most of the relevant sensor names/values for the M1 are not contained in the SMC. You’ll need to pull a header from the hid system located in IOKit in order to access sensor names/values by using some client matching tricks (This requires Objective-C).

I daily drive an Apple Silicon machine and know how to pull the sensor information in this way, so I could try to bring aid if you need some help in solving this issue 👍