I Run omxplayer in a loop with pexpect via python. After a period of time, the screen blacks out and the pi is unresponsive to keyboard input. I have hostapd running and it responds by sending me back replies from local server, but the display is completely blacked out. The power light is still on. I checked the /var/log directory for errors, and I have nothing. Any help or debugging considerations are greatly appreciated. Thanks.


It is possible that your GPU is running out of RAM. This is more likely if you are running an old model with only 250 MB of RAM. You should allocate more RAM to your graphics card. You can just run the raspi-config script to access the split menu. You probably want a half and half split of 128 CPU and 128 GPU. This will increase the graphics performance substantially.

If you are still having problems, you can try setting up a swap on either a USB drive or a small partition on your SD card:

I would recommend setting up a swap on a USB drive because it will shorten the lifespan of your SD card.


Try disabling the console blanking. I put the following in /etc/rc.local to turn off the automatic blanking that is on by default:

setterm -blank 0

The command has to be run so it outputs to tty1, and you can't do that (easily) from a remote connection. I use a small script to send setterm commands to tty1:

# send 'setterm' commands to /dev/tty1 (physical console)
setterm $* | sudo tee /dev/tty1 > /dev/null

Drop this into /usr/local/bin (mine's named 'tty1'), make it executable, then:

tty1 -blank 0

will turn off blanking anytime you desire, and another useful command is:

tty1 -cursor off

to turn off the blinky cursor.

If you're connecting via wireless and are having connectivity issues, I'd recommend disabling the wireless power saving options, which turn off the wireless dongle if nothing's happening for a bit. Annoyed me greatly. (I've posted a longer answer explicitly for this here somewhere, but I'll paraphrase here)

Create a file '8192cu.conf' in /etc/modprobe.d:

# prevent power down of wireless when idle
options 8192cu rtw_power_mgnt=0 rtw_enusbss=0

Next reboot, it'll turn off the power saving for the wireless. I've had rock steady connections since this. Um, if it means anything, this is for a generic edimax wireless micro-dongle, the teeny-tiny one. lsusb output:

Bus 001 Device 004: ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.