Vibe coded through this problem on my rooted LG b5 and q800f, maybe copy this to your codex as inspiration. This was generated by Codex
This is the troubleshooting process and workaround that worked on my setup. The basic checks may help other CEC setups; the optional automation section uses an LG webOS status client and needs adapting to your own installation.
Setup and symptoms
My HDMI path is:
Vero V → Samsung soundbar HDMI input → LG B5 HDMI3/eARC
After waking the TV and selecting HDMI3, Kodi could appear briefly, then the soundbar selected TV ARC/eARC and the TV showed “No signal.” Going Home and selecting HDMI3 again sometimes recovered it. LG-remote navigation in Kodi had also been unreliable, and navigation worked after the changes below.
The exact soundbar model/firmware still needs to be recorded. This is a tested workaround on one setup, not a confirmed Samsung/LG firmware fix.
1. Check whether this is the same input-routing problem
When the failure happens, leave the TV on Vero’s HDMI input and check the soundbar display:
- TV ARC/eARC/D.IN: the bar has selected TV-return audio rather than its external HDMI input.
- HDMI: the external input is selected, so a remaining picture failure needs further HDMI-link investigation.
Select HDMI on the soundbar, keeping the TV input unchanged. If Kodi returns, that is useful evidence of a soundbar input/routing problem. It does not by itself prove which device sent the wrong command.
In my captured failure, LG had HDMI3 selected but reported no usable video dimensions or frame rate. Vero remained responsive and reported an active 1080p60 output. It also happened with PicCap capture stopped, which separated this occurrence from the LED-capture issue.
2. Check Kodi’s CEC registration
Save your existing CEC choices and choose a time when restarting Kodi will not interrupt playback.
Go to:
Settings → System → Input → Peripherals → CEC Adapter
Find CEC client device mode. I changed Recording Device → Playback Device, pressed OK to save, then restarted Kodi.
My previous session logged a CEC OpenConnection error. After the role change, that error disappeared and a packet trace showed Vero transmitting replies again. The role change alone did not stop the soundbar selecting eARC after wake.
Test the LG remote’s Up/Down/OK/Back buttons in Kodi at this point. If a remote-only problem is resolved, there is no need to add the automation below just for that symptom.
CEC carries remote-control commands as well as source-selection commands, so broken CEC discovery/registration can affect both. My LG remote worked after the combined changes, but I did not isolate a remote-only before/after test to establish which change was responsible. See Kodi’s CEC documentation.
I left physical-address discovery automatic. A manual “connected device = AVR” trial did not help in my case and was reverted. Keep your own original configuration recorded; copying somebody else’s HDMI port/address is not a substitute for checking your wiring. libCEC’s FAQ explains those fields.
3. Test source activation before automating it
With the TV on Vero’s HDMI input and the soundbar in the failed state, test Kodi’s native CECActivateSource built-in once. Its purpose is to announce Vero as the active source.
The following snippet is for an SSH shell on Vero. It expects Kodi’s installed /usr/bin/kodi-send sender library and the local EventServer on 127.0.0.1:9777:
python3 - <<'PY'
import runpy
import socket
sender = runpy.run_path('/usr/bin/kodi-send', run_name='cec_source_test')
with socket.socket(socket.AF_INET, socket.SOCK_DGRAM) as channel:
channel.settimeout(0.2)
packet = sender['PacketACTION'](
actionmessage='CECActivateSource',
actiontype=sender['ACTION_EXECBUILTIN'])
packet.send(channel, ('127.0.0.1', 9777), uid=0)
PY
This is a control command: run it when you want Vero selected. Check the actual picture and soundbar input, not just the command’s exit status.
On my installation, stock kodi-send builds an ACTION_BUTTON packet. The snippet explicitly uses ACTION_EXECBUILTIN; I verified that path executed the built-in. Under the working Playback Device registration, it restored the failed picture and the bar stayed on HDMI.
Only proceed to the automatic helper after this manual test works on your setup. Automating a command that does not recover your failure will not solve it. The command is listed in Kodi’s built-in functions.
4. Optional: delay activation until LG input selection settles
My soundbar could still land on eARC during startup, so I added a separate helper that:
- Reads the paired LG’s power state and foreground app.
- Waits until the TV has remained Active with Vero’s HDMI input selected for eight seconds.
- Rechecks both immediately before acting.
- Submits one
CECActivateSourcecommand through Kodi.
It cancels a pending action if I switch to Home/YouTube, turn the TV off, or lose valid status. It does not continuously force the source, inspect black pixels, or restart capture. Explicit input/power transitions can arm a new attempt; reconnect activations have a 60-second cooldown.
This lets native TV apps use eARC normally. When I deliberately return to Vero’s input, the helper selects the soundbar’s HDMI input after settling.
Reference files and prerequisites
The attached reference ZIP contains the helper, status client, tests, service example and this guide.
You need:
- Python with
aiohttp, Kodi’s sender library and its local EventServer. - Your LG TV’s address and your own existing paired webOS client key with the permissions used by
tv_status.py. - The correct LG input app ID. The example targets
com.webos.app.hdmi3; editVERO_APPfor a different input. - Adapted interpreter, source and key-file paths in the service example.
Pairing setup is a prerequisite, not supplied by this guide. Keep the key private. Its expected file shape is documented in the ZIP’s README.
First run the guard tests from the extracted source directory:
python3 -m unittest -v test_cec_route.py
For a foreground test, use your own TV/key paths and a private state directory:
mkdir -p "$HOME/.cache/cec-route-test"
chmod 700 "$HOME/.cache/cec-route-test"
python3 cec_route.py \
--host YOUR_TV_IP \
--key-file /path/to/your-paired-tv-key.json \
--state-dir "$HOME/.cache/cec-route-test"
This foreground test can select Vero once its guarded conditions are met. Stop it with Ctrl+C before starting the service: the duplicate-instance lock only applies when instances share a state directory.
After adapting all placeholder paths and arguments in vero-cec-route.service.example, it can be installed as vero-cec-route.service under /etc/systemd/system/, followed by systemctl daemon-reload and systemctl enable --now vero-cec-route.service. The example runs as osmc and uses Kodi’s existing CEC connection.
5. Verify normal use
Check all of these:
- TV standby/wake → select Vero’s input once → wait up to 25 seconds without Home or the soundbar remote.
- Native YouTube picture/sound → return to Vero’s input.
- LG-remote navigation in Kodi.
- Ordinary movie playback, including Dolby Vision if used.
- Staying in a native TV app without being pulled back to Vero.
Our tested acceptance covered automatic wake, the YouTube round trip, LG-remote navigation and Dolby Vision picture/sound/backlight. The helper stayed inactive while YouTube was selected. HPD lock was already enabled and stayed enabled; this test does not establish whether every installation needs it. Video/capture settings and calibration were unchanged.
There may still be a brief initial “No signal” display while startup settles. I have tested one accepted automatic wake and normal playback, not long-term endurance or a cold OS boot. Eight seconds is the value that passed here, not a universal optimum. In the successful automatic wake, video metadata became valid shortly before the delayed command; that pass alone does not prove the delay caused initial recovery. The separate failed-state source-command recovery was verified.
6. Undo the workaround
Disable the helper:
sudo systemctl disable --now vero-cec-route.service
Restore the previous CEC client role separately through Kodi if needed, save with OK, and restart Kodi at a convenient time. Preserve any newer settings; avoid restoring an entire old configuration over unrelated changes.
Related discussion: Vero/Samsung soundbar HDMI CEC bug.