[keymap Microsoft Natural Ergonomic Keyboard 4000] Error calling EVIOCSKEYCODE on device node: Invalid argument

Bug #1389201 reported by Michael Heuberger on 2014-11-04
This bug affects 3 people
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)

Bug Description

In dmesg I can see these two error lines

[ 7.375599] systemd-udevd[508]: Error calling EVIOCSKEYCODE on device node '/dev/input/event10' (scan code 0xc022d, key code 418): Invalid argument
[ 7.375605] systemd-udevd[508]: Error calling EVIOCSKEYCODE on device node '/dev/input/event10' (scan code 0xc022e, key code 419): Invalid argument
         res 51/04:fe:00:00:00/00:00:00:00:00/40 Emask 0x1 (device error)

No idea what these two mean and how we can fix this. Any clues?

ProblemType: Bug
DistroRelease: Ubuntu 14.10
Package: linux-image-3.16.0-24-generic 3.16.0-24.32
ProcVersionSignature: Ubuntu 3.16.0-24.32-generic 3.16.4
Uname: Linux 3.16.0-24-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.14.7-0ubuntu8
Architecture: amd64
 /dev/snd/controlC1: michael-heuberger 2178 F.... pulseaudio
 /dev/snd/controlC2: michael-heuberger 2178 F.... pulseaudio
 /dev/snd/controlC0: michael-heuberger 2178 F.... pulseaudio
CurrentDesktop: Unity
Date: Wed Nov 5 00:55:34 2014
HibernationDevice: RESUME=UUID=b0b47183-895a-4f27-bb25-40bd23028028
InstallationDate: Installed on 2014-10-31 (4 days ago)
InstallationMedia: Ubuntu 14.10 "Utopic Unicorn" - Release amd64 (20141022.1)
MachineType: System manufacturer System Product Name

ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.16.0-24-generic root=UUID=b5b38333-3694-4441-8a13-50bf4dbf2f41 ro quiet
 linux-restricted-modules-3.16.0-24-generic N/A
 linux-backports-modules-3.16.0-24-generic N/A
 linux-firmware 1.138
 0: phy0: Wireless LAN
  Soft blocked: yes
  Hard blocked: no
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 08/06/2012
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 0803
dmi.board.asset.tag: To Be Filled By O.E.M.
dmi.board.name: P6X58D-E
dmi.board.vendor: ASUSTeK Computer INC.
dmi.board.version: Rev 1.xx
dmi.chassis.asset.tag: Asset-1234567890
dmi.chassis.type: 3
dmi.chassis.vendor: Chassis Manufacture
dmi.chassis.version: Chassis Version
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr0803:bd08/06/2012:svnSystemmanufacturer:pnSystemProductName:pvrSystemVersion:rvnASUSTeKComputerINC.:rnP6X58D-E:rvrRev1.xx:cvnChassisManufacture:ct3:cvrChassisVersion:
dmi.product.name: System Product Name
dmi.product.version: System Version
dmi.sys.vendor: System manufacturer

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed

This doesn't seem like a kernel issue.

affects: linux (Ubuntu) → systemd (Ubuntu)
Changed in systemd (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Incomplete

Why incomplete?

Launchpad Janitor (janitor) wrote :

[Expired for systemd (Ubuntu) because there has been no activity for 60 days.]

Changed in systemd (Ubuntu):
status: Incomplete → Expired
Martin Pitt (pitti) on 2015-01-04
Changed in systemd (Ubuntu):
status: Expired → New
Martin Pitt (pitti) wrote :

Key codes 418/419 are KEY_ZOOMIN and KEY_ZOOMOUT. We don't have any hwdb keymaps for ASUS which set those, but it applies to the USB keyboard:

N: input/event10
S: input/by-id/usb-Microsoft_Natural®_Ergonomic_Keyboard_4000-event-kbd
E: ID_VENDOR=Microsoft
E: ID_MODEL=Natural®_Ergonomic_Keyboard_4000
E: KEYBOARD_KEY_c022d=zoomin
E: KEYBOARD_KEY_c022e=zoomout

This rule was introduced in 2011 in http://cgit.freedesktop.org/systemd/systemd/commit/?id=310aba9 (via https://bugs.debian.org/629647) and later converted to hwdb. I'm hesitant to remove it now, as there might be either older keyboard models or (more probably) older kernels which still need it. However, can you please do this:

  - Edit /lib/udev/hwdb.d/60-keyboard.hwdb (as root, e. g. with "sudo gedit") to remove this paragraph:

# Microsoft Natural Ergonomic Keyboard 4000

Then reboot your computer, verify that the warning went away. Then please install the "evtest" package, run "sudo evtest", select your Microsoft USB keyboard, press the Zoom in/out keys, and copy&paste the output? If they still work, then your model/kernel doesn't need the mappings any more. Thanks!

summary: - Error calling EVIOCSKEYCODE on device node: Invalid argument
+ [keymap Microsoft Natural Ergonomic Keyboard 4000] Error calling
+ EVIOCSKEYCODE on device node: Invalid argument
Changed in systemd (Ubuntu):
status: New → Incomplete

Thanks man!

I didn't modify '/lib/udev/hwdb.d/60-keyboard.hwdb' yet but had a look at the 'dmesg' output and spotted, the warning is already gone. No idea why. Probably a recent apt-get upgrade already solved it. This ticket is quite old.

But give me a couple of weeks to observe and confirm this 100%.

By the way, I installed the evtest and tested the Zoom in/out keys. Nothing happens, no event is fired for these keys. Looks like these aren't mapped anymore.

Changed in systemd (Ubuntu):
status: Incomplete → Confirmed
Michał Zając (quintasan) wrote :

Something weird has happend because I now have TWO event devices related to this keyboard:

ls -l /dev/input/by-id
lrwxrwxrwx 1 root root 9 Oct 11 18:09 usb-Microsoft_Natural??_Ergonomic_Keyboard_4000-event-kbd -> ../event2
lrwxrwxrwx 1 root root 9 Oct 11 18:09 usb-Microsoft_Natural??_Ergonomic_Keyboard_4000-if01-event-kbd -> ../event3

Zoom In/Out keys do NOT work on /dev/input/event2 device but they do work on /dev/input/even3 device. Any ideas how to get this fixed?

Chris J Arges (arges) wrote :

Comment #8 was filed as a separate issue here:

Closing since the original reporter declared the problem fixed.

Changed in systemd (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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