I am using a Raspberry Pi model 3 as a simple signage display (web page through Chromium in kiosk mode) and have used cec-utils to manage on/off times for the TV. I have had this same setup for about 5 months now. Until recently, it has worked perfectly but as of two weeks ago, the RPi can no longer turn on/off the TV via cec-utils and it won't show up as a device when I do a scan. Here is the results of a cec scan for the TV:
echo "scan" | cec-client -s
opening a connection to the CEC adapter...
DEBUG: [ 164] Broadcast (F): osd name set to 'Broadcast'
DEBUG: [ 164] Open - vc_cec initialised
DEBUG: [ 164] logical address changed to Free use (e)
NOTICE: [ 164] connection opened
DEBUG: [ 165] processor thread started
DEBUG: [ 165] << Broadcast (F) -> TV (0): POLL
DEBUG: [ 165] initiator 'Broadcast' is not supported by the CEC adapter. using 'Free use' instead
TRAFFIC: [ 165] << e0
DEBUG: [ 1165] command 'feature abort' timeout
DEBUG: [ 1665] initiator 'Broadcast' is not supported by the CEC adapter. using 'Free use' instead
TRAFFIC: [ 1666] << e0
DEBUG: [ 1696] >> POLL not sent
DEBUG: [ 1696] TV (0): device status changed into 'not present'
NOTICE: [ 1696] registering new CEC client - v4.0.4
DEBUG: [ 1696] detecting logical address for type 'recording device'
DEBUG: [ 1696] trying logical address 'Recorder 1'
DEBUG: [ 1696] << Recorder 1 (1) -> Recorder 1 (1): POLL
TRAFFIC: [ 1696] << 11
TRAFFIC: [ 3228] << 11
DEBUG: [ 4759] >> POLL not sent
DEBUG: [ 4759] using logical address 'Recorder 1'
DEBUG: [ 4759] Recorder 1 (1): device status changed into 'handled by libCEC'
DEBUG: [ 4759] Recorder 1 (1): power status changed from 'unknown' to 'on'
DEBUG: [ 4759] Recorder 1 (1): vendor = Pulse Eight (001582)
DEBUG: [ 4759] Recorder 1 (1): CEC version 1.4
DEBUG: [ 4759] AllocateLogicalAddresses - device '0', type 'recording device', LA '1'
WARNING: [ 4759] RegisterLogicalAddress - vc_cec_set_logical_address(1) returned device is busy (3)
DEBUG: [ 4759] UnregisterLogicalAddress - releasing previous logical address
DEBUG: [ 4759] logical address changed to Broadcast (f)
DEBUG: [ 4759] Recorder 1 (1): osd name set to 'CECTester'
DEBUG: [ 4759] Recorder 1 (1): menu language set to 'eng'
DEBUG: [ 4760] GetPhysicalAddress - physical address = 2000
DEBUG: [ 4760] AutodetectPhysicalAddress - autodetected physical address '2000'
DEBUG: [ 4760] Recorder 1 (1): physical address changed from ffff to 2000
DEBUG: [ 4760] << Recorder 1 (1) -> broadcast (F): physical address 2000
TRAFFIC: [ 4760] << 1f:84:20:00:01
DEBUG: [ 4760] sending command 'report physical address' failed (4)
TRAFFIC: [ 4760] << 1f:84:20:00:01
DEBUG: [ 4761] sending command 'report physical address' failed (4)
NOTICE: [ 4761] CEC client registered: libCEC version = 4.0.4, client version = 4.0.4, firmware version = 1, logical address(es) = Recorder 1 (1) , physical address: 2.0.0.0, git revision: libcec-4.0.4, compiled on Fri Feb 1 01:48:47 UTC 2019 by root@hostname: Name or service not known on Linux 4.15.0-44-generic (armv7l), features: P8_USB, DRM, P8_detect, randr, RPi
DEBUG: [ 4761] << Recorder 1 (1) -> TV (0): OSD name 'CECTester'
DEBUG: [ 4761] << Recorder 1 (1) -> TV (0): POLL
TRAFFIC: [ 4761] << 10
DEBUG: [ 4761] sending command 'feature abort' failed (4)
TRAFFIC: [ 4761] << 10
DEBUG: [ 4761] sending command 'feature abort' failed (4)
DEBUG: [ 4761] >> POLL not sent
DEBUG: [ 4761] not sending command 'set osd name': destination device 'TV' marked as not present
DEBUG: [ 4761] << requesting power status of 'TV' (0)
DEBUG: [ 4761] << Recorder 1 (1) -> TV (0): POLL
TRAFFIC: [ 4761] << 10
DEBUG: [ 4762] sending command 'feature abort' failed (4)
TRAFFIC: [ 4762] << 10
DEBUG: [ 4762] sending command 'feature abort' failed (4)
DEBUG: [ 4762] >> POLL not sent
DEBUG: [ 4762] not sending command 'give device power status': destination device 'TV' marked as not present
requesting CEC bus information ...
DEBUG: [ 4762] << Recorder 1 (1) -> TV (0): POLL
TRAFFIC: [ 4762] << 10
DEBUG: [ 4762] sending command 'feature abort' failed (4)
TRAFFIC: [ 4762] << 10
DEBUG: [ 4762] sending command 'feature abort' failed (4)
DEBUG: [ 4762] >> POLL not sent
DEBUG: [ 4762] << Recorder 1 (1) -> Recorder 2 (2): POLL
TRAFFIC: [ 4763] << 12
DEBUG: [ 4763] sending command 'feature abort' failed (4)
TRAFFIC: [ 4763] << 12
DEBUG: [ 4763] sending command 'feature abort' failed (4)
DEBUG: [ 4763] >> POLL not sent
DEBUG: [ 4763] Recorder 2 (2): device status changed into 'not present'
DEBUG: [ 4763] << Recorder 1 (1) -> Tuner 1 (3): POLL
TRAFFIC: [ 4763] << 13
DEBUG: [ 4763] sending command 'feature abort' failed (4)
TRAFFIC: [ 4763] << 13
DEBUG: [ 4763] sending command 'feature abort' failed (4)
DEBUG: [ 4763] >> POLL not sent
DEBUG: [ 4763] Tuner 1 (3): device status changed into 'not present'
DEBUG: [ 4763] << Recorder 1 (1) -> Playback 1 (4): POLL
TRAFFIC: [ 4764] << 14
DEBUG: [ 4764] sending command 'feature abort' failed (4)
TRAFFIC: [ 4764] << 14
DEBUG: [ 4764] sending command 'feature abort' failed (4)
DEBUG: [ 4764] >> POLL not sent
DEBUG: [ 4764] Playback 1 (4): device status changed into 'not present'
DEBUG: [ 4764] << Recorder 1 (1) -> Audio (5): POLL
TRAFFIC: [ 4764] << 15
DEBUG: [ 4764] sending command 'feature abort' failed (4)
TRAFFIC: [ 4764] << 15
DEBUG: [ 4764] sending command 'feature abort' failed (4)
DEBUG: [ 4764] >> POLL not sent
DEBUG: [ 4764] Audio (5): device status changed into 'not present'
DEBUG: [ 4764] << Recorder 1 (1) -> Tuner 2 (6): POLL
TRAFFIC: [ 4764] << 16
DEBUG: [ 4765] sending command 'feature abort' failed (4)
TRAFFIC: [ 4765] << 16
DEBUG: [ 4765] sending command 'feature abort' failed (4)
DEBUG: [ 4765] >> POLL not sent
DEBUG: [ 4765] Tuner 2 (6): device status changed into 'not present'
DEBUG: [ 4765] << Recorder 1 (1) -> Tuner 3 (7): POLL
TRAFFIC: [ 4765] << 17
DEBUG: [ 4765] sending command 'feature abort' failed (4)
TRAFFIC: [ 4765] << 17
DEBUG: [ 4765] sending command 'feature abort' failed (4)
DEBUG: [ 4765] >> POLL not sent
DEBUG: [ 4765] Tuner 3 (7): device status changed into 'not present'
DEBUG: [ 4765] << Recorder 1 (1) -> Playback 2 (8): POLL
TRAFFIC: [ 4765] << 18
DEBUG: [ 4766] sending command 'feature abort' failed (4)
TRAFFIC: [ 4766] << 18
DEBUG: [ 4766] sending command 'feature abort' failed (4)
DEBUG: [ 4766] >> POLL not sent
DEBUG: [ 4766] Playback 2 (8): device status changed into 'not present'
DEBUG: [ 4766] << Recorder 1 (1) -> Recorder 3 (9): POLL
TRAFFIC: [ 4766] << 19
DEBUG: [ 4766] sending command 'feature abort' failed (4)
TRAFFIC: [ 4766] << 19
DEBUG: [ 4766] sending command 'feature abort' failed (4)
DEBUG: [ 4766] >> POLL not sent
DEBUG: [ 4766] Recorder 3 (9): device status changed into 'not present'
DEBUG: [ 4766] << Recorder 1 (1) -> Tuner 4 (A): POLL
TRAFFIC: [ 4767] << 1a
DEBUG: [ 4767] sending command 'feature abort' failed (4)
TRAFFIC: [ 4767] << 1a
DEBUG: [ 4767] sending command 'feature abort' failed (4)
DEBUG: [ 4767] >> POLL not sent
DEBUG: [ 4767] Tuner 4 (A): device status changed into 'not present'
DEBUG: [ 4767] << Recorder 1 (1) -> Playback 3 (B): POLL
TRAFFIC: [ 4767] << 1b
DEBUG: [ 4767] sending command 'feature abort' failed (4)
TRAFFIC: [ 4767] << 1b
DEBUG: [ 4768] sending command 'feature abort' failed (4)
DEBUG: [ 4768] >> POLL not sent
DEBUG: [ 4768] Playback 3 (B): device status changed into 'not present'
DEBUG: [ 4768] << Recorder 1 (1) -> Reserved 1 (C): POLL
TRAFFIC: [ 4768] << 1c
DEBUG: [ 4768] sending command 'feature abort' failed (4)
TRAFFIC: [ 4768] << 1c
DEBUG: [ 4768] sending command 'feature abort' failed (4)
DEBUG: [ 4768] >> POLL not sent
DEBUG: [ 4768] Reserved 1 (C): device status changed into 'not present'
DEBUG: [ 4768] << Recorder 1 (1) -> Reserved 2 (D): POLL
TRAFFIC: [ 4768] << 1d
DEBUG: [ 4768] sending command 'feature abort' failed (4)
TRAFFIC: [ 4768] << 1d
DEBUG: [ 4768] sending command 'feature abort' failed (4)
DEBUG: [ 4769] >> POLL not sent
DEBUG: [ 4769] Reserved 2 (D): device status changed into 'not present'
DEBUG: [ 4769] << Recorder 1 (1) -> Free use (E): POLL
TRAFFIC: [ 4769] << 1e
DEBUG: [ 4769] sending command 'feature abort' failed (4)
TRAFFIC: [ 4769] << 1e
DEBUG: [ 4769] sending command 'feature abort' failed (4)
DEBUG: [ 4769] >> POLL not sent
DEBUG: [ 4769] Free use (E): device status changed into 'not present'
DEBUG: [ 4769] << requesting active source
TRAFFIC: [ 4769] << 1f:85
DEBUG: [ 4769] sending command 'request active source' failed (4)
TRAFFIC: [ 4769] << 1f:85
DEBUG: [ 4770] sending command 'request active source' failed (4)
DEBUG: [ 4770] << requesting active source
TRAFFIC: [ 4770] << 1f:85
DEBUG: [ 4770] sending command 'request active source' failed (4)
TRAFFIC: [ 4770] << 1f:85
CEC bus information
===================
device #1: Recorder 1
address: 2.0.0.0
active source: no
vendor: Pulse Eight
osd string: CECTester
CEC version: 1.4
power status: on
language: eng
currently active source: unknown (-1)
DEBUG: [ 4770] sending command 'request active source' failed (4)
DEBUG: [ 4771] unregistering all CEC clients
NOTICE: [ 4771] unregistering client: libCEC version = 4.0.4, client version = 4.0.4, firmware version = 1, logical address(es) = Recorder 1 (1) , physical address: 2.0.0.0, git revision: libcec-4.0.4, compiled on Fri Feb 1 01:48:47 UTC 2019 by root@hostname: Name or service not known on Linux 4.15.0-44-generic (armv7l), features: P8_USB, DRM, P8_detect, randr, RPi
DEBUG: [ 4771] Recorder 1 (1): power status changed from 'on' to 'unknown'
DEBUG: [ 4771] Recorder 1 (1): vendor = Unknown (000000)
DEBUG: [ 4771] Recorder 1 (1): CEC version unknown
DEBUG: [ 4771] Recorder 1 (1): osd name set to 'Recorder 1'
DEBUG: [ 4771] Recorder 1 (1): device status changed into 'unknown'
DEBUG: [ 4771] unregistering all CEC clients
DEBUG: [ 5166] UnregisterLogicalAddress - releasing previous logical address
DEBUG: [ 5166] logical address changed to Broadcast (f)
The only recent change that I can think of that could even possibly have affected this was when I made a script to allow a non-admin user to refresh the web-page via ssh using xdotools. It involved changing the DISPLAY so that's why I'm thinking maybe that had something to do with it but I'm not sure. Here is that script:
#!/bin/bash
DISPLAY=:0.0
export DISPLAY
WID=$(xdotool search --onlyvisible --class chromium|head -1)
xdotool windowactivate ${WID}
xdotool key ctrl+F5