0

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.

2
  • 1
    Did you try filing a bug? Commented Jan 4, 2010 at 11:06
  • What message do you get when you try to read keys? It could that it can't be read with cat. Commented Jan 5, 2010 at 15:26

1 Answer 1

1

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.

1
  • Can you please explain why reading from a uinput is not preffered?
    – Vishnu N K
    Commented Feb 2, 2017 at 8:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .