Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
1  
Did you try filing a bug? –  Mahmoud Hossam Jan 4 '10 at 11:06
    
What message do you get when you try to read keys? It could that it can't be read with cat. –  Jimmy Hedman Jan 5 '10 at 15:26

1 Answer 1

up vote 0 down vote accepted

You are not supposed to read from uinput, as uinput is for creating user space devices and sending events to them, so the No such device message is normal.

I assume that it was either a simple permissions problem or a change in the location of the uinput device itself (i.e. /dev/uinput was expected but it was in /dev/input/uinput), both of which have changed in Ubuntu a while back, so that programs that expected old behavior might have gotten confused.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.