Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
raspberry-pi:rotate-official-touchscreen [2024/02/11 13:45] Zyzonixraspberry-pi:rotate-official-touchscreen [2024/03/23 19:17] (current) Zyzonix
Line 27: Line 27:
  
 //Sourced from: [[https://baldbeardedbuilder.com/blog/setting-up-raspberry-pi-for-use-in-kiosk-mode-with-chromium/|baldbeardedbuilder.com - Chromium in kiosk mode]]// //Sourced from: [[https://baldbeardedbuilder.com/blog/setting-up-raspberry-pi-for-use-in-kiosk-mode-with-chromium/|baldbeardedbuilder.com - Chromium in kiosk mode]]//
 +
 +==== Turn off screen automatically after a period of inactivity ====
 +
 +To enable this "energy saving"-setting create a system service file under ''/etc/systemd/system/'' with the name ''screenblanking.service'':
 +<code bash>sudo nano /etc/systemd/system/screenblanking.service</code>
 +
 +Then add this content:
 +<code bash>
 +[Unit]
 +Description=Automatic screen blanking
 +After=network.target network-online.target
 +
 +[Service]
 +Environment=DISPLAY=:0.0
 +RestartSec=40
 +Restart=always
 +User=pi
 +ExecStart=/usr/bin/xset dpms force off
 +
 +[Install]
 +WantedBy=multi-user.target
 +</code>
 +
 +Finally save the service and enable it with:
 +<code bash>sudo systemctl enable screenblanking.service</code>
 +
 +//Partially sourced from [[https://forums.raspberrypi.com/viewtopic.php?t=281523|forums.raspberrypi.com - know a command-line for turning off the screen?]]//
 +
  
  • raspberry-pi/rotate-official-touchscreen.txt
  • Last modified: 2024/03/23 19:17
  • by Zyzonix