Page 1 of 1

Preventing Sleep

Posted: Thu Aug 23, 2012 5:42 am
by MadDoc
Hi,

My pi is running Raspbmc and it's great. The pi is connected via hdmi to an AV receiver which, in turn, is connected via hdmi to my TV.

The pi and receiver are in a different room to the TV. The pi is to be left on continuously but the receiver and TV get turned off when not needed.

I'm experiencing a weird problem where sometimes, generally after turning back on the TV and amp, no signal is output from the pi. Ordinarily there isn't a keyboard plugged in (the pi is in a cupboard) but even plugging one in and pressing keys does not wake the pi. I know the pi is still functioning because I can SSH into it with no problem. The only way to get the signal back is to reboot the pi.

I wonder if the pi is maybe putting the display to sleep?? Is there a way to prevent this?

Re: Preventing Sleep

Posted: Thu Aug 23, 2012 6:20 am
by jose1711_
only happens to me when xbmc crashes and console screensaver turns itself on after some time. if it happens i do fbset -depth 8 && fbset -depth 16 and start xbmc again. might be the same issue. jose

Re: Preventing Sleep

Posted: Thu Aug 23, 2012 7:35 am
by Jim JKla
Your guess is a good one and the current stage of development is such that we are identifying issues like this and testing solutions.

This is all part of the ongoing tapestry If you do find a solution please make sure you post the feedback you will not be the only one using a setup like the one you describe.

Idealy you should try and get a spare SD card install one of the other images say wheezy and see if you get the same effect if it is the same or different post because either way it may help trace the core issue. ;)

Re: Preventing Sleep

Posted: Thu Aug 23, 2012 7:50 am
by MadDoc
Thanks. I'll experiment when I get back home and report back.

Re: Preventing Sleep

Posted: Thu Aug 23, 2012 8:54 am
by james968
I just did a little searching and found this:
By default, the Linux kernel will use screen-save option to disable it you need to type command (it turns off monitor VESA powersaving features):

$ setterm -powersave off -blank 0
From this article:http://www.cyberciti.biz/tips/linux-dis ... blank.html

I'm also interested in a solution, I can't test it right now, but let me know if it works. (I'm running just a text console, and don't have any keyboard plugged in. I'd like to be able to switch to the inputs to the Pi and just see what's on the display without have to dig up a keyboard, plug it in......etc).

Re: Preventing Sleep

Posted: Fri Aug 24, 2012 4:41 pm
by 355/113
I'm having the same problem with my Pi going to sleep about every 10 minutes or so. I tried this:
$ setterm -powersave off -blank 0
before "startx" command but it apparently did nothing. Maybe I did it wrong?

Thanks for any clues!

Re: Preventing Sleep

Posted: Mon Oct 01, 2012 12:53 pm
by Rasadmin
I had the same problem here.
I found this solution elsewhere in these forums and it works for me:

sudo nano /etc/lightdm/lightdm.conf

In that file, look for:
[SeatDefault]

and insert this line:
xserver-command=X -s 0 dpms

My test monitor has been on for a couple of days now :-)

Re: Preventing Sleep

Posted: Tue Oct 02, 2012 10:06 am
by MadDoc
Thanks - I'll give it a go.

Re: Preventing Sleep

Posted: Mon Feb 25, 2013 10:01 am
by Mekai
Rasadmin wrote:I had the same problem here.
I found this solution elsewhere in these forums and it works for me:

sudo nano /etc/lightdm/lightdm.conf

In that file, look for:
[SeatDefault]

and insert this line:
xserver-command=X -s 0 dpms

My test monitor has been on for a couple of days now :-)
This didnt work for me :(

Re: Preventing Sleep

Posted: Mon Feb 25, 2013 11:43 am
by Mekai
I am just trying to get my regular Raspbian to stop going into monitor sleep.

Re: Preventing Sleep

Posted: Mon Feb 25, 2013 12:10 pm
by RaTTuS
Mekai wrote:I am just trying to get my regular Raspbian to stop going into monitor sleep.
console mode ?
do this :-
http://www.raspberrypi.org/phpBB3/viewt ... 54#p296180

Re: Preventing Sleep

Posted: Mon Feb 25, 2013 12:41 pm
by Mekai
RaTTuS wrote:
Mekai wrote:I am just trying to get my regular Raspbian to stop going into monitor sleep.
console mode ?
do this :-
http://www.raspberrypi.org/phpBB3/viewt ... 54#p296180
Didnt do the trick for me, i am in "startx mode" i don´t know if that changes anything for me.

Re: Preventing Sleep

Posted: Sat Jun 29, 2013 2:04 am
by 42wolf
I have the same problem too , I tried all of it ,but it doesn't work……

Re: Preventing Sleep

Posted: Tue Nov 26, 2013 12:38 am
by csik
Above solution did not work for me either, most recent Raspian on rev 2 512

BUT! Confirmed working:
in:
sudo nano /etc/kbd/config
edit these values to:
BLANK_TIME=0
POWERDOWN_TIME=0

Re: Preventing Sleep

Posted: Sat May 10, 2014 9:53 am
by HuggaWuggasDad
Agree with csik.
I have tightvncserver set up to run automatically on start up.
This *seemed* to have been obeying the blank time, power down rules, and causing freezing.
Setting both to 0 has cured the problem.
Thanks.

Re: Preventing Sleep

Posted: Tue Sep 27, 2016 3:14 pm
by almoore
Rasadmin wrote:I had the same problem here.
I found this solution elsewhere in these forums and it works for me:

sudo nano /etc/lightdm/lightdm.conf

In that file, look for:
[SeatDefault]

and insert this line:
xserver-command=X -s 0 dpms

My test monitor has been on for a couple of days now :-)
This one seems to be working for me. Ran about an hour longer than usual so far. I'll leave it up for the rest of the week.

Re: Preventing Sleep

Posted: Thu Nov 17, 2016 9:31 pm
by rsaulnie
xserver-command=X -s 0 dpms

Worked for me .. Pi 3

Re: Preventing Sleep

Posted: Mon Jan 22, 2018 1:54 pm
by cehwitham
xserver-command=X -s 0 dpms
That worked for me too on Raspbian Stretch.