Failed to call EVIOCSKEYCODE with scan code 0xc022d, and key code 103: Invalid argument

Bug #1890186 reported by Md Ayquassar
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Invalid
Undecided
Unassigned
systemd (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

I run an up-to-date Ubuntu 20.04.1 LTS "focal" with kernel 5.4.0-42-generic on Dell Latitude E6440. Upon examining the output of journalctl -b, I see this:

Aug 03 19:22:15 pseudonymizedHostname systemd[1]: Condition check resulted in Show Plymouth Boot Screen being skipped.
Aug 03 19:22:15 pseudonymizedHostname systemd[1]: Condition check resulted in Forward Password Requests to Plymouth Directory Watch being skipped.
Aug 03 19:22:15 pseudonymizedHostname systemd[1]: Condition check resulted in Set Up Additional Binary Formats being skipped.
Aug 03 19:22:15 pseudonymizedHostname systemd[1]: Condition check resulted in File System Check on Root Device being skipped.
Aug 03 19:22:15 pseudonymizedHostname systemd[1]: Condition check resulted in Rebuild Hardware Database being skipped.
Aug 03 19:22:15 pseudonymizedHostname systemd[1]: Condition check resulted in Platform Persistent Storage Archival being skipped.
Aug 03 19:22:15 pseudonymizedHostname kernel: [drm] radeon: dpm initialized
Aug 03 19:22:15 pseudonymizedHostname kernel: [drm] GART: num cpu pages 524288, num gpu pages 524288
Aug 03 19:22:15 pseudonymizedHostname kernel: dell_laptop: Using dell-rbtn acpi driver for receiving events
Aug 03 19:22:15 pseudonymizedHostname systemd-udevd[385]: event8: Failed to call EVIOCSKEYCODE with scan code 0xc022d, and key code 103: Invalid argument
Aug 03 19:22:15 pseudonymizedHostname systemd-udevd[385]: event8: Failed to call EVIOCSKEYCODE with scan code 0xc022e, and key code 108: Invalid argument

"Invalid argument" means that something goes wrong there, and I don't know what it is.
On my laptop, event8 seems to be keyboard-related:

$ sudo cat /proc/bus/input/devices | grep -C 5 event8
I: Bus=0003 Vendor=045e Product=00db Version=0111
N: Name="Microsoft Natural® Ergonomic Keyboard 4000"
P: Phys=usb-0000:00:14.0-13.1/input0
S: Sysfs=/devices/pci0000:00/0000:00:14.0/usb3/3-13/3-13.1/3-13.1:1.0/0003:045E:00DB.0002/input/input9
U: Uniq=
H: Handlers=sysrq kbd event8 leds
B: PROP=0
B: EV=120013
B: KEY=1000000000007 ff800000000007ff febeffdff3cfffff fffffffffffffffe
B: MSC=10
B: LED=107

The issue report https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1754921 is probably related but marked as a duplicate of a no longer existing issue report (#1750855).

The report https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1597415 describes a similar issue for older kernels; the differences pertain to error message, error code, input..., and, opposed to #19 there, I have no Windows partitions (except /boot/efi vfat) in /etc/fstab; mine is not a dual-boot machine.

Tags: focal
Revision history for this message
Dan Streetman (ddstreet) wrote :

this seems to be the same issue as bug 1389201, it's even the same kbd in that bug. note while the scancodes match, the keycodes in the error messages from that bug are different because in 2018 the hwdb mapping was changed to set the scancodes from 'zoomin/zoomout' to the simpler 'up/down', and those map to the keycodes you are seeing, i.e.:

$ grep -E 'KEY_(UP|DOWN)' /usr/include/linux/input-event-codes.h
#define KEY_UP 103
#define KEY_DOWN 108

the original reporter in that bug indicated it 'fixed itself' though from your report it seems it might not have. can you edit the hwdb file as mentioned in bug 1389201 comment 6 and see if that removes the warning messages? you should also check if the 'zoom in/out' keys work, or if you dont care about those keys, then you can just ignore the error messages.

Revision history for this message
Dan Streetman (ddstreet) wrote :

it looks like the specific usb mapping adjustment for this kbd never got finished in bug 1523675 so maybe that's needed to fix this

Revision history for this message
Md Ayquassar (mdayquassar) wrote :

@ddstreet : Will do. Before commenting out

# Microsoft Natural Ergonomic Keyboard 4000
evdev:input:b0003v045Ep00DB*
 KEYBOARD_KEY_c022d=up # zoomin
 KEYBOARD_KEY_c022e=down

from /lib/udev/hwdb.d/60-keyboard.hwdb , the output of `sudo evtest` is this:

No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0: Lid Switch
/dev/input/event1: Power Button
/dev/input/event2: Sleep Button
/dev/input/event3: Power Button
/dev/input/event4: AT Translated Set 2 keyboard
/dev/input/event5: USB Optical Mouse
/dev/input/event6: AlpsPS/2 ALPS DualPoint Stick
/dev/input/event7: AlpsPS/2 ALPS DualPoint TouchPad
/dev/input/event8: Microsoft Natural® Ergonomic Keyboard 4000
/dev/input/event9: Microsoft Natural® Ergonomic Keyboard 4000
/dev/input/event10: ST LIS3LV02DL Accelerometer
/dev/input/event11: HDA Intel PCH Dock Mic
/dev/input/event12: HDA Intel PCH Dock Line Out
/dev/input/event13: HDA Intel PCH Front Headphone
/dev/input/event14: Laptop_Integrated_Webcam_HD: In
/dev/input/event15: Dell WMI hotkeys
/dev/input/event16: Video Bus
/dev/input/event17: Video Bus
/dev/input/event18: HDA Intel HDMI HDMI/DP,pcm=3
/dev/input/event19: HDA Intel HDMI HDMI/DP,pcm=7
/dev/input/event20: HDA Intel HDMI HDMI/DP,pcm=8
/dev/input/event21: HDA Intel HDMI HDMI/DP,pcm=9
/dev/input/event22: HDA Intel HDMI HDMI/DP,pcm=10
Select the device event number [0-22]:

1) What would I choose after editing the file and rebooting? 8 or 9 or something else?

2) How are they Zoom keys supposed to work under Linux? The up/down slider scrolls for me so far. Does a combination of modifier keys (Alt, Shift, Ctrl, AltGr) have to be pressed? Should the Fn key light be on or off?

Revision history for this message
Md Ayquassar (mdayquassar) wrote :

I commented the lines out as shown here:

$ grep -A 4 Ergonomic /lib/udev/hwdb.d/60-keyboard.hwdb
# # Microsoft Natural Ergonomic Keyboard 4000
# evdev:input:b0003v045Ep00DB*
# KEYBOARD_KEY_c022d=up # zoomin
# KEYBOARD_KEY_c022e=down # zoomout

Then, I rebooted and ran sudo journalctl -b. I still see

Aug 04 00:28:28 pseudonymizedHostname systemd-udevd[400]: event8: Failed to call EVIOCSKEYCODE with scan code 0xc022d, and key code 103: Invalid argument
Aug 04 00:28:28 pseudonymizedHostname systemd-udevd[400]: event8: Failed to call EVIOCSKEYCODE with scan code 0xc022e, and key code 108: Invalid argument

there. Running `sudo evest` and choosing 8 leads to this:

Testing ... (interrupt to exit)
Event: time 1596494194.967361, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70028
Event: time 1596494194.967361, type 1 (EV_KEY), code 28 (KEY_ENTER), value 0
Event: time 1596494194.967361, -------------- SYN_REPORT ------------
^[[A^[[B

The output ^[[A comes from sliding up, the output ^[[B from sliding down. So, what next? Is it possible to zoom in/out with the slider? How?

Revision history for this message
Md Ayquassar (mdayquassar) wrote :

@ddstreet Similar stuff happens when I choose device 9 instead of device 8 and the lines /lib/udev/hwdb.d/60-keyboard.hwdb are still commented out.

Revision history for this message
Md Ayquassar (mdayquassar) wrote :

@ddstreet However, if in sudo evtest I choose device 9 instead of device 8 and the lines /lib/udev/hwdb.d/60-keyboard.hwdb are in their original state (i.e., active), I get this when pressing the slider up then down:

Event: time 1596495480.180989, type 4 (EV_MSC), code 4 (MSC_SCAN), value c022d
Event: time 1596495480.180989, type 1 (EV_KEY), code 103 (KEY_UP), value 1
Event: time 1596495480.180989, -------------- SYN_REPORT ------------
^[[AEvent: time 1596495480.439165, type 1 (EV_KEY), code 103 (KEY_UP), value 2
Event: time 1596495480.439165, -------------- SYN_REPORT ------------
Event: time 1596495480.439165, type 4 (EV_MSC), code 4 (MSC_SCAN), value c022d
Event: time 1596495480.439165, type 1 (EV_KEY), code 103 (KEY_UP), value 0
Event: time 1596495480.439165, -------------- SYN_REPORT ------------
Event: time 1596495481.621007, type 4 (EV_MSC), code 4 (MSC_SCAN), value c022e
Event: time 1596495481.621007, type 1 (EV_KEY), code 108 (KEY_DOWN), value 1
Event: time 1596495481.621007, -------------- SYN_REPORT ------------
^[[BEvent: time 1596495481.844992, type 4 (EV_MSC), code 4 (MSC_SCAN), value c022e
Event: time 1596495481.844992, type 1 (EV_KEY), code 108 (KEY_DOWN), value 0
Event: time 1596495481.844992, -------------- SYN_REPORT ------------

Revision history for this message
Dan Streetman (ddstreet) wrote :

> the lines /lib/udev/hwdb.d/60-keyboard.hwdb are still commented out

i think you also have to recreate the binary db after editing the file, with:
$ sudo systemd-hwdb update

and then reboot.

I think this has something to do with the keyboard providing multiple event interfaces, can you gather its udev info with:

$ sudo udevadm info /dev/input/event8
$ sudo udevadm info /dev/input/event9

and also event info with:

$ sudo evemu-describe /dev/input/event8
$ sudo evemu-describe /dev/input/event9

Revision history for this message
Md Ayquassar (mdayquassar) wrote :
Download full text (5.2 KiB)

With the original file /lib/udev/hwdb.d/60-keyboard.hwdb :

# udevadm info /dev/input/event8
P: /devices/platform/lis3lv02d/input/input9/event8
N: input/event8
L: 0
S: input/by-path/platform-lis3lv02d-event
E: DEVPATH=/devices/platform/lis3lv02d/input/input9/event8
E: DEVNAME=/dev/input/event8
E: MAJOR=13
E: MINOR=72
E: SUBSYSTEM=input
E: USEC_INITIALIZED=4296811
E: ID_INPUT=1
E: ID_INPUT_ACCELEROMETER=1
E: ID_PATH=platform-lis3lv02d
E: ID_PATH_TAG=platform-lis3lv02d
E: IIO_SENSOR_PROXY_TYPE=input-accel
E: SYSTEMD_WANTS=iio-sensor-proxy.service
E: LIBINPUT_DEVICE_GROUP=19/0/0:lis3lv02d
E: DEVLINKS=/dev/input/by-path/platform-lis3lv02d-event
E: TAGS=:systemd:

# udevadm info /dev/input/event9
P: /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:4f/LNXVIDEO:00/input/input10/event9
N: input/event9
L: 0
E: DEVPATH=/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:4f/LNXVIDEO:00/input/input10/event9
E: DEVNAME=/dev/input/event9
E: MAJOR=13
E: MINOR=73
E: SUBSYSTEM=input
E: USEC_INITIALIZED=4230143
E: ID_INPUT=1
E: ID_INPUT_KEY=1
E: ID_PATH=acpi-LNXVIDEO:00
E: ID_PATH_TAG=acpi-LNXVIDEO_00
E: XKBMODEL=pc105
E: XKBLAYOUT=de
E: BACKSPACE=guess
E: LIBINPUT_DEVICE_GROUP=19/0/6:LNXVIDEO/video
E: TAGS=:power-switch:

# evemu-describe /dev/input/event8
# EVEMU 1.3
# Kernel: 5.4.0-42-generic
# DMI: dmi:bvnDellInc.:bvrA21:bd02/01/2018:svnDellInc.:pnLatitudeE6440:pvr00:rvnDellInc.:rn02P3T1:rvrA00:cvnDellInc.:ct9:cvr:
# Input device name: "ST LIS3LV02DL Accelerometer"
# Input device ID: bus 0x19 vendor 0000 product 0000 version 0000
# Supported events:
# Event type 0 (EV_SYN)
# Event code 0 (SYN_REPORT)
# Event code 1 (SYN_CONFIG)
# Event code 2 (SYN_MT_REPORT)
# Event code 3 (SYN_DROPPED)
# Event code 4 ((null))
# Event code 5 ((null))
# Event code 6 ((null))
# Event code 7 ((null))
# Event code 8 ((null))
# Event code 9 ((null))
# Event code 10 ((null))
# Event code 11 ((null))
# Event code 12 ((null))
# Event code 13 ((null))
# Event code 14 ((null))
# Event code 15 (SYN_MAX)
# Event type 3 (EV_ABS)
# Event code 0 (ABS_X)
# Value -172
# Min -2304
# Max 2304
# Fuzz 18
# Flat 18
# Resolution 0
# Event code 1 (ABS_Y)
# Value -10
# Min -2304
# Max 2304
# Fuzz 18
# Flat 18
# Resolution 0
# Event code 2 (ABS_Z)
# Value 1178
# Min -2304
# Max 2304
# Fuzz 18
# Flat 18
# Resolution 0
# Properties:
N: ST LIS3LV02DL Accelerometer
I: 0019 0000 0000 0000
P: 00 00 00 00 00 00 00 00
B: 00 0b 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 02 00 00 00 00 00 00 00 00
B: 03 07 00 00 00 00 00 00 00
B: 04 00 00 00 00 00 00 00 00
B: 05 00 00 00 00 00 00 00 00
B: 11 00 0...

Read more...

Revision history for this message
Md Ayquassar (mdayquassar) wrote :

Please ignore #8: at new boot, the device numbers have changed :-(. Sorry, will post anew in short.

Revision history for this message
Md Ayquassar (mdayquassar) wrote :

I rebooted once again to ensure that `sudo evtest` returns
/dev/input/event8: Microsoft Natural® Ergonomic Keyboard 4000
/dev/input/event9: Microsoft Natural® Ergonomic Keyboard 4000
The results of

# udevadm info /dev/input/event8
# udevadm info /dev/input/event9
# evemu-describe /dev/input/event8
# evemu-describe /dev/input/event9

with the original file /lib/udev/hwdb.d/60-keyboard.hwdb will be attached or posted in short.

Revision history for this message
Md Ayquassar (mdayquassar) wrote :

# udevadm info /dev/input/event8
P: /devices/pci0000:00/0000:00:14.0/usb3/3-13/3-13.1/3-13.1:1.0/0003:045E:00DB.0002/input/input9/event8
N: input/event8
L: 0
S: input/by-id/usb-Microsoft_Natural®_Ergonomic_Keyboard_4000-event-kbd
S: input/by-path/pci-0000:00:14.0-usb-0:13.1:1.0-event-kbd
E: DEVPATH=/devices/pci0000:00/0000:00:14.0/usb3/3-13/3-13.1/3-13.1:1.0/0003:045E:00DB.0002/input/input9/event8
E: DEVNAME=/dev/input/event8
E: MAJOR=13
E: MINOR=72
E: SUBSYSTEM=input
E: USEC_INITIALIZED=4188709
E: KEYBOARD_KEY_c022d=up
E: KEYBOARD_KEY_c022e=down
E: ID_INPUT=1
E: ID_INPUT_KEY=1
E: ID_INPUT_KEYBOARD=1
E: ID_VENDOR=Microsoft
E: ID_VENDOR_ENC=Microsoft
E: ID_VENDOR_ID=045e
E: ID_MODEL=Natural®_Ergonomic_Keyboard_4000
E: ID_MODEL_ENC=Natural®\x20Ergonomic\x20Keyboard\x204000
E: ID_MODEL_ID=00db
E: ID_REVISION=0173
E: ID_SERIAL=Microsoft_Natural®_Ergonomic_Keyboard_4000
E: ID_TYPE=hid
E: ID_BUS=usb
E: ID_USB_INTERFACES=:030101:030000:
E: ID_USB_INTERFACE_NUM=00
E: ID_USB_DRIVER=usbhid
E: ID_PATH=pci-0000:00:14.0-usb-0:13.1:1.0
E: ID_PATH_TAG=pci-0000_00_14_0-usb-0_13_1_1_0
E: XKBMODEL=pc105
E: XKBLAYOUT=de
E: BACKSPACE=guess
E: LIBINPUT_DEVICE_GROUP=3/45e/db:usb-0000:00:14.0-13
E: DEVLINKS=/dev/input/by-id/usb-Microsoft_Natural®_Ergonomic_Keyboard_4000-event-kbd /dev/input/by-path/pci-0000:00:14.0-usb-0:13.1:1.0-event-kbd
E: TAGS=:power-switch:

Revision history for this message
Md Ayquassar (mdayquassar) wrote :

# udevadm info /dev/input/event9
P: /devices/pci0000:00/0000:00:14.0/usb3/3-13/3-13.1/3-13.1:1.1/0003:045E:00DB.0003/input/input10/event9
N: input/event9
L: 0
S: input/by-path/pci-0000:00:14.0-usb-0:13.1:1.1-event-kbd
S: input/by-id/usb-Microsoft_Natural®_Ergonomic_Keyboard_4000-if01-event-kbd
E: DEVPATH=/devices/pci0000:00/0000:00:14.0/usb3/3-13/3-13.1/3-13.1:1.1/0003:045E:00DB.0003/input/input10/event9
E: DEVNAME=/dev/input/event9
E: MAJOR=13
E: MINOR=73
E: SUBSYSTEM=input
E: USEC_INITIALIZED=4185161
E: KEYBOARD_KEY_c022d=up
E: KEYBOARD_KEY_c022e=down
E: ID_INPUT=1
E: ID_INPUT_KEY=1
E: ID_INPUT_KEYBOARD=1
E: ID_VENDOR=Microsoft
E: ID_VENDOR_ENC=Microsoft
E: ID_VENDOR_ID=045e
E: ID_MODEL=Natural®_Ergonomic_Keyboard_4000
E: ID_MODEL_ENC=Natural®\x20Ergonomic\x20Keyboard\x204000
E: ID_MODEL_ID=00db
E: ID_REVISION=0173
E: ID_SERIAL=Microsoft_Natural®_Ergonomic_Keyboard_4000
E: ID_TYPE=hid
E: ID_BUS=usb
E: ID_USB_INTERFACES=:030101:030000:
E: ID_USB_INTERFACE_NUM=01
E: ID_USB_DRIVER=usbhid
E: ID_PATH=pci-0000:00:14.0-usb-0:13.1:1.1
E: ID_PATH_TAG=pci-0000_00_14_0-usb-0_13_1_1_1
E: XKBMODEL=pc105
E: XKBLAYOUT=de
E: BACKSPACE=guess
E: LIBINPUT_DEVICE_GROUP=3/45e/db:usb-0000:00:14.0-13
E: DEVLINKS=/dev/input/by-path/pci-0000:00:14.0-usb-0:13.1:1.1-event-kbd /dev/input/by-id/usb-Microsoft_Natural®_Ergonomic_Keyboard_4000-if01-event-kbd
E: TAGS=:power-switch:

Revision history for this message
Md Ayquassar (mdayquassar) wrote :
Download full text (6.4 KiB)

# evemu-describe /dev/input/event8
# EVEMU 1.3
# Kernel: 5.4.0-42-generic
# DMI: dmi:bvnDellInc.:bvrA21:bd02/01/2018:svnDellInc.:pnLatitudeE6440:pvr00:rvnDellInc.:rn02P3T1:rvrA00:cvnDellInc.:ct9:cvr:
# Input device name: "Microsoft Natural® Ergonomic Keyboard 4000"
# Input device ID: bus 0x03 vendor 0x45e product 0xdb version 0x111
# Supported events:
# Event type 0 (EV_SYN)
# Event code 0 (SYN_REPORT)
# Event code 1 (SYN_CONFIG)
# Event code 2 (SYN_MT_REPORT)
# Event code 3 (SYN_DROPPED)
# Event code 4 ((null))
# Event code 5 ((null))
# Event code 6 ((null))
# Event code 7 ((null))
# Event code 8 ((null))
# Event code 9 ((null))
# Event code 10 ((null))
# Event code 11 ((null))
# Event code 12 ((null))
# Event code 13 ((null))
# Event code 14 ((null))
# Event code 15 (SYN_MAX)
# Event type 1 (EV_KEY)
# Event code 1 (KEY_ESC)
# Event code 2 (KEY_1)
# Event code 3 (KEY_2)
# Event code 4 (KEY_3)
# Event code 5 (KEY_4)
# Event code 6 (KEY_5)
# Event code 7 (KEY_6)
# Event code 8 (KEY_7)
# Event code 9 (KEY_8)
# Event code 10 (KEY_9)
# Event code 11 (KEY_0)
# Event code 12 (KEY_MINUS)
# Event code 13 (KEY_EQUAL)
# Event code 14 (KEY_BACKSPACE)
# Event code 15 (KEY_TAB)
# Event code 16 (KEY_Q)
# Event code 17 (KEY_W)
# Event code 18 (KEY_E)
# Event code 19 (KEY_R)
# Event code 20 (KEY_T)
# Event code 21 (KEY_Y)
# Event code 22 (KEY_U)
# Event code 23 (KEY_I)
# Event code 24 (KEY_O)
# Event code 25 (KEY_P)
# Event code 26 (KEY_LEFTBRACE)
# Event code 27 (KEY_RIGHTBRACE)
# Event code 28 (KEY_ENTER)
# Event code 29 (KEY_LEFTCTRL)
# Event code 30 (KEY_A)
# Event code 31 (KEY_S)
# Event code 32 (KEY_D)
# Event code 33 (KEY_F)
# Event code 34 (KEY_G)
# Event code 35 (KEY_H)
# Event code 36 (KEY_J)
# Event code 37 (KEY_K)
# Event code 38 (KEY_L)
# Event code 39 (KEY_SEMICOLON)
# Event code 40 (KEY_APOSTROPHE)
# Event code 41 (KEY_GRAVE)
# Event code 42 (KEY_LEFTSHIFT)
# Event code 43 (KEY_BACKSLASH)
# Event code 44 (KEY_Z)
# Event code 45 (KEY_X)
# Event code 46 (KEY_C)
# Event code 47 (KEY_V)
# Event code 48 (KEY_B)
# Event code 49 (KEY_N)
# Event code 50 (KEY_M)
# Event code 51 (KEY_COMMA)
# Event code 52 (KEY_DOT)
# Event code 53 (KEY_SLASH)
# Event code 54 (KEY_RIGHTSHIFT)
# Event code 55 (KEY_KPASTERISK)
# Event code 56 (KEY_LEFTALT)
# Event code 57 (KEY_SPACE)
# Event code 58 (KEY_CAPSLOCK)
# Event code 59 (KEY_F1)
# Event code 60 (KEY_F2)
# Event code 61 (KEY_F3)
# Event code 62 (KEY_F4)
# Event code 63 (KEY_F5)
# Event code 64 (KEY_F6)
# Event code 65 (KEY_F7)
# Event code 66 (KEY_F8)
# Event code 67 (KEY_F9)
# Event code 68 (KEY_F10)
# Event code 69 (KEY_NUMLOCK)
# Event code 70 (KEY_SCROLLLOCK)
# Event code 71 (KEY_KP7)
# Event code 72 (KEY_KP8)
# Event code 73 (KEY_KP9)
# Event code 74 (KEY_KPMINUS)
# Event code 75 (KEY_KP4)
# Event code 76 (KEY_KP5)
# Event code 77 (KEY_KP6...

Read more...

Revision history for this message
Md Ayquassar (mdayquassar) wrote :
Download full text (10.9 KiB)

# evemu-describe /dev/input/event9
# EVEMU 1.3
# Kernel: 5.4.0-42-generic
# DMI: dmi:bvnDellInc.:bvrA21:bd02/01/2018:svnDellInc.:pnLatitudeE6440:pvr00:rvnDellInc.:rn02P3T1:rvrA00:cvnDellInc.:ct9:cvr:
# Input device name: "Microsoft Natural® Ergonomic Keyboard 4000"
# Input device ID: bus 0x03 vendor 0x45e product 0xdb version 0x111
# Supported events:
# Event type 0 (EV_SYN)
# Event code 0 (SYN_REPORT)
# Event code 1 (SYN_CONFIG)
# Event code 2 (SYN_MT_REPORT)
# Event code 3 (SYN_DROPPED)
# Event code 4 ((null))
# Event code 5 ((null))
# Event code 6 ((null))
# Event code 7 ((null))
# Event code 8 ((null))
# Event code 9 ((null))
# Event code 10 ((null))
# Event code 11 ((null))
# Event code 12 ((null))
# Event code 13 ((null))
# Event code 14 ((null))
# Event code 15 (SYN_MAX)
# Event type 1 (EV_KEY)
# Event code 1 (KEY_ESC)
# Event code 2 (KEY_1)
# Event code 3 (KEY_2)
# Event code 4 (KEY_3)
# Event code 5 (KEY_4)
# Event code 6 (KEY_5)
# Event code 7 (KEY_6)
# Event code 8 (KEY_7)
# Event code 9 (KEY_8)
# Event code 10 (KEY_9)
# Event code 11 (KEY_0)
# Event code 12 (KEY_MINUS)
# Event code 13 (KEY_EQUAL)
# Event code 14 (KEY_BACKSPACE)
# Event code 15 (KEY_TAB)
# Event code 16 (KEY_Q)
# Event code 17 (KEY_W)
# Event code 18 (KEY_E)
# Event code 19 (KEY_R)
# Event code 20 (KEY_T)
# Event code 21 (KEY_Y)
# Event code 22 (KEY_U)
# Event code 23 (KEY_I)
# Event code 24 (KEY_O)
# Event code 25 (KEY_P)
# Event code 26 (KEY_LEFTBRACE)
# Event code 27 (KEY_RIGHTBRACE)
# Event code 28 (KEY_ENTER)
# Event code 29 (KEY_LEFTCTRL)
# Event code 30 (KEY_A)
# Event code 31 (KEY_S)
# Event code 32 (KEY_D)
# Event code 33 (KEY_F)
# Event code 34 (KEY_G)
# Event code 35 (KEY_H)
# Event code 36 (KEY_J)
# Event code 37 (KEY_K)
# Event code 38 (KEY_L)
# Event code 39 (KEY_SEMICOLON)
# Event code 40 (KEY_APOSTROPHE)
# Event code 41 (KEY_GRAVE)
# Event code 42 (KEY_LEFTSHIFT)
# Event code 43 (KEY_BACKSLASH)
# Event code 44 (KEY_Z)
# Event code 45 (KEY_X)
# Event code 46 (KEY_C)
# Event code 47 (KEY_V)
# Event code 48 (KEY_B)
# Event code 49 (KEY_N)
# Event code 50 (KEY_M)
# Event code 51 (KEY_COMMA)
# Event code 52 (KEY_DOT)
# Event code 53 (KEY_SLASH)
# Event code 54 (KEY_RIGHTSHIFT)
# Event code 55 (KEY_KPASTERISK)
# Event code 56 (KEY_LEFTALT)
# Event code 57 (KEY_SPACE)
# Event code 58 (KEY_CAPSLOCK)
# Event code 59 (KEY_F1)
# Event code 60 (KEY_F2)
# Event code 61 (KEY_F3)
# Event code 62 (KEY_F4)
# Event code 63 (KEY_F5)
# Event code 64 (KEY_F6)
# Event code 65 (KEY_F7)
# Event code 66 (KEY_F8)
# Event code 67 (KEY_F9)
# Event code 68 (KEY_F10)
# Event code 69 (KEY_NUMLOCK)
# Event code 70 (KEY_SCROLLLOCK)
# Event code 71 (KEY_KP7)
# Event code 72 (KEY_KP8)
# Event code 73 (KEY_KP9)
# Event code 74 (KEY_KPMINUS)
# Event code 75 (KEY_KP4)
# Event code 76 (KEY_KP5)
# Event code 77 (KEY_KP6...

Revision history for this message
Md Ayquassar (mdayquassar) wrote :

After commenting the corresponding lines /lib/udev/hwdb.d/60-keyboard.hwdb out, issuing
# systemd-hwdb update
and rebooting, the middle slider up/down keys stopped producing any effect completely at least in Firefox (i.e., it got worse). The "Failed to call ..." error is gone from the output of journalctl -b, though. Running evtest and checking event8 produces absolutely no effect for the slider keys. Running evtest and checking event9 produces the following effect for the slider keys up (+) followed by down (-):
Event: time 1597336850.366186, type 4 (EV_MSC), code 4 (MSC_SCAN), value c022d
Event: time 1597336850.366186, type 1 (EV_KEY), code 418 (KEY_ZOOMIN), value 1
Event: time 1597336850.366186, -------------- SYN_REPORT ------------
Event: time 1597336850.510185, type 4 (EV_MSC), code 4 (MSC_SCAN), value c022d
Event: time 1597336850.510185, type 1 (EV_KEY), code 418 (KEY_ZOOMIN), value 0
Event: time 1597336850.510185, -------------- SYN_REPORT ------------
Event: time 1597336851.454182, type 4 (EV_MSC), code 4 (MSC_SCAN), value c022e
Event: time 1597336851.454182, type 1 (EV_KEY), code 419 (KEY_ZOOMOUT), value 1
Event: time 1597336851.454182, -------------- SYN_REPORT ------------
Event: time 1597336851.526184, type 4 (EV_MSC), code 4 (MSC_SCAN), value c022e
Event: time 1597336851.526184, type 1 (EV_KEY), code 419 (KEY_ZOOMOUT), value 0
Event: time 1597336851.526184, -------------- SYN_REPORT ------------

I'll revert to the prior default setting of /lib/udev/hwdb.d/60-keyboard.hwdb in the meantime.

Revision history for this message
Dan Streetman (ddstreet) wrote :

@kaihengfeng can you review this bug to see if you can tell what the correct change to the hwdb should be?

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

This is more likely to be a kernel bug. Let's find out why IOCTL EVIOCSKEYCODE failed.

Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1890186

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Md Ayquassar (mdayquassar) wrote :

This command would disclose potentially sensitive information of a production machine to the public; I won't do it unless given an opportunity to anonymize the results upfront.

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

OK. dmesg should be enough.

Changed in linux (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Md Ayquassar (mdayquassar) wrote :
Download full text (103.3 KiB)

In the meantime, I updated Ubuntu to groovy 20.10. My dmesg is

[ 0.000000] microcode: microcode updated early to revision 0x28, date = 2019-11-12
[ 0.000000] Linux version 5.8.0-33-generic (buildd@lgw01-amd64-036) (gcc (Ubuntu 10.2.0-13ubuntu1) 10.2.0, GNU ld (GNU Binutils for Ubuntu) 2.35.1) #36-Ubuntu SMP Wed Dec 9 09:14:40 UTC 2020 (Ubuntu 5.8.0-33.36-generic 5.8.17)
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-5.8.0-33-generic root=UUID=e5bf110c-cf26-4c1f-8f95-84c054455347 ro
[ 0.000000] KERNEL supported cpus:
[ 0.000000] Intel GenuineIntel
[ 0.000000] AMD AuthenticAMD
[ 0.000000] Hygon HygonGenuine
[ 0.000000] Centaur CentaurHauls
[ 0.000000] zhaoxin Shanghai
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
[ 0.000000] x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256
[ 0.000000] x86/fpu: Enabled xstate features 0x7, context size is 832 bytes, using 'standard' format.
[ 0.000000] BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000004efff] usable
[ 0.000000] BIOS-e820: [mem 0x000000000004f000-0x000000000004ffff] reserved
[ 0.000000] BIOS-e820: [mem 0x0000000000050000-0x000000000009efff] usable
[ 0.000000] BIOS-e820: [mem 0x000000000009f000-0x000000000009ffff] reserved
[ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x00000000bead8fff] usable
[ 0.000000] BIOS-e820: [mem 0x00000000bead9000-0x00000000beadffff] ACPI NVS
[ 0.000000] BIOS-e820: [mem 0x00000000beae0000-0x00000000bf4d4fff] usable
[ 0.000000] BIOS-e820: [mem 0x00000000bf4d5000-0x00000000bf9b9fff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000bf9ba000-0x00000000c7db2fff] usable
[ 0.000000] BIOS-e820: [mem 0x00000000c7db3000-0x00000000c7ffffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000c8000000-0x00000000c8758fff] usable
[ 0.000000] BIOS-e820: [mem 0x00000000c8759000-0x00000000c87fffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000c8800000-0x00000000c8f92fff] usable
[ 0.000000] BIOS-e820: [mem 0x00000000c8f93000-0x00000000c8ffffff] ACPI data
[ 0.000000] BIOS-e820: [mem 0x00000000c9000000-0x00000000ca6f9fff] usable
[ 0.000000] BIOS-e820: [mem 0x00000000ca6fa000-0x00000000ca7fffff] ACPI NVS
[ 0.000000] BIOS-e820: [mem 0x00000000ca800000-0x00000000cbce8fff] usable
[ 0.000000] BIOS-e820: [mem 0x00000000cbce9000-0x00000000cbffffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000cd000000-0x00000000cf1fffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000f8000000-0x00000000fbffffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000fec00000-0x00000000fec00fff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000fed00000-0x00000000fed03fff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000fed1c000-0x00000000fed1ffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000fee00000-0x00000000fee00fff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000ff000000-0x00000000ffffffff] reserved
[ 0.000000] BIOS-e820: [mem 0x0000000100000000-0x000000042edfffff...

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Dan Streetman (ddstreet) wrote :

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.

Changed in linux (Ubuntu):
status: Confirmed → Invalid
Changed in systemd (Ubuntu):
status: New → Won't Fix
Revision history for this message
Md Ayquassar (mdayquassar) wrote :

@ddstreet Thanks for the feedback. The keyboard has “Microsoft® Natural® Ergonomic Keyboard 4000 v1.0”, “Model 1048” printed on its bottom. The keyboard looks pretty standard to me from outside. Do you really mean it's broken? Is any combination of the sliding key with any modifier key(s) (such as Ctrl, Alt, or Shift) supposed to zoom in/out say, in the Firefox Web browser?

Revision history for this message
Dan Streetman (ddstreet) wrote :

> Do you really mean it's broken?

by "broken", what I mean is it was designed with two separate HID-type usb interfaces with identical identification (vendor/product/model/revision ids) but with different operation.

> Is any combination of the sliding key with any modifier key(s)
> (such as Ctrl, Alt, or Shift) supposed to zoom in/out say,
> in the Firefox Web browser

Assuming the keys in question work already (and based on your comment 15 I thought they already did), any modification to what they keys actually do should be done by your window manager and/or X configuration.

Additionally, I don't know what exactly you mean by "zoom" in/out; if you mean accessibility zooming you should read https://help.ubuntu.com/stable/ubuntu-help/a11y-mag.html.en

Revision history for this message
Md Ayquassar (mdayquassar) wrote :

@ddstreet Thank for the explanation. (Myself, I don't know why the keyboard behaves this way; I can imagine any option, e.g., a glitch of the keyboard firmware or hardware, an unintended bug introduced by the developers of the manufacturer, a cost-reducing design of the manufacturer, or an politically intentional (against the standard!) design of the manufacturer.) As for the zoom in/out, I meant this:

https://support.mozilla.org/en-US/kb/font-size-and-zoom-increase-size-of-web-pages

Revision history for this message
Dan Streetman (ddstreet) wrote :

> As for the zoom in/out, I meant this:

that's typically done by holding "Ctrl" down and using scroll up/down to zoom.

Revision history for this message
Md Ayquassar (mdayquassar) wrote :

Yes, Ctrl + <Mouse Scroll wheel> zooms in and out. If we believe https://www.microsoft.com/accessories/en-ww/products/keyboards/natural-ergonomic-keyboard-4000/b2m-00012 (though my model is not B2M-00012 but 1048) , Microsoft intended the zoom slider on the keyboard to map to zoom in and out, too.

Revision history for this message
Tony Martin Berbel (wingarmac) wrote :

I think this might be related:

journalctl -p 3 -xb
nov 15 12:53:55 cinnamon systemd-udevd[643]: event6: Failed to call EVIOCSKEYCODE with scan code 0x7c, and key code 190: Invalid argument

sudo cat /proc/bus/input/devices | grep -C 5 event6
I: Bus=0019 Vendor=0000 Product=0000 Version=0000
N: Name="Eee PC WMI hotkeys"
P: Phys=eeepc-wmi/input0
S: Sysfs=/devices/platform/eeepc-wmi/input/input6
U: Uniq=
H: Handlers=rfkill kbd event6
B: PROP=0
B: EV=100013
B: KEY=7e00000 0 800000000000 0 0 1400b00100000 8300180001100800 e000000000000 2
B: MSC=10

I'm using Ubuntu 22.10 5.19.0-23-generic Kernel Cinnamon 5.4.12

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.