How do you control the Apple MacBook “Sleep” light?

霸气de小男生 提交于 2019-12-12 12:32:24

问题


I would like to control the "sleep" light on a MacBook or iMac.

That is, I want to be able to make it turn on, turn off, and pulsate.

I am happy to do this in usermode or in kernel mode. I assume I'll need root.

Any ideas?


回答1:


You don't, at least not in any way that will not involve possibly bricking your machine. The sleep light is controlled (on intel macs) by the SMC, and you can't even get to it through Open Firmware.

There is hope, after a fashion, as Apple has actually released firmware updates to make the LED dimmer (on some machines it was insanely bright). You could poke around in the EFI firmware updates for the SMC that have been delivered and see if you can figure out how they control the light. However, even in that case, whatever you did would have to be done completely in firmware, as it's unlikely you can make the SMC expose that variable to software. If you pop open the case of a MacBook Pro, there's a Cypress MSA in there that is probably what is functioning as the SMC, since it's hooked into the keyboard USB and can thus wake from sleep, etc. without running the main CPU. (You can also follow the traces from the sleep light - there's a little cable attached in there if you want to remove it completely - and I suspect if you pulled the whole logic board out that you would find that it runs to that chip as well).

Of course, as I mentioned before, as soon as you start flashing your SMC, you can easily brick the machine if you screw it up.



来源:https://stackoverflow.com/questions/2010713/how-do-you-control-the-apple-macbook-sleep-light

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!