3

There is a kernel module hid_apple, and I need to set its option fnmode to 2.

So, I've created /etc/modprobe.d/hid_apple.conf file with such content

options hid_apple fnmode=2

Then run

dracut -f /boot/initramfs-$(uname -r).img $(uname -r)

As I understood now, the value in /sys/module/hid_apple/parameters/fnmode should be 2, but there is still default value (1). It still there even after reboot.

What is wrong, and how could I fix it?

2
  • Have you tried to change the value through sysfs? I've seen examples like echo 2 >/sys/xxx
    – sawdust
    Aug 14, 2012 at 20:56
  • Yes, it works, but only until reboot. I need permanent change
    – krasilich
    Aug 14, 2012 at 20:59

2 Answers 2

4

The problem is that hid_apple is not compiled as a module - the Fedora kernel has it builtin to the main kernel image.

So you can't use modprobe.d to change the options as that only applies to modules.

What you will need to do is to edit /etc/grub2.cfg and find the which starts with linux... for the kernel you are using and add hid_apple.fnmode=2 to the end of the line.

2
  • Ok, it works. But what if kernel will be updated? Should I add this options every time kernel update is installed or maybe there is ability to set this permanently for all kernel updates? Thanks
    – krasilich
    Aug 15, 2012 at 9:38
  • No - grubby (the tool that updates grub2.cfg when kernels are added or removed should copy the options over.
    – TomH
    Aug 16, 2012 at 20:26
3

That config file isn't available in the initrd. You'll need to pass it as a kernel option at boot, i.e. hid_apple.fnmode=2.

3
  • Ok, how can do this? I use grub btw
    – krasilich
    Aug 14, 2012 at 20:58
  • Edit the configuration file in /boot/grub/grub.conf and put it on the relevant kernel line. Aug 14, 2012 at 21:00
  • I do not have such file. I do have /boot/grub2/grub.cfg instead but can't find there anything about kernel boot options unfortunately
    – krasilich
    Aug 14, 2012 at 21:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .