Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] modprobe not loading config even when set as module
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
norange_
n00b
n00b


Joined: 18 Jul 2022
Posts: 22

PostPosted: Tue Jul 19, 2022 11:16 pm    Post subject: [SOLVED] modprobe not loading config even when set as module Reply with quote

Greetings,

I'm trying to alter the default behavior of my Apple driver based keyboard (Royal Kludge RK61) Fn keys to its traditional functions since the defaults are set as XF86's.

In /etc/modprobe.d I have a config file with the code below that has -rw-r--r-- permission:
Code:
options hid_apple fnmode=2

The problem is its not loaded at boot. Here's my Kernel config where HID_APPLE is a module.

Explicitly loading the module works tho...

Default:
Code:
KeyRelease event, serial 32, synthetic NO, window 0x1000001,
    root 0x567, subw 0x0, time 6857288, (1053,779), root:(1054,799),
    state 0x40, keycode 232 (keysym 0x1008ff03, XF86MonBrightnessDown), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False


After running modprobe -r hid_apple; modprobe hid_apple:
Code:
KeyRelease event, serial 32, synthetic NO, window 0xe00001,
    root 0x567, subw 0x0, time 7023805, (1054,614), root:(1055,634),
    state 0x40, keycode 67 (keysym 0xffbe, F1), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False


NOTE: I'm aware of other solutions such as: (1) a script that runs at boot (local.d, sysctl, and the likes), (2) command line (kernel, and grub), but what I primarily want to know is why modprobe is not loading the set config of hid_apple at boot.


Last edited by norange_ on Wed Jul 20, 2022 9:53 pm; edited 1 time in total
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1689

PostPosted: Wed Jul 20, 2022 1:05 pm    Post subject: Re: modprobe not loading set config Reply with quote

norange_ wrote:
I'm trying to alter the default behavior of my Apple driver based keyboard (Royal Kludge RK61) Fn keys to its traditional functions since the defaults are set as XF86's.

In /etc/modprobe.d I have a config file with the code below that has -rw-r--r-- permission:
Code:
options hid_apple fnmode=2


One last bit missing.. do you have an initramfs to start the system? If yes, how is it created?
Back to top
View user's profile Send private message
Goverp
Advocate
Advocate


Joined: 07 Mar 2007
Posts: 2014

PostPosted: Wed Jul 20, 2022 1:46 pm    Post subject: Re: modprobe not loading set config even when set as module Reply with quote

norange_ wrote:
...
In /etc/modprobe.d I have a config file with the code below

AFAIR, files in modprobe.d must have .conf as their filename extension.
_________________
Greybeard
Back to top
View user's profile Send private message
norange_
n00b
n00b


Joined: 18 Jul 2022
Posts: 22

PostPosted: Wed Jul 20, 2022 3:03 pm    Post subject: Re: modprobe not loading set config even when set as module Reply with quote

I do have it as that.
Goverp wrote:
AFAIR, files in modprobe.d must have .conf as their filename extension.


Last edited by norange_ on Wed Jul 20, 2022 3:07 pm; edited 1 time in total
Back to top
View user's profile Send private message
norange_
n00b
n00b


Joined: 18 Jul 2022
Posts: 22

PostPosted: Wed Jul 20, 2022 3:07 pm    Post subject: Re: modprobe not loading set config Reply with quote

I just ran dracut --lz4
grknight wrote:
One last bit missing.. do you have an initramfs to start the system? If yes, how is it created?
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1689

PostPosted: Wed Jul 20, 2022 3:17 pm    Post subject: Re: modprobe not loading set config Reply with quote

norange_ wrote:
I just ran dracut --lz4
grknight wrote:
One last bit missing.. do you have an initramfs to start the system? If yes, how is it created?


It is very likely dracut is loading the module thus not considering the modprobe.d file. Does lsinitrd command on the resulting initramfs show your modprobe file included? Or any modprobe file included?

Also, it is possible to check the contents of a Dracut initramfs compressed file with the -f switch.

A brief search of the dracut modules seems to indicate that the --hostonly option is required to include /etc/modprobe.d files for loading.

Alternatively, using rd.driver.blacklist=hid-apple on the kernel command-line or omit_drivers+=" hid-apple " in the dracut.conf before building will have dracut skip loading it.
Back to top
View user's profile Send private message
norange_
n00b
n00b


Joined: 18 Jul 2022
Posts: 22

PostPosted: Wed Jul 20, 2022 9:45 pm    Post subject: Re: modprobe not loading set config Reply with quote

Looks like this did the trick! Thank you very much!
grknight wrote:
--hostonly option is required to include /etc/modprobe.d files for loading.
Back to top
View user's profile Send private message
norange_
n00b
n00b


Joined: 18 Jul 2022
Posts: 22

PostPosted: Thu Jul 21, 2022 2:20 am    Post subject: Re: modprobe not loading set config Reply with quote

Technically this is not relevant to the topic, so my apologies...

Setting the --hostonly flag solved the modprobe issue, but now I'm getting a Permission denied message at boot before OpenRC:
Code:
//lib/dracut/hooks/pre-mount/10-resume.sh: line 17: /sys/power/resume: Permission denied

This only happens when I pass the mentioned flag when generating the initramfs. Omitting it doesn't show the message.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum