For anyone stumbling upon this thread using one of the newer MacBook Pros (2016 and later) which need the applespi driver to make the keyboard and touchpad work, here's how to make this work, as I couldn't find any other thread explaining this for newer Macs.
As far as I understand, the driver effectively replaces the role of the hid_apple module, so the files to edit are slightly different.
First, to verify that you are using the applespi driver and not the hid_apple driver, check what this command returns (using the terminal). It will tell you which driver you are currently using:
# If this returns "applespi", you are using applespi
ls /sys/module | grep -e applespi -e hid_apple
To test settings temporarily (settings will be reset after a reboot):
echo 2 | sudo tee -a /sys/module/applespi/parameters/fnmode
To apply the changes permanently (persist with reboots):
# Add the option for the fn key
echo options applespi fnmode=2 | sudo tee -a /etc/modprobe.d/applespi.conf
# Update initramfs bootfile
sudo update-initramfs -u -k all
# Reboot to test (optional)
For older MacBook Pros using the hid_apple module, use "hid_apple" rather than "applespi" in the commands.