OMXPlayer freezes when playing video - raspbian

I am using OMXPlayer to play some HD videos on my RaspberryPi 3 with latest Raspbian Jessie image. It run perfectly for some time (sometimes 20 minutes, sometimes 3 hours, sometimes 5 hours) but then it freezes. CPU and RAM values are normal. I am running OMXPlayer with this command:
/usr/bin/omxplayer --no-osd --loop myVideo.mp4
and after OMXPlayer freezes I get this message in console:
omxplayer.bin: OMXCore.cpp:785 OMX_ERRORTYPE COMXCoreCOmponent:FreeInputBuffers(): Assertion 'm_omx_input_buffers.size() == m_omx_input_available.size()' failed.
Googled and only advice that I found to solve this problem is to set GPU memory to 128 instead to default 64, I did it, but nothing changed.
Anybody here had similar experience with OMXPlayer ? Is there any way to fix this ?

It was because old raspberry pi firmware and old omxplayer version, so I recommend you to update firmware by:
sudo rpi-update
and to install and download OMXPlayer version 6c90c75 from this link to avoid freezing problems:
http://omxplayer.sconde.net/

Based on this thread, I discovered that installing an old version of Omxplayer (from Mar 9, 2014) solved my freezing issue. You can download old versions of Omxplayer here and install the downloaded .deb file using:
sudo dpkg -i /path/to/your_install_file.deb

I had a similar problem here... in my case, I was pushing a video from a nodeJS server on the local network. If I changed the video at the server, OMXPlayer would just crash.
I removed the OMXPlayer --loop flag. Instead, perform a while loop in a bash script. This solution fixed it for me...
#!/bin/bash
sleep .5
while [1]
do
omxplayer -b -r -live http://192.168.1.16:3000/fileserver/channelA
done

Related

Google Cloud Deep Learning On Linux VM throws Unknown Cuda Error

I am trying to set up a deep learning VM on Google Cloud but I keep running into the same issue over and over again.
I will follow all the steps, set up a N1-highmem-8 (8 vCPU, 52gb Memory) instance, add a single T4 GPU and select the Deep Learning Image: TensorFlow 2.4 m69 CUDA 110 image. That's it.
After that, I will ssh into the vm, run the script that installs all the NVIDIA drivers and... when I begin using it, by simply running
from tensorflow.keras.layers import Input, Dense
i = Input((100,))
x = Dense(500)(i)
I keep getting failed call to cuInit: CUDA_ERROR_UNKNOWN: unknown error. By that point I haven't installed anything and haven't done anything custom, just the vanilla image from GCP.
What is more concerning is that, even if I delete the vm and then create a new one with the same config, some times the error won't happen immediately and sometimes it's present off the bat.
Has anyone encountered this? I've googled around to see if anyone has faced this issue and while I came across suggestions, all of them are old and have not worked for me. More over, suggestions on NVIDIA support forums tell me to re-install everything and the whole point of me using a pre-built GCP image specifically for deep learning is so that I don't have to enter the hell of installing and resolving issues with NVIDIA drivers.
The issue is fixed with the M74 image, but you are using M69. So follow one of the two fixes provided in the Google Cloud public forum.
we can mitigate the issue by:
Fix #1: Use the latest DLVM image (M74 or later) in a new VM instance: They have released a fix for the newest DLVM image in M74 so you will no longer be affected by this issue.
Fix #2: Patch your existing instance running images older than M74.
Run the following via an SSH session on the affected instance:
gsutil cp gs://dl-platform-public-nvidia/b191551132/restart_patch.sh /tmp/restart_patch.sh
chmod +x /tmp/restart_patch.sh
sudo /tmp/restart_patch.sh
sudo service jupyter restart
This only needs to be done once, and does not need to be rerun each time the instance is rebooted.

Install Rust on a 32 bit CentOS 7 server through SSH

I'm trying to install Rust on a 32 bit CentOS 7 server through SSH. I run this command suggested here:
curl https://sh.rustup.rs -sSf | sh
This command never finishes, and the server machine CPU fan goes high speed. Eventually, the server machine screen becomes black with keyboard lights getting on and off (blinking) repeatedly.
Is the problem due to the fact that the server is 32 bit? Is there any other possibility?
Update
The kernel panic occurred multiple times, for example when trying to run cargo run as described here:
kernel bug at kernel/auditsc.c:1532
#amo-ej1 comment worked.
Offline installers are available here. Just downloaded the i686-unknown-linux-gnu file tar.gz for nightly. Installed by running the install.sh script inside it with --verbose option.

Spyder crashes upon launch on Linux with QtWebEngineCore error

Pic 1
Pic 2
Pic 3
Pic 4
This has been happening to me ever since i installed anaconda . I tried spyder --reset, I've tried installing pyqt5.
Nothing worked for me.
Its an Ubuntu18.10 machine. I happened to recently have a fresh install of the OS too and the problem started. It used to run without any error till the last day though upon same configurations. I've already updated my OS with recent updates too.
(Spyder maintainer here) To fix this problem you need to open a system terminal (xterm, konsole, gnome-terminal, etc) and run there
conda install pyopengl
Note: This problem will be solved in our next version (Spyder 3.3.0) to be released in June/2018.

Ubuntu 16.04 screen completely freezes only mouse moves

Ever since I have upgraded my laptop (Click here for hardware specs.) my screen usually freezes. Mostly in chrome or Firefox browser. I am pretty sure this is a Nvidia driver problem but I can't seem to find the solution. I am running a Nvidia Quadro K2100M.
I am currently running Nvidia 361.42. I have tried using open source Xorg server without any luck.
The only solution I have found so far is forcefully turning off the computer by holding down the power button.
Things that I have tried:
I got keyboard input
I cannot switch to another terminal to restart lightdm
This problem came to me occasionally, making me really annoyed.
As illustrated in many blogs, this may be caused by graphic driver problem. For me, my desktop has a NVIDIA video card, you can run lspci | grep VGA to see what type of your video type, in my case, it returned:
02:00.0 VGA compatible controller: NVIDIA Corporation G98 [GeForce 8400 GS Rev. 2] (rev a1)
I followed the instruction on jiakai zhang's blog to reinstall proper drivers for the desktop, hope this will help you.
The key steps in [1] are to reinstall the ubuntu desktop and nvidia drivier by:
$ sudo su
$ apt-get update
$ apt-get install --reinstall ubuntu-desktop
$ apt-get install unity
$ apt-get remove --purge nvidia*
$ reboot
$ sudo apt-get install nvidia-current
$ sudo reboot
Updating the grub settings worked for me! Do the following:
1. Open the GRUB configuration
sudo vi /etc/default/grub
2. Change the value of GRUB_CMDLINE_LINUX_DEFAULT from "quiet splash" to
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_idle.max_cstate=1"
and save the file.
3. Update & Reboot
sudo update-grub
sudo reboot
More info:
This is a bug in the processor, known as the c-state bug. It causes total freezes when the CPU tries to enter an unsupported sleep state. It's a problem for many Bay Trail devices especially with newer (4.*) kernels. There is a simple workaround until it gets properly fixed upstream. You just need to pass a kernel boot parameter and the random freezing stops completely. The parameter may increase battery consumption slightly, but it will give you a usable system. You do this by editing the configuration file for GRUB as described above.
GRUB - boot loader package from the GNU Project, which provides a user the choice to boot one of multiple operating systems
installed on a computer or select a specific kernel configuration available on a particular operating system's partitions;
Intel Bay Trail - new Atom Processors from Intel. Atom is Intel's family of x86 and x86-64 processors that are optimized
for small computing devices, such as smartphones and mobile Internet devices;
C-States - used to optimize optimize or reduce power consumption in idle mode (i. e. when no code is executed) - (C0 to C8)
Reference: here.
I have since fixed this problem by re-installing Ubuntu 16.04 and not switching from the nouveau video driver. I also disable updates and everything been working good for about 2 months now.
Gaming is pretty good but I usually play steam games so doesn't push any kinda hard core graphics
Well, I had the same problem: My PC was freezing randomly. I tried Ubuntu 16, 17 and 18.04 and everything was the same. I tried several drivers and didn't get a solution. I tried several solutions that I found in the forums (including this) and got bad and harmful results.
My solution was: I stopped using the graphical nvidia card, removed it and now I'm using the integrated Intel HD graphics card (IntelĀ® HD Graphics 530 card (Skylake GT2)) and all the problems were solved!
I fixed mine using a few commands from #Qoros solution above. i just ran apt-get update, apt-get install nvidia-current, and sudo reboot. cheers to #Qoros btw!
For me, none of the approaches described in rest of the answers worked.
I was opening multiple terminal tabs running some heavy processes and ubuntu used to freeze when I had 6-7 tabs. I tried monitoring the resources used while I was starting my processes in terminal tabs. You can do it by opening System Monitor app and going to Resources tab.
What I noticed is that when my RAM(8GB) and my swap space(1GB) were completely used up, ubuntu would freeze.
As a solution, I increased my swap space and made it 16GB. After this memory never gets used completely and ubuntu doesn't freeze.
https://askubuntu.com/questions/178712/how-to-increase-swap-space decsibes how to increase swap space.

Adafruit Ultimate GPS Breakout - UART connection issues

I have been experiencing problems setting up the Ultimate GPS Breakout on a Raspberry Pi, running Raspbian. I followed the tutorial found on the Adafruit web page, found here:
https://learn.adafruit.com/adafruit-ultimate-gps-on-the-raspberry-pi/introduction
For the project I am working on it is required that UART needs to be implemented instead of a USB transmission. Through following the tutorial, I was unable to get the module to work yesterday as it keeps giving me a "NO FIX" status, even after an hour of waiting. It did not matter how many times I typed the following into the terminal, as per the suggestions on other tutorials or forums:
$ sudo killall gpsd
$ sudo gpsd /dev/ttyAMA0 -F /var/run/gpsd.sock
$ cgps -s
After two hours, after much frustration, I decided to take a break. After the break, I returned to the Raspberry Pi where I restarted the device and ran the previously mentioned command lines, and miraculously it worked. After another hour of so of playing around with the data via Python 2.7, the GPS dropped connection and has not returned.
Killing the command using Ctrl-C yields the following message:
cgps: caught signal_2
I have no clue what's wrong with it after countless attempts. Any help would be greatly appreciated.