benanzo
May 6th, 2008, 12:21 PM
Unfortunately the Apple IR remote doesn't work out-of-the-box in Hardy on my MacBook 1,1 so I went about trying to figure out why. I came across this (http://ubuntuforums.org/showthread.php?t=607797) thread which addresses the problem but requires some steps unnecessary for the Hardy kernel, which can lead to some complications down the road. I actually found a really simple solution in the bug report on launchpad for this problem here (https://bugs.launchpad.net/ubuntu/+source/linux-ubuntu-modules-2.6.24/+bug/157919). Just to simplify things, I'll give the quick fix here.
Basically the problem is just that the appleir module is loaded too late in the initial modprobe process. It needs to be loaded before applesmc and usbhid. In order to get it to load before those other two we have to change the order a bit.
Open a terminal (Applications -> Accessories -> Terminal) and do:
$ sudo nano /etc/modprobe.d/blacklist
Scroll to the bottom of that file and add the following:
# To fix the IR receiver we have to load appleir _before_ these two (see /etc/modules)
blacklist applesmc
blacklist usbhid
Press ctrl-o (to save) then ctrl-x to exit nano.
The only important part is the two blacklist lines. The other is just there to remind you why you did this in a few months when you're wondering why usbhid is blacklisted.
Now we're going to change the order in which these modules load. With your terminal still open do this:
$ sudo nano /etc/modules
Add the following lines to the bottom of this file:
# Apple modules need to be loaded in this order for the IR receiver to work
appleir
usbhid
applesmc
Press ctrl-o then ctrl-x again to save and exit nano.
Reboot.
You can try unloading then reloading these modules in the correct order by hand but you might have a hard time controlling your machine once usbhid is unloaded! I certainly did. I couldn't get it to reload (no keyboard, duh) so I had to reboot anyway.
NOTE: This process *may* cause the numlock to stay on after resuming from suspend forcing you to reboot in order to restore normal operation. I can't find a workaround for this (putting the load order in /etc/rc.local instead of doing the blacklist/modules thing doesn't seem to fix it.) If you have problems please report it on the launchpad bug mentioned above.
Good Luck!
Basically the problem is just that the appleir module is loaded too late in the initial modprobe process. It needs to be loaded before applesmc and usbhid. In order to get it to load before those other two we have to change the order a bit.
Open a terminal (Applications -> Accessories -> Terminal) and do:
$ sudo nano /etc/modprobe.d/blacklist
Scroll to the bottom of that file and add the following:
# To fix the IR receiver we have to load appleir _before_ these two (see /etc/modules)
blacklist applesmc
blacklist usbhid
Press ctrl-o (to save) then ctrl-x to exit nano.
The only important part is the two blacklist lines. The other is just there to remind you why you did this in a few months when you're wondering why usbhid is blacklisted.
Now we're going to change the order in which these modules load. With your terminal still open do this:
$ sudo nano /etc/modules
Add the following lines to the bottom of this file:
# Apple modules need to be loaded in this order for the IR receiver to work
appleir
usbhid
applesmc
Press ctrl-o then ctrl-x again to save and exit nano.
Reboot.
You can try unloading then reloading these modules in the correct order by hand but you might have a hard time controlling your machine once usbhid is unloaded! I certainly did. I couldn't get it to reload (no keyboard, duh) so I had to reboot anyway.
NOTE: This process *may* cause the numlock to stay on after resuming from suspend forcing you to reboot in order to restore normal operation. I can't find a workaround for this (putting the load order in /etc/rc.local instead of doing the blacklist/modules thing doesn't seem to fix it.) If you have problems please report it on the launchpad bug mentioned above.
Good Luck!