Moderator Control Panel ]

[SOLVED] Remote works (kind of) without lirc

[SOLVED] Remote works (kind of) without lirc

Postby mossy » Thu Dec 08, 2011 10:11 pm

On 64-bit Mythbuntu -

I tried following the settings given by bickcat, but the remote would ONLY get a response from the machine when the lirc service was stopped! (sudo service lirc stop) Even then the only buttons that worked are: Mute, Numbers and Arrows.

I have since reinstalled Mythbuntu, this time without installing lirc. The remote "works" in the same limited fashion as before. The remote is useless unless it can be configured, but I don't know what's controlling it, or how to configure it.


There is no "/etc/lirc" folder, and while there is a "/dev/lirc0" as there was when lirc was installed, there is no longer a "/dev/lircd".

lsmod | grep rc outputs:
Code: Select All Code
rc_tbs_nec             12502  0
ir_lirc_codec          12898  0
lirc_dev               19166  1 ir_lirc_codec
ir_rc6_decoder         12546  0
ir_rc5_decoder         12546  0
rc_core                26884  10 rc_tbs_nec,ir_lirc_codec,ir_mce_kbd_decoder,ir_sony_decoder,cx23885,ir_jvc_decoder,ir_rc6_decoder,ir_rc5_decoder,ir_nec_decoder


So the ir_lirc_codec is loaded even though the service isn't installed, but there are several other "rc" codecs there that could be involved. So it's possible that the lirc codec is running the show, using some default configuration, but then again maybe it's not.

Is there a way for me to determine which codecs /processes are responsible for handling the remote signals, or otherwise determining how I can configure Ubuntu to handle the remote?

It could be that the best solution is to install lirc again, in which case I may need to disable whatever is controlling the remote right now, but I don't know what that is.

Also can I get other remotes to work with the 6981? How would I know if a different remote is compatible?
Last edited by mossy on Fri Apr 05, 2013 11:19 pm, edited 1 time in total.
mossy
 
Posts: 9
Joined: Thu Dec 08, 2011 9:19 pm

Re: Remote works (kind of) without lirc

Postby SergioDanielG » Fri Dec 09, 2011 7:20 pm

And woth about your /etc/lircd.conf file?
And you can read this to help you: http://www.mythtv.org/wiki/LIRC

Best regards.
SergioDanielG
 
Posts: 356
Joined: Tue May 31, 2011 3:53 am
Location: Tostado (SF) Argentina

Re: Remote works (kind of) without lirc

Postby mossy » Fri Dec 09, 2011 9:36 pm

Hi Sergio,

As I said above

1)
I tried following the settings given by bickcat


Originally, with lirc installed, I used the settings given by bickcat (which as you can see from the link includes hardware.conf and lircd.conf, follow the link in my last post if you need to see those settings).


2)
I have since reinstalled Mythbuntu, this time without installing lirc...There is no "/etc/lirc" folder


After reinstalling Mythbuntu I did not install lirc, and there was no /etc/lirc folder. (Clearly that folder is only createed when lirc is installed). Yet the remote worked, in a limited fashion.

So lirc is not controlling the RC receiver when it (lirc) is not installed, only the codec module (ir_lirc_codec) is loaded.

In that case what is receiving the remote inputs (limited to arrows, numbers and mute) and translating them into keystrokes?
mossy
 
Posts: 9
Joined: Thu Dec 08, 2011 9:19 pm

Re: Remote works (kind of) without lirc

Postby SergioDanielG » Fri Dec 09, 2011 11:11 pm

Yes, I understood all. But ¿did you read http://www.mythtv.org/wiki/LIRC ? There are using LIRC and maybe you can install lirc and use it too.
However you can use the remote without lirc, but you need configure the remote, but I don't remember where how to configure it.
Best regards.
SergioDanielG
 
Posts: 356
Joined: Tue May 31, 2011 3:53 am
Location: Tostado (SF) Argentina

Re: Remote works (kind of) without lirc

Postby mossy » Sat Dec 10, 2011 2:47 am

More detailed information -

Linux mythbox 3.0.0-13-generic #22-Ubuntu SMP Wed Nov 2 13:27:26 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

I get the following output in my syslog when I start lirc:
Code: Select All Code
Dec  9 17:48:53 mythbox lircd-0.9.0[4581]: lircd(devinput) ready, using /var/run/lirc/lircd
Dec  9 17:48:54 mythbox lircd-0.9.0[4581]: accepted new client on /var/run/lirc/lircd
Dec  9 17:48:54 mythbox lircd-0.9.0[4581]: initializing '/dev/input/tbs-ir'


There is similar lirc logging when I stop lirc, but there is no other lirc related logging, e.g. nothing when I press RC buttons. I have also temporarily introduced errors into my lircd.conf file, to see if the logs showed anything: they show an error and specify the line on which the error occurs. The fact that there is no such log output without the artificial error shows that the config file I'm using is error-free. This does not mean that there are no problems with the config file, but the fact that at least two other people on this forum have used it successfully makes me confident that my problems don't come from the lircd.conf or hardware.conf file.


lspci output for cx23885
Code: Select All Code
02:00.0 Multimedia video controller [0400]: Conexant Systems, Inc. CX23885 PCI Video and Audio Decoder [14f1:8852] (rev 04)
        Subsystem: Device [6981:8888]
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0, Cache Line Size: 4 bytes
        Interrupt: pin A routed to IRQ 16
        Region 0: Memory at fd800000 (64-bit, non-prefetchable) [size=2M]
        Capabilities: [40] Express (v1) Endpoint, MSI 00
                DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
                        ExtTag- AttnBtn- AttnInd- PwrInd- RBE- FLReset-
                DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
                        RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+
                        MaxPayload 128 bytes, MaxReadReq 512 bytes
                DevSta: CorrErr- UncorrErr+ FatalErr- UnsuppReq+ AuxPwr- TransPend-
                LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 <2us, L1 <4us
                        ClockPM- Surprise- LLActRep- BwNot-
                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
        Capabilities: [80] Power Management version 2
                Flags: PMEClk- DSI+ D1+ D2+ AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold-)
                Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
        Capabilities: [90] Vital Product Data
                Product Name: "
                End
        Capabilities: [a0] MSI: Enable- Count=1/1 Maskable- 64bit+
                Address: 0000000000000000  Data: 0000
        Capabilities: [100 v1] Advanced Error Reporting
                UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-
                UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
                CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
                CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
                AERCap: First Error Pointer: 14, GenCap- CGenEn- ChkCap- ChkEn-
        Capabilities: [200 v1] Virtual Channel
                Caps:   LPEVC=0 RefClk=100ns PATEntryBits=1
                Arb:    Fixed+ WRR32+ WRR64+ WRR128-
                Ctrl:   ArbSelect=WRR64
                Status: InProgress-
                Port Arbitration Table [240] <?>
                VC0:    Caps:   PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
                        Arb:    Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
                        Ctrl:   Enable+ ID=0 ArbSelect=Fixed TC/VC=ff
                        Status: NegoPending- InProgress-
        Kernel driver in use: cx23885
        Kernel modules: cx23885




I have loaded the cx23885 and cx25480 modules as follows, to add debug info to the logs:

modprobe cx25840 ir_debug=2 debug=2
modprobe cx23885 ir_input_debug=2 irq_debug=7 debug=7


Logs showing cx23885/cx25480 module response to remote control buttons being pressed -
Code: Select All Code
Dec  9 16:39:08 mythbox kernel: [ 8397.182218] cx23885[0]/0: pci_status: 0x08300000  pci_mask: 0x08000000
Dec  9 16:39:08 mythbox kernel: [ 8397.182228] cx23885[0]/0: vida_status: 0x00000000 vida_mask: 0x00000000 count: 0x0
Dec  9 16:39:08 mythbox kernel: [ 8397.182235] cx23885[0]/0: ts1_status: 0x00000000  ts1_mask: 0x00000000 count: 0x0
Dec  9 16:39:08 mythbox kernel: [ 8397.182241] cx23885[0]/0: ts2_status: 0x00000000  ts2_mask: 0x00000000 count: 0x0
Dec  9 16:39:08 mythbox kernel: [ 8397.182247] cx23885[0]/0:  (PCI_MSK_AV_CORE   0x08000000)
Dec  9 16:39:08 mythbox kernel: [ 8397.182398] cx25840 16-0044: AV Core IRQ status (entry): ir       
Dec  9 16:39:08 mythbox kernel: [ 8397.182625] cx25840 16-0044: AV Core ir IRQ status: 0x21 disables: 0x20
Dec  9 16:39:08 mythbox kernel: [ 8397.183314] cx25840 16-0044: IR IRQ Status:  tsr     rto           
Dec  9 16:39:08 mythbox kernel: [ 8397.183320] cx25840 16-0044: IR IRQ Enables:     rse rte roe
Dec  9 16:39:08 mythbox kernel: [ 8397.183983] cx25840 16-0044: rx read: end of rx
Dec  9 16:39:08 mythbox kernel: [ 8397.183988] cx25840 16-0044: rx read:    9709000 ns  space
Dec  9 16:39:08 mythbox kernel: [ 8397.184247] cx25840 16-0044: AV Core audio IRQ status: 0x80 disables: 0xff
Dec  9 16:39:08 mythbox kernel: [ 8397.184493] cx25840 16-0044: AV Core audio MC IRQ status: 0x2000 enables: 0x0000
Dec  9 16:39:08 mythbox kernel: [ 8397.184908] cx25840 16-0044: AV Core video IR
Dec  9 16:39:08 mythbox kernel: [ 8397.185024] cx25840 16-0044: AV Core IRQ status (exit):   


That kind of logging happens for each button press, regardless of whether or not lirc is running. The difference is that with lirc running, the machine does NOT get keyboard input when buttons on the remote are pressed. Also note irw shows no response to RC button presses, indicating that /var/run/lirc/lircd is not receiving any input.

So it seems that the cx23885 and cx25840 modules are handling the IR reception and are being blocked from sending the keystrokes to the system when lirc is running, and/or cx23885 and cx25840 are preventing IR input being sent to lirc.

My questions remain:

    Can I configure how cx23885/cx25840 handles IR input? If so, how?
    Do I need to stop cx23885/cx25840 from handling IR reception before lirc will work correctly? Is this possible?
    Do the latest TBS drivers break LIRC again? (Seems unlikely, doubt I'd be the first to complain).

If anyone from TBS is reading I can provide more information as required.
mossy
 
Posts: 9
Joined: Thu Dec 08, 2011 9:19 pm

Re: Remote works (kind of) without lirc

Postby mossy » Tue Dec 13, 2011 10:25 am

Have it working now, will report findings in a day or two.
mossy
 
Posts: 9
Joined: Thu Dec 08, 2011 9:19 pm

Re: Remote works (kind of) without lirc

Postby romanb » Sat Jan 07, 2012 7:21 am

Hi mossy,

you wrote, you have the IR working with lirc. I have the same problem on my Ubuntu 11.10 64bit.

Can you please post your solution.

greetings
Roman
romanb
 
Posts: 2
Joined: Sat Jan 07, 2012 4:30 am

Re: Remote works (kind of) without lirc

Postby mossy » Wed Jan 11, 2012 9:03 pm

Hi Roman,

In short, my solution was to stop the lirc service and run the lircd command manually.

Run the following to see exactly what command the lirc service is running:

Code: Select All Code
ps aux | grep lirc


This should output something like this:

Code: Select All Code

root      1215  0.0  0.0  32304   680 ?        Ss   12:46   0:00 /usr/sbin/lircd --output=/var/run/lirc/lircd --driver=devinput --device=/dev/input/tbs-ir
user     2657  0.0  0.0   9368   880 pts/0    S+   12:57   0:00 grep --color=auto lirc



The exact lircd parameters will depend on your configuration.

Stop the lirc service and run the same command from the output you get above:

Code: Select All Code
sudo service lirc stop
sudo /usr/sbin/lircd --output=/var/run/lirc/lircd --driver=devinput --device=/dev/input/tbs-ir
mossy
 
Posts: 9
Joined: Thu Dec 08, 2011 9:19 pm

Re: Remote works (kind of) without lirc

Postby mossy » Fri Apr 05, 2013 11:16 pm

The problem was caused by evdev (an input driver for Xorg) which was picking up the remote as a keyboard input device. This could be seen from my Xorg logs (/var/log/Xorg...), see below. Most of the buttons don't work by default because they don't naturally map to keyboard buttons, e.g. your keyboard doesn't have an EPG key, but it does have numbers and direction keys.

There are basically two solutions
1. Configure evdev to ignore the IR input and use lirc
2. Remap the remote buttons to keyboard keys, as discussed in this post, and don't use lirc

evdev can be configured to ignore the TBS6981 as a keyboard by adding the following to the end of /usr/share/X11/xorg.conf.d/10-evdev.conf -

Code: Select All Code
Section "InputClass"
        Identifier "cx23885 IR (TurboSight TBS 6981)"
        MatchProduct "cx23885 IR (TurboSight TBS 6981)"
        MatchIsKeyboard "on"
        Option "Ignore"
EndSection


Note that MatchProduct above matches the identifier found in Xorg.0.log.


This is an extract from Xorg.0.log showing evdev picking the remote input, these lines do not appear if evdev is correctly configured to ignore the remote as a keyboard:

Code: Select All Code
[    21.486] (II) config/udev: Adding input device cx23885 IR (TurboSight TBS 6981) (/dev/input/event3)
[    21.486] (**) cx23885 IR (TurboSight TBS 6981): Applying InputClass "evdev keyboard catchall"
[    21.486] (II) Using input driver 'evdev' for 'cx23885 IR (TurboSight TBS 6981)'
[    21.486] (II) Loading /usr/lib/xorg/modules/input/evdev_drv.so
[    21.486] (**) cx23885 IR (TurboSight TBS 6981): always reports core events
[    21.486] (**) evdev: cx23885 IR (TurboSight TBS 6981): Device: "/dev/input/event3"
[    21.486] (--) evdev: cx23885 IR (TurboSight TBS 6981): Vendor 0x6981 Product 0x8888
[    21.486] (--) evdev: cx23885 IR (TurboSight TBS 6981): Found keys
[    21.486] (II) evdev: cx23885 IR (TurboSight TBS 6981): Configuring as keyboard
[    21.486] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:04.0/0000:02:00.0/rc/rc0/input3/event3"
[    21.486] (II) XINPUT: Adding extended input device "cx23885 IR (TurboSight TBS 6981)" (type: KEYBOARD, id 8)

mossy
 
Posts: 9
Joined: Thu Dec 08, 2011 9:19 pm


Return to Linux

Who is online

Users browsing this forum: No registered users and 1 guest

cron