Fix HDMI-CEC weirdness with a Raspberry Pi and a $7 cable

149 pointsposted 3 hours ago
by jlian

70 Comments

recursive

2 hours ago

Modern AV stuff is insane. I have no interest in taking it up as a hobby. I have an xbox, a TV, and a pair of bookshelf speakers. How am I supposed to get the audio to the speakers without a bulky expensive receiver box? Luckily, I have one of the last remaining TVs with a headphone jack. I don't use a remote for any of it.

Side note: Sometimes the TV doesn't come on when you press its power button. After a tremendous amount of experimentation, I determined this was because the "brain" was on, but the backlight was not. Power cycling it blind usually fixes it. That's harder than it sounds though because you have to navigate the menu blind using short and long button presses with the one button. But I'm scared to try a new TV, because then I'm going to have to figure out how to get audio out of the TV.

It seems like AV stuff used to be so simple. Now the simplest scenarios seem to require more and more knowledge about arcane connection standard interactions and network topology. Ugh.

jimmaswell

2 hours ago

That little headphone jack is seriously driving bookshelf speakers to a reasonable volume? If it works it works but that doesn't sound right, unless these are actually self-powered speakers with their own amplifiers inside. I'd really like to know the details because this sounds crazy.

Also, I collect a lot of old receivers and speakers. It's really not that complicated and the basics have been the same since the 70s and 80s. Any flatscreen TV made in the past 20 years typically has a TOSLINK output which will be compatible with receivers stretching back to the 80s - I have my LG C1 connected to some 90s Marantz receiver this way. Any old receiver you find on Facebook Marketplace for $20 will typically suffice here as long as you check for the TOSLINK port first, but you do need a separate actual amplifier somewhere along the line to drive a speaker larger than a pair of headphones unless the speaker has its own amp built-in.

I find all this stuff fun so my own setup has that chained to a series of other receivers acting as subwoofer amplifiers as well as using the pre-amp output to drive a Mesa Baron tube amplifier/Acoustat electrostats I was gifted, but most people don't need anything so complex.

recursive

an hour ago

The jack is not driving the bookshelf speakers. They're active. They have their own internal amps. It's simple if you use a receiver. If someone can point me to a receiver that's more like 4 inches than 18 inches, then I'd consider that a solution. Receivers are big boxes as far as I've seen. I don't have space. Or maybe I don't want to make space.

tonyarkles

3 minutes ago

Have a look at Fosi Audio. I'm currently using a BT30D to drive the passive speakers from an old Samsung integrated amplifier+receiver+2014-era "Smart TV" type system that died. It only has 1 analog input and Bluetooth, but it looks like they have other products in a similar form factor that can take multiple inputs (e.g. the P4 Mini). I was skeptical but needed something cheap to drive those speakers and am quite impressed.

mikepurvis

20 minutes ago

Some of the bigness is just tradition and buyer expectation (big = expensive). But also, modern AVRs are like 1000W devices amplifying 7, 9, even 11 channels of passives. That’s a lot of componentry and corresponding heat to shed— if you open one of those up, it’s not just empty space in there like an NES cartridge or something.

timdorr

39 minutes ago

https://www.sonos.com/en-us/shop/amp

Sonos makes this specifically. Has an RCA and HDMI input, along with being a Sonos device for streaming audio.

The only downside is the price.

s3graham

29 minutes ago

And that Sonos is terrible to its users.

I had a houseful of overpriced speakers, some only 3 years old when they decided they were too old to support in their rewritten app, or some lazy crap like that.

For GP; I use some cheapo (sub $50) "100W mini amps" from Amazon. They seem fine to me.

ryandrake

an hour ago

I was kind of in OP's shoes a few months ago. My 2000-2010 era stereo receiver crapped out and I was looking to see if I could simplify my system a bit. Unlike OP, I didn't need anything that could extract audio from the TV. My requirements were:

1. A decoder with at least 5.1 output since that's how many speakers I have

2. At least 3 HDMI inputs + 1 HDMI output to my TV

3. An amplifier with a volume control

That's it! I don't need an FM tuner. I don't need multiple zones. I don't need wild listening modes and DSP effects. I don't need an on-TV setup display. I don't need fiber optic digital audio inputs. I don't need fucking rows and rows of 20 RCA jack inputs, composite video, component video, S-Video. You'd think I could find a small cheap box the size of an AppleTV that I could just hide somewhere that could do this, but I couldn't find anything sufficient. So I got another $20 gigantic, ugly, old 18-inch receiver again from Craigslist and just leave all those features and inputs unused.

jimmaswell

7 minutes ago

I never understood the "ugly" perception. At worst some might look boring to me, but at best some of them are absolutely beautiful. For example, my favorite in my collection appearance-wise has a 70s-style wooden finish on all but the front plate with a polished silver look on the front plate: https://imgur.com/a/DAUeJJW

p1necone

an hour ago

A receiver has always been a pretty standard part of even really simple AV setups - you can get half decent ones pretty cheap, and then you just run either the HDMI ARC port or the optical/coax digital audio out from your tv to the receiver so that everything you plug into your tv has it's audio go out to the speakers.

recursive

an hour ago

I know I could do this. But I don't really have space for a box. And I'd rather not have it.

monster_truck

an hour ago

It's still very simple and you have never needed anything expensive to do so. Stop with the learned helplessness and "being afraid to try a new TV"

recursive

35 minutes ago

I'm not going to buy a TV just to "try" to figure out how to get audio out of it. I mean, I'm sure there must be a way to do this. I've seen a few options in this thread. If I were to buy a TV, I would want to avoid making it more difficult than I have to. To that end, I'd want to figure out specifically how to get audio to the speakers. In my case, they're active bookshelf speakers without HDMI input.

If the only possible way of doing this is with a bulky receiver, I'd feel justified in complaining about modern AV stuff. Not because of the cost, but because of the size.

Anyway, thanks for your input.

amluto

2 hours ago

> How am I supposed to get the audio to the speakers without a bulky expensive receiver box?

You can get a small ARC/eARC audio extractor with RCA or S/PDIF output and use your favorite amplifier or DAC with it.

ewoodrich

an hour ago

Yep, I have a bunch of those audio extractors, they're awesome. In my home office setup I even have an HDMI output that's mirrored to several screens and extract audio at various points along the same path (two using the dedicated mini extractor boxes, one just using the headphone out on a monitor).

systemtest

2 hours ago

> How am I supposed to get the audio to the speakers without a bulky expensive receiver box?

You can have bookshelf speakers with an integrated amplifier and HDMI-ARC. All you need is an HDMI cable between the TV and the speakers.

recursive

19 minutes ago

I'm not home at the moment, but I'm pretty sure they don't have an HDMI input. I haven't seen speakers that do, except sound bars. I don't like the general premise of sound bars. You either need a subwoofer, or you're limited to too-many too-small drivers.

rhinoceraptor

an hour ago

Another infuriating issue is TVs with so few HDMI inputs. I have tried many different HDMI switchers and none of them work reliably, so it kind of puts me off of buying a receiver which would also have that function.

jonhohle

an hour ago

I’ve mostly had no issues with HDMI through Yamaha receivers and that includes weird things like an OSSC and Framemeister.

On the other hand, HDMI switchers haven’t fared as well. I built a mini console rack with a switch and it doesn’t recognize several devices, even when manually selected.

exmadscientist

an hour ago

> Yamaha receivers

In my limited experience, Yamaha handles HDMI-CEC significantly better than Denon/Marantz. As evidenced by the fact that I currently own a Marantz receiver and am reading this page, but back when I owned a Yamaha receiver, I had no need to care about all of this crud. Things somehow worked on the first try! I did not expect that. However, it conditioned me to expect that again with a different receiver (the sources and sinks are the problems, right? the receivers are super well tested because sitting in the middle and passing these commands around is their entire job, right? right?) which was a mistake.

(The actual issue with the Marantz is that it seems to be eating some kind of power-on command from the source, and not passing it on, so the TV never turns on if you try to turn on the receiver or the source. I have no idea how to fix this, short of following in the path of this article.)

mschuster91

an hour ago

Personally, I run a Yinker 4x4 matrix (in: nintendo switch 1, chromecast, mac pro 4.1 I use as a gaming rig, raspberry pi 5, out: projector, TV, pi 5) and am quite happy with it - no outages so far in half a year of uptime.

I desperately need to work with CEC though lol, never had the time to actually test that.

[1] https://www.amazon.de/Yinker-hintergrundbeleuchteter-Unterst...

justinsaccount

an hour ago

> It seems like AV stuff used to be so simple.

> without a bulky expensive receiver box

A "receiver" has been one of the standard options for making bookshelf speakers work for more than 50 years. A receiver is also not expensive. You can get a basic used one for under $100. I paid $30 for a perfectly working 5.1 Denon receiver with HDMI.

Your problem is that you aren't even using "Modern" AV stuff. If you were, your speakers and TV would both have HDMI Arc ports. Arc has been a thing since 2009.

> That's harder than it sounds though because you have to navigate the menu blind using short and long button presses with the one button.

Or you could unplug it and plug it back in.

recursive

an hour ago

Why are receivers so big? It's not exactly a money issue. I just don't want the big box.

jauntywundrkind

2 hours ago

Thankfully there are fun engaged hackery people.

The article here seemed to dive in, look at what was happening, and figure out some altogether decent & not absurd flows. It wasn't "easy", but it also wasn't totally absurd.

I get why you'd whinge & argue for a simple cable. But this was also a wonderful study, that showed steps, that I hope can bring joy & not just derision. That said, I also have no receiver box & rely on headphone out... which my not that old LG C4 has. Also, if that goes away: SPDIF decoder boxes are very cheap!

lysace

2 hours ago

Your quest is thankfully unrelated to ARC/CEC.

Find a tiny TPA3255- or TPA3116-based amp. These are class D amplifier chips made by TI.

https://en.wikipedia.org/wiki/Class-D_amplifier

Buy one of these from e.g. Amazon.

Optionally: Throw away/recycle away the supplied chinese noname power supply. Buy a used laptop PSU from a reputable brand locally for cheap instead. I scored a Lenovo 135W/20V laptop PSU for $5 at my local Goodwill equivalent. Solder on a 5.5mm barrel jack connector.

My fav for your use case: Fosi Audio TB10D.

jtbayly

41 minutes ago

1. His speakers are powered already. He doesn't need an amp. 2. Even if they weren't, how is he supposed to connect to the Fosi without a headphone jack coming out from the TV? The Fosi only has RCA input.

lysace

35 minutes ago

1. That information just arrived as a reply to my comment.

2. "Luckily, I have one of the last remaining TVs with a headphone jack."

recursive

44 minutes ago

I'm using active bookshelf speakers with integrated amps. They are working fine.

lysace

41 minutes ago

I really dislike this behavior. You presented a problem, but you didn't want a solution. You wanted attention.

davidczech

an hour ago

A side note: I am very sad that HDMI-CEC apparently can only support like 3 "console-like" devices. I have an Apple TV, Nintendo Switch 2, Sound Bar (eARC) and PS5 hooked up, but only 3 can really interact with CEC.

It took me a long time to diagnose why it seemingly wouldn't work with my Nintendo Switch 2.

I ended up disabling it on my PS5 because I never use the darn thing, but it kind of stinks since most TV's have 4 HDMI inputs.

codepoet80

3 hours ago

Yup, my AppleTV is the only device that gets CEC right. Even my LG TV and LG soundbar get confused. And don’t get me started on the PS4 Pro’s garbage implementation. I’m sad that Logitech killed Harmony because CEC was supposed to make universal remotes obsolete — they’re still the only way my full home theater can function without juggling a dozen remotes.

Spoom

2 hours ago

I dread the day that Logitech kills the servers for Harmony. If they don't release the IR code database, they're going to have a lot of people (myself included) pretty annoyed.

(To be clear, they still work today if you can get a second hand remote / hub.)

zimpenfish

2 hours ago

Amusingly, my AppleTV is currently the one thing that doesn't even though it used to - for some reason, with no changes, it just stopped turning on the TV. Switch 2 can happily turn on the TV though. Most peculiar.

(I've tried updating the AppleTV, replugging the HDMI cable, unplugging the HDMI cable for <period of time>, etc. Nothing has worked. TV does not have any network which means it can't have had any nefarious updates.)

spacecrafter3d

an hour ago

This has happened to me several times. I believe what fixes it is power cycling my AV receiver, in case it helps you.

jnaina

26 minutes ago

this. power cycling my Marantz fixed it. Otherwise Apple TV is rock solid.

crtasm

an hour ago

Anyone know how to make a LG TV wake an AppleTV from sleep?

Once it's awake buttons presses on the LG remote are passed through to it but I have to keep the Apple remote around for that first step.

SchemaLoad

3 hours ago

I've had pretty good luck with the Steam Deck for CEC, at least with the Apple USB-C hub.

deepspace

17 minutes ago

I am not sure why the author specifically mentions a $7 cable when the Raspberry Pi and accessories are going to set you back close to $100. That is by far the most expensive component. The money is possibly better spent buying a programmable remote.

ihaveone

7 minutes ago

I'm assuming he could have used a Pi zero instead

bsimpson

2 hours ago

I saw the Steam Machine bragging about CEC and being able to turn the TV on when it does, which made me wonder why my setup doesn't do that.

Turns out that there's a special pin on your APU that has to be wired up, and AMD didn't bother for the Z1 Extreme chips. I wish "wake on signal" was a universal option.

extraduder_ire

2 hours ago

For some reason, GPU makers don't usually expose the CEC interface for the HDMI ports on their cards. Even the raspberry pi's ability to support it wasn't standard/default for years.

The common workaround if you had a kodi PC or something was to buy one of these things: https://www.pulse-eight.com/p/104/usb-hdmi-cec-adapter and run a HDMI cable through it. Because CEC is open drain like i2c is, connecting to it anywhere in your network of devices should work. (the HDMI spec mandated that the CEC pin needs to be connected, even if you aren't using it, from the first version) Just connect it to a spare HDMI port anywhere and you're off to the races.

sedatk

2 hours ago

Huh, is that why my Steam Deck won't wake up my TV?

jonah-archive

2 hours ago

A long time ago I used one of these HDMI-CEC-to-USB/serial bridges: https://web.archive.org/web/20110219131237/http://rainshadow...

(I'd gotten a large LG monitor instead of a flatscreen tv, and it didn't talk HDMI-CEC but it had a serial-over-TRRS control interface, so I listened for messages on the bus and my media PC translated and relayed them to the monitor.)

sudobash1

2 hours ago

I am using a raspberry pi pico with a modified pico-cec program to control my Jellyfin-client media PC. CEC is actually really fun to hack on, and once you get a custom setup working, it is (at least in my experience) rock solid.

Jellyfin even has a TV mode that you can enable in a normal desktop browser. So my media PC runs the browser in kiosk mode, and it has CEC buttons mapped to keyboard presses. Guests have used it, and I don't think anyone could tell that it wasn't a "smart" TV.

https://github.com/gkoh/pico-cec

baq

3 hours ago

Assuming you’re ok with connecting your receiver to the network, you should be able to wake the receiver if you detect the tv is on without any cables at all - if your tv is also on the network (I’ve got a home assistant automation doing exactly that) or you can use a $10 smart plug with power metering.

That said props for actually using HDMI-CEC! And it’s cheaper than most smart plugs (and probably safer, too)

rgovostes

an hour ago

This is the lord’s work. It’s ridiculous that in 2025 my $500 gaming PC GPU cannot tell the receiver to change inputs. Even my Apple TV, which is considered a model citizen here, steals the receiver’s input every few hours if I have another device active.

ghm2199

an hour ago

An analogous audio binding issue used to happen with my Jabra Bt headphones. It was generally connected to my phone and my computer. After finishing a phone call — if previously the computer was playing some music — the music would turn back on but it would be a very poor quality, I suspect the audio "mode" was stuck at "transmitting" phone call audio quality even though the BT software on the headset detected devices being switched from phone -> computer. Toggling the BT sound output on the mac to and fro between Computer and Headphones, fixed it.

I suspect it was probably a vendor — jabra — software issue when sending a signal to apple's BT stack when switching between types of devices? But probably not worth fixing on my own.

kayson

2 hours ago

Would love to know more about the magic Apple bytes and why the Denon is behaving differently with consoles.

Arbortheus

2 hours ago

In my home media setup (LG UQ81 TV, WiiM Amp via ARC, Xbox Series X, Chromecast with Google TV), the CEC setup _almost_ works perfectly.

* I can use the LG TV’s remote alone to control everything including the Chromecast and amp’s volume controls.

* The amp automatically switches on and off with the TV.

* Turning the Xbox on/off via its controller also turns on/off the TV and the amplifier together.

Mostly good, except sometimes when I have my Chromecast on and switch the Xbox on via the controller it gets stuck in an endless loop of flicking back and forth between HDMI 1 and HDMI 2, between Chromecast and Xbox. Nothing I can do will stop it except to power cycle the TV.

If anyone has experienced anything similar or has any tips on how to debug this that would be much appreciated!

pottertheotter

2 hours ago

“every console behaves like it missed the last week of CEC school. They wake the TV, switch the input, then leave the Denon asleep so I’m back to toggling audio outputs manually.”

My Roku does this! It will turn on the TV but not the soundbar, which is so frustrating. Guess it’s somewhat normal.

rcarmo

an hour ago

Genius. I might have a pretty good use for this, since I have constant issues with my consoles fighting for the TV.

paulbgd

3 hours ago

Super cool, I'm definitely going to have to grab a pi and set this up. Now if we could also solve the ps5/switch/etc not turning off the TV, my setup would be perfect!

theLegionWithin

an hour ago

that was an interesting read. glad I do all of my video watching & games playing on a computer instead of consumer grade hardware!

jauntywundrkind

3 hours ago

I know it's called a bus, but I'm still surprised that all devices get the HDMI-CEC stream of all other devices. Being able to watch the Apple TV from the Pi was super cool, and I never would have guessed it was possible to see what was going on there (short of building a man in the middle hardware proxy)!

tylerflick

3 hours ago

CEC is just i2c which is a bus. In fact you can hook regular i2c devices up to an HDMI port and communicate with them. You’ll need a resistor and shouldn’t draw more than 50 mA.

amluto

2 hours ago

I always assumed that it was a separate i2c bus per HDMI link and that it was the AVR’s job to handle a request from something and send the right requests to everything else.

extraduder_ire

an hour ago

Much like i2c, any message put on the bus is transmitted to everything on the bus.

Version 1.0 and later of the HDMI spec even mandate that you have to connect those pins across all HDMI ports on your device even if you don't do anything with them.

amluto

35 minutes ago

Okay, now I’m curious. If the pins are just connected across all ports, how does the AVR tell which CEC-speaking device is on which port? Chip select or similar pins?

extraduder_ire

an hour ago

It's electrically similar, but not directly compatible. (if you know better than me, please let me know)

neuroelectron

40 minutes ago

"Media closet tour"

Just looks like a Rube Goldberg/spoiled-brat-cash-pit server to me. This is really illustrative of the nonsense that media copyright has manufactured. I'm not going to solve "HDMI-CEC weirdness with a XYX" I'm going to download the movie from a torrent or run an emulator.

Hackbraten

2 hours ago

Nice hack! The cat seems to be happy with the setup, too!

thebruce87m

2 hours ago

Strange place for a cat to lie - must be a hot water pipe under the floor there or perhaps a sliver of sunshine that’s since gone away.

colechristensen

3 hours ago

The first time I "discovered" CEC was when the arrow keys on my TV remote inadvertently navigated the PS3 system menu. I thought I was hallucinating because there was no mechanism for this magic to happen.

neilv

2 hours ago

I was thrilled when I saw a Reddit comment about this, and it actually worked with my Sony dumb TV + PS5 + Sony RM-VZ320 universal remote.

(I was sad at having to give up my nice PS4 universal remote, and not finding an equivalent for the PS5.)

However, I couldn't find a button on the remote that was the equivalent of pressing a PS5 controller's PS Button, and that's pretty important to the messy PS5 UI. But the TV had menus that could simulate pressing that button. So I upgraded to a Sony RM-VLZ620, which added programmable macro buttons, which I kludged hard to navigate the TV menus. From my notes:

  ### Programming PS Button

  1. SET(Hold 3 seconds, for LED, then keep holding)
  2. middle-circle
  3. (Release SET)
  4. System-Control-1
  5. 9, 8, 1
  6. Options
  7. Up
  8. Down, Down, Down, Down
  9. middle-circle, middle-circle
  10. SET

  Note: The **Up** is a timing NOP, since otherwise
  the TV usually only sees only 3 Down rather than 4.

pyrolistical

2 hours ago

Now package that into a tiny device with an hdmi plug.

Better hurry befor-, too late it’s cloned in china.

Actually it would be funny if somebody integrated this fix into a cable

mongol

2 hours ago

I think it will be a while. There is not even a Pulse-Eight clone on Aliexpress

lawlessone

2 hours ago

Someone invent the cornucopia machine