Issue
I am working with Raspberry Pi 4 B, 8 gb RAM and Raspbian OS. I am having 7" touch screen attached to PI. In my project, I want to make touch screen sleep if there is no activity detected for 5 mins from the Python script (just to save some power). Is there any shell command I can use in the Python script?
Solution
There is the option in config.txt of "disable_touchscreen=1" which will stop the Pi polling the controller board for touch input. It also doesn't start the firmware side of the touchscreen input driver, which should stop the Linux side loading either. The display side will work exactly as before.
This file is normally accessible as /boot/config.txt from raspbian OS.
You can read config.txt and modify using following python code
import ConfigParser
config_parser = ConfigParser.ConfigParser()
config_parser.read('config.txt')
Answered By - Harsha Vardhan Gundapaneni Answer Checked By - Pedro (WPSolving Volunteer)