You are not logged in.

#1 2025-02-25 04:45:58

utkarshverma
Member
Registered: 2022-12-30
Posts: 18

[SOLVED] modprobe.d config not applied

I have the following modprobe config for hid_apple device:

# /etc/modprobe.d/gmk67.conf
# The GMK67 keyboard presents itself as an Apple keyboard, who knew!
#
# This fixes the Fn keys as shown on the ArchWiki:
# https://wiki.archlinux.org/title/Apple_Keyboard#Function_keys_do_not_work
options hid_apple fnmode=2

What is weird is that modprobe picks the config up, but doesn't apply it at all.

$ modprobe -D hid_apple
insmod /lib/modules/6.13.2-arch1-1/kernel/drivers/hid/hid-apple.ko.zst fnmode=2

$ cat /sys/module/hid_apple/parameters/fnmode
3

What could be the issue here?

Last edited by utkarshverma (2025-04-22 09:25:59)

Offline

#2 2025-02-25 04:50:36

utkarshverma
Member
Registered: 2022-12-30
Posts: 18

Re: [SOLVED] modprobe.d config not applied

One quick note, I use a unified kernel image. The config is not applied at boot but works if I do:

$ sudo rmmod hid_apple && sudo modprobe hid_apple

Last edited by utkarshverma (2025-02-25 04:51:20)

Offline

#3 2025-02-25 10:05:34

seth
Member
Registered: 2012-09-03
Posts: 63,483

Re: [SOLVED] modprobe.d config not applied

Did you regenerate the UKI after editing the config, because otherwise, if the module is in the initramfs/uki, the config won't apply (because itself isn't there)

Offline

#4 2025-02-25 10:09:10

utkarshverma
Member
Registered: 2022-12-30
Posts: 18

Re: [SOLVED] modprobe.d config not applied

seth wrote:

Did you regenerate the UKI after editing the config, because otherwise, if the module is in the initramfs/uki, the config won't apply (because itself isn't there)

Yes, I regenerated my UKI using mkinitcpio and rebooted.

$ sudo mkinitcpio -p linux

Offline

#5 2025-02-25 16:09:34

seth
Member
Registered: 2012-09-03
Posts: 63,483

Re: [SOLVED] modprobe.d config not applied

As a work-a-round (and assuming you need the module during the boot) you could set the parameter via the commandline, https://wiki.archlinux.org/title/Unifie … mmand_line
"hid_apple.fnmode=2"

Offline

#6 2025-04-21 19:57:58

utkarshverma
Member
Registered: 2022-12-30
Posts: 18

Re: [SOLVED] modprobe.d config not applied

The issue was caused because my modprobe.d/gmk67.conf was symlinked and it could not be accessed during boot. So, I fixed this by adding a FILES+=(/etc/modprobe.d/*.conf) via a drop-in mkinitcpio.conf config. As mentioned in mkinitcpio manpage, add_file results in copying both the target and the link in case of symlinks.

Offline

#7 2025-04-21 20:39:07

seth
Member
Registered: 2012-09-03
Posts: 63,483

Re: [SOLVED] modprobe.d config not applied

\o/
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

Board footer

Powered by FluxBB