Latest versions:
Server plugin: 0.5.1
MVP dongle: 0.5.2
Raspberry Pi client: 0.5.2
Windows client: 0.5.2-1

Main Menu

CEC power off/on broke 23 November

Started by sirwio, November 28, 2013, 16:16:18

Previous topic - Next topic


With commit 2f7b15598665aacde6010e91f858cdb4f078c764 "Improve cec handling in remote linux" powering off and on is borked.

With the offending commit the TV is turned off but when turned on again it will only display a blank/black picture. There is no way to get the picture back but restoring vompclient.

In head, e.g. commit 7abb2e355d86c592f14d998e47e3594cce0d8a1b, the behaviour is slightly different. When the TV is powered off it turns off for a few seconds but then turns on again but with a no signal picture. Switching to another input source than the pi is connected to and back does give the picture back.

It should be noted that I'm using libcec 2.1.0-1 and not 1.8.1-1 and that the backend is vompserver 0.4.0 so I have patched to be protocol compliant with the vompserver plugin.

What is the reason and rationale behind the cec changes introduced. Would make it easier to troubleshoot. The commit log "Improve cec handling in remote linux" is not so informative :-)


One user has troubles with using cec with his television.
Therefore I am trying to implement handlers for cec message, which are not handled before.
Unfortunetely these changes are causing problems with other tvs.
I am trying to get a stable implementation again. (In the moment it seems, that some messages are handled twice).

Can you please try the following things (all independently and in multiple combinations, so that I can figure out, which new functio is causing the problems):
1) Uncomment the lines in changePowerstate, does this help? Is the behaviour changed?
2) In ceccommand, there are three handled commands: CEC_OPCODE_STANDBY, CEC_OPCODE_DECK_CONTROL, CEC_OPCODE_PLAY. Can you comment them one by one and determine which one of these is causing troubles ?
3) Comment the lines in cecSourceActivated and try if this causing the troubles.

Thanks, this will help me to figure out to make vomp compatible to more tvs.



Switched back to libcec 1.8.1-1 just to make sure using a later version wasn't the cause. It still does not work as intended but the behaviour changed slightly. The biggest difference is that with libcec 1.8.1-1 the tv does not switch on after the first power off. I won't use libcec 2.1.0-1 any more unless instructed to do so.

I will describe the existing behaviour first before commenting on the results of the suggested changers 1) 2) and 3).

With the TV in standby and starting vompclient it will wake tv and give picture. When the power button is pressed to TV goes into standby as expected. But when its turned on from standby there is no picture. Its possible to get picture back by switching to a NON hdmi input source and then back to the pi hdmi input source. When switching to the non hdmi input source one can observer the following message in the log:
21:25:40.694667 [debug]  3239 Remote - CECSourceActivated: 1 0
There is no such message when switching to other hdmi sources (unconnected).

Results of the suggested testing:
1) If the lines in changePowerState are uncommented.
With TV in standby and starting vompclient it will wake tv and give picture. If put to standby it will turn off and when awakened it will give picture. Note however that the remote commands won't be routed to vompclient. To get the remote functional one have to switch to another input source and back. Any input source could be chosen even the current that the pi is connected to!

2) Uncommenting the CEC_OPCODE_STANDBY
Exactly the same behaviour as observed making the changes in 1).

Have not had the time to check to other suggested combination of CEC_OPCODE_DECK_CONTROL and CEC_OPCODE_PLAY since it appears as if CEC_OPCODE_STANDBY is the offender!

3) If the call to incommingPowerkey is commented out it is not possible to get picture back by switching to another source and then back to the pi connected hdmi input not even if switching to a non hdmi input. Vompclient need to be restarted in order to get in a picture showing state.


Thanks, for your analysis.

I try to got with 1), but I changed one function call, so hopefully remote is now working.
It would be nice, if you can test current git.

Can you please clarify your comment to 2).
I am a bit confused. So without the CEC_OPCODE_STANDBY handler, everything works as in 1)? Do you have also the problem with the remote?



>Can you please clarify your comment to 2).
>I am a bit confused. So without the CEC_OPCODE_STANDBY handler,
>everything works as in 1)? Do you have also the problem with the remote?

It worked exactly as in comment 1). I.e. when the TV was awakened from standby the remote commands would not be passed on to the pi. One had to pick the source once again from the "Choose input source" menu on the tv to get the client registered with the TV.

I have tested with the latest commit, 30e68c9d03d1075463adcd28ca1a79e0ad8ea00f, and now it works perfectly again. One does not even have to do the switch input source thing to get remote commands passed to vompclient after the TV has been suspended. Thanks.

I will make some tests on another Philips TV as well and on two different Samsung models to see if it behaves correctly on those as well.