# udev not populating /dev/input/by-path for remote controller

## Specto

I recently did an emerge system. Since the update my remote control has stopped working. I could do with some help as I have no idea where to go next!

It seems it upgraded udev from sys-fs/udev-124-r2 to sys-fs/udev-141.

I have a Nova T 500 DVB card. The card words fine (tuner wise) and I can still see it detecting the remote in dmesg output:

```
input: IR-receiver inside an USB DVB receiver as /class/input/input5
```

After some investigation I have tracked this down to a missing entry in /dev/input/by-path that was formerly there.

Prior to the upgrade lirc was configured to take ir input from '/dev/input/by-path/pci-3-1--event-ir' using the 'dev/input' driver.

The remote control is still detected and is present in /dev/input as 'event5', but there is no entry in either 'by-path' or 'by-id'. Since these /dev/input/event* entries re-order after each reboot I cannot use these for the lirc device path. 

```

# cat /proc/bus/input/devices 

<snip>

I: Bus=0003 Vendor=2040 Product=9950 Version=0100

N: Name="IR-receiver inside an USB DVB receiver"

P: Phys=usb-0000:01:08.2-1/ir0

S: Sysfs=/class/input/input5

U: Uniq=

H: Handlers=kbd event5 

B: EV=3

B: KEY=14afc336 284284d 0 0 0 4 80058000 2190 40000801 9e96c0 0 900200 ffd

```

Listing of my /dev/input/by-path/ directory post upgrade:

```

lrwxrwxrwx 1 root root 9 2009-07-13 18:51 pci-0000:00:02.0-usb-0:3:1.0-event-mouse -> ../event3

lrwxrwxrwx 1 root root 9 2009-07-13 18:51 pci-0000:00:02.0-usb-0:3:1.0-mouse -> ../mouse0

lrwxrwxrwx 1 root root 9 2009-07-13 18:51 platform-i8042-serio-0-event-kbd -> ../event2

lrwxrwxrwx 1 root root 9 2009-07-13 18:51 platform-pcspkr-event-spkr -> ../event4

```

I checked out udev rules and tried to set one up following a guide at http://reactivated.net/writing_udev_rules.html and using suggestions from http://linuxtv.org/wiki/index.php/Hauppauge_WinTV-NOVA-T-500 and http://www.mythtv.org/wiki/Hauppauge_WinTV_Nova-T_500_PCI.

The udev rule I have written never functions.  I put the rule in /etc/udev/rules.d/10-local.rules

```
KERNEL=="input*", ATTRS{name}=="IR-receiver inside an USB DVB receiver", SYMLINK+="input/dvb-ir"
```

and after a reboot the /dev/input/dvb-ir  entry does not exist. I tried with event* instead of input* to no avail.[/code]

The following devices exist in sys

```

ls -l /sys/class/input/

total 0

lrwxrwxrwx 1 root root 0 2009-07-13 18:51 event0 -> ../../class/input/input0/event0

lrwxrwxrwx 1 root root 0 2009-07-13 18:51 event1 -> ../../class/input/input1/event1

lrwxrwxrwx 1 root root 0 2009-07-13 18:51 event2 -> ../../class/input/input2/event2

lrwxrwxrwx 1 root root 0 2009-07-13 18:51 event3 -> ../../class/input/input3/event3

lrwxrwxrwx 1 root root 0 2009-07-13 17:51 event4 -> ../../class/input/input4/event4

lrwxrwxrwx 1 root root 0 2009-07-13 17:51 event5 -> ../../class/input/input5/event5

drwxr-xr-x 6 root root 0 2009-07-13 18:51 input0

drwxr-xr-x 6 root root 0 2009-07-13 18:51 input1

drwxr-xr-x 6 root root 0 2009-07-13 18:51 input2

drwxr-xr-x 7 root root 0 2009-07-13 18:51 input3

drwxr-xr-x 6 root root 0 2009-07-13 18:51 input4

drwxr-xr-x 6 root root 0 2009-07-13 18:51 input5

drwxr-xr-x 3 root root 0 2009-07-13 18:51 mice

lrwxrwxrwx 1 root root 0 2009-07-13 18:51 mouse0 -> ../../class/input/input3/mouse0

```

If I run udevadm test i get:

```

udevadm test /sys/class/input/event5/

run_command: calling: test

udevadm_test: version 141

This program is for debugging only, it does not run any program,

specified by a RUN key. It may show incorrect results, because

some values may be different, or not available at a simulation run.

parse_file: reading '/etc/udev/rules.d/10-local.rules' as rules file

parse_file: reading '/dev/.udev/rules.d/10-root-link.rules' as rules file

parse_file: reading '/lib/udev/rules.d/30-kernel-compat.rules' as rules file

parse_file: reading '/lib/udev/rules.d/40-alsa.rules' as rules file

parse_file: reading '/lib/udev/rules.d/40-gentoo.rules' as rules file

parse_file: reading '/lib/udev/rules.d/40-isdn.rules' as rules file

parse_file: reading '/lib/udev/rules.d/50-firmware.rules' as rules file

parse_file: reading '/lib/udev/rules.d/50-udev-default.rules' as rules file

parse_file: reading '/lib/udev/rules.d/60-cdrom_id.rules' as rules file

parse_file: reading '/lib/udev/rules.d/60-persistent-input.rules' as rules file

parse_file: reading '/lib/udev/rules.d/60-persistent-serial.rules' as rules file

parse_file: reading '/lib/udev/rules.d/60-persistent-storage-tape.rules' as rules file

parse_file: reading '/lib/udev/rules.d/60-persistent-storage.rules' as rules file

parse_file: reading '/lib/udev/rules.d/60-persistent-v4l.rules' as rules file

parse_file: reading '/lib/udev/rules.d/61-persistent-storage-edd.rules' as rules file

parse_file: reading '/etc/udev/rules.d/64-device-mapper.rules' as rules file

parse_file: reading '/etc/udev/rules.d/70-bluetooth-pcmcia.rules' as rules file

parse_file: reading '/etc/udev/rules.d/70-bluetooth.rules' as rules file

parse_file: reading '/etc/udev/rules.d/70-persistent-cd.rules' as rules file

parse_file: reading '/etc/udev/rules.d/70-persistent-net.rules' as rules file

parse_file: reading '/lib/udev/rules.d/75-cd-aliases-generator.rules' as rules file

parse_file: reading '/lib/udev/rules.d/75-persistent-net-generator.rules' as rules file

parse_file: reading '/lib/udev/rules.d/79-fstab_import.rules' as rules file

parse_file: reading '/lib/udev/rules.d/80-drivers.rules' as rules file

parse_file: reading '/etc/udev/rules.d/90-hal.rules' as rules file

parse_file: reading '/lib/udev/rules.d/90-network.rules' as rules file

parse_file: reading '/lib/udev/rules.d/95-udev-late.rules' as rules file

udev_rules_new: rules use 13356 bytes tokens (1113 * 12 bytes), 8381 bytes buffer

udev_rules_new: temporary index used 9400 bytes (470 * 20 bytes)

udev_device_new_from_syspath: device 0x8074b30 has devpath '/class/input/input5/event5'

udev_device_new_from_syspath: device 0x80748f8 has devpath '/class/input/input5/event5'

udev_device_read_db: device 0x80748f8 filled with db file data

udev_rules_apply_to_event: LINK 'char/13:69' /lib/udev/rules.d/50-udev-default.rules:5

udev_rules_apply_to_event: MODE 0640 /lib/udev/rules.d/50-udev-default.rules:26

udev_rules_apply_to_event: NAME 'input/event5' /lib/udev/rules.d/50-udev-default.rules:26

udev_device_new_from_syspath: device 0x80676f0 has devpath '/devices/pci0000:00/0000:00:08.0/0000:01:08.2/usb3/3-1'

udev_device_new_from_syspath: device 0x80679e8 has devpath '/devices/pci0000:00/0000:00:08.0/0000:01:08.2/usb3'

udev_device_new_from_syspath: device 0x8067b80 has devpath '/devices/pci0000:00/0000:00:08.0/0000:01:08.2'

udev_device_new_from_syspath: device 0x8067ce0 has devpath '/devices/pci0000:00/0000:00:08.0'

udev_device_new_from_syspath: device 0x8067e40 has devpath '/devices/pci0000:00'

udev_rules_apply_to_event: IMPORT 'usb_id --export /class/input/input5/event5' /lib/udev/rules.d/60-persistent-input.rules:8

util_run_program: 'usb_id --export /class/input/input5/event5'

util_run_program: '/lib/udev/usb_id' returned with status 1

udev_rules_apply_to_event: IMPORT 'path_id /class/input/input5/event5' /lib/udev/rules.d/60-persistent-input.rules:28

util_run_program: 'path_id /class/input/input5/event5'

util_run_program: '/lib/udev/path_id' (stdout) 'ID_PATH=pci-3-1'

util_run_program: '/lib/udev/path_id' returned with status 0

udev_rules_apply_to_event: RUN 'socket:/org/freedesktop/hal/udev_event' /etc/udev/rules.d/90-hal.rules:2

udev_device_update_db: created db file for '/class/input/input5/event5' in '/dev/.udev/db/\x2fclass\x2finput\x2finput5\x2fevent5'

udev_node_add: creating device node '/dev/input/event5', devnum=13:69, mode=0640, uid=0, gid=0

udev_node_mknod: preserve file '/dev/input/event5', because it has correct dev_t

update_link: '/dev/char/13:69' with target '/dev/input/event5' has the highest priority 0, create it

node_symlink: preserve already existing symlink '/dev/char/13:69' to '../input/event5'

udevadm_test: run: 'socket:/org/freedesktop/hal/udev_event'

```

The entires saying usb_id returning with status 1 seems odd. Is that an error ?

Anyone have any ideas how to at least get back the by-path entries?

I never needed the udev rules before, although if that is the fix i'd go for it.

I am running the following system:

```
Linux cube 2.6.24-gentoo-r8 #12 SMP Wed Dec 24 10:49:19 GMT 2008 i686 AMD Athlon(tm) Dual Core Processor 4850e AuthenticAMD GNU/Linux
```

----------

