LG TV power on issue via HDMI CEC

Hi, when using android 7.1.1 stock firmware on KIII PRO (S912), power on LG TV (CEC) is done automatically when I power on KIII PRO BOX.

However when I tried Libreelec or Coreelec I can not get the LG TV power on when I power on KIII PRO. I can control KODI with TV remote controller no problem, also Simplink logo is visible on HDMI source TV screen. Same power on issue I am facing with Samsung TV, also logo Anynet+ is visible on HDMI source TV screen but can’t power on asutomatically with KIII PRO.

When LG TV is on and I execute power on command from KIII PRO (just simulating) I get following log, seems to be OK and TV get the signal “powering on ‘TV’ (0)”

CoreELEC:~ # echo “on 0” | cec-client -s -d 31
opening a connection to the CEC adapter…
DEBUG: [ 223] Broadcast (F): osd name set to ‘Broadcast’
NOTICE: [ 223] connection opened
DEBUG: [ 223] processor thread started
DEBUG: [ 223] << Broadcast (F) → TV (0): POLL
TRAFFIC: [ 223] << f0
DEBUG: [ 299] >> POLL sent
DEBUG: [ 299] TV (0): device status changed into ‘present’
DEBUG: [ 299] << requesting vendor ID of ‘TV’ (0)
TRAFFIC: [ 299] << f0:8c
TRAFFIC: [ 518] >> 0f:87:00:e0:91
DEBUG: [ 519] TV (0): vendor = LG (00e091)
DEBUG: [ 519] expected response received (87: device vendor id)
DEBUG: [ 519] replacing the command handler for device ‘TV’ (0)
DEBUG: [ 519] >> TV (0) → Broadcast (F): device vendor id (87)
DEBUG: [ 519] TV (0): CEC version 1.3a
DEBUG: [ 519] TV (0): menu language set to ‘eng’
NOTICE: [ 519] registering new CEC client - v4.0.2
DEBUG: [ 519] detecting logical address for type ‘recording device’
DEBUG: [ 519] trying logical address ‘Recorder 1’
DEBUG: [ 519] << Recorder 1 (1) → Recorder 1 (1): POLL
TRAFFIC: [ 519] << 11
WARNING: [ 729] Write: write failed
TRAFFIC: [ 729] << 11
WARNING: [ 909] Write: write failed
DEBUG: [ 909] >> POLL not sent
DEBUG: [ 909] using logical address ‘Recorder 1’
DEBUG: [ 909] Recorder 1 (1): device status changed into ‘handled by libCEC’
DEBUG: [ 909] Recorder 1 (1): power status changed from ‘unknown’ to ‘on’
DEBUG: [ 909] Recorder 1 (1): vendor = Pulse Eight (001582)
DEBUG: [ 909] Recorder 1 (1): CEC version 1.4
DEBUG: [ 909] AllocateLogicalAddresses - device ‘0’, type ‘recording device’, LA ‘1’
DEBUG: [ 910] Recorder 1 (1): osd name set to ‘CECTester’
DEBUG: [ 910] Recorder 1 (1): menu language set to ‘eng’
DEBUG: [ 910] AutodetectPhysicalAddress - autodetected physical address ‘1000’
DEBUG: [ 910] Recorder 1 (1): physical address changed from ffff to 1000
DEBUG: [ 910] << Recorder 1 (1) → broadcast (F): physical address 1000
TRAFFIC: [ 910] << 1f:84:10:00:01
NOTICE: [ 1089] CEC client registered: libCEC version = 4.0.2, client version = 4.0.2, firmware version = 5, logical address(es) = Recorder 1 (1) , physical address: 1.0.0.0, compiled on Mon Jul 16 20:35:05 UTC 2018 by adamg@ubuntu.lan on Linux 4.4.0-131-generic (x86_64), features: P8_USB, DRM, P8_detect, AOCEC
DEBUG: [ 1089] Recorder 1 (1): vendor = LG (00e091)
DEBUG: [ 1089] replacing the command handler for device ‘Recorder 1’ (1)
DEBUG: [ 1089] Recorder 1 (1): CEC version 1.3a
DEBUG: [ 1089] << Recorder 1 (1) → TV (0): OSD name ‘CECTester’
TRAFFIC: [ 1089] << 10:47:43:45:43:54:65:73:74:65:72
DEBUG: [ 1439] << requesting power status of ‘TV’ (0)
TRAFFIC: [ 1439] << 10:8f
DEBUG: [ 2559] expected response not received (90: report power status)
TRAFFIC: [ 2559] << 10:8f
DEBUG: [ 3649] expected response not received (90: report power status)
NOTICE: [ 3649] << powering on ‘TV’ (0)
TRAFFIC: [ 3649] << 10:04
DEBUG: [ 3739] TV (0): power status changed from ‘unknown’ to ‘in transition from standby to on’
DEBUG: [ 3739] unregistering all CEC clients
NOTICE: [ 3739] unregistering client: libCEC version = 4.0.2, client version = 4.0.2, firmware version = 5, logical address(es) = Recorder 1 (1) , physical address: 1.0.0.0, compiled on Mon Jul 16 20:35:05 UTC 2018 by adamg@ubuntu.lan on Linux 4.4.0-131-generic (x86_64), features: P8_USB, DRM, P8_detect, AOCEC
DEBUG: [ 3739] Recorder 1 (1): power status changed from ‘on’ to ‘unknown’
DEBUG: [ 3739] Recorder 1 (1): vendor = Unknown (000000)
DEBUG: [ 3739] Recorder 1 (1): CEC version unknown
DEBUG: [ 3739] Recorder 1 (1): osd name set to ‘Recorder 1’
DEBUG: [ 3739] Recorder 1 (1): device status changed into ‘unknown’
DEBUG: [ 3740] unregistering all CEC clients

When I turn the LG off and try the command again there is nothing being executed, does anybody know why ? Is it related to some KODI or COREELEC settings that it is not being transmitted to TV ?

CoreELEC:~ # echo “on 0” | cec-client -s -d 31
opening a connection to the CEC adapter…
DEBUG: [ 192] Broadcast (F): osd name set to ‘Broadcast’

check if your tv is 0 or not first, my receiver is #5 device #5: Audio
echo "scan" | cec-client -s -d 1

TV is for 100% #0 as you can see on the log, see just part of it when the TV is on:

DEBUG: [ 519] TV (0): vendor = LG (00e091)

When I execute the same command when the TV is off, just not getting much promising output.

What is your output when you initiate HDMI CEC wake up command when your AVR is off ?

echo “on 0” | cec-client -s -d 31

If my AVR is off, then it doesn’t available.
To wake up it must be in standby mode.
echo "on 5" | cec-client -s -d 31

Output

CoreELEC:~ # echo “standby 5” | cec-client -s -d 31
opening a connection to the CEC adapter…
DEBUG: [ 222] Broadcast (F): osd name set to ‘Broadcast’
NOTICE: [ 222] connection opened
DEBUG: [ 222] processor thread started
DEBUG: [ 223] << Broadcast (F) → TV (0): POLL
TRAFFIC: [ 223] << f0
WARNING: [ 425] Write: write failed
TRAFFIC: [ 425] << f0
WARNING: [ 625] Write: write failed
DEBUG: [ 625] >> POLL not sent
DEBUG: [ 625] TV (0): device status changed into ‘not present’
NOTICE: [ 625] registering new CEC client - v4.0.2
DEBUG: [ 625] detecting logical address for type ‘recording device’
DEBUG: [ 625] trying logical address ‘Recorder 1’
DEBUG: [ 625] << Recorder 1 (1) → Recorder 1 (1): POLL
TRAFFIC: [ 625] << 11
WARNING: [ 825] Write: write failed
TRAFFIC: [ 825] << 11
WARNING: [ 1155] Write: write failed
DEBUG: [ 1155] >> POLL not sent
DEBUG: [ 1155] using logical address ‘Recorder 1’
DEBUG: [ 1155] Recorder 1 (1): device status changed into ‘handled by libCEC’
DEBUG: [ 1155] Recorder 1 (1): power status changed from ‘unknown’ to ‘on’
DEBUG: [ 1155] Recorder 1 (1): vendor = Pulse Eight (001582)
DEBUG: [ 1155] Recorder 1 (1): CEC version 1.4
DEBUG: [ 1155] AllocateLogicalAddresses - device ‘0’, type ‘recording device’, LA ‘1’
DEBUG: [ 1156] Recorder 1 (1): osd name set to ‘CECTester’
DEBUG: [ 1156] Recorder 1 (1): menu language set to ‘eng’
DEBUG: [ 1156] AutodetectPhysicalAddress - autodetected physical address ‘3400’
DEBUG: [ 1156] Recorder 1 (1): physical address changed from ffff to 3400
DEBUG: [ 1156] << Recorder 1 (1) → broadcast (F): physical address 3400
TRAFFIC: [ 1157] << 1f:84:34:00:01
NOTICE: [ 3315] CEC client registered: libCEC version = 4.0.2, client version = 4.0.2, firmware version = 5, logical address(es) = Recorder 1 (1) , physical address: 3.4.0.0, compiled on Fri Jul 20 13:30:33 UTC 2018 by dmitry@ubuntu on Linux 4.13.0-43-generic (x86_64), features: P8_USB, DRM, P8_detect, AOCEC
DEBUG: [ 3315] << Recorder 1 (1) → TV (0): OSD name ‘CECTester’
DEBUG: [ 3315] << Recorder 1 (1) → TV (0): POLL
TRAFFIC: [ 3315] << 10
WARNING: [ 3515] Write: write failed
TRAFFIC: [ 3515] << 10
WARNING: [ 3715] Write: write failed
DEBUG: [ 3715] >> POLL not sent
DEBUG: [ 3715] not sending command ‘set osd name’: destination device ‘TV’ marked as not present
DEBUG: [ 3715] << requesting power status of ‘TV’ (0)
DEBUG: [ 3715] << Recorder 1 (1) → TV (0): POLL
TRAFFIC: [ 3715] << 10
WARNING: [ 3915] Write: write failed
TRAFFIC: [ 3915] << 10
WARNING: [ 4115] Write: write failed
DEBUG: [ 4115] >> POLL not sent
DEBUG: [ 4115] not sending command ‘give device power status’: destination device ‘TV’ marked as not present
DEBUG: [ 4115] << Recorder 1 (1) → Audio (5): POLL
TRAFFIC: [ 4115] << 15
DEBUG: [ 4185] >> POLL sent
DEBUG: [ 4185] Audio (5): device status changed into ‘present’
DEBUG: [ 4185] << requesting vendor ID of ‘Audio’ (5)
TRAFFIC: [ 4185] << 15:8c
DEBUG: [ 5275] expected response not received (87: device vendor id)
TRAFFIC: [ 5275] << 15:8c
TRAFFIC: [ 5754] >> 5f:87:00:09:b0
DEBUG: [ 5754] Audio (5): vendor = Onkyo (0009b0)
DEBUG: [ 5754] expected response received (87: device vendor id)
DEBUG: [ 5754] replacing the command handler for device ‘Audio’ (5)
DEBUG: [ 5754] >> Audio (5) → Broadcast (F): device vendor id (87)
NOTICE: [ 5754] << putting ‘Audio’ (5) in standby mode
TRAFFIC: [ 5755] << 15:36
DEBUG: [ 5855] unregistering all CEC clients
NOTICE: [ 5855] unregistering client: libCEC version = 4.0.2, client version = 4.0.2, firmware version = 5, logical address(es) = Recorder 1 (1) , physical address: 3.4.0.0, compiled on Fri Jul 20 13:30:33 UTC 2018 by dmitry@ubuntu on Linux 4.13.0-43-generic (x86_64), features: P8_USB, DRM, P8_detect, AOCEC
DEBUG: [ 5855] Recorder 1 (1): power status changed from ‘on’ to ‘unknown’
DEBUG: [ 5855] Recorder 1 (1): vendor = Unknown (000000)
DEBUG: [ 5855] Recorder 1 (1): CEC version unknown
DEBUG: [ 5855] Recorder 1 (1): osd name set to ‘Recorder 1’
DEBUG: [ 5855] Recorder 1 (1): device status changed into ‘unknown’
DEBUG: [ 5856] unregistering all CEC clients
CoreELEC:~ # echo “on 5” | cec-client -s -d 31
opening a connection to the CEC adapter…
DEBUG: [ 183] Broadcast (F): osd name set to ‘Broadcast’
NOTICE: [ 183] connection opened
DEBUG: [ 183] processor thread started
DEBUG: [ 183] << Broadcast (F) → TV (0): POLL
TRAFFIC: [ 183] << f0
WARNING: [ 386] Write: write failed
TRAFFIC: [ 386] << f0
WARNING: [ 586] Write: write failed
DEBUG: [ 586] >> POLL not sent
DEBUG: [ 586] TV (0): device status changed into ‘not present’
NOTICE: [ 586] registering new CEC client - v4.0.2
DEBUG: [ 586] detecting logical address for type ‘recording device’
DEBUG: [ 586] trying logical address ‘Recorder 1’
DEBUG: [ 586] << Recorder 1 (1) → Recorder 1 (1): POLL
TRAFFIC: [ 586] << 11
WARNING: [ 786] Write: write failed
TRAFFIC: [ 786] << 11
WARNING: [ 986] Write: write failed
DEBUG: [ 986] >> POLL not sent
DEBUG: [ 986] using logical address ‘Recorder 1’
DEBUG: [ 986] Recorder 1 (1): device status changed into ‘handled by libCEC’
DEBUG: [ 986] Recorder 1 (1): power status changed from ‘unknown’ to ‘on’
DEBUG: [ 986] Recorder 1 (1): vendor = Pulse Eight (001582)
DEBUG: [ 986] Recorder 1 (1): CEC version 1.4
DEBUG: [ 986] AllocateLogicalAddresses - device ‘0’, type ‘recording device’, LA ‘1’
DEBUG: [ 987] Recorder 1 (1): osd name set to ‘CECTester’
DEBUG: [ 987] Recorder 1 (1): menu language set to ‘eng’
DEBUG: [ 987] AutodetectPhysicalAddress - autodetected physical address ‘3400’
DEBUG: [ 987] Recorder 1 (1): physical address changed from ffff to 3400
DEBUG: [ 987] << Recorder 1 (1) → broadcast (F): physical address 3400
TRAFFIC: [ 988] << 1f:84:34:00:01
NOTICE: [ 1156] CEC client registered: libCEC version = 4.0.2, client version = 4.0.2, firmware version = 5, logical address(es) = Recorder 1 (1) , physical address: 3.4.0.0, compiled on Fri Jul 20 13:30:33 UTC 2018 by dmitry@ubuntu on Linux 4.13.0-43-generic (x86_64), features: P8_USB, DRM, P8_detect, AOCEC
DEBUG: [ 1156] << Recorder 1 (1) → TV (0): OSD name ‘CECTester’
DEBUG: [ 1156] << Recorder 1 (1) → TV (0): POLL
TRAFFIC: [ 1156] << 10
WARNING: [ 1356] Write: write failed
TRAFFIC: [ 1356] << 10
WARNING: [ 1556] Write: write failed
DEBUG: [ 1556] >> POLL not sent
DEBUG: [ 1556] not sending command ‘set osd name’: destination device ‘TV’ marked as not present
DEBUG: [ 1556] << requesting power status of ‘TV’ (0)
DEBUG: [ 1556] << Recorder 1 (1) → TV (0): POLL
TRAFFIC: [ 1556] << 10
WARNING: [ 1756] Write: write failed
TRAFFIC: [ 1756] << 10
WARNING: [ 1956] Write: write failed
DEBUG: [ 1956] >> POLL not sent
DEBUG: [ 1956] not sending command ‘give device power status’: destination device ‘TV’ marked as not present
DEBUG: [ 1956] << Recorder 1 (1) → Audio (5): POLL
TRAFFIC: [ 1956] << 15
DEBUG: [ 2026] >> POLL sent
DEBUG: [ 2026] Audio (5): device status changed into ‘present’
DEBUG: [ 2026] << requesting vendor ID of ‘Audio’ (5)
TRAFFIC: [ 2026] << 15:8c
DEBUG: [ 3116] expected response not received (87: device vendor id)
TRAFFIC: [ 3116] << 15:8c
DEBUG: [ 4206] expected response not received (87: device vendor id)
DEBUG: [ 4206] << requesting vendor ID of ‘Audio’ (5)
TRAFFIC: [ 4206] << 15:8c
DEBUG: [ 5296] expected response not received (87: device vendor id)
TRAFFIC: [ 5296] << 15:8c
DEBUG: [ 6406] expected response not received (87: device vendor id)
DEBUG: [ 6406] << requesting power status of ‘Audio’ (5)
TRAFFIC: [ 6406] << 15:8f
TRAFFIC: [ 6836] >> 51:90:01
DEBUG: [ 6836] Audio (5): power status changed from ‘unknown’ to ‘standby’
DEBUG: [ 6836] expected response received (90: report power status)
NOTICE: [ 6836] << powering on ‘Audio’ (5)
DEBUG: [ 6836] >> Audio (5) → Recorder 1 (1): report power status (90)
TRAFFIC: [ 6837] << 15:44:40
TRAFFIC: [ 6966] << 15:45
DEBUG: [ 7056] unregistering all CEC clients
NOTICE: [ 7056] unregistering client: libCEC version = 4.0.2, client version = 4.0.2, firmware version = 5, logical address(es) = Recorder 1 (1) , physical address: 3.4.0.0, compiled on Fri Jul 20 13:30:33 UTC 2018 by dmitry@ubuntu on Linux 4.13.0-43-generic (x86_64), features: P8_USB, DRM, P8_detect, AOCEC
DEBUG: [ 7056] Recorder 1 (1): power status changed from ‘on’ to ‘unknown’
DEBUG: [ 7056] Recorder 1 (1): vendor = Unknown (000000)
DEBUG: [ 7056] Recorder 1 (1): CEC version unknown
DEBUG: [ 7056] Recorder 1 (1): osd name set to ‘Recorder 1’
DEBUG: [ 7056] Recorder 1 (1): device status changed into ‘unknown’
DEBUG: [ 7057] unregistering all CEC clients

Right, I’ll double check whether TV is in standby mode, this is obvious and good point :slight_smile:

Not sure how much power the KIII PRO BOX consumes, but all my devices are powered from TV USB with a USB A-A lead in the back of the TV’s 1A USB power port.

Box powers on and off with the TV then.

HaHa - you mean you think outside the box :point_up:

Can the Tanix Tx3 mini be powered through its USB port like you describe? (I think you have one)

@JohnBoyz Yes it can

Sir, I can confirm this is so far the most easiest and the only working solution at least for LG TVs. I have been trying and playing with so many approaches and here you go…

Everybody, just forget about HDMI CEC power on / off issues :slight_smile:

1 Like

Thanks for the confirmation :slight_smile:

I had previously used this scheme for a R-Pi but it was marginal on power so I never tried it on the Tanix.