xslide
Posts: 2
Joined: Sun Apr 17, 2016 11:05 am

Disable sleep mode

Sun Apr 17, 2016 11:10 am

Hi,

I use my Raspberry Pi 2 (Raspbian) as a kiosk with fullscreen webpage.

My problem is, that Raspberry turn off display each 15 minutes. I try to disable sleep mode, but this is not working.

I try:
1)ALT+F2 gksu leafpad /etc/kbd/config

2) set BLANK_TIME=0 a POWERDOWN_TIME=0.

3) save

4)ALT+F2 gksu leafpad /etc/xdg/lxsession/LXDE-pi/autostart

5) add lines
@xset s noblank
@xset s off
@xset -dpms

This method not working for me. Do you have any idea where is a problem? Thank you

JimmyN
Posts: 1109
Joined: Wed Mar 18, 2015 7:05 pm
Location: Virginia, USA

Re: Disable sleep mode

Sun Apr 17, 2016 1:14 pm

Method #1 and #2 only disable blanking if you're logged into console, they don't work when running the desktop.

Method #4~#5 should work but you're using the old location.
Add it to the users autostart file at "~/.config/lxsession/LXDE-pi/autostart", rather than adding it to the global autostart file at "/etc/xdg/...".

xslide
Posts: 2
Joined: Sun Apr 17, 2016 11:05 am

Re: Disable sleep mode

Sun Apr 24, 2016 10:33 am

Hi, I try your method but i faild.

What I must type to terminal for setting this?

I try sudo nano ~/.config/lxsession/LXDE-pi/autostart and gksu leafpad ~/.config/lxsession/LXDE-pi/autostart but not working.

Can you help me how to edit this file?

Thank you very much!

User avatar
Rive
Posts: 586
Joined: Sat Mar 26, 2016 5:21 pm
Location: USA

Re: Disable sleep mode

Sun Apr 24, 2016 12:44 pm

xslide wrote:Hi, I try your method but i faild.

What I must type to terminal for setting this?

I try sudo nano ~/.config/lxsession/LXDE-pi/autostart and gksu leafpad ~/.config/lxsession/LXDE-pi/autostart but not working.

Can you help me how to edit this file?

Thank you very much!
Here is how to disable blanking and monitor standby/off in pi3 (should work with pi2 I suspect)

Open terminal
Open:

Code: Select all

sudo nano /boot/config.txt
Add:

Code: Select all

# power down monitor when lockscreen enabled
hdmi_blanking=1

Code: Select all

sudo nano ~/.config/lxsession/LXDE-pi/autostart
add:

Code: Select all

@xset s 0 0
@xset s noblank
@xset s noexpose
@xset dpms 0 0 0
Save 'Cntrl +X', then 'Y', then 'Enter'

reboot

Code: Select all

sudo reboot
Last edited by Rive on Tue Apr 26, 2016 12:21 am, edited 1 time in total.
DNPNWO

JimmyN
Posts: 1109
Joined: Wed Mar 18, 2015 7:05 pm
Location: Virginia, USA

Re: Disable sleep mode

Sun Apr 24, 2016 1:28 pm

xslide wrote: I try sudo nano ~/.config/lxsession/LXDE-pi/autostart and gksu leafpad ~/.config/lxsession/LXDE-pi/autostart but not working.

Can you help me how to edit this file?
If you used "sudo" you changed the ownership of the "pi" users autostart file to "root". You might want to change that back so it belongs to "pi" again. Using "sudo" to edit files that are supposed to belong to "pi" can cause permission problems.

Code: Select all

sudo chown pi:pi /home/pi/.config/lxsession/LXDE-pi/autostart

User avatar
Rive
Posts: 586
Joined: Sat Mar 26, 2016 5:21 pm
Location: USA

Re: Disable sleep mode

Sun Apr 24, 2016 2:14 pm

JimmyN wrote:
xslide wrote: I try sudo nano ~/.config/lxsession/LXDE-pi/autostart and gksu leafpad ~/.config/lxsession/LXDE-pi/autostart but not working.

Can you help me how to edit this file?
If you used "sudo" you changed the ownership of the "pi" users autostart file to "root". You might want to change that back so it belongs to "pi" again. Using "sudo" to edit files that are supposed to belong to "pi" can cause permission problems.

Code: Select all

sudo chown pi:pi /home/pi/.config/lxsession/LXDE-pi/autostart
That is neat, but unnecessary for this file.
I modified this file myself with sudo (to disable blanking), and I have no issues. It can be "viewed" and executed by "anyone". In any event, the Owner is still "pi".

Image
DNPNWO

calde315
Posts: 14
Joined: Tue Nov 04, 2014 10:12 pm

Re: Disable sleep mode

Wed Jun 08, 2016 1:10 pm

I'm having similar issues. I have my pi running constantly while hooked up via HDMI to my TV. After a couple days of not using it, the output of the pi appears to be not there. No key presses, mouse moves do anything. But it's still able to ssh just fine. The only way I'm able to get picture back on the screen is a reboot. It's like it's sleeping, but unlike a traditional PC, a keystroke or shake of the mouse doesn't awaken it.

I have a raspberry pi B+ or 2, I'm hoping these fixes above work for these Pi's. I know someone said it should work for the 2, but can anyone confirm it works for the B+ as well?

sparrow_tech
Posts: 1
Joined: Mon Oct 03, 2016 1:04 pm

Re: Disable sleep mode

Mon Oct 03, 2016 1:11 pm

Hello,
I'm having a similar problem trying to disable sleep mode. Rive I noticed that in your screenshot the autostart file has been edited to have the last line as:

@setx dpms 0 0 7200

What does this do differently from the above suggestions? Any other suggestions to disable sleep mode?

Thanks

Return to “Troubleshooting”