Need help troubleshooting why my kernel module params are not being used

Questions about hardware,drivers and peripherals
Forum rules
Before you post please read how to get help
Post Reply
jmt
Level 1
Level 1
Posts: 4
Joined: Thu May 17, 2018 10:20 am

Need help troubleshooting why my kernel module params are not being used

Post by jmt » Thu May 17, 2018 10:28 am

I have an apple magic keyboard and am setting up the hid_apple module to swap the options and command key. I had this working a few days ago, but for some reason now the hid_apple.conf settings are no longer being used. I have tried for a while to figure out what is going on, but I can't seem to understand why the kernel module params aren't being respected.

Here is my setup:

Code: Select all

# /etc/modprobe.d/hid_apple.conf
options hid_apple fnmode=2 iso_layout=0 swap_opt_cmd=1
It looks like those params are loaded:

Code: Select all

$ cat /sys/module/hid_apple/parameters/fnmode 
2
$ cat /sys/module/hid_apple/parameters/swap_opt_cmd
1
$ cat /sys/module/hid_apple/parameters/iso_layout
0
here is my modinfo output:

Code: Select all

$ modinfo hid_apple
filename:       /lib/modules/4.14.13-041413-generic/kernel/drivers/hid/hid-apple.ko
license:        GPL
srcversion:     CEF2CBE9D74ECF54E8B9C1B
alias:          hid:b0003g*v000005ACp0000030B
alias:          hid:b0003g*v000005ACp0000030A
alias:          hid:b0005g*v000005ACp0000023B
alias:          hid:b0005g*v000005ACp0000023A
alias:          hid:b0005g*v000005ACp00000239
alias:          hid:b0003g*v000005ACp00000274
alias:          hid:b0003g*v000005ACp00000273
alias:          hid:b0003g*v000005ACp00000272
alias:          hid:b0003g*v000005ACp00000292
alias:          hid:b0003g*v000005ACp00000291
alias:          hid:b0003g*v000005ACp00000290
alias:          hid:b0003g*v000005ACp0000025B
alias:          hid:b0003g*v000005ACp0000025A
alias:          hid:b0003g*v000005ACp00000259
alias:          hid:b0003g*v000005ACp00000264
alias:          hid:b0003g*v000005ACp00000263
alias:          hid:b0003g*v000005ACp00000262
alias:          hid:b0003g*v000005ACp00000254
alias:          hid:b0003g*v000005ACp00000253
alias:          hid:b0003g*v000005ACp00000252
alias:          hid:b0003g*v000005ACp0000024B
alias:          hid:b0003g*v000005ACp0000024A
alias:          hid:b0003g*v000005ACp00000249
alias:          hid:b0003g*v000005ACp0000024E
alias:          hid:b0003g*v000005ACp0000024D
alias:          hid:b0003g*v000005ACp0000024C
alias:          hid:b0003g*v000005ACp00000247
alias:          hid:b0003g*v000005ACp00000246
alias:          hid:b0003g*v000005ACp00000245
alias:          hid:b0003g*v000005ACp00000244
alias:          hid:b0003g*v000005ACp00000243
alias:          hid:b0003g*v000005ACp00000242
alias:          hid:b0003g*v000005ACp00000241
alias:          hid:b0003g*v000005ACp00000240
alias:          hid:b0003g*v000005ACp0000023F
alias:          hid:b0003g*v000005ACp00000238
alias:          hid:b0003g*v000005ACp00000237
alias:          hid:b0003g*v000005ACp00000236
alias:          hid:b0003g*v000005ACp00000232
alias:          hid:b0003g*v000005ACp00000231
alias:          hid:b0003g*v000005ACp00000230
alias:          hid:b0003g*v000005ACp00000225
alias:          hid:b0003g*v000005ACp00000224
alias:          hid:b0003g*v000005ACp00000223
alias:          hid:b0003g*v000005ACp00000267
alias:          hid:b0005g*v000005ACp0000022E
alias:          hid:b0005g*v000005ACp00000257
alias:          hid:b0005g*v000005ACp00000255
alias:          hid:b0005g*v000005ACp00000256
alias:          hid:b0005g*v000005ACp0000022D
alias:          hid:b0005g*v000005ACp0000022C
alias:          hid:b0003g*v000005ACp00000251
alias:          hid:b0003g*v000005ACp00000250
alias:          hid:b0003g*v000005ACp0000024F
alias:          hid:b0003g*v000005ACp0000022B
alias:          hid:b0003g*v000005ACp0000022A
alias:          hid:b0003g*v000005ACp00000229
alias:          hid:b0003g*v000005ACp00000222
alias:          hid:b0003g*v000005ACp00000221
alias:          hid:b0003g*v000005ACp00000220
alias:          hid:b0003g*v000005ACp0000021F
alias:          hid:b0003g*v000005ACp0000021E
alias:          hid:b0003g*v000005ACp0000021D
alias:          hid:b0003g*v000005ACp0000021C
alias:          hid:b0003g*v000005ACp0000021B
alias:          hid:b0003g*v000005ACp0000021A
alias:          hid:b0003g*v000005ACp00000219
alias:          hid:b0003g*v000005ACp00000218
alias:          hid:b0003g*v000005ACp00000217
alias:          hid:b0003g*v000005ACp00000216
alias:          hid:b0003g*v000005ACp00000215
alias:          hid:b0003g*v000005ACp00000214
alias:          hid:b0003g*v000005ACp0000020F
alias:          hid:b0003g*v000005ACp0000020E
alias:          hid:b0003g*v000005ACp00000304
depends:        hid
intree:         Y
name:           hid_apple
vermagic:       4.14.13-041413-generic SMP mod_unload 
parm:           fnmode:Mode of fn key on Apple keyboards (0 = disabled, [1] = fkeyslast, 2 = fkeysfirst) (uint)
parm:           iso_layout:Enable/Disable hardcoded ISO-layout of the keyboard. (0 = disabled, [1] = enabled) (uint)
parm:           swap_opt_cmd:Swap the Option ("Alt") and Command ("Flag") keys. (For people who want to keep Windows PC keyboard muscle memory. [0] = as-is, Mac layout. 1 = swapped, Windows layout.) (uint)

Any ideas what is going on? Any help would be greatly appreciated :)

Hoser Rob
Level 12
Level 12
Posts: 4213
Joined: Sat Dec 15, 2012 8:57 am

Re: Need help troubleshooting why my kernel module params are not being used

Post by Hoser Rob » Thu May 17, 2018 10:41 am

Did you update your kernel just before this happened? If you install a driver by compiling and building you have to reinstall it if you do a kernel update.

jmt
Level 1
Level 1
Posts: 4
Joined: Thu May 17, 2018 10:20 am

Re: Need help troubleshooting why my kernel module params are not being used

Post by jmt » Thu May 17, 2018 10:48 am

I don't believe I upgraded my kernal. But I didn't compile the kernel module, I am using the built in hid_apple module.

Will I have to compile it?

jmt
Level 1
Level 1
Posts: 4
Joined: Thu May 17, 2018 10:20 am

Re: Need help troubleshooting why my kernel module params are not being used

Post by jmt » Thu May 17, 2018 10:55 am

So this is strange.

The apple magic keyboard is connected through bluetooth normally and it just ran out of battery, so I plugged it in.

Now all the settings are working correctly.

jmt
Level 1
Level 1
Posts: 4
Joined: Thu May 17, 2018 10:20 am

Re: Need help troubleshooting why my kernel module params are not being used

Post by jmt » Fri May 18, 2018 9:36 am

Yeah so the hid_apple settings only take affect when the magic keyboard is plugged into my computer. Any Ideas why that might be? Once I disconnect the wire, the keyboard stays connected via bluetooth, but the settings aren't applied.

Post Reply

Return to “Hardware Support”