Bug 651019

Summary: applesmc module problems on Macbook Air3,1,1
Product: [Fedora] Fedora Reporter: Jan Wildeboer <jwildebo>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 14CC: aquini, car.insurance3, dougsland, gansalmon, gaul, gtmkramer, itamar, johannbg, jonathan, kernel-maint, kmcmartin, madhu.chinakonda, pbrobinson
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-11-16 03:38:05 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Description Flags
dmesg output of Macbbo Air3,1,1
patch for mba 3,1 / 3,2 (not a proper patch yet)
patch for mba 3,1 / 3,2 (without cruft of v1, )
patch for mba 3,1 / 3,2 none

Description Jan Wildeboer 2010-11-08 16:53:05 UTC
Description of problem:

Touchpad recognition fails, brightness buttons do not work

Version-Release number of selected component (if applicable): #1 SMP Fri Oct 22 15:36:08 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux

How reproducible:


Steps to Reproduce:
1. Install fedora 14 x86_64 on MBA3,1,1
2. done
Actual results:

touchpad not recognized as such (in GNOME - System - Preferences - Mouse), no settings for two-finger scroll etc as do exist on normal macbook pro

brightness control via F1 and F2 does not work (using de keayboard layout)

Expected results:

touchpad options in preferences

working brightness control (really important to safe battery life, ATM always at 100% which eats battery)

Additional info:

smolt profile of this box at http://www.smolts.org/client/show/pub_01375d10-2b7a-4d39-a71e-89d7f4789d55

Comment 1 Jan Wildeboer 2010-11-08 17:06:20 UTC
Created attachment 458816 [details]
dmesg output of Macbbo Air3,1,1

Attached dmesg from MBA3,1,1

Comment 2 Jan Wildeboer 2010-11-09 12:12:02 UTC
Looking at dmesg, I notice:

[    5.306995] applesmc: Apple MacBook Air detected:
[    5.307012] applesmc:  - Model with accelerometer
[    5.307015] applesmc:  - Model with light sensors and backlight
[    5.307018] applesmc:  - Model with 15 temperature sensors

Which is definitely wrong. The new Macbook Air does not have light sensors.

This is followed by a multitude (102 times) of

[    5.345956] applesmc: wait status failed: 5 != 0

and finally concluded with

[   13.837029] applesmc: failed to init the device
[   13.837844] applesmc: 1 fans found.
[   13.870966] applesmc: wait status failed: 5 != 0
[   13.904035] applesmc: wait status failed: 5 != 0
[   13.904270] input: applesmc as /devices/platform/applesmc.768/input/input10
[   13.904884] Registered led device: smc::kbd_backlight
[   13.905290] applesmc: driver successfully loaded.

So something is definitely wrong. The peeps over at ubuntu are closing in on the same stuff and seemingly are working with a patched/updated applesmc module that works better with the MBA3,1,1 according to:


The updates to the applesmc module are discussed at:


This thread also includes numerous patches for btusb, keyboard, touchpad etc. Maybe we can backport some stuff to F14?

Comment 3 Jurgen Kramer 2010-11-09 17:10:10 UTC
Patches for applesmc, touchpad (bcm5974), btusb, hid-apple, mbp-nvidia-bl, snd quirks have been sent to LKML. 
See: http://lkml.indiana.edu/hypermail/linux/kernel/1011.0/00520.html. 

It would be nice if the next F14 kernel would incorporate these, or at least the patches for bcm5974 and hid-apple.

Comment 4 Jan Wildeboer 2010-11-10 09:58:39 UTC
My priority list would be:

1. mbp-nvidia-bl - not being able to dim brightness == battery drain
(2. nouveau - want to use normal tools to work with external display)
3. hid-apple - need to be able to right-click at least.
4. snd - nice to have working internal speakers
5. bcm5974 - kmod-wl is good enough for me ATM, but better to have OOTB working wireless

How can we raise awareness on engineering level for this? Will gladly send bavarian beer to speed things up ;-)


Comment 5 Jurgen Kramer 2010-11-12 14:09:23 UTC
I've created a patched kernel with patches from the mailinglist (excluding the apple smc patches for now).

1. mbp-nvidia-bl - works
2. nouveau -> I use nvidia binary drivers from rpmfusion (akmod). dithering is needed because of the 6-bit LCD panel. I am not sure if nouveau supports this.
3. hid-apple work, brightness/volume etc keys work nicely
4. snd - I cannot get sound from the speakers
5. bcm5974 - module loads but I cannot get X to get the touchpad to work. On the ubuntu forums they speak about a multitouch X driver which is not available in Fedora. When I set the bcm5974 into debug mode I do get values in /var/log/messages.
6. wifi - works with akmod-wl (but still not on wifi-N).

I've attached the patch for good measure.

Comment 6 Jurgen Kramer 2010-11-12 14:12:59 UTC
Created attachment 460055 [details]
patch for mba 3,1 / 3,2 (not a proper patch yet)

includes patch for:
- bcm5974
- btusb
- hid-apple
- ALSA patch_cirrus

Comment 7 Jurgen Kramer 2010-11-13 11:06:59 UTC
Created attachment 460214 [details]
patch for mba 3,1 / 3,2 (without cruft of v1, )

A cleaner version of the patch.

Comment 8 Jurgen Kramer 2010-11-13 12:33:43 UTC
Created attachment 460221 [details]
patch for mba 3,1 / 3,2

Patch for macbookair 3,1 and 3,2 - btusb, bcm5974, hid-apple, patch_cirrus and apple-smc

Comment 9 Jurgen Kramer 2010-11-13 12:35:37 UTC
Apple smc messages before the patch:

[    4.597093] applesmc: Apple MacBook Air detected:
[    4.597097] applesmc:  - Model with accelerometer
[    4.597099] applesmc:  - Model with light sensors and backlight
[    4.597102] applesmc:  - Model with 15 temperature sensors
[    4.630229] applesmc: wait status failed: 5 != 0
[    4.910032] applesmc: wait status failed: 5 != 0
[    4.994094] applesmc: wait status failed: 5 != 0
[    5.078342] applesmc: wait status failed: 5 != 0


[   13.070157] applesmc: wait status failed: 5 != 0
[   13.154158] applesmc: wait status failed: 5 != 0
[   13.205100] applesmc: failed to init the device
[   13.205668] applesmc: 1 fans found.
[   13.238779] applesmc: wait status failed: 5 != 0
[   13.271838] applesmc: wait status failed: 5 != 0
[   13.271924] input: applesmc as /devices/platform/applesmc.768/input/input10
[   13.272182] Registered led device: smc::kbd_backlight
[   13.272222] applesmc: driver successfully loaded.
[   17.045300] applesmc: wait status failed: 5 != 0
[   20.261097] applesmc: wait status failed: 5 != 0

With the patch:

[    5.691020] applesmc: Apple MacBook Air 3 detected:
[    5.691024] applesmc:  - Model without accelerometer
[    5.691026] applesmc:  - Model without light sensors and backlight
[    5.691029] applesmc:  - Model with 19 temperature sensors
[    5.691088] applesmc: device successfully initialized.
[    5.691888] applesmc: 1 fans found.
[    5.691981] applesmc: driver successfully loaded.

Comment 10 Peter Robinson 2010-11-15 11:04:44 UTC
(In reply to comment #8)
> Created attachment 460221 [details]
> patch for mba 3,1 / 3,2
> Patch for macbookair 3,1 and 3,2 - btusb, bcm5974, hid-apple, patch_cirrus and
> apple-smc

The ideal and quickest way to get these in Fedora would be once they are in 2.6.37 would be to get them pulled into a 2.6.35.x stable release update.

Comment 11 Kyle McMartin 2010-11-16 03:38:05 UTC
Stable 35 isn't going to be updated by Greg anymore...


Committed as a568a0d4 to master, thanks for the patch.


Comment 12 Jan Wildeboer 2010-11-16 10:31:43 UTC
Installed kernel- from koji, added kernel-devel, kernel-headers and akmod-wl to the mix.

The plus:

- gnome-mouse-properties now adds a tab for touchpad config, two-finger scrolling etc works.
- brightness control now works for most parts. However, after auto-dim after some time of inactivity returning to activity restores to some arbitrary brightness level but the one used before.
- Bluetooth works

The minus:

- Still no sound from internal speakers
- Still no working suspend/resume with nouvuea driver
- (a)kmod-wl behaves flaky (looses connections, reconnects frequently)

Overall - Wow :-) I am much more happy now.

Comment 13 Jan Wildeboer 2010-11-16 11:03:24 UTC
Clarification wrt brightness control (my previous comment was unparseable ;-)

Brightness of screen is autoset to sth like 50% on battery mode.

I put it to 80% by using the now working keys.

After a few minutes of idling, the screen gets dimmed.

When you stop idling, brightness returns to 50% but not to the previous 80%.

Short form: individual settings of brightness seem to be ignored. It's a minor isuue, but worth mentioning IMHO

Comment 14 Paul Ross 2011-05-13 09:23:53 UTC
I followed the instructions here (http://www.mind-download.com/2011/01/installing-fedora-14-on-macbook-air.html) to get audio working from the internal speakers.

Step 10 - Fixing Sound:

Sound is detected by default, but not correctly, as root:

echo "options snd_hda_intel model=mbp55" > /etc/modprobe.d/sound.conf


Now, you need to unmute the speakers via the terminal. As your user:

alsamixer -c0

Make sure "Front sp" and "Surround" are not set to MM, and the volume is high. I usually set mine up in the 90s.

Hit 'Esc' to exit. As root:

alsactl store 0

To save settings.