CEC Issue

Now here is the crux shortly described…
I have for some time had problem with OSMC on a RPi B+.
The setup is that the Pi is hooked up with a TV via HDMI, has a Ethernet cable connection to the router and a steady power supply from a 2 Amp feed. I have controlled the Pi via the TV’s remote that just worked “out of the box”.
The problem is that during playback of a movie suddenly the sound disappears and a second or two later the image freezes. Fully non responsive to any remote input. Due to lack of patience I only waited a coupe of minutes before pulling the power cord for a restart of the Pi.

The other day I just let it be as it was in its frozen state and after several minutes (perhaps 5) it suddenly gave me a message on-screen that the CEC-something had stopped. After that the video fast forwarded for a minute or so (no sound) and then continued the playback normally (sound and all)… TV remote still non responsive but I have the app “Kore” (Official Remote for Kodi) that worked fine after the hickup. During the freeze even the app Kore lost its connection.

Now that is seams that it is the CEC service that is messing with the Pi how do I prevent the freezing from occurring and mess up the TV-watching-session ? :smile:

Should I disable (uninstall?) the CEC service altogether ? (How?)
(Even though if it’s less convenient, I can live with the fact that I can’t control OSMC via the TV remote)

Or… is it fixable in any way ?

That is certainly a useful observation - would it be possible for you to get a picture of the error message next time it appears on the screen ?

Also, if the system does unfreeze after a while as you describe, could you do the following:

Enable debug mode in Kodi, reboot twice to clear out any old Kodi logs, then use it until you see this freeze happen, after it unfreezes (and without rebooting) please use the My OSMC log uploader to upload all logs. (Or at minimum the Kodi debug log and system journal)

It is possible to disable CEC in Settings->System->Input->Peripherals->CEC - turn off the first option. Let us know if that stops it happening too.

1 Like

Well, sounds like a swell thing to wait for :stuck_out_tongue: I’ll see if I can catch it.
(It only appears for a second or two so no high hopes there…)

I’ll start by doing the above recommended actions to get some data for you to analyze.

Then I think I turn the CEC off since it is a rather annoying behavior. I’ll let you know if it helps.

Thanx a million for your prompt and detailed answer ! Much appreciated.

Arkey, you are experiencing the exact same bug as me and others:

I didn’t mention the CEC issue in my report, as I wasn’t sure if it was an additional bug or just a manifestation of the freezing issue. I will add to your report that my experience was that freezing could sometimes be provoked by skipping back and forth in the movie, which might support the hypothesis that CEC is at fault here. I also occasionally saw the RPi wake up after prolonged freezing, but it crashed within minutes thereafter.

I am currently going through the most recent OSMC disk images to pinpoint the bug. So far it seems that all images except ‘OSMC_TGT_rbp1_20151027.img’ (for RPi v/1) don’t have this bug. You can revert to one of these installations if you just want a bug-free experience.

Alternatively, you can join us in the efforts to track down this bug. Project lead Sam Nazarko has suggested that we first identify the release where the bug was introduced. We’ll then do a partial upgrade to narrow it down, and the more testers we have, the sooner we can close the file on this one. I’m just about to install the latest release (‘OSMC_TGT_rbp1_20151027.img’) and will hopefully verify that this was the release that introduced this bug. Join us at: Frequent random muting, then freezing - #2 by sam_nazarko

Kodi freezing doesn’t necessarily mean that the whole OS has hung. Can you still log in with SSH when it freezes ? If so you can still upload logs from the command line:

grab-logs -A

The Kodi log is probably only useful if you had debug mode enabled at the time of the freeze however.

There is a way to enable debug mode permanently without the on screen debug info, see here:

http://kodi.wiki/view/Advancedsettings.xml#loglevel

If you do this, make sure “enable component-specific logging” is disabled in Debugging otherwise you can end up with huge log files.

Nope. I couldn’t. Kore lost its connection and SSH (via “Mobile SSH”) weren’t possible… (when it first happened I thought I could get away with a SSH reboot command so I didn’t have to get physical and move over to the Pi and pull the plug :smile: Lazy? Hmmm perhaps a bit :wink:

I’ve been waiting for a hiccup since your recommendation but still nothing.
I will however upload the logs when it happens and hope it will help you in your bug-seeking-quest…

I don’t want to hijack this thread, but I just posted a rather lengthy bug report (in debug mode) that covers the initial freeze bug, followed by what appears to be a long period of inactivity. I created a graph to get an overview of the log’s contents, and it shows that OSMC is doing something, however, and that it eventually manages make an almost full recovery on its own: Frequent random muting, then freezing - #10 by holgerd

Btw, I tried connecting via ssh while the system was frozen, but this time I was unable to get a response. (Once’s success with this might depend on which ‘stage’ of the lock-up you’re experiencing at the time.)

Edit: Forgot to mention that following the freeze, CEC was of course gone, as expected.

Ok, yesterday i got a hiccup…
Loaded up (tried to) the log files, all of them, via the OSMC interface but got a “Documentexceedsmaximumlength” error. Tried the terminal version as well. Same message with the -A switch. The -J switch worked so the Journal got uploaded but yet again the same message when using the -X switch… What should I do?

Do you know how to access your B+ via ssh? If so, you can grab the log files individually, or create a complete log using the command line. You can paste the logs on OSMC’s pastebin: http://paste.osmc.io/

(Beware that OSMC has two log files: kodi.log is the log of current activites since the last reboot, while kodi.old.log is a log of the activity before your last reboot.)

Well, an update regarding this freeze-issue…

I have suspicion that it hasn’t anything to do with the CEC even though I at occasion got the OSD-message that the CEC-was breaking down…

I turned off the CEC-capability and still get a whole system freeze and must pull the plug to be able to start it up again. No connection with the Kore-remote, no SSH-connection, no TV-remote response (when having the CEC enabled).

Have tried running locally stored files and that seams to work just fine, but haven’t done that for longer periods, just a couple of films.

It is rather unpredictable so I havent been able to catch it in the act running debugger.

Caught the bug in action… After the “normal” freeze of the Raspberry Pi B+ after a couple of minutes I got this “on screen” message, then the video played fast forward, catching up for lost playback, then continued to play normally again. I could then scroll back to where It halted and it was ok to play again. Now without the ability to control OSMC with the TV remote. I used Kore on my phone instead…

I checked witch version of LibCEC I have and it states that it is v3.0.1 compiled the 22’nd Dec (2015).

How do I tackle this situation, anyone got a idea ??

…well since I use Swedish language perhaps there is need of some translation… “Tappat anslutning” means “Lost connection”, if there are any questions regarding the message… :slight_smile:

And still… No logs that have captured the issue…

think i got it. Uploaded it via paste.osmc.io:
http://paste.osmc.io/bewagomike.vhdl

Before you go any further secure your installation!

You have SSH exposed to the internet and there are hundreds of login attempts from random addresses as well as signs of nmap scans being made against your device. (Search for ‘sshd’ in the log)

If you have not changed the OSMC password then your box is probably compromised now, as the default osmc password is well known…

Well, I changed the OSMC password first thing when I installed it, and have also changed all information revealing both external IP and passwords in the log…
It’s a lot of things to think about when it comes to security and I guess most aren’t aware of all the threats out there.
For a starter “nmap scans” was something new for me…

Here is the log from the Pi’s OSMC Kodi log for the last half an hour before yet another crash.
This is from a new fresh installation with just a handfull addons installed.
Hope this say something…
http://paste.osmc.io/turaganevo.coffee
/R

Absolutely nothing in that snippet even mentions CEC, or anything else that seems to be of any concern. This is why snippets are generally useless.

…here you got a CEC-crash as well in action :slight_smile:
This one gave the on-screen CEC message (see pix in message above)
http://paste.osmc.io/ireholuned.vhdl

This is a clear indication that the issue is not related to CEC.

Remove your rogue third party addons and report if issue persists.