appleir driver does not work with new macbook pro

Bug #157919 reported by Joakim Recht
46
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mactel Support
Fix Released
Low
Alex Karpenko
linux (Ubuntu)
Fix Released
Medium
Colin Ian King
linux-ubuntu-modules-2.6.22 (Ubuntu)
Won't Fix
Undecided
Unassigned
linux-ubuntu-modules-2.6.24 (Ubuntu)
Fix Released
Medium
Colin Ian King

Bug Description

Binary package hint: linux-ubuntu-modules-2.6.22-14-generic

The appleir driver does not work on the most recent MacBook Pro. The device is now under a new id:

Bus 005 Device 024: ID 05ac:8242 Apple Computer, Inc.
Device Descriptor:
  bLength 18
  bDescriptorType 1
  bcdUSB 2.00
  bDeviceClass 0 (Defined at Interface level)
  bDeviceSubClass 0
  bDeviceProtocol 0
  bMaxPacketSize0 8
  idVendor 0x05ac Apple Computer, Inc.
  idProduct 0x8242
  bcdDevice 0.16
  iManufacturer 1 Apple Computer, Inc.
  iProduct 2 IR Receiver
  iSerial 0
  bNumConfigurations 1

Compiling the module with USB_DEVICE_ID_APPLE_ID set to 0x8242 makes the module work, as long as it is loaded before usbhid.

Revision history for this message
Neil J. Patel (njpatel) wrote :

Just to confim, I have the same problem on my MacBook Pro. There is a thread on the forums (with a step-by-step solution) for people who experience this problem: http://ubuntuforums.org/showthread.php?t=607797.

Revision history for this message
FrejSoya (frej) wrote :

It works on hardy - but the order is still broken.
To resolve this:
Either
 1)fix usbhid to work with macbook pro + evdev (hal find this device as an input device)
 2)Don't load usbhid for this device. So it doesn't get in the way of appleir.

Revision history for this message
FrejSoya (frej) wrote :

Actually the above is valid for old _AND_ new macbooks
On an old macbook the device id is:
Bus 004 Device 002: ID 05ac:8240 Apple Computer, Inc. IR Receiver [build-in]

Revision history for this message
Baumgartner Martin (baumgartner-martin) wrote :

You have to load appleir before usbhid AND applesmc! I didn´t knew that and it took me some time to find that out.

Blacklist applesmc and usbhid and add this to your /etc/modules:
appleir
usbhid
applesmc

Note: You have to load applesmc at least or it wouldn´t work. (Tested on a santa rosa Macbook)

Revision history for this message
Nick Barcet (nijaba) wrote :

This bug is still valid on hardy 2.6.24 modules

Changed in linux-ubuntu-modules-2.6.24:
status: New → Confirmed
Revision history for this message
Ben Wilber (benwilber) wrote :

Blacklisting usbhid and applesmc, then adding the proper load order to /etc/modules causes numlock to stay on permanently after resume from suspend on MacBook 1,1. No other keypress events are recognized so this forces a hard reboot.

Changed in mactel-support:
assignee: nobody → alexkarpenko
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Alex Karpenko (alexkarpenko) wrote :

Attached is the patch for appleir, which makes it work with the new macbooks (i.e., the ones which have IR device ID of 0x8242).
In addition, the patch changes the key codes for back and forward to correspond with those used on apple keyboards. That way media controls on the remote work out of the box (e.g., in rhythmbox).

Revision history for this message
Alex Karpenko (alexkarpenko) wrote :

I should also note that I've tested this patch on a Macbook Pro 4,1 running Hardy.

I've also sent the patch to the kernel-team mailing list.

Revision history for this message
Henrik Rydberg (rydberg) wrote : Re: [Mactel-support] [Bug 157919] Re: appleir driver does not work with new macbook pro

Alex Karpenko wrote:
> Attached is the patch for appleir, which makes it work with the new macbooks (i.e., the ones which have IR device ID of 0x8242).
> In addition, the patch changes the key codes for back and forward to correspond with those used on apple keyboards. That way media controls on the remote work out of the box (e.g., in rhythmbox).
>
> ** Attachment added: "appleir_add_device_id_for_new_macbooks.patch"
> http://launchpadlibrarian.net/16351456/appleir_add_device_id_for_new_macbooks.patch
>

Thanks Alex,

I am out of town for a week, but I will eventually test this also on Macbook Air.

Cheers,
Henrik

Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

Just adding a note that I'm also targetting this report against the upcoming Intrepid Ibex 8.10 release. Beginning with the Intrepid development cycle the linux-ubuntu-modules package was merged with the linux kernel source package. Going forward bugs that would have been reported against linux-ubuntu-modules should now be reported against linux. Thanks.

Changed in linux:
assignee: nobody → ubuntu-kernel-team
importance: Undecided → Medium
status: New → Triaged
Changed in linux-ubuntu-modules-2.6.24:
assignee: nobody → colin-king
Revision history for this message
Colin Ian King (colin-king) wrote :

Hi,

I've added the patch and built the linux-ubuntu-modules package - you can download the packages from my PPA at: https://launchpad.net/~colin-king/+archive

Add the following lines to your apt sources.list:

deb http://ppa.launchpad.net/colin-king/ubuntu hardy main
deb-src http://ppa.launchpad.net/colin-king/ubuntu hardy main

alternatively, follow the instructions at: https://help.ubuntu.com/8.04/add-applications/C/extra-repositories-adding.html

If you can test this package and let me know if it works, then I can add it as a fix to as a SRU.

Thanks, Colin

Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

The Ubuntu Kernel Team is planning to move to the 2.6.27 kernel for the upcoming Intrepid Ibex 8.10 release. As a result, the kernel team would appreciate it if you could please test this newer 2.6.27 Ubuntu kernel. There are one of two ways you should be able to test:

1) If you are comfortable installing packages on your own, the linux-image-2.6.27-* package is currently available for you to install and test.

--or--

2) The upcoming Alpha5 for Intrepid Ibex 8.10 will contain this newer 2.6.27 Ubuntu kernel. Alpha5 is set to be released Thursday Sept 4. Please watch http://www.ubuntu.com/testing for Alpha5 to be announced. You should then be able to test via a LiveCD.

Please let us know immediately if this newer 2.6.27 kernel resolves the bug reported here or if the issue remains. More importantly, please open a new bug report for each new bug/regression introduced by the 2.6.27 kernel and tag the bug report with 'linux-2.6.27'. Also, please specifically note if the issue does or does not appear in the 2.6.26 kernel. Thanks again, we really appreicate your help and feedback.

Revision history for this message
Colin Ian King (colin-king) wrote :

Henrik, Alex,

Is it possible for you to try out the patched Hardy package that is in my PPA, as noted in https://bugs.launchpad.net/ubuntu/+bug/157919/comments/11

Then I can put this patch into Hardy for all users to benefit from this fix.

Thanks, Colin.

Revision history for this message
Alex Karpenko (alexkarpenko) wrote :

Hello Colin,

Sorry, I was away for a week. I've tried the patched appleir module in your PPA and it works on my macbook pro 4,1.

Cheers,
Alex

Revision history for this message
Henrik Rydberg (rydberg) wrote :

Colin King wrote:
> Henrik, Alex,
>
> Is it possible for you to try out the patched Hardy package that is in
> my PPA, as noted in
> https://bugs.launchpad.net/ubuntu/+bug/157919/comments/11

I never got around to getting the remote control, thus cannot test the Macbook
Air at this time. Hopefully Alex' test of the Macbook Pro is enough.

Thanks,
Henrik

Revision history for this message
Colin Ian King (colin-king) wrote :

SRU justification:

Impact: The appleir driver does not work with the most recent MacBook
Pro because the device now has a new ID 0x8242.

Fix: Add new device ID in appleir_ids[]. Also add in appropriate key
response codes for this device.

Testcase: Without the patch, appleir driver on newer MacBook Pros do not
detect this device. With the patch, the device is detected.

Patch tested and confirmed by user:
https://bugs.launchpad.net/ubuntu/+source/linux-ubuntu-modules-2.6.24/+bug/157919/comments/14

Changed in linux-ubuntu-modules-2.6.24:
importance: Undecided → Medium
milestone: none → ubuntu-8.04.2
status: Confirmed → Fix Committed
Changed in linux:
assignee: ubuntu-kernel-team → colin-king
milestone: none → intrepid-alpha-6
status: Triaged → In Progress
Changed in linux:
status: In Progress → Fix Committed
Changed in mactel-support:
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (20.6 KiB)

This bug was fixed in the package linux - 2.6.27-3.4

---------------
linux (2.6.27-3.4) intrepid; urgency=low

  [ Colin Ian King ]

  * SAUCE: fix kernel oops in VirtualBox during paravirt patching
    - LP: #246067
  * SAUCE: qc-usb: Enable Logitech QuickCam Messenger
    - LP: #209901
  * SAUCE: appleir: Enable driver for new MacBook Pro
    - LP: #157919

  [ Tim Gardner ]

  * Enabled CONFIG_DEBUG_RODATA=y

  [ Upstream Kernel Changes ]

  * Revert "ALSA: hda - Added model selection for iMac 24""
  * Revert "x86: fix HPET regression in 2.6.26 versus 2.6.25, check hpet
    against BAR, v3"
  * Revert "[ARM] use the new byteorder headers"
  * Revert "mac80211: Use IWEVASSOCREQIE instead of IWEVCUSTOM"
  * Revert "crypto: camellia - Use kernel-provided bitops, unaligned access
    helpers"
  * svcrdma: Fix race between svc_rdma_recvfrom thread and the dto_tasklet
  * sched, cpuset: rework sched domains and CPU hotplug handling (v4)
  * ACPI: Fix now signed module parameter.
  * ACPI: Change package length error to warning
  * ACPI: Fix now signed module parameter.
  * ACPI: Fix typo in "Disable MWAIT via DMI on broken Compal board"
  * acpi: add checking for NULL early param
  * UBIFS: fix zero-length truncations
  * Input: bcm5974 - add maintainer entry
  * sh64: re-add the __strnlen_user() prototype
  * sh: fix ptrace_64.c:user_disable_single_step()
  * PNPACPI: ignore the producer/consumer bit for extended IRQ descriptors
  * UBIFS: always read hashed-key nodes under TNC mutex
  * UBIFS: allow for racing between GC and TNC
  * [CIFS] Fix plaintext authentication
  * sparc32: Implement smp_call_function_single().
  * sh: crash kernel resource fix
  * sh: fix kexec entry point for crash kernels
  * sh: fix platform_resource_setup_memory() section mismatch
  * sh: update Migo-R defconfig
  * sh: update AP325RXA defconfig
  * sh: fix semtimedop syscall
  * cifs: fix O_APPEND on directio mounts
  * [CIFS] update cifs change log
  * [CIFS] Turn off Unicode during session establishment for plaintext
    authentication
  * ACPI: thinkpad-acpi: wan radio control is not experimental
  * sparc: Fix resource flags for PCI children in OF device tree.
  * remove blk_register_filter and blk_unregister_filter in gendisk
  * ALSA: oxygen: fix distorted output on AK4396-based cards
  * ipv6: When we droped a packet, we should return NET_RX_DROP instead of
    0
  * pkt_sched: Fix locking of qdisc_root with qdisc_root_sleeping_lock()
  * net: Unbreak userspace usage of linux/mroute.h
  * Don't trigger softlockup detector on network fs blocked tasks
  * Resource handling: add 'insert_resource_expand_to_fit()' function
  * sparc64: setup_valid_addr_bitmap_from_pavail() should be __init
  * UBIFS: do not update min_idx_lebs in stafs
  * UBIFS: push empty flash hack down
  * UBIFS: remove incorrect index space check
  * UBIFS: improve statfs reporting
  * UBIFS: fix assertion
  * UBIFS: add forgotten gc_idx_lebs component
  * UBIFS: introduce LEB overhead
  * UBIFS: improve statfs reporting even more
  * UBIFS: fill f_fsid
  * drm/radeon: downgrade debug message from info to debug.
  * Remove invalidate_partition call from do_md_stop.
  * Fix problem with wai...

Changed in linux:
status: Fix Committed → Fix Released
Changed in mactel-support:
status: Fix Committed → Fix Released
Revision history for this message
Henrik Rydberg (rydberg) wrote :

I can confirm the appleir driver working on MacBookAir1,1 running Intrepid with 2.6.27-6-generic kernel. The modules needs to be loaded early, before usbhid (I put it in /etc/initramfs-tools/modules), and not every button on my remote is mapped into X, but it works.

Revision history for this message
Martin Pitt (pitti) wrote :

Accepted into hardy-proposed, please test and give feedback here. Please see https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Revision history for this message
Steve Langasek (vorlon) wrote :

Accepted into intrepid-proposed, please test and give feedback here. Please see https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux-ubuntu-modules-2.6.24 - 2.6.24-23.36

---------------
linux-ubuntu-modules-2.6.24 (2.6.24-23.36) hardy-proposed; urgency=low

  [Adrian Bunk]

  * sms1xxx: dvb/siano/: cleanups
    - LP: #301204

  [Amit Kucheria]

  * Marvell 8686 driver update from moblin to fix suspend issues
    - LP: #291558
  * LPIA: Updated poulsbo driver to 2.2.0.32L.0020
    - LP: #291582

  [Colin Ian King]

  * Enable appleir driver for new MacBook Pro
    - LP: #157919

  [Mackenzie Morgan]

  * Add quirk for ASUS Z37E to make sound audible after resume
    - LP: #25896

  [Michael Krufky]

  * au0828: add new USB IDs for HVR950Q
    - LP: #299634
  * sms1xxx: fix product name for Hauppauge WinTV MiniStick
    - LP: #299640
  * sms1xxx: Add new USB product ID for Hauppauge WinTV MiniStick
    - LP: #299636
  * sms1xxx: support two new revisions of the Hauppauge WinTV MiniStick
    - LP: #299636
  * sms1xxx: use new firmware for Hauppauge WinTV MiniStick
    - LP: #299671
  * sms1xxx: add USB IDs for Hauppauge WinTV MiniCard DVB-T
    - LP: #299680
  * sms1xxx: add autodetection support for Hauppauge WinTV MiniCard
    2040:200a
    - LP: #299680
  * sms1xxx: add functions to configure and set gpio
    - LP: #301204
  * sms1xxx: turn off LEDs after initialization of Hauppauge WinTV
    MiniStick
    - LP: #301204
  * sms1xxx: enable power LED on Hauppauge WinTV MiniStick
    - LP: #301405
  * sms1xxx: enable LNA control on Hauppauge WinTV MiniCard
    - LP: #301204
  * sms1xxx: fix invalid unc readings
    - LP: #301204
  * sms1xxx: enable signal quality indicator LEDs on Hauppauge WinTV
    MiniStick
    - LP: #301405

  [Stefan Bader]

  * Import git-ubuntu-log from kernel repository
  * alsa: backport alc662 update to enable CMPC 1.5
    - LP: #301785

  [Tim Gardner]

  * Backoport iwlwifi 5000 (Shirley Peak) wireless driver
    - LP: #264063
  * Add microcode for iwlwifi 5000.
    - LP: #264063
  * iwl3945 - set disable_hw_scan=1
    - LP: #226410

linux-ubuntu-modules-2.6.24 (2.6.24-22.35) hardy-security; urgency=low

  ABI bump to -22

linux-ubuntu-modules-2.6.24 (2.6.24-22.34) hardy-proposed; urgency=low

  [Amit Kucheria]

  * Marvell 8686 driver update from moblin to fix suspend issues
    - LP: #291558
  * LPIA: Updated poulsbo driver to 2.2.0.32L.0020
    - LP: #291582

  [Colin Ian King]

  * Enable appleir driver for new MacBook Pro
    - LP: #157919

  [Mackenzie Morgan]

  * Add quirk for ASUS Z37E to make sound audible after resume
    - LP: #25896

  [Stefan Bader]

  * SAUCE: buildenv: Import git-ubuntu-log from kernel repository

  [Tim Gardner]

  * Backoport iwlwifi 5000 (Shirley Peak) wireless driver
    - LP: #264063
  * Add microcode for iwlwifi 5000.
    - LP: #264063
  * iwl3945 - set disable_hw_scan=1
    - LP: #226410

 -- Stefan Bader <email address hidden> Mon, 24 Nov 2008 17:01:59 +0100

Changed in linux-ubuntu-modules-2.6.24:
status: Fix Committed → Fix Released
Revision history for this message
Steve Beattie (sbeattie) wrote :

I don't believe this will be addressed with an SRU for gutsy, marking that task Won't Fix.

Changed in linux-ubuntu-modules-2.6.22:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.