Created attachment 161793 [details] [patch] asmc(4) I'm using MacBookAir 13" late 2012 model for FreeBSD 10.2-R. UEFI boot works fine. Thanks for big effort of the feature. I wrote a patch for asmc(4) to control keyboard backlight. This patch adds model name entries used in the probe function. I added following two #define symbols for the entries. (1) ASMC_SMS_FUNCS_DISABLED (2) ASMC_FAN_FUNCS2 (1) is used to disable Sudden Motion Sensor(SMS). MacBoookAir,5.2 doesn't have SMS. asmc(4) must skip probing SMS. (2) is another set of FAN functions. MacBookAir,5.2 misses fan safe speed. I tested on my MacbookAir. And I think both 13" and 11" are same hardware, MacBookAir,5.1 entry works on the same way.
In a similar vein, I have patched the asmr.c driver myself and have confirmed it to be working on systems with the identifier "MacBookPro8,1" SMS must also be disabled for this device. While keyboard backlight changes work, sysctl -a | grep asmc produces: asmc0: asmc_key_read for key Tm0P failed ten times, giving up
A commit references this bug: Author: adrian Date: Mon May 2 19:15:17 UTC 2016 New revision: 298937 URL: https://svnweb.freebsd.org/changeset/base/298937 Log: [asmc] add support for more models and restore keyboard backlight after resume. This patch adds support for restoring backlight after resume and adds models Macbook3,1 MacbookAir5,1 MacbookAir5,2 It also incorporates fixes for bug #175260, bug #203610 and bug #203512 so those can be closed if this patch is applied. PR: kern/209156 PR: kern/175260 PR: kern/203610 PR: kern/203512 Submitted by: Johannes Lundberg <johannes@brilliantservice.co.jp> Changes: head/sys/dev/asmc/asmc.c head/sys/dev/asmc/asmcvar.h
Thanks for the commit r298937. It works fine on my MacbookAir 2012 model. For FreeBSD 10.3 kernel, I changed kern_getenv to getenv and it's enough for me. Why don't you plan to MFC ?
Committed - fixed. Please close.
On Mac mini Mid 2010 (Macmini4,1) helloSystem 0.7.0 getting asmc0: asmc_key_read for key F0Sf failed 10 times, giving up. Does this model also lack fan safe speed?