TL;DR Summary
- Running the latest version of LibreELEC (9.2.2) on x86 machine with Pulse Eight USB-CEC adapter.
- CEC remote control worked great. Then upgraded VIZIO TV to P55-F1. CEC control stopped working.
- Found forum posts about VIZIO TVs having the same problem with Kodi. Solution was to change CEC device type to Playback (4).
- Need to change config line <setting id="device_type" value="1" /> (Recording) to <setting id="device_type" value="4" /> (Playback.)
- Attempted to implement by editing .kodi/userdata/peripheral_data/usb_2548_1002_CEC_Adapter.xml, but change revert on reboot.
- Attempted to implement by editing /usr/share/kodi/system/peripherals.xml but location is read only.
- How do I make changes to .kodi/userdata/peripheral_data/usb_2548_1002_CEC_Adapter.xml persist across reboots? or
- How do I make changes to /usr/share/kodi/system/peripherals.xml or
- Is there another way to force libCEC to register as a Playback device?
First time poster, long time user, so be gentle. I've done my best to use the forum and documentation resources to find a solution on my own but haven't found one yet, so I'm hazarding a forum post.
I have a compatibility issue with a VIZIO TV (P55-F1.) My LibreELEC based HTPC is an Intel based machine using a Pulse Eight USB-CEC Adapter. I've enjoyed CEC control of this HTPC for years with a previous VIZIO TV, but upgraded at the end of 2018 to a new TV (the VIZIO model above) and sound bar (also a VIZIO model SB3651.) That's when I lost CEC control of the HTPC from the TV remote.
At startup, I get a "Connected: TV - VISIO SB3651" message, but no remote button presses result in any changes to Kodi. I've twiddled with the settings for the CEC adapter in Settings -> System -> Input -> Peripherals -> CEC Adapter without any change.
I did find it a little odd that the "Connected" message above lists TV and the model of my sound bar together (SB3651.) I suspected that there may be some confusion by the adapter about exactly what device on the bus was the TV, but after reviewing the logs carefully below, I think I am mistaken. Maybe it's just saying it found two CEC compatible devices on the bus? A TV and sound bar.
Through my own research, I stumbled upon the following two posts (not on this forum.)
CEC remote on VIZIO P Series Quantum
CEC Control not working - VIZIO E50-E1 - After TV OS Upgrade (4.0.32.2)
These both seem to be dancing around the same issue. Namely that the default "device_type" for the CEC adapter to declare itself as is a Recording Device. VIZIO TVs seem to choke on this and prefer Playback Device (device_type = 4.) No such setting exists in the GUI, so it must be made in a config file.
So, I've been attempting to make this change ever since. These other forum posts point me change the adapter XML config file located at .kodi/userdata/peripheral_data/<adapter name>.xml and/or /usr/share/kodi/system/peripherals.xml. Of course, "peripherals.xml" is in the read-only portion of the file system, so I've focused on the userdata based XML file. In my case that's "usb_2548_1002_CEC_Adapter.xml." I can edit this file via the terminal, make the device type change, and save the edits without issue, but they do not persist across a reboot. Maybe that's because my adapter is a USB device and it gets enumerated on every reboot? I'm not sure, but no matter what I do, I can't make this edit persist. So that's my first real question. How do I edit the adapter config file in .kodi/userdata/peripheral_data/ and have it persist across reboots?
Note that I have done some additional debugging. I disabled the CEC Adapter through the GUI interface, rebooted, and then operated the adapter via the terminal using cec-client. Using the cec-client command, I was able to force a playback device, which seemed to make a big difference in the log entries. As you'll see from the log link attached, remote button press commands seem to be received on the CEC bus (or at least change the bus polling behavior,) but their source may be inaccurate. Changing to a playback device type shows button release events without duplicates. So this information coupled with the above forum posts makes me think this is the right approach. I don't have a log file to back this up, but if necessary, can probably figure out how to get one via some cec-client command output piping (I'm no linux terminal expert, but I bet I could figure it out.)
If there is no good way to make changes to the peripheral_data based XML config file persist across reboots, then perhaps the solution is to change the peripherals.xml file located at /usr/share/kodi/system/peripherals.xml? If so, how do I edit the read-only peripherals.xml file? Or is there some other place I should be making edits to ensure things persist across reboots.
Here's a link to my log file. I enabled debug logging and additionally I enabled component specific logging for libCEC (and the Video component by accident, somehow.) This log represents a normal boot with the CEC adapter configured normally and enabled. The notifications and behavior are consistent with my description above. I'm running the latest LibreELEC (official) 9.2.2 release.
I appreciate any help you can give me, or even some direction to go research. I'll be happy to provide any other info needed. This question may be a better fit over at the Kodi forum, but given that my assumed solution is modifying the device_type setting in these XML files, I thought it best to start here.