beltex / SMCKit

Apple SMC library & tool
https://beltex.github.io/SMCKit
MIT License
473 stars 55 forks source link

Getting fan name on MacbookPro15,1 is not working #38

Closed D0miH closed 5 years ago

D0miH commented 5 years ago

Some of the keys to get information about the fans are not working on a 15" MacbookPro from 2018. After testing the keys, I got the result that the following keys are not working:

Trying to read data from these keys will throw an exception. Any idea how to fix this?

perfaram commented 5 years ago

What is the thrown exception ? We need more details... At any rate, the most likely cause is simply that these keys aren't available on this device, for some reason. I'll have a look at a couple of apps that communicate with the SMC this week-end. If these really are not present on your model, I'll look for an replacement key that provides the same or close information, if any exists.

For reference, here's the meaning of each key : The F indeed indicates a Fan-related information The next character is the fan index ID means "identification" or maybe "identifier" (it's supposed to be a description, according to https://app.assembla.com/wiki/show/fakesmc) Mt, according the same source, is the "max calculated target RPM", whatever that may mean.

D0miH commented 5 years ago

Thank you very much for the fast response:)

ok here is some more information. This is the code I am executing:

do {
    try SMCKit.open()       
    let data = try SMCKit.readData(SMCKey(code: FourCharCode(fromStaticString: "F0ID"), info: DataTypes.FDS))
    print(data)
} catch let error {
    print(error)
}

and the output of printing the error is: keyNotFound(code: "F0ID")

perfaram commented 5 years ago

Please run SMCExplorer (you can download it from https://github.com/perfaram/SMCExplorer/releases) and Save a dump of the keys (File → Save). A file named SMCDump.plist will appear in your Downloads folder, just attach it here. This is, so I can check whether the key is present or not on your system. If not, then the "error" you're facing is in fact normal and expected behaviour.

D0miH commented 5 years ago

Ok so I run SMCExplorer and it seems like the key is not present.

So apparently as you said this is a expected behaviour. Nevertheless thank you very much for your help :-)