Thanx for testing the driver. As you say, the driver needs further tweaking. I am in a very preliminary state a ith the coding :-) Your information is valuable for the future process. I would correct the mode line for your model. Need to get the right values for the temps and sensors;-) It is interesting, that the MacBook air has no x, y, z support - good! There is only SDD Drive, no need to get the heads of a standard HDD drive parked by the motion sensors.
I am currently working on the light sensors to get my keyboard backlit... have you tried the trackpad driver from Joshua? MfG, regards, cordialement Volker Nowarra +41 79 503 4849 Envoyé de mon iPhone > Am 02.02.2014 um 13:45 schrieb Joerg Jung <m...@umaxx.net>: > > Hi, > >> On Fri, Jan 24, 2014 at 11:00:32PM +0000, peb.nowa...@bluewin.ch wrote: >> I was working on the asmc kernel driver for the Macbooks. I have a >> MBPro8.2 (mid 2011), and came to get the driver installed, reading all >> sensors and temperatures into the "hw.sensors" framework. >> See >> attached diffs. Beginning line 30 I describe the ideas for the driver. >> Further information available, also a "todo list". Thx to Joshua@, who >> helped me to create the diffs below, and provided input for the "todo >> list". Looking forward to get some feedback, especially on other Apple >> hardware. > > I tested this on my MacBook Air 4,2 and got the following in dmesg: > > ASMC_MATCH > BIOS: vendor Apple Inc., product MacBookAir4,2 > ** ERROR: no model found for MacBookAir4,2 > > Hence, I added "blindly" the following asmc_model line to your diff: > + { "MacBookAir4,2", 3, 0, 0, 63, 511, 10 }, > > With this line I got the following in sysctl output: > > hw.sensors.applesmc.fan0=1992 RPM (fan0_speed) > hw.sensors.applesmc.fan1=0 RPM (fan1_speed), UNKNOWN > hw.sensors.applesmc.fan2=2000 RPM (fan0_targetspeed) > hw.sensors.applesmc.fan3=0 RPM (fan1_targetspeed), UNKNOWN > hw.sensors.applesmc.fan4=0 RPM (fan0_safespeed), UNKNOWN > hw.sensors.applesmc.fan5=0 RPM (fan1_safespeed), UNKNOWN > hw.sensors.applesmc.fan6=2000 RPM (fan0_minspeed) > hw.sensors.applesmc.fan7=0 RPM (fan1_minspeed), UNKNOWN > hw.sensors.applesmc.fan8=6500 RPM (fan0_maxspeed) > hw.sensors.applesmc.fan9=0 RPM (fan1_maxspeed), UNKNOWN > hw.sensors.applesmc.raw0=36 (Enclosure Bottom) > hw.sensors.applesmc.raw1=76 (CPU Temperature Diode) > hw.sensors.applesmc.illuminance0=0.00 lx (lightright) > hw.sensors.applesmc.illuminance1=0.00 lx (lightleft) > hw.sensors.applesmc.acceleration0=0.0000 m/s^2 (sms_x), UNKNOWN > hw.sensors.applesmc.acceleration1=0.0000 m/s^2 (sms_y), UNKNOWN > hw.sensors.applesmc.acceleration2=0.0000 m/s^2 (sms_z), UNKNOWN > > Since, it works only "partially", I guess the asmc_model line requires > further tweaking? Anything else I can test? > Whole dmesg follows below. > > Thanks, > Regards, > Joerg > > OpenBSD 5.5-beta (GENERIC.MP) #1: Sun Feb 2 13:14:43 CET 2014 > r...@marvin.hq.umaxx.net:/usr/src_apple/sys/arch/amd64/compile/GENERIC.MP > RTC BIOS diagnostic error cf<clock_battery,ROM_cksum,fixed_disk,invalid_time> > real mem = 4185079808 (3991MB) > avail mem = 4065439744 (3877MB) > mainbus0 at root > bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xe0000 (53 entries) > bios0: vendor Apple Inc. version "MBA41.88Z.0077.B0F.1201241549" date > 01/24/2012 > bios0: Apple Inc. MacBookAir4,2 > acpi0 at bios0: rev 2 > acpi0: sleep states S0 S3 S4 S5 > acpi0: tables DSDT FACP HPET APIC SBST ECDT SSDT SSDT SSDT SSDT SSDT SSDT > SSDT SSDT MCFG SSDT SSDT SSDT > acpi0: wakeup devices P0P2(S4) EC__(S4) HDEF(S4) ARPT(S4) RP02(S4) EHC1(S3) > EHC2(S3) ADP1(S4) LID0(S4) > acpitimer0 at acpi0: 3579545 Hz, 24 bits > acpihpet0 at acpi0: 14318179 Hz > acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat > cpu0 at mainbus0: apid 0 (boot processor) > cpu0: Intel(R) Core(TM) i7-2677M CPU @ 1.80GHz, 1800.30 MHz > cpu0: > FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC > cpu0: 256KB 64b/line 8-way L2 cache > cpu0: smt 0, core 0, package 0 > mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges > cpu0: apic clock running at 100MHz > cpu0: mwait min=64, max=64, C-substates=0.2.1.1.2, IBE > cpu1 at mainbus0: apid 2 (application processor) > cpu1: Intel(R) Core(TM) i7-2677M CPU @ 1.80GHz, 1800.02 MHz > cpu1: > FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC > cpu1: 256KB 64b/line 8-way L2 cache > cpu1: smt 0, core 1, package 0 > cpu2 at mainbus0: apid 1 (application processor) > cpu2: Intel(R) Core(TM) i7-2677M CPU @ 1.80GHz, 1800.02 MHz > cpu2: > FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC > cpu2: 256KB 64b/line 8-way L2 cache > cpu2: smt 1, core 0, package 0 > cpu3 at mainbus0: apid 3 (application processor) > cpu3: Intel(R) Core(TM) i7-2677M CPU @ 1.80GHz, 1800.02 MHz > cpu3: > FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,NXE,LONG,LAHF,PERF,ITSC > cpu3: 256KB 64b/line 8-way L2 cache > cpu3: smt 1, core 1, package 0 > ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 24 pins > ioapic0: misconfigured as apic 0, remapped to apid 2 > acpiec0 at acpi0 > acpimcfg0 at acpi0 addr 0xe0000000, bus 0-151 > acpiprt0 at acpi0: bus 0 (PCI0) > acpiprt1 at acpi0: bus 3 (P0P2) > acpiprt2 at acpi0: bus 2 (RP02) > acpicpu0 at acpi0: C3, C2, C1, PSS > acpicpu1 at acpi0: C3, C2, C1, PSS > acpicpu2 at acpi0: C3, C2, C1, PSS > acpicpu3 at acpi0: C3, C2, C1, PSS > acpibat0 at acpi0: BAT0 model "3545797981023400290" type 3545797981528607052 > oem "3545797981528673619" > acpiac0 at acpi0: AC unit online > acpibtn0 at acpi0: LID0 > acpibtn1 at acpi0: PWRB > acpibtn2 at acpi0: SLPB > acpivideo0 at acpi0: IGPU > acpivout0 at acpivideo0: DD02 > cpu0: Enhanced SpeedStep 1800 MHz: speeds: 1801, 1800, 1700, 1600, 1500, > 1400, 1300, 1200, 1100, 1000, 900, 800 MHz > memory map conflict 0xe00f8000/0x1000 > memory map conflict 0xfed1c000/0x4000 > memory map conflict 0xffed0000/0x30000 > pci0 at mainbus0 bus 0 > pchb0 at pci0 dev 0 function 0 "Intel Core 2G Host" rev 0x09 > ppb0 at pci0 dev 1 function 0 "Intel Core 2G PCIE" rev 0x09: msi > pci1 at ppb0 bus 3 > ppb1 at pci1 dev 0 function 0 vendor "Intel", unknown product 0x151a rev 0x01 > pci2 at ppb1 bus 4 > ppb2 at pci2 dev 0 function 0 vendor "Intel", unknown product 0x151a rev 0x01 > pci3 at ppb2 bus 5 > vendor "Intel", unknown product 0x151a (class system subclass miscellaneous, > rev 0x01) at pci3 dev 0 function 0 not configured > ppb3 at pci2 dev 3 function 0 vendor "Intel", unknown product 0x151a rev 0x01 > pci4 at ppb3 bus 6 > ppb4 at pci2 dev 4 function 0 vendor "Intel", unknown product 0x151a rev 0x01 > pci5 at ppb4 bus 55 > vga1 at pci0 dev 2 function 0 "Intel HD Graphics 3000" rev 0x09 > intagp0 at vga1 > agp0 at intagp0: aperture at 0x90000000, size 0x10000000 > inteldrm0 at vga1 > drm0 at inteldrm0 > inteldrm0: 1440x900 > wsdisplay0 at vga1 mux 1: console (std, vt100 emulation) > wsdisplay0: screen 1-5 added (std, vt100 emulation) > "Intel 6 Series MEI" rev 0x04 at pci0 dev 22 function 0 not configured > uhci0 at pci0 dev 26 function 0 vendor "Intel", unknown product 0x1c2c rev > 0x05: apic 2 int 21 > ehci0 at pci0 dev 26 function 7 "Intel 6 Series USB" rev 0x05: apic 2 int 23 > usb0 at ehci0: USB revision 2.0 > uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1 > azalia0 at pci0 dev 27 function 0 "Intel 6 Series HD Audio" rev 0x05: msi > azalia0: codecs: Cirrus Logic CS4206, Intel/0x2805, using Cirrus Logic CS4206 > audio0 at azalia0 > ppb5 at pci0 dev 28 function 0 "Intel 6 Series PCIE" rev 0xb5: msi > pci6 at ppb5 bus 1 > ppb6 at pci0 dev 28 function 1 "Intel 6 Series PCIE" rev 0xb5: msi > pci7 at ppb6 bus 2 > "Broadcom BCM43224" rev 0x01 at pci7 dev 0 function 0 not configured > uhci1 at pci0 dev 29 function 0 vendor "Intel", unknown product 0x1c27 rev > 0x05: apic 2 int 19 > ehci1 at pci0 dev 29 function 7 "Intel 6 Series USB" rev 0x05: apic 2 int 22 > usb1 at ehci1: USB revision 2.0 > uhub1 at usb1 "Intel EHCI root hub" rev 2.00/1.00 addr 1 > pcib0 at pci0 dev 31 function 0 "Intel QS67 LPC" rev 0x05 > pciide0 at pci0 dev 31 function 2 "Intel 6 Series SATA" rev 0x05: DMA, > channel 0 configured to native-PCI, channel 1 configured to native-PCI > pciide0: using apic 2 int 19 for native-PCI interrupt > wd0 at pciide0 channel 0 drive 0: <APPLE SSD SM256C> > wd0: 16-sector PIO, LBA48, 239372MB, 490234752 sectors > wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 6 > ichiic0 at pci0 dev 31 function 3 "Intel 6 Series SMBus" rev 0x05: apic 2 int > 18 > iic0 at ichiic0 > iic0: addr 0x2c 03=fc 05=6f 06=a0 71=06 72=80 86=89 90=37 91=21 92=25 93=3d > 94=62 95=8c 96=6a 97=87 98=3d 99=1d 9a=9d 9f=7c a0=7f a1=b5 a2=bf a3=7b a4=28 > a5=cf a6=64 a7=2d words 00=0000 01=0000 02=00fc 03=fc00 04=006f 05=6fa0 > 06=a000 07=0000 > usb2 at uhci0: USB revision 1.0 > uhub2 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1 > usb3 at uhci1: USB revision 1.0 > uhub3 at usb3 "Intel UHCI root hub" rev 1.00/1.00 addr 1 > isa0 at pcib0 > isadma0 at isa0 > pcppi0 at isa0 port 0x61 > spkr0 at pcppi0 > ASMC_MATCH > BIOS: vendor Apple Inc., product MacBookAir4,2 > asmc_models[13]=MacBookAir4,2;asmc0 at isa0 port 0x300/1638 irq 6 > ASMC_ATTACH > ASMC_INIT > ** ASMC_NKEYS > * number of keys = 106 > ** ASMC_FANCOUNT > * FANCOUNT=1 > ASMC_GET_SENSORS > ASMC_UPDATE_SENSORS > ** TEMPERATURES > ** TB0T, enclosure, Enclosure Bottom > * TB0T = 36, sensor_number=1 > ** TC0D, cpu, CPU Temperature Diode > * TC0D = 76, sensor_number=2 > ** REG-SENSORS > ** MO_X, sms_x, sms_x > *** wait status failed: status 0x00 != expected value 0x0c > *** Error getting result for 0x02 > ** Error updating SMS sensor MO_X. > * MO_X = 0, sensor_number=3 > ** MO_Y, sms_y, sms_y > *** wait status failed: status 0x00 != expected value 0x0c > *** Error getting result for 0x02 > ** Error updating SMS sensor MO_Y. > * MO_Y = 0, sensor_number=4 > ** MO_Z, sms_z, sms_z > *** wait status failed: status 0x00 != expected value 0x0c > *** Error getting result for 0x02 > ** Error updating SMS sensor MO_Z. > * MO_Z = 0, sensor_number=5 > ** F0Ac, fan0, fan0_speed > * F0Ac = 1992, sensor_number=6 > ** F1Ac, fan1, fan1_speed > *** wait status failed: status 0x00 != expected value 0x0c > *** Error getting result for 0x02 > ** Error updating FAN sensor F1Ac. > * F1Ac = 0, sensor_number=7 > ** F0Tg, fan0, fan0_targetspeed > * F0Tg = 2000, sensor_number=8 > ** F1Tg, fan1, fan1_targetspeed > *** wait status failed: status 0x00 != expected value 0x0c > *** Error getting result for 0x02 > ** Error updating FAN sensor F1Tg. > * F1Tg = 0, sensor_number=9 > ** ALV0, lightright, lightright > * ALV0 = 0, sensor_number=10 > ** ALV1, lightleft, lightleft > * ALV1 = 0, sensor_number=11 > ** IRREG-SENSORS, Status = 1 > ** F0Sf, fan0, fan0_safespeed > *** wait status failed: status 0x00 != expected value 0x0c > *** Error getting result for 0x02 > ** Error updating sensor F0Sf. > * F0Sf = 0, sensor_number=12 > ** F1Sf, fan1, fan1_safespeed > *** wait status failed: status 0x00 != expected value 0x0c > *** Error getting result for 0x02 > ** Error updating sensor F1Sf. > * F1Sf = 0, sensor_number=13 > ** F0Mn, fan0, fan0_minspeed > * F0Mn = 2000, sensor_number=14 > ** F1Mn, fan1, fan1_minspeed > *** wait status failed: status 0x00 != expected value 0x0c > *** Error getting result for 0x02 > ** Error updating sensor F1Mn. > * F1Mn = 0, sensor_number=15 > ** F0Mx, fan0, fan0_maxspeed > * F0Mx = 6500, sensor_number=16 > ** F1Mx, fan1, fan1_maxspeed > *** wait status failed: status 0x00 != expected value 0x0c > *** Error getting result for 0x02 > ** Error updating sensor F1Mx. > * F1Mx = 0, sensor_number=17 > > nvram: invalid checksum > uhub4 at uhub0 port 1 "Standard Microsystems Hub" rev 2.00/b.b3 addr 2 > uhub5 at uhub4 port 1 "Apple Inc. BRCM20702 Hub" rev 2.00/1.00 addr 3 > uhidev0 at uhub5 port 1 configuration 1 interface 0 "Apple Computer product > 0x820a" rev 2.00/1.00 addr 4 > uhidev0: iclass 3/1, 1 report id > ukbd0 at uhidev0 reportid 1: 8 variable keys, 6 key codes > wskbd0 at ukbd0: console keyboard, using wsdisplay0 > uhidev1 at uhub5 port 2 configuration 1 interface 0 "Apple Computer product > 0x820b" rev 2.00/1.00 addr 5 > uhidev1: iclass 3/1, 2 report ids > ums0 at uhidev1 reportid 2: 3 buttons > wsmouse0 at ums0 mux 0 > ugen0 at uhub5 port 3 "Apple Inc. Bluetooth USB Host Controller" rev > 2.00/1.00 addr 6 > uhidev2 at uhub4 port 2 configuration 1 interface 0 "Apple Inc. Apple > Internal Keyboard / Trackpad" rev 2.00/2.09 addr 7 > uhidev2: iclass 3/1, 9 report ids > ukbd1 at uhidev2 reportid 1: 8 variable keys, 6 key codes, country code 13 > wskbd1 at ukbd1 mux 1 > wskbd1: connecting to wsdisplay0 > uhid0 at uhidev2 reportid 9: input=0, output=0, feature=3 > uhidev3 at uhub4 port 2 configuration 1 interface 1 "Apple Inc. Apple > Internal Keyboard / Trackpad" rev 2.00/2.09 addr 7 > uhidev3: iclass 3/0, 68 report ids > uhid1 at uhidev3 reportid 68: input=511, output=0, feature=0 > uhidev4 at uhub4 port 2 configuration 1 interface 2 "Apple Inc. Apple > Internal Keyboard / Trackpad" rev 2.00/2.09 addr 7 > uhidev4: iclass 3/1, 2 report ids > ums1 at uhidev4 reportid 2: 3 buttons > wsmouse1 at ums1 mux 0 > run0 at uhub4 port 3 "Linksys Linksys WUSB600N Wireless-N USB Network Adapter > with Dual-Band ver. 2" rev 2.00/1.01 addr 8 > run0: MAC/BBP RT3572 (rev 0x0221), RF RT3052 (MIMO 2T2R), address > 68:7f:74:82:e6:f1 > uvideo0 at uhub0 port 2 configuration 1 interface 0 "Apple Inc. FaceTime > Camera (Built-in)" rev 2.00/6.46 addr 9 > video0 at uvideo0 > ugen1 at uhub0 port 2 configuration 1 "Apple Inc. FaceTime Camera (Built-in)" > rev 2.00/6.46 addr 9 > uhub6 at uhub1 port 1 "Standard Microsystems Hub" rev 2.00/b.b3 addr 2 > umass0 at uhub6 port 1 configuration 1 interface 0 "Apple Card Reader" rev > 2.00/3.10 addr 3 > umass0: using SCSI over Bulk-Only > scsibus0 at umass0: 2 targets, initiator 0 > sd0 at scsibus0 targ 1 lun 0: <APPLE, SD Card Reader, 2.00> SCSI0 0/direct > removable serial.05ac8404000000000310 > vscsi0 at root > scsibus1 at vscsi0: 256 targets > softraid0 at root > scsibus2 at softraid0: 256 targets > root on wd0a (e9265d7af45791f2.a) swap on wd0b dump on wd0b > clock: unknown CMOS layout