I'm using the method as described in the Community Docs, under Kernel/Compile.
Followed by a brief edit of the drivers/hid/usbhid/hid-quirks.c file to enable Fn functionality. Then it's on to:Code:sudo apt-get build-dep linux-image-$(uname -r) apt-get source linux-image-$(uname -r)
Finally, I install the freshly built debs with dpkg -i.Code:debian/rules updateconfigs sudo CONCURRENCY_LEVEL=2 AUTOBUILD=1 fakeroot debian/rules binary-generic
Are there other sources I should be building from?
As a brief aside, is there anyone tasked with creating a MacBook Pro 4th Gen page in the community docs? Is it necessary at this stage? If so, I'd like to help with the creation of it.
Last edited by seaward; May 16th, 2008 at 11:43 PM. Reason: Grammatical
I'd be willing to chime in with helping create the page for the new Macbooks.
seaward, I found it easier to just use the hid modules from the compiled custom kernel to replace the ones in the generic kernel. That way the fn key works as well as the touchpad, in the sense that i can move the mouse and left click (scrolling and right clicking does not work however).
I've also been looking at the source to see if I can figure out how to issue a patch for the fn key that will work on all new Macbooks... If anyone wants to help out please let me know
hid_blacklist in drivers/hid/usbhid/hid-quirks.c
Essentially the hid module checks if a quirk for the Vendor ID and corresponding Device ID exists, if so the quirks are applied.
As I describe in my recent post to the bug report, it's just a matter of adding the Keyboard Device IDs for the latest Macbooks (the ones with the multitouch touchpads). I just need to verify that I got the IDs right and then I can make a patch.
I'd be up for the mactel-support membership, although this patch really should go upstream as every distro is affected.
Ok, from the code snippets I had seen, it looked like they were just defining single constants or something. I am no programmer
These keyboard fixes do not seem to be high on the priority list at the moment. and some are even marked as 'triaged'. So it could be quite a while before they make it into the Ubuntu repos.
Whether you would like to post this patch there or not, it would really be helpful to have people with a understanding of linux code such as you helping out.
Here's how to get the fn key working without any patches / kernel recompiles:
If you have a Macbook Pro 4,1, add the following line to the end of /etc/modprobe.d/options:
Code:options usbhid quirks=0x05ac:0x0230:0x00000800,0x05ac:0x0231:0x00004800,0x05ac:0x0232:0x00000800
If you have a Macbook Air, add the following line to the end of /etc/modprobe.d/options:
Reboot. Try deleting a file (fn+delete).Code:options usbhid quirks=0x05ac:0x0223:0x00000800,0x05ac:0x0224:0x00004800,0x05ac:0x0225:0x00000800
If this does not work for you let me know the output of "lsusb -v" so that I can add another option to the one above for your Keyboard Device ID.
Edit: Touchpad confirmed to work with the above.
Last edited by _alex_; May 20th, 2008 at 03:01 AM. Reason: Added Macbook Air fn key fix.
_alex_, great stuff. Certainly the line added to /etc/modprobe.d/options makes the fn key work (with the change to 0x0231 on my comp) however, I lose the touchpad after adding the line and rebooting. Unbelievable. I would love to find someone else with the International Keyboard Layout to see if the same is happening to them.
Anyway, the fix you've come up with speeds up the process of switching between having touchpad and fn compatibility considerably. And also means I don't have to use a recompiled kernel. Many thanks!
EDIT: I've appended the instructions provided to the Santa Rosa MacBook Pro wiki page, where the other Penryn revisions are. It's getting a bit crowded up there, so I'll have a go at putting together a Wiki page purely for the 4th gen MBP when I get some free time this evening.
Last edited by seaward; May 18th, 2008 at 02:57 PM.