How to disable sleeping on Raspberry pi

为君一笑 提交于 2020-12-27 08:18:58

问题


I am working on a project similar to the one at http://www.instructables.com/id/Raspberry-Pi-Wall-Mounted-Google-Calendar/?ALLSTEPS

Similarly, I need my pi to stay on constantly. I have the regular Raspbian OS installed and I am using Iceweasel browser to run a web application all day.

I have tried every single one of these suggestions from this link http://www.bitpi.co/2015/02/14/prevent-raspberry-pi-from-sleeping/

Yet the pi fails to stay on longer than 10 minutes. Any help would be greatly appreciated.


回答1:


I installed xscreensaver

  1. sudo apt-get install xscreensaver
  2. Once installed, go to Rpi's desktop "Menu" (left top corner)
  3. Go to preference --> screensaver.
  4. You will see a screen saver main menu. In the mode drop-down menu, select "disable screensaver" then close the window.
  5. Reboot the Raspberry PI.

It should work now.




回答2:


You don't need to install lib, just edit lightdm

1 - Open lightdm using your prefer text editor, eg using default editor(nano).:

sudo nano /etc/lightdm/lightdm.conf

2 - Add this line

xserver-command=X -s 0 -p 0 -dpms




回答3:


I recently installed Raspian Buster with Desktop (circa 2019-September) - the smaller install with the Desktop, but without the "recommended software". I found there are two settings that have to be changed as either one of them will blank the screen in ten minutes under the default settings.
set screen saver timeout to zero:

xset s 0

and set dpms (EnergyStar) to disabled:

xset -dpms

This way I haven't needed to install anything (no screensaver). It was confusing because I'd tried both items, but it wasn't until I learned they both were blanking the screen at ten minutes that I saw what was going on.
As this has tested out OK, the next step for me is to put them into an autostart routine.
ps Verify your settings with

xset q



回答4:


Without installing anything, official Raspberry Pi doc:

On the Console If you are using the Raspberry Pi solely on the console (no desktop GUI), you need to set the console blanking. The current setting, in seconds, can be displayed using

cat /sys/module/kernel/parameters/consoleblank

Here, consoleblank is a kernel parameter. In order to be permanently set, it needs to be defined on the kernel command line.

sudo nano /boot/cmdline.txt

Add consoleblank=0 to turn screen blanking off completely, or edit it to set the number of seconds of inactivity before the console will blank. Note the kernel command line must be a single line of text.

https://www.raspberrypi.org/documentation/configuration/screensaver.md




回答5:


I've created a picture frame with a pi 3 and want to stop the screen going blank. I installed xscreensaver as in answer 22 and it's working a treat:

sudo apt-get install xscreensaver

After install, went to Rpi's desktop "Menu" (left top corner)

Went to preference ---> screensaver.

Then In mode : section, selected "disable screensaver" and closed.

Rebooted Rpi.




回答6:


I had the same issue with Raspbian OS that was installed on raspberry Pi device. I just installed xscreensaver by using the following command in default Command panel.

sudo apt-get install xscreensaver

After installation is completed, Go to the menu in the left corner and select preference. First time you will see a pop up to enable xscreensaver on your screen. Just accept it. After that you can disable the screensaver.



来源:https://stackoverflow.com/questions/30985964/how-to-disable-sleeping-on-raspberry-pi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!