v20 CEC built-in functions not working in kodi 20.3 on booksworm
#1
Hi,

I used kodi 19.4 on bullseye in pi4.
I mapped CECActivateSource/CECToggleState/CECDeactivate to usb remote buttons.
It works alright.
Here is the log.

https://paste.kodi.tv/nidavigetu.kodi

#829 When I press sleep button, it sends CECActivateSource.
#842 When I press browser_home, it send CECToggleState.

------------
I installed 20.3 on booksworm in the pi4.
CEC worked alright, because I could use my ir tv remote.
I mapped the same functions to the usb remote, but they did not work. 
Here is the log.

https://paste.kodi.tv/etoyacijow.kodi

#804 When I press sleep button, it sends CECActivateSource.
#821 When I press browser_home, it send CECToggleState.

------
I installed booksworm using the latest binary and installed Kodi 20.3.
I used the same TV and cable and tried to make sure all the settings were same.
I used cron to start kodi as below.
@reboot kodi
In bullseye, kodi runs as the pi user, and in booksworm, kodi runs as the root user.

Is there anything I can do to make it work?
Reply
#2
(2024-02-07, 12:32)marvin_kim Wrote: In bullseye, kodi runs as the pi user, and in booksworm, kodi runs as the root user.

Is there anything I can do to make it work?

Don't run kodi as root.
With RPiOS bookworm, install kodi, don't make it start at boot.
Launch it manually from desktop (as Kodi Fullscreen). Does CEC work?

If you want to use the Pi primarily as a kodi device then you should consider using LibreELEC.
Reply
#3
I lauched Kodi manually from desktop.
As I mentioned before, CEC worked OK with IR TV remote.
The problem is that CEC built-in functions not working when used with keymap.
I send CECStandby using keymap editor as below.
      <key id="61663">CECStandby</key>

When I pressed sleep button(61663), TV did not go to standby.
Please find the log below.

https://paste.kodi.tv/felixasegu.kodi 
#714 ToggleDeviceState - putting CEC device on standby...
Reply
#4
When I put CECActivateSource, I can see the log below and I seemed to work.
HandleKey: sleep (0xf0df) pressed, window 10000, action is CECActivateSource.

But when I change CECActivateSource to CECStandby, I cannot see the 'Handlekey' log.
Reply
#5
With additional tests, it looked CECActivateSource worked alright, but CECStandby did not.
Reply
#6
I found the solution to the problem.
In CEC, I set the following options to "None", but when I changed the setting to "TV", CECStandby works.
"Devices to power off during shutdown"
Reply

Logout Mark Read Team Forum Stats Members Help
CEC built-in functions not working in kodi 20.3 on booksworm0