Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
raspberry-pi:rotate-official-touchscreen [2024/02/11 13:45] – Zyzonix | raspberry-pi:rotate-official-touchscreen [2024/03/23 19:17] (current) – Zyzonix | ||
---|---|---|---|
Line 27: | Line 27: | ||
//Sourced from: [[https:// | //Sourced from: [[https:// | ||
+ | |||
+ | ==== Turn off screen automatically after a period of inactivity ==== | ||
+ | |||
+ | To enable this " | ||
+ | <code bash> | ||
+ | |||
+ | Then add this content: | ||
+ | <code bash> | ||
+ | [Unit] | ||
+ | Description=Automatic screen blanking | ||
+ | After=network.target network-online.target | ||
+ | |||
+ | [Service] | ||
+ | Environment=DISPLAY=: | ||
+ | RestartSec=40 | ||
+ | Restart=always | ||
+ | User=pi | ||
+ | ExecStart=/ | ||
+ | |||
+ | [Install] | ||
+ | WantedBy=multi-user.target | ||
+ | </ | ||
+ | |||
+ | Finally save the service and enable it with: | ||
+ | <code bash> | ||
+ | |||
+ | //Partially sourced from [[https:// | ||
+ | |||