Apple Bluetooth Keyboard Fn key not working

Bug #911064 reported by Jason
86
This bug affects 16 people
Affects Status Importance Assigned to Milestone
Linux
Invalid
Medium
linux (Ubuntu)
Incomplete
Medium
Unassigned

Bug Description

The latest Apple Bluetooth Keyboards (purchased in Oct 2011) do not have a working Fn key in Ubuntu. This has been reported for the Australian sold keyboards (http://ubuntuforums.org/showthread.php?t=1855975). Not sure if it is also a problem in other countries.

 I suspect the device ID has changed. A similar (?) bug is 227501 (https://bugs.launchpad.net/ubuntu/+source/linux/+bug/227501) from 2009 which was fixed when Apple last changed the Device ID.

Hidd output for the keyboard is
40:30:04:10:BF:32 jaseeverett’s keyboard [05ac:0255] connected

All other keys seem to work correctly, however since the Fn key doesn't work there is no multimedia etc.

Output of cat /proc/version_signature is:
Ubuntu 3.0.0-15.24-generic-pae 3.0.13

Revision history for this message
Jason (jaseeverett) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/911064/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
Revision history for this message
Jason (jaseeverett) wrote :

I've tried to follow the instructions above. I suspect the bug is in the kernel, but when I search for "kernel" under packages I get an error saying "too many matches". When I refine the search to my specific kernel i get "no packages exist".

Not sure where to go from here. Perhaps the help page (https://wiki.ubuntu.com/Bugs/FindRightPackage) needs updating with more info re what to do if the bug is in the kernel.

In any case, my kernel is 3.0.0-15-generic-pae

Let me know if any more info is required.

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

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubuntu:
status: New → Confirmed
Revision history for this message
Paul Natsuo Kishimoto (khaeru) wrote :

I just marked bug #913601 (which contains a full collection of apport data) as a duplicate, because I installed 'bluez-compat', and then:

$ hidd
28:37:37:35:04:E4 Apple Wireless Keyboard [05ac:0255] connected

…gives a device ID is the same as in the description above.

Revision history for this message
Paul Natsuo Kishimoto (khaeru) wrote :

Also, I did some browsing in the kernel source on gitweb, and it appears the relevant definition has moved from net/bluetooth/hidp/core.c (kernel 2.6.14, as reported in bug #227501) to drivers/hid/hid-ids.h and drivers/hid/hid-apple.c in the linux source.

It seems like it would be simple to fix, but I don't know how / don't have time to learn how to prepare a kernel patch.

affects: ubuntu → linux (Ubuntu)
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Would it be possible for you to test the latest upstream kernel? It will allow additional upstream developers to examine the issue. Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . If possible, please test the latest v3.2 kernel[1] (Not a kernel in the daily directory). Once you've tested the upstream kernel, please remove the 'needs-upstream-testing' tag(Only that one tag, please leave the other tags). This can be done by clicking on the yellow pencil icon next to the tag located at the bottom of the bug description and deleting the 'needs-upstream-testing' text.

If this bug is fixed by the mainline kernel, please add the following tag 'kernel-fixed-upstream-KERNEL-VERSION'. For example, if kernel version 3.2-rc1 fixed the issue, the tag would be: 'kernel-fixed-upstream-v3.2-rc1'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

If you are unable to test the mainline kernel, for example it will not boot, please add the tag: 'kernel-unable-to-test-upstream'. If you believe this bug does not require upstream testing, please add the tag: 'kernel-upstream-testing-not-needed'.

Once testing of the upstream kernel is complete, please mark this bug as "Confirmed".

Thanks in advance.

Changed in linux (Ubuntu):
status: Confirmed → Incomplete
tags: added: needs-upstream-testing
Revision history for this message
Paul Natsuo Kishimoto (khaeru) wrote :
tags: added: kernel-bug-exists-upstream kernel-upstream-testing-not-needed
removed: needs-upstream-testing
Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Craig Magina (craig.magina) wrote :

I am experiencing this on precise with my brand new apple wireless keyboard, which just arrived today, and I verified it also has the product id of 0x0255.

Revision history for this message
Paul Natsuo Kishimoto (khaeru) wrote :
Revision history for this message
Brian Graham (bgrah7) wrote :

@Paul, I don't understand the format of that page, so I'll just ask you here.

What version of the kernel has the device ID been added to; and/or when will it be released, because those fn keys are useful.

Thanks

Revision history for this message
Paul Natsuo Kishimoto (khaeru) wrote :

@Brian: I'm not a kernel developer, so I'm not sure either.

Here's what I did to find it: Go to http://kernel.org. On the line by "stable: 3.0.18", click "Gitweb". Click "tree" at the top of the page, then browse to drivers/hid/hid-ids.h; the device ID is visible. For comparison:
$ cat /proc/version_signature
Ubuntu 3.0.0-15.26-generic 3.0.13

So I guess it was introduced sometime between kernel version 3.0.14 and 3.0.18 inclusive. But I have no idea how/on what schedule the Ubuntu kernel for 11.10 is updated from the one on kernel.org.

Since this is a simple fix, only a few lines, I hope one of the Ubuntu devs could "cherry-pick" it, if they happen to look at this bug. Worst case: no one will, and the fix will come in the 3.2 kernel when Ubuntu 12.04 is released.

Revision history for this message
Paul Natsuo Kishimoto (khaeru) wrote :

This is still appearing in Precise:

$ cat /proc/version_signature
Ubuntu 3.2.0-17.27-generic 3.2.6

tags: added: kernel-fixed-upstream
removed: kernel-bug-exists-upstream
tags: removed: kernel-upstream-testing-not-needed
Revision history for this message
Paul Natsuo Kishimoto (khaeru) wrote :

Changing tags in the hope that this comes to the attention of Ubuntu devs…

Installing the mainline 3.3-rc7 kernel from http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.3-rc7-precise/ does NOT fix the problem.

However, again, the device ID is in the Linux kernel repository for the same tag:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob;f=drivers/hid/hid-ids.h;hb=HEAD#l131

For some reason, the driver in the mainline kernel PPA does not include the device ID.

Changed in linux (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → Medium
tags: added: precise
Revision history for this message
Paul Natsuo Kishimoto (khaeru) wrote :

Bug #942184 is very similar to this one, but for a natty SRU. The suggested patch from the submitter (comment #1) includes the 0x0255, 0x0256 and 0x0257 device IDs, but the when the patch was applied (comment #4) only 0x0256 was added.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

I see that the device is now in Linus' mainline tree:

git log --pretty=oneline | grep 'hid-input/battery: add FEATURE quirk'
652aa6a9ac4a5f8d3e1fa3f6466646519e83c01e hid-input/battery: add FEATURE quirk

The set of patches including this fix was submitted on LKML, but I didn't see stable in the Cc list:
https://lkml.org/lkml/2012/1/9/136

I sent a query asking if this set of fixes will be submitted to stable.

Revision history for this message
Dan Lange (metalifloyd) wrote :

Any progress here? The device IDs are still not in the current precise kernel (3.2.0-23-generic). Not having a page up/down key is getting pretty annoying.

$ cat /proc/version_signature
Ubuntu 3.2.0-23.36-generic 3.2.14

$ hidd
60:C5:47:1C:C9:7C Apple Wireless Keyboard [05ac:0255] connected

$ lsmod | grep hid # Note the lack of hid-apple
hidp 22628 1
bluetooth 180104 28 hidp,bnep,rfcomm,btusb
mac_hid 13253 0
usbhid 47199 0
hid 99559 2 hidp,usbhid

Revision history for this message
Dan Lange (metalifloyd) wrote :

I see Precise is past Kernel freeze so I doubt anyone will fix this any time soon. After all, this bug has only been open for 4 months.. /rant.

The required patches are in the 3.3 stable kernel, not in 3.2.14 which Precise is using. I see lots of requests to just use the 3.3 kernel (largely for power enhancements) but if Ubuntu insists on sticking with 3.2, could we please get the following commits backported to 3.2?

http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=commit;h=652aa6a9ac4a5f8d3e1fa3f6466646519e83c01e
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=commit;h=ad734bc1565364f9e4b70888d3ce5743b3c1030a
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=commit;h=4a4c879904aa0cc64629e14a49b64fb3d149bf1a

Those should add the necessary IDs to solve this bug for everyone.

Revision history for this message
Peter Hedlund (peter-peterandlinda) wrote :

I am using http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.3-precise/ and this issue is still present (basically confirming comment #14). So "just" using the 3.3 kernel does not help.

Revision history for this message
Peter Hedlund (peter-peterandlinda) wrote :

mainline 3.3.2 and kernel.ubuntu.com/~kernel-ppa/mainline/v3.4-rc3-precise/ do not help. Definitely something missing in Ubuntu.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Can you test the latest v3.4 mainline kernel, which is available at:
http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.4-rc3-precise/

Revision history for this message
Peter Hedlund (peter-peterandlinda) wrote :

That's what I did in comment 20. It does not work.

Revision history for this message
Peter Hedlund (peter-peterandlinda) wrote :

Still not fixed in mainline 3.4-rc5.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

This issue appears to be an upstream bug, since you tested the latest upstream kernel. Would it be possible for you to open an upstream bug report at bugzilla.kernel.org [1]? That will allow the upstream Developers to examine the issue, and may provide a quicker resolution to the bug.

If you are comfortable with opening a bug upstream, It would be great if you can report back the upstream bug number in this bug report. That will allow us to link this bug to the upstream report.

[1] https://wiki.ubuntu.com/Bugs/Upstream/kernel

Revision history for this message
Dan Lange (metalifloyd) wrote :

The problem as I stated above is that the commits have not been backported to the 3.2 kernel series. If you browse the stable tree at git.kernel.org you'll see the 3.3.4 [1] and 3.4-rc1 [2] tagged trees have the right commits. 3.2.16 still does not. This is probably the type of thing a Ubuntu kernel guy could get pushed through a lot faster than some random guy on the internet (me).

[1] http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=blob;f=drivers/hid/hid-ids.h;h=c7d0aa609d9cfd09bfb068a9cc726e2bc4d40df1;hb=d0c4f31c99b390c9bfc54e79de0f7650ab819352#l131

[2] http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=blob;f=drivers/hid/hid-ids.h;h=e39aecb1f9f28def0a0490a3de0ef29021f49ede;hb=dd775ae2549217d3ae09363e3edb305d0fa19928#l131

Revision history for this message
Peter Hedlund (peter-peterandlinda) wrote :

Well, it's a backporting problem if you are running vanilla Precise. The other part of the problem is that running Precise with a newer kernel that supposedly has the devices added doesn't help. I would be happy to file an upstream bug if someone can confirm that the device IDs are indeed included in recent mainline kernels or is comment #14 still valid?

Revision history for this message
Paul Natsuo Kishimoto (khaeru) wrote :

Reported upstream, but I want to point out that the backport in bug #942184 (mentioned earlier) was accomplished without upstream intervention. I agree with Dan in #25.

Changed in linux:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
Paul Natsuo Kishimoto (khaeru) wrote :

The upstream bug was marked INVALID:

Comment #1 From Dmitry Torokhov 2012-05-04 22:21:33

Please only use bugzilla for issues that exist in mainline. For inclusion existing patches into stable kernels please either ask your distribution or forward necessary patch to <email address hidden>

--

So: can Ubuntu prepare the necessary patch? Again, an example is at bug #942184.

Changed in linux:
status: Confirmed → Invalid
Revision history for this message
Craig Magina (craig.magina) wrote :

The Fn key still does not work even when running Quantal with kernel 3.4.0-5 amd64.

Revision history for this message
Jason (jaseeverett) wrote :

Does anyone have an update on this?

The device ids seem to be in the kernel at kernel.org, but on my computer the keyboard is still detected as 'generic-bluetooth 0005:05AC:0255.0005: input,hidraw3: BLUETOOTH HID v0.50 Keyboard ' rather than any sort of apple wireless keyboard.

Not being a developer, I'm not really sure how the kernel works, but every version of the kernel I check, has 0x0255 listed in drivers/hid/hid-ids.h.

Not sure why this doesn't translate to a working keyboard on my computer.

I'm currently running
Ubuntu 3.2.0-26.41-generic-pae 3.2.19

Revision history for this message
Victor Trac (victor-trac) wrote :

I'm also having this problem, even with the latest 3.6 kernel:
3.6.0-030600rc6-generic

Revision history for this message
Victor Trac (victor-trac) wrote :

For what it's worth, I downloaded and installed mainline 3.6-rc6 from kernel.org and it fixed the issue.

Revision history for this message
Paul Natsuo Kishimoto (khaeru) wrote :

I've just upgraded to 12.10 beta and this is still not fixed:

$ apt-cache policy linux-image-generic
linux-image-generic:
  Installed: 3.5.0.15.15
  Candidate: 3.5.0.15.15
  Version table:
 *** 3.5.0.15.15 0
        500 http://archive.ubuntu.com/ubuntu/ quantal/main amd64 Packages
        100 /var/lib/dpkg/status

tags: added: quantal
Revision history for this message
Paul Natsuo Kishimoto (khaeru) wrote :

Although Alpha 1 is not released yet, and I won't upgrade that early anyway, this bug appears to be fixed in "raring ringtail". The device ID 0255 appears in the kernel sources, file 'hid-ids.h' from:

http://packages.ubuntu.com/raring/linux-image-extra-3.7.0-3-generic

…and in a grep of the 'hid-apple.ko' module binary from:

https://launchpad.net/ubuntu/raring/+package/linux-image-extra-3.7.0-3-generic

However, it's still erroneously missing from the 12.10 kernels.

Should we file a new bug requesting a SRU, or convert this one into a SRU? If so, how? If not, will this be fixed before 13.04 is released?

Revision history for this message
Ari Pollak (ari) wrote :

I believe the people still seeing this issue after kernel 3.5 are running into http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=694546, which should be fixed upstream soon.

Revision history for this message
Андрей Мирон (mnior) wrote :

A recent update Ubuntu 12.04:
  Ubuntu 3.2.0-38.59-generic 3.2.37
Changelog:
  * HID: apple: Add Apple wireless keyboard 2011 ANSI PID
    - LP: #1096966
  * HID: Add Apple wireless keyboard 2011 ANSI to special driver list
    - LP: #1096966

Work fine for me. Thanks! :D

Revision history for this message
Paul Natsuo Kishimoto (khaeru) wrote :

This also seems to be fixed for me in 12.10, with linux-image-3.5.0-24-generic 3.5.0-24.37. I'll leave it to the submitter to mark it "Fix Released".

Revision history for this message
Matteo Landi (landimatte) wrote :

Don't know if it is a problem of my current setup, but I'm running Ubuntu 12.10 with Kernel 3.7.0-7generic and function keys do not work anymore.

Revision history for this message
Matteo Landi (landimatte) wrote :

It May be better off giving you more information about my current setup.

I have the hid_apple module loaded at startup via /etc/modules, and use the /etc/modprobe.d/hid_apple.conf file to configure specific settings for the driver.

Now comes the interesting part. If I place `options hid_apple fnmode=2` inside the latter, F* keys are working as expected but media keys (fn + f* keys) do not. On the other hand, if I leave the modproble settings file empty, everything works as expected (media keys defaulting on f* keys, and standard f* keys functions when using the fn modifier).

Am I the only one experiencing this? Thanks.

Revision history for this message
Craig Magina (craig.magina) wrote :

All the keys are now working for me in Raring (13.04).

Revision history for this message
penalvch (penalvch) wrote :

Jason, this bug was reported a while ago and there hasn't been any activity in it recently. We were wondering if this is still an issue? If so, could you please test for this with the latest development release of Ubuntu? ISO images are available from http://cdimage.ubuntu.com/daily-live/current/ .

If it remains an issue, could you please run the following command in the development release from a Terminal (Applications->Accessories->Terminal), as it will automatically gather and attach updated debug information to this report:

apport-collect -p linux <replace-with-bug-number>

Also, could you please test the latest upstream kernel available (not the daily folder, but the one all the way at the bottom) following https://wiki.ubuntu.com/KernelMainlineBuilds ? It will allow additional upstream developers to examine the issue. Once you've tested the upstream kernel, please comment on which kernel version specifically you tested. If this bug is fixed in the mainline kernel, please add the following tags:
kernel-fixed-upstream
kernel-fixed-upstream-VERSION-NUMBER

where VERSION-NUMBER is the version number of the kernel you tested. For example:
kernel-fixed-upstream-v3.12

This can be done by clicking on the yellow circle with a black pencil icon next to the word Tags located at the bottom of the bug description. As well, please remove the tag:
needs-upstream-testing

If the mainline kernel does not fix this bug, please add the following tags:
kernel-bug-exists-upstream
kernel-bug-exists-upstream-VERSION-NUMBER

As well, please remove the tag:
needs-upstream-testing

Once testing of the upstream kernel is complete, please mark this bug's Status as Confirmed. Please let us know your results. Thank you for your understanding.

tags: added: needs-kernel-logs needs-upstream-testing
Changed in linux (Ubuntu):
status: Triaged → Incomplete
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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