If your Raspberry Pi monitor keeps going into sleep mode or blanking after inactivity, this is due to the default power management settings. You can disable these settings to prevent the screen from sleeping. Here's how:
1. Disable Screen Blanking via raspi-config
You can use the Raspberry Pi configuration tool to disable screen blanking:
- Open the terminal.
- Run the configuration tool:
sudo raspi-config
- Navigate to:
Display Options > Screen Blanking > Set it to No. - Save and exit, then reboot:
sudo reboot
2. Modify xserver
Settings (For Desktop Environments)
If you're using a desktop environment, you can disable DPMS (Display Power Management Signaling):
- Open the terminal.
- Edit the X server settings:
sudo nano /etc/xdg/lxsession/LXDE-pi/autostart
- Add the following lines:
@xset s off
@xset -dpms
@xset s noblank
- Save and exit (
Ctrl + O
,Enter
,Ctrl + X
), then reboot:
sudo reboot
3. Update lightdm
Configuration
For systems running lightdm
(the default display manager on Raspberry Pi OS):
- Edit the LightDM configuration file:
sudo nano /etc/lightdm/lightdm.conf
Look for (or add) the [Seat:*]
section and ensure it has:
[Seat:*]
xserver-command=X -s 0 -dpms
Save and exit, then restart LightDM:
sudo systemctl restart lightdm
4. Disable Console Screen Blanking
If you're not running a desktop and use the terminal, you can disable console blanking:
- Edit the kernel command line:
sudo nano /boot/cmdline.txt
Add this to the end of the single line (space-separated):
consoleblank=0
Save and reboot:
sudo reboot
Comments