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

Bug #1389201 reported by Michael Heuberger
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Fix Released
Medium
Unassigned

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
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /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
ProcFB:

ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.16.0-24-generic root=UUID=b5b38333-3694-4441-8a13-50bf4dbf2f41 ro quiet
RelatedPackageVersions:
 linux-restricted-modules-3.16.0-24-generic N/A
 linux-backports-modules-3.16.0-24-generic N/A
 linux-firmware 1.138
RfKill:
 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

Revision history for this message
Michael Heuberger (michael.heuberger) wrote :
Revision history for this message
Brad Figg (brad-figg) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Tim Gardner (timg-tpi) wrote : Re: Error calling EVIOCSKEYCODE on device node: Invalid argument

This doesn't seem like a kernel issue.

affects: linux (Ubuntu) → systemd (Ubuntu)
Changed in systemd (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Incomplete
Revision history for this message
Michael Heuberger (michael.heuberger) wrote :

Why incomplete?

Revision history for this message
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)
Changed in systemd (Ubuntu):
status: Expired → New
Revision history for this message
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
keyboard:usb:v045Ep00DB*
 KEYBOARD_KEY_c022d=zoomin
 KEYBOARD_KEY_c022e=zoomout

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
Revision history for this message
Michael Heuberger (michael.heuberger) wrote :

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
Revision history for this message
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?

Revision history for this message
Chris J Arges (arges) wrote :

Comment #8 was filed as a separate issue here:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1523675

Revision history for this message
Laurent Bonnaud (laurent-bonnaud) wrote :

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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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