/dev/input/uinput Device appears to be 'broken'
- by Adam Luchjenbroers
I'm trying to setup Pystromo so that I can remap the keys on my Belkin N52TE gamepad.
Pystromo basically captures the key strokes and then outputs the remapped keystrokes to the uinput device. However, at the moment it simply swallows the input and outputs absolutely nothing.
I've tracked the issue to something being wrong with my uinput device, with the smoking gun being:
# ls -l /dev/input/uinput
crw-rw---- 1 root plugdev 10, 223 Dec 31 2009 /dev/input/uinput
# cat /dev/input/uinput
cat: /dev/input/uinput: No such device
The uinput module is loaded, and can be clearly seen via lsmod. Anyone seen this before, or can think of something worth attempting?
Current Setup
Gentoo Linux
Kernel 2.6.32 (Gentoo Sources 2.6.32-r1)
HP DV7 Laptop
Output
dmesg
dmesg | grep uinput does nothing, and no new lines appear if I run modprobe -r uinput && modprobe uinput. Yet the uinput module can clearly be seen when running lsmod:
# lsmod | grep uinput
uinput 6200 0
lsusb
# lsusb
Bus 005 Device 003: ID 050d:0200 Belkin Components
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 002: ID 1532:0101 Razer USA, Ltd
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 5986:0143 Acer, Inc
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 002: ID 03f0:171d Hewlett-Packard Wireless (Bluetooth + WLAN) Interface [Integrated Module]
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
lsusb -v
PasteBin
Update
Hmm, updating evdev and hal seems to have partially fixed it. /dev/input/uinput still can't be accessed but Pystromo is now remapping keys successfully.
I'm a little bit mystified about what's going on here, but it seems that my understanding of how all this works is flawed.
Since I've posted a bounty, I'll leave this here for someone to post an explanation for how user-space input devices work under the hood.