systemd-udevd: Error calling EVIOCSKEYCODE on device node '/dev/input/event9' (scan code 0x150, key code 190): Invalid argument

Bug #1597415 reported by Laurent Bonnaud on 2016-06-29
50
This bug affects 11 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Medium
Dimitri John Ledkov
systemd (Ubuntu)
Medium
Unassigned

Bug Description

Hi,

the symptom is this error message in my system's logs:

juin 29 16:56:39 vougeot systemd-udevd[522]: Error calling EVIOCSKEYCODE on device node '/dev/input/event9' (scan code 0x150, key code 190): Invalid argument

According to /proc/bus/input/devices the corresponding input device is:

I: Bus=0019 Vendor=0000 Product=0000 Version=0000
N: Name="Dell WMI hotkeys"
P: Phys=wmi/input0
S: Sysfs=/devices/virtual/input/input10
U: Uniq=
H: Handlers=kbd event9
B: PROP=0
B: EV=13
B: KEY=1000b00000400 0 e000000000000 0
B: MSC=10

This laptop is a Dell Latitude E6520.

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: udev 229-4ubuntu6
Uname: Linux 4.6.3-040603-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
CurrentDesktop: KDE
CustomUdevRuleFiles: 60-ssd-scheduler.rules
Date: Wed Jun 29 17:43:01 2016
EcryptfsInUse: Yes
MachineType: Dell Inc. Latitude E6520
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.6.3-040603-generic root=UUID=749a9901-bdd3-4b5f-b80e-69414667e058 ro enable_mtrr_cleanup mtrr_spare_reg_nr=1 mtrr_gran_size=32M mtrr_chunk_size=128M quiet splash vt.handoff=7
SourcePackage: systemd
UpgradeStatus: Upgraded to xenial on 2016-04-09 (80 days ago)
dmi.bios.date: 11/14/2013
dmi.bios.vendor: Dell Inc.
dmi.bios.version: A19
dmi.board.name: 0NVF5K
dmi.board.vendor: Dell Inc.
dmi.board.version: A01
dmi.chassis.type: 9
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvrA19:bd11/14/2013:svnDellInc.:pnLatitudeE6520:pvr01:rvnDellInc.:rn0NVF5K:rvrA01:cvnDellInc.:ct9:cvr:
dmi.product.name: Latitude E6520
dmi.product.version: 01
dmi.sys.vendor: Dell Inc.

Johan Tol (jto-joto) wrote :

I have exactly the same message for my Dell Latitude E6540.

Johan Tol (jto-joto) wrote :

In /lib/udev/hwdb.d/60-keyboard.hwdb I see the following related to scan code 150:

# Dell Latitude microphone mute
evdev:name:Dell WMI hotkeys:dmi:bvn*:bvr*:bd*:svnDell*:pnLatitude*
# Dell Precision microphone mute
evdev:name:Dell WMI hotkeys:dmi:bvn*:bvr*:bd*:svnDell*:pnPrecision*
 KEYBOARD_KEY_150=f20 # Mic mute toggle, should be micmute

Is that related to the error message?

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in systemd (Ubuntu):
status: New → Confirmed
Ivan (adamapollo) wrote :

confirmed on Dell Latitude E7440

Changed in systemd (Ubuntu):
importance: Undecided → Medium
Michael Doube (michael-doube) wrote :

I have the same on Dell Latitude 7370 on Zesty daily iso & 16.04. Marking my other report as a duplicate of this one.

Kai-Heng Feng (kaihengfeng) wrote :

https://github.com/systemd/systemd/pull/5012

Change "KEYBOARD_KEY_150=f20" to "KEYBOARD_KEY_100150=f20" should fix this issue.

tags: added: yakkety zesty

https://github.com/systemd/systemd/pull/5012

Change "KEYBOARD_KEY_150=f20" to "KEYBOARD_KEY_100150=f20" should fix
this issue.

Confirming this fix works here.

Editing /lib/udev/hwdb.d/60-keyboard.hwdb with the change above followed by
:~$ udevadm hwdb --update
~:$ udevadm trigger

Enables mic mute key.

Johan Tol (jto-joto) wrote :

This fix doesn't work for me (Dell Latitude E6540, Ubuntu 16.04); /var/log/syslog mentions instead:

Error calling EVIOCSKEYCODE on device node '/dev/input/event17' (scan code 0x100150, key code 190): Invalid argument

On my Dell Latitude E6520 with Ubuntu 16.10, after applying the "KEYBOARD_KEY_150=f20" -> "KEYBOARD_KEY_100150=f20" patch, I get this error:

janv. 10 14:13:24 vougeot systemd-udevd[954]: Error calling EVIOCSKEYCODE on device node '/dev/input/event9' (scan code 0x100150, key code 190): Invalid argument

Michael Doube (michael-doube) wrote :

Fix may be dependent on kernel version; testing with stock kernel for Ubuntu 16.04, v4.4, results in:

Jan 10 19:32:33 Bethany systemd-udevd[332]: Error calling EVIOCSKEYCODE on device node '/dev/input/event11' (scan code 0x100150, key code 190): Invalid argument

Previous testing used kernel v4.9 from here: http://kernel.ubuntu.com/~kernel-ppa/mainline/?C=N;O=D

I tested with a 4.9.2 mainline kernel.
I will try to test with an Ubuntu kernel when I have a chance to reboot my system...

Michael Doube (michael-doube) wrote :

This bug definitely depends on kernel version. Both the fix mentioned above in #8 https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1597415/comments/8 and mainline kernel after this commit (found with reverse bisect), are required. Marking as linux bug. Would be very nice if fix could make it into Ubuntu 16.04 LTS.

:~/linux/linux$ git bisect bad
e075b3c898e4055ec62a1f0ed7f3b8e62814bfb6 is the first bad commit
commit e075b3c898e4055ec62a1f0ed7f3b8e62814bfb6
Author: Pali Rohár <email address hidden>
Date: Wed Jun 15 21:49:13 2016 +0200

    dell-wmi: Generate one sparse keymap for all machines

    This patch reworks code for generating sparse keymap and processing WMI
    events. It unifies procedure for generating sparse keymap and also unifies
    big switch code for processing WMI events of different types. After this
    patch dell-wmi driver does not differ between "old" and "new" hotkey type.

    It constructs sparse keymap table with all WMI codes. It is because on some
    laptops (e.g. Dell Latitude E6440) ACPI/firmware send both event types (old
    and new).

    Each WMI code in sparse keymap table is prefixed by 16bit event type, so it
    does not change functionality on laptops with "old" hotkey support (those
    without scancodes in DMI).

    This allow us to distinguish between same WMI codes with different types in
    sparse keymap. Thanks to this WMI events of type 0x0011 were moved from big
    switch into sparse keymap table too.

    This patch also fixes possible bug in parsing WMI event buffer introduced
    in commit 5ea2559726b7 ("dell-wmi: Add support for new Dell systems"). That
    commit changed buffer type from int* to u16* without fixing code. More at:
    http://lkml.iu.edu/hypermail/linux/kernel/1507.0/01950.html

    Signed-off-by: Pali Rohár <email address hidden>
    Tested-by: Michał Kępień <email address hidden>
    Reviewed-by: Michał Kępień <email address hidden>
    Tested-by: Gabriele Mazzotta <email address hidden>
    Signed-off-by: Darren Hart <email address hidden>

:040000 040000 babec68576f8756c9b0ee28a7ca7496de1c3c41a b2e0e8cffb710d6ef2bdb9d4634cbd8b65867a34 M drivers

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Changed in linux (Ubuntu):
importance: Undecided → Medium
dastillero (dastillero) wrote :

Fix on comment #7 worked for me on a Dell Latitude 3150, 4.8.0-36-generic kernel.

Thanks!

Changed in linux (Ubuntu):
assignee: nobody → Dimitri John Ledkov (xnox)
milestone: none → ubuntu-17.02

I am still seeing this error with the 4.10.1-041001-generic mainline kernel.

Stefano (stefano-d) wrote :

Can confirm this bug in Ubuntu 17.04 with kernel 4.10.0-13-generic.

Stefano (stefano-d) wrote :

Mär 19 14:50:58 stefano-PC systemd-udevd[458]: Error calling EVIOCSKEYCODE on device node '/dev/input/event3' (scan code 0x90001, key code 148): Invalid argument
Mär 19 14:50:58 stefano-PC systemd-udevd[458]: Error calling EVIOCSKEYCODE on device node '/dev/input/event3' (scan code 0x90002, key code 152): Invalid argument
Mär 19 14:50:58 stefano-PC systemd-udevd[458]: Error calling EVIOCSKEYCODE on device node '/dev/input/event3' (scan code 0x90003, key code 144): Invalid argument
Mär 19 14:50:58 stefano-PC systemd-udevd[458]: Error calling EVIOCSKEYCODE on device node '/dev/input/event3' (scan code 0x90004, key code 421): Invalid argument
Mär 19 14:50:58 stefano-PC systemd-udevd[458]: Error calling EVIOCSKEYCODE on device node '/dev/input/event3' (scan code 0x90005, key code 423): Invalid argument
Mär 19 14:50:58 stefano-PC systemd-udevd[458]: Error calling EVIOCSKEYCODE on device node '/dev/input/event3' (scan code 0x90006, key code 140): Invalid argument
Mär 19 14:50:58 stefano-PC systemd-udevd[458]: Error calling EVIOCSKEYCODE on device node '/dev/input/event3' (scan code 0x90007, key code 155): Invalid argument
Mär 19 14:50:58 stefano-PC systemd-udevd[458]: Error calling EVIOCSKEYCODE on device node '/dev/input/event3' (scan code 0x90008, key code 150): Invalid argument

Gediminas (g-jancys) wrote :

Problem occured when force shutdown windows and booted up ubuntu. I was able to bypass this bug by commenting out windows partition mount in fstab

Marco Ochse (t3chn0m4g3) wrote :

Confirming the same issue on Ubuntu Server 18.04 LTS:

Error calling EVIOCSKEYCODE on device node '/dev/input/event2' (scan code 0x9004c, key code 162): Invalid argument
CODE_FILE ../src/udev/udev-builtin-keyboard.c
CODE_FUNC map_keycode
CODE_LINE 103
ERRNO 22
PRIORITY 3
SYSLOG_FACILITY 3
SYSLOG_IDENTIFIER systemd-udevd
_BOOT_ID 8561955e61444adea66c6983c7972f60
_CAP_EFFECTIVE 3fffffffff
_CMDLINE /lib/systemd/systemd-udevd
_COMM systemd-udevd
_EXE /lib/systemd/systemd-udevd
_GID 0
_HOSTNAME blueeyebrows
_MACHINE_ID 3c83a050931347c59c2d930c491afdc7
_PID 340
_SELINUX_CONTEXT unconfined
_SOURCE_REALTIME_TIMESTAMP 1530104311822252
_SYSTEMD_CGROUP /system.slice/systemd-udevd.service
_SYSTEMD_INVOCATION_ID da5926014fa944509d5e10a8d9a6adf2
_SYSTEMD_SLICE system.slice
_SYSTEMD_UNIT systemd-udevd.service
_TRANSPORT journal
_UID 0
__CURSOR s=b7551ec2b2f942ae94a42e8501582e71;i=1784;b=8561955e61444adea66c6983c7972f60;m=868e2f;t=56f9f2bf9bcec;x=626cfce2d4ede039
__MONOTONIC_TIMESTAMP 8818223
__REALTIME_TIMESTAMP 1530104311823596

Kernel: 4.15.0-23-generic #25-Ubuntu SMP Wed May 23 18:02:16 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Woonjas (woonjas) wrote :

Seeing the same error on Dell Latitude e6520 on 18.04.2 LTS, 4.15.0-45 kernel

Not sure if it has any detrimental effects though

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

Duplicates of this bug

Other bug subscribers