#22 Irexec dies when you disconnect the device

1.0
closed
nobody
irexec (4)
2014-08-27
2014-08-19
Deve
No

Irexec dies when you disconnect USB IR device. It doesn't crash - simply exits.

lsusb shows:
Bus 001 Device 010: ID 045e:006d Microsoft Corp. eHome Remote Control Keyboard keys

I use Ubuntu 14.04 with lirc 0.9.

Related

Tickets: #9

Discussion

  • Deve

    Deve - 2014-08-19

    Actually it occurs also in other programs. For example Audacious has support for auto-reconnect and it restores connection after few seconds.

     
  • Alec Leamas

    Alec Leamas - 2014-08-19
    • labels: --> irexec
     
  • Alec Leamas

    Alec Leamas - 2014-08-19

    Thanks for filing this bug! It looks reasonable to add some options and code to irexec so it can keep running (or restart) if the device is disconnected. See also ticket #9, irexec does not restart after suspend/hibernate.

     
    Last edit: Alec Leamas 2014-08-20
  • Alec Leamas

    Alec Leamas - 2014-08-19
    • status: open --> accepted
     
  • Christoph Bartelmus

    Do not try to handle this in irexec. lircd has support to handle device disconnect gracefully. No change should be required in irexec. Which lircd driver is being used here?

     
  • Christoph Bartelmus

    • status: accepted --> need-info
     
  • Deve

    Deve - 2014-08-20

    hardware.conf says:

    Chosen Remote Control

    REMOTE="Windows Media Center Transceivers/Remotes (all)"
    REMOTE_MODULES="lirc_dev mceusb"
    REMOTE_DRIVER=""
    REMOTE_DEVICE="/dev/lirc0"
    REMOTE_SOCKET=""
    REMOTE_LIRCD_CONF="mceusb/lircd.conf.mceusb"
    REMOTE_LIRCD_ARGS=""

    Chosen IR Transmitter

    TRANSMITTER="Microsoft Windows Media Center V2 (usb) : Direct TV Receiver"
    TRANSMITTER_MODULES="lirc_dev mceusb"
    TRANSMITTER_DRIVER=""
    TRANSMITTER_DEVICE=""
    TRANSMITTER_SOCKET=""
    TRANSMITTER_LIRCD_CONF="directtv/general.conf"
    TRANSMITTER_LIRCD_ARGS=""

    So, I use mceusb driver.

     
  • Alec Leamas

    Alec Leamas - 2014-08-26

    Hm... thanks for feedback!

    What would also be very helpful is full debug logs. However, on 0.9.0 you need to rebuild the package using configure to enable the debug functions. Is this something you could do?

     
  • Deve

    Deve - 2014-08-26

    I tried to compile current git version. There were some issues with missing packages which autotools doesn't check. Finally compiled it, but now it doesn't work because of some missing libraries.

    I conpiled 0.9.0 version with --enable-debug flag. What is strange, this version works fine and irexec still runs when you disconnect the device. So actually I can't give you debug output because debug version works ;)

    Release version (from ubuntu repos) says:

    lircd-0.9.0[3042]: lircd(default) ready, using /var/run/lirc/lircd
    lircd-0.9.0[3042]: accepted new client on /var/run/lirc/lircd
    lircd-0.9.0[3042]: error reading from /dev/lirc0 (ret -1, expected 4)
    lircd-0.9.0[3042]: No such device
    lircd-0.9.0[3042]: caught signal

    Lircd was exitted after it. Previously it looked like irexec dies because ubuntu automatically restarts lircd. But lircd dies, and then irexec because of that.

    Maybe there is some necessary code in #ifdef DEBUG somewhere?

    I will try to run current git version in next few days.

     
  • Alec Leamas

    Alec Leamas - 2014-08-27

    Thanks for trying to resolve this! When you proceed, be aware that current git isn't a clean drop-in. In particular, check that you get the --plugindir option right.

    Om a sidenote: Do you remember the libs configure didn't check for you?

     
  • Christoph Bartelmus

    The Ubuntu package adds these lirc.udev rules:

    ACTION=="add", KERNEL=="lirc[0-9]", RUN="/etc/init.d/lirc restart udev"
    ACTION=="remove", KERNEL=="lirc[0-9]", RUN="/etc/init.d/lirc stop udev"

    Nasty. Please file a bug report against the Ubuntu package. Closing this...

     
  • Christoph Bartelmus

    • status: need-info --> closed
     

Log in to post a comment.