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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Actually it occurs also in other programs. For example Audacious has support for auto-reconnect and it restores connection after few seconds.
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
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?
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.
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?
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.
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?
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...