Closed Hubro closed 4 years ago
You are still using the builtin one. You will see all options under /sys/module/hid_apple/parameters
if the patched one is being used.
You can check dkms status
and see if the module is correctly compiled.
Yes, @Aetf is right, you don't have patched version running. The options you have (fnmode
, iso_layout
, swap_opt_cmd
) are from the original version. Patched version adds additional ones like swap_fn_leftctrl
.
So, try to find out why you don't have new version of kernel module loaded.
You are still using the builtin one. You will see all options under
/sys/module/hid_apple/parameters
if the patched one is being used.You can check
dkms status
and see if the module is correctly compiled.
Thanks for the response. I can't seem to get dkms status
to produce any output:
$ dkms status
$ sudo dkms status
$ sudo dkms status hid-apple
$ sudo dkms status hid-apple-patched
Do you have dkms
package correctly installed? Your kernel isn't the latest one. Probably you should do a full system upgrade first.
How did you install hid-apple-patched-git-dkms
? Did it run successfully?
There should be dkms hook triggered by installing the package, and you should see outputs like by the end of the installation.
==> dkms install hid-apple-patched/20170406.61dce7d -k 5.2.1-arch1-1-ARCH
Maybe you can try reinstall these two packages. Also see if there's anything in the Archlinux wiki will help.
@Aetf Thanks, I figured it out. When I installed the package from AUR, it printed a line saying "missing kernel headers". I installed linux-headers
and the DKMS hook immediately installed hid-apple-patched.
After rebooting, my Magic Keyboard is now handled by hid-generic... All of the improvements of the non-patched hid_apple disappeared.
Manually activating hid-apple
by running sudo modprobe hid_apple
, I now see all parameters available:
$ ls /sys/module/hid_apple/parameters/
ejectcd_as_delete fnmode iso_layout rightalt_as_rightctrl swap_fn_leftctrl swap_opt_cmd
But none of the parameters affect my keyboard in any way. Is there any way to force hid_apple
to handle my keyboard?
Here's my dmesg output now, when connecting the keyboard:
[ +8.709086] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[ +0.000004] Bluetooth: HIDP socket layer initialized
[ +1.359279] hid-generic 0005:004C:0267.0003: unknown main item tag 0x0
[ +0.000180] input: Magic Keyboard as /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.0/bluetooth/hci0/hci0:2/0005:004C:0267.0003/input/input31
[ +0.000357] input: Magic Keyboard as /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.0/bluetooth/hci0/hci0:2/0005:004C:0267.0003/input/input32
[ +0.000140] hid-generic 0005:004C:0267.0003: input,hidraw2: BLUETOOTH HID v1.00 Keyboard [Magic Keyboard] on 9c:b6:d0:e7:e9:4c
I did a full system update while I was at it.
$ uname -a
Linux carbon 5.2.1-arch1-1-ARCH #1 SMP PREEMPT Sun Jul 14 14:52:52 UTC 2019 x86_64 GNU/Linux
$ pacman -Qs apple
local/hid-apple-patched-git-dkms 20171118.c92cc98-1
Hmm, I'm not an expert regarding this, but seems you can at least manually rebind the keyboard to use hid-apple like this. And see this: #48
@Aetf Disappointment... :(
I could unbind successfully from hid_generic, but I couldn't bind to hid_apple, I just get an error:
$ echo -n 0005:004C:0267.0003 | sudo tee /sys/bus/hid/drivers/apple/bind
0005:004C:0267.0003tee: /sys/bus/hid/drivers/apple/bind: No such device
I also attempted the X config from issue #48, but it didn't affect my keyboard in any way, it still uses hid_generic.
So doesn't the patched driver support Bluetooth at all? Shouldn't it support it, considering the built-in hid_apple supports Bluetooth?
You are connecting over Bluetooth. This currently doesn't work. You can use a USB cable.
@Hubro now it should support Bluetooth (see #48, thanks to @almson with their PR #63). Please check it with your device.
@Aetf as a maintainer of https://aur.archlinux.org/packages/hid-apple-patched-git-dkms/ could you please check current version and update AUR?
Thank you @Aetf.
This issue will be closed as solved soon if @Hubro is not going to provide any additional feedback.
Thank you @Aetf.
This issue will be closed as solved soon if @Hubro is not going to provide any additional feedback.
Well it seems the conclusion is that this patched driver doesn't support Bluetooth, so I'm not sure there's any value in keeping this issue open :) Unless anyone intends to implement it.
@Hubro The patched driver does support Bluetooth now.
Well it seems the conclusion is that this patched driver doesn't support Bluetooth, so I'm not sure there's any value in keeping this issue open :) Unless anyone intends to implement it.
It supports Bluetooth now. That's the point of bumping this ticket (reread my recent messages here). Please check the new version and if everything's fine the issue will be closed as solved.
@almson @free5lot My bad, I'll give it a try as soon as I have time.
@free5lot Had some time to test this today. I installed hid-apple-patched-git-dkms from AUR on kernel 5.6.3 and everything seems to work perfectly out of the box :) Command and alt is swapped, Ctrl and Fn is swapped, all F keys are F keys by default and the media keys work as expected by using the Ctrl key.
Awesome job!
EDIT:
... and everything seems to work perfectly out of the box ...
Except one small thing, the key to the right of my shift key is swapped with the key above my tab key. On my keyboard layout that means the < key and | keys are swapped. That's not relevant to this patch though.
@Hubro nice it works for you.
Except one small thing, the key to the right of my shift key is swapped with the key above my tab key. On my keyboard layout that means the < key and | keys are swapped. That's not relevant to this patch though.
Try to change iso_layout
option like that:
echo 1 | sudo tee /sys/module/hid_apple/parameters/iso_layout
or
echo 0 | sudo tee /sys/module/hid_apple/parameters/iso_layout
If it fixes your issue you will be able to set this setting permanently in config.
@Hubro nice it works for you.
Except one small thing, the key to the right of my shift key is swapped with the key above my tab key. On my keyboard layout that means the < key and | keys are swapped. That's not relevant to this patch though.
Try to change
iso_layout
option like that:echo 1 | sudo tee /sys/module/hid_apple/parameters/iso_layout
orecho 0 | sudo tee /sys/module/hid_apple/parameters/iso_layout
If it fixes your issue you will be able to set this setting permanently in config.
That doesn't make any difference unfortunately :frowning_face:
I'm now having this problem as well. The module is indeed installed, the kernel has loaded it - all the options are there.
It's magically fixed by sudo modprobe -r hid_apple; sudo modprobe hid_apple
.
usb-devices
shows that the keyboard uses usbhid
. I don't know whether it's relevant or not - none of the values change after the above command.
T: Bus=01 Lev=05 Prnt=12 Port=02 Cnt=01 Dev#= 14 Spd=12 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=05ac ProdID=026c Rev=08.52
S: Manufacturer=Apple Inc.
S: Product=Magic Keyboard with Numeric Keypad
S: SerialNumber=F0T85060145HTCYA1
C: #Ifs= 2 Cfg#= 1 Atr=a0 MxPwr=500mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=00 Driver=usbhid
E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=8ms
I: If#= 1 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=01 Driver=usbhid
E: Ad=82(I) Atr=03(Int.) MxPS= 16 Ivl=8ms
dkms status
shows:
Deprecated feature: REMAKE_INITRD (/var/lib/dkms/hid-apple/1.0/source/dkms.conf)
Deprecated feature: REMAKE_INITRD (/var/lib/dkms/hid-apple/1.0/source/dkms.conf)
Deprecated feature: REMAKE_INITRD (/var/lib/dkms/hid-apple/1.0/source/dkms.conf)
hid-apple/1.0, 6.5.0-21-generic, x86_64: installed
hid-apple/1.0, 6.5.0-25-generic, x86_64: installed
hid-apple/1.0, 6.5.0-26-generic, x86_64: installed
I've installed this patch via AUR (
hid-apple-patched-git-dkms
) (CC @Aetf)That included this config file (
/etc/depmod.d/hid-apple-patched.conf
):As well as (
/etc/modprobe.d/hid_apple_pclayout.conf
):I ran
sudo depmod -a
andsudo mkinitcpio -p linux
and rebooted.Immediately the command and opt keys were swapped, and my F keys worked without having to hold fn, which is great. All the other options were ignored though, my fn key and control keys are not swapped. I can't set these settings under
/proc
, I just get access denied, even though I'm root.That makes sense because apparently not all options are available:
Is this because my system is using the built-in version of hid-apple rather than the patched one? How can I know which one is being used?
(I'm using the wireless magic keyboard via Bluetooth, but I'm guessing that's not relevant.)
Here's the relevant lines from dmesg:
Some system and version info: