Just installed Raspbian on a 3 B connected to a TV that supposedly supports CEC (LG 47LD450), but struggling to find any info on how to test CEC on Raspbian.

I want to confirm that it works, or alternatively isolate which part doesn't work (e.g. the cable), but the only thing that turns up in my searches is the cec-client command. It does nothing for me except saying that auto detect failed. Not sure what that's indicative of. I don't know if the tool is suitable for what I want.

pi@raspberrypi:~ $ cec-client
No device type given. Using 'recording device'
CEC Parser created - libCEC version 4.0.1
no serial port given. trying autodetect: FAILED

Is it supposed to fail auto detection if my cable is faulty? That I've found indications of; some threads I've found immediately start talking about cables. It just felt weird to me at first because I got the impression that cec-client was searching for some internal device, which doesn't require the presence of a hdmi cable. I suppose that was a wrong impression.

How do I test CEC?


I haven't found an answer yet, but...

I installed LibreELEC and could immediately conclude that 1. CEC works and that the cable is not faulty, 2. Raspbian doesn't support CEC out of the box (apparently) since it never worked in Kodi, 3. neither cec-client nor the suggested tvservice command could confirm that the software setup was insufficient — at least the way I used them.

1 Answer 1


tvservice -m CEC should show supported modes.

You will only get a response if the connected device supports CEC; monitors often only respond to DMT.

There is no man page for tvservice, but tvservice -h will show the commands.

tvservice -d edid.dat; edidparser edid.dat should give you all supported data.

  • Thank you. I got [E] Invalid group 'CEC', but got a response for DMT. I guess that means the cable is faulty, assuming the TV isn't.
    – Andreas
    Sep 3, 2017 at 1:53
  • I'd be grateful for confirmation on my guess. Can I assume that Raspbian has all it needs and is configured for CEC to work judging by these results? Everywhere I read there's talk of compiling libcec, 4.0.1 not working, 4.0.2 working, older Raspbian working, newer not working... Not that I know what libraries tvservice uses.
    – Andreas
    Sep 3, 2017 at 12:04
  • Well, I just installed LibreELEC and can confirm there's nothing wrong with my cable. CEC works. So, technically, the question stands.
    – Andreas
    Sep 3, 2017 at 14:57
  • cec-client is working fine on a stock stretch install. I had to compile it under jessie, but the deb seems to be working fine. Are you certain cec is enabled on your tv? I had to enable it on my Sony.
    – bobstro
    Sep 6, 2017 at 2:11
  • @bobstro CEC is 100% working in LibreELEC.
    – Andreas
    Sep 6, 2017 at 18:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.