Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

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

2 Answers 2

up vote 2 down vote accepted

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.

share|improve this answer
    
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 '12 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 '12 at 20:26

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.

share|improve this answer
    
Ok, how can do this? I use grub btw –  krasilich Aug 14 '12 at 20:58
    
Edit the configuration file in /boot/grub/grub.conf and put it on the relevant kernel line. –  Ignacio Vazquez-Abrams Aug 14 '12 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 '12 at 21:06

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.