xbianonpi / xbian

XBMC on Raspberry Pi, Bleeding Edge
https://xbian.org
GNU General Public License v3.0
294 stars 46 forks source link

Lirc modules are not always loaded #644

Closed pcernocky closed 9 years ago

pcernocky commented 9 years ago

From /etc/init/lirc.conf the /etc/lirc/hardware.conf script is executed where dmesg output is parsed like this: DMESG="$(dmesg)". But at this time dmesg not always contains information about IR remote.

The DMESG variable contains:

[   10.144464] bcm2835-cpufreq: switching to governor powersave
[   10.144496] bcm2835-cpufreq: switching to governor powersave
[   10.144860] bcm2835-cpufreq: switching to governor performance
[   10.144882] bcm2835-cpufreq: switching to governor performance
[   10.861740] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0x4DE1
[   11.683981] udevd[569]: starting version 175

Sometime it ends here, but sometimes it continues with:

[   13.998468] Registered IR keymap rc-rc6-mce
[   13.999150] input: Media Center Ed. eHome Infrared Remote Transceiver (0471:060c) as /devices/platform/bcm2708_usb/usb1/1-1/1-1.3/1-1.3:1.0/rc/rc0/input0
[   13.999552] rc0: Media Center Ed. eHome Infrared Remote Transceiver (0471:060c) as /devices/platform/bcm2708_usb/usb1/1-1/1-1.3/1-1.3:1.0/rc/rc0
[   14.362675] IR NEC protocol handler initialized
[   14.373193] IR RC6 protocol handler initialized
[   14.485432] mceusb 1-1.3:1.0: Registered   BB+ Dongle(e.d) with mce emulator interface version 1
[   14.485469] mceusb 1-1.3:1.0: 2 tx ports (0x0 cabled) and 2 rx sensors (0x1 active)
[   14.485781] usbcore: registered new interface driver mceusb
[   14.546626] IR JVC protocol handler initialized
[   14.726052] IR RC5(x) protocol handler initialized
[   14.728655] IR Sony protocol handler initialized
[   14.822414] IR SANYO protocol handler initialized
[   14.839530] IR Sharp protocol handler initialized
[   14.846144] input: MCE IR Keyboard/Mouse (mceusb) as /devices/virtual/input/input1
[   14.846909] IR MCE Keyboard/mouse protocol handler initialized
[   14.967343] lirc_dev: IR Remote Control driver registered, major 247 
[   15.089848] rc rc0: lirc_dev: driver ir-lirc-codec (mceusb) registered at minor = 0
[   15.089879] IR LIRC bridge handler initialized

If dmesg contains the longer output then lirc modules (lirc_dev and mceusb) are properly loaded and my remote works well. In the other case the remote works only partially (only few keys) like in https://github.com/xbianonpi/xbian/issues/440.

mk01 commented 9 years ago

@pcernocky

can you try edit /etc/init/lirc.conf and change 1st line to:

start on stopped module-init-tools and stopped udevtrigger
pcernocky commented 9 years ago

I've tried it, rebooted about 15 times and it works good. Thanks a lot.

mk01 commented 9 years ago

@pcernocky

pushed