Since upgrading to Fecora 41 my keyboard, which was working fine on Fedora 40, now types < (less than) instead of ` (backtick) and > (greater than) instead of ~ (tilde). I have searched all over the place and think I narrowed it down to the hid_apple kernel module is not being loaded, and instead hid_logitech_hidpp module is loaded.
Relevant dmesg output:
[ 5.259089] input: Logitech MX Keys Mac as /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4.2/1-4.2:1.2/0003:046D:C52B.0003/0003:046D:4092.0004/input/input15
[ 5.296475] logitech-hidpp-device 0003:046D:4092.0004: input,hidraw1: USB HID v1.11 Keyboard [Logitech MX Keys Mac] on usb-0000:00:14.0-4.2/input2:1
[ 6.606722] logitech-hidpp-device 0003:046D:4092.0004: HID++ 4.5 device connected.
[ 14.167389] device-mapper: thin: Data device (dm-2) discard unsupported: Disabling discard passdown.
uname -a
Linux quad 6.12.4-200.fc41.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Dec 9 20:01:35 UTC 2024 x86_64 GNU/Linux
Is there a way to make the OS use the hid_apple module rather than hid_logitech_hidpp?
What changed to make Fedora 41 choose a different driver for the keyboard?
I think the hypothesis that hid_apple was previously being loaded and establishing a proper keyboard mapping is incorrect. Fedora 40 boot logs also show the keyboard being identified as logitech-hidpp-device, so I have no evidence that the hid_apple kernel module was being used on Fedora 40.
However, the question persists. Why did the keyboard mapping change on Fedora 41?
When I boot into F40 the keyboard works as expected but in F41 it does not. They both boot from the same bootloader. I’m confused why keyboard behavior before the kernel is loaded would make a difference?
I’m in the middle of a deep dive into XKB keyboard mapping, and have managed to build a new mapping that fixes the issue, so that’s progress. Next time I get a chance to boot into F40 I’ll dump the XKB config to a file with xkbcomp $DISPLAY. That should at least show the mapping differences.
The output of xkbcomp $DISPLAY is the same on Fedora 40 as on Fedora 41, so the issue appears to be caused by something other than XKB configuration. I haven’t figured that out yet.
However, I can temporarily solve my issue with this xmodmap command:
xmodmap -e "keycode 94 = grave asciitilde"
Or more persistently with a custom XKB configuration:
It may be necessary to select the new input source in Keyboard Settings to persist it across sessions. I thought I had this working earlier, but it’s not working as expected today.
I believe I’m in the same situation as you: I use an MX Keys Mac on Fedora Workstation 41, kernel 6.12.7, Gnome 47.2, Mutter WM. And my tilde/backtick key, left of the “1” key, suddenly started producing “<”/“>”.
I applied the changes you suggested, added the layout to the Gnome Settings and, voilá, everything works fine, again!