Your message dated Mon, 24 Apr 2023 00:20:29 +0200
with message-id <ef007502-f01c-7a4c-c711-180d9fa84...@debian.org>
and subject line Re: Bug#1034766: systemd-udevd[…]: Failed to call 
EVIOCSKEYCODE with scan code 0xc022d/0xc022e, and key code 103/108: Invalid 
argument
has caused the Debian Bug report #1034766,
regarding systemd-udevd[…]: Failed to call EVIOCSKEYCODE with scan code 
0xc022d/0xc022e, and key code 103/108: Invalid argument
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
1034766: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1034766
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: systemd
Version: 247.3-7+deb11u2
Control: affects -1 + udev
In the output of journalctl -b we see
…
Apr 23 22:30:59 AnonymizedMachineName kernel: usb 1-10: new low-speed USB 
device number 4 using xhci_hcd
Apr 23 22:30:59 AnonymizedMachineName kernel: sr 5:0:0:0: Attached scsi CD-ROM 
sr1
Apr 23 22:30:59 AnonymizedMachineName kernel: usb 1-10: New USB device found, 
idVendor=045e, idProduct=00db, bcdDevice= 1.73
Apr 23 22:30:59 AnonymizedMachineName kernel: usb 1-10: New USB device strings: 
Mfr=1, Product=2, SerialNumber=0
Apr 23 22:30:59 AnonymizedMachineName kernel: usb 1-10: Product: Natural® 
Ergonomic Keyboard 4000
Apr 23 22:30:59 AnonymizedMachineName kernel: usb 1-10: Manufacturer: Microsoft
Apr 23 22:30:59 AnonymizedMachineName kernel: input: Microsoft Natural® 
Ergonomic Keyboard 4000 as 
/devices/pci0000:00/0000:00:14.0/usb1/1-10/1-10:1.0/0003:045E:00DB.0003/input/input1
Apr 23 22:30:59 AnonymizedMachineName kernel: microsoft 0003:045E:00DB.0003: 
input,hidraw2: USB HID v1.11 Keyboard [Microsoft Natural® Ergonomic Keyboard 
4000] on usb-0000:00:14.0-10/input0
Apr 23 22:30:59 AnonymizedMachineName kernel: input: Microsoft Natural® 
Ergonomic Keyboard 4000 as 
/devices/pci0000:00/0000:00:14.0/usb1/1-10/1-10:1.1/0003:045E:00DB.0004/input/input2
Apr 23 22:30:59 AnonymizedMachineName kernel: usb 1-11: new high-speed USB 
device number 5 using xhci_hcd
Apr 23 22:30:59 AnonymizedMachineName kernel: microsoft 0003:045E:00DB.0004: 
input,hidraw3: USB HID v1.11 Device [Microsoft Natural® Ergonomic Keyboard 
4000] on usb-0000:00:14.0-10/input1
…
Apr 23 22:30:59 AnonymizedMachineName systemd[1]: Finished Flush Journal to 
Persistent Storage.
Apr 23 22:30:59 AnonymizedMachineName kernel: input: USB2.0 FHD UVC WebCam: 
USB2.0 F as 
/devices/pci0000:00/0000:00:14.0/usb1/1-11/1-11.4/1-11.4.2/1-11.4.2:1.0/input/input8
Apr 23 22:30:59 AnonymizedMachineName kernel: uvcvideo: Found UVC 1.50 device 
USB2.0 FHD UVC WebCam (04f2:b612)
Apr 23 22:30:59 AnonymizedMachineName systemd-udevd[408]: ethtool: 
autonegotiation is unset or enabled, the speed and duplex are not writable.
Apr 23 22:30:59 AnonymizedMachineName kernel: input: USB2.0 FHD UVC WebCam: IR 
Camer as 
/devices/pci0000:00/0000:00:14.0/usb1/1-11/1-11.4/1-11.4.2/1-11.4.2:1.2/input/input9
Apr 23 22:30:59 AnonymizedMachineName kernel: usbcore: registered new interface 
driver uvcvideo
Apr 23 22:30:59 AnonymizedMachineName kernel: USB Video Class driver (1.1.1)
Apr 23 22:30:59 AnonymizedMachineName systemd-udevd[397]: event1: Failed to 
call EVIOCSKEYCODE with scan code 0xc022d, and key code 103: Invalid argument
Apr 23 22:30:59 AnonymizedMachineName systemd-udevd[397]: event1: Failed to 
call EVIOCSKEYCODE with scan code 0xc022e, and key code 108: Invalid argument
The keyboard “Microsoft® Natural® Ergonomic Keyboard 4000 v1.0” is attached to 
the machine in question. As for the scan codes, we indeed see
###########################################################
# Microsoft
###########################################################
# Microsoft Natural Ergonomic Keyboard 4000
evdev:input:b0003v045Ep00DB*
KEYBOARD_KEY_c022d=up # zoomin
KEYBOARD_KEY_c022e=down # zoomout
in /lib/udev/hwdb.d/60-keyboard.hwdb .
In plain English, what do the two messages „systemd-udevd[…]: Failed to call 
EVIOCSKEYCODE with scan code …, and key code …: Invalid argument“ tell us, and 
how should this worry us? (By the way, the way I zoom in or out using keyboard, 
say, in Mozilla Firefox, is via Ctrl++ and Ctrl+-. The middle slide key of the 
keyboard moves the contents of the window or the cursor up and down.)

--- End Message ---
--- Begin Message ---
Am 23.04.23 um 23:26 schrieb Al Ma:

Apr 23 22:30:59 AnonymizedMachineName systemd-udevd[397]: event1: Failed to call EVIOCSKEYCODE with scan code 0xc022d, and key code 103: Invalid argument

Apr 23 22:30:59 AnonymizedMachineName systemd-udevd[397]: event1: Failed to call EVIOCSKEYCODE with scan code 0xc022e, and key code 108: Invalid argument

Quoting https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1890186/comments/22 from [1]
"""


Ok here's my understanding of this:

Most keyboards report a single usb device 'interface' for the keyboard (some have separate interface(s) for builtin mice or other non-keyboard stuff). However, your keyboard reports two separate 'interfaces' for your single keyboard. Unfortunately, both of the interfaces it reports use the exact same vendor and product id, so there's no way for systemd to tell which is which, from the bus/vendor/product info.

The setting in the hwdb matches specifically on this bus/vendor/product id info (the b0003v045Ep00DB string):
evdev:input:b0003v045Ep00DB*

This applies the scancode remapping to *both* of the interfaces that your keyboard reports. However, only one of the interfaces actually supports the remapped scancodes, so when systemd attempts to tell the kernel to map the specific scancode to the assigned keycode, the kernel rejects it, which results in the warning messages you saw in the logs.

However these warning log messages are only produced for the second interface which doesn't actually support or provide the scancodes in question. So, this logged warning is completely harmless and you can ignore it.

It's possible that we might be able to figure out how to finesse systemd hwdb config to get around the fact that your hardware keyboard is essentially broken (because it reports two separate interfaces with identical vendor/product ids but with different operation and behavior). However since these logged errors are completely harmless, and any 'fix' could possibly (accidentally) cause the mapped keys to *not* function, I don't think it's worth it to bother fixing this.

Therefore I'm going to close this as wontfix, since I believe this is a hardware problem that does not have any actual impact on the system's operation, besides logging a harmless warning message.
"""

Doing the same in Debian.



[1] https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1890186

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


--- End Message ---

Reply via email to