![]() |
How to switch off the Local Display using a linux command - Printable Version +- Moode Forum (https://moodeaudio.org/forum) +-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3) +--- Forum: Support (https://moodeaudio.org/forum/forumdisplay.php?fid=7) +--- Thread: How to switch off the Local Display using a linux command (/showthread.php?tid=3501) |
How to switch off the Local Display using a linux command - pkdick - 02-14-2021 Hello Everyone, I set up a Moode installation with an USBBridge Sig and a Katana DAC powered with a Shanti PS: the total boot time is around 40-50 seconds before my 5.5" Waveshare AMOLED displays something. So I would like to let my electronic setup always on while I would switch off the display and all other running operations (e.g. the play of a song) with a GPIO Switch (this way, it will be much quicker to use). So my question is: is it possible to do that using some batch or python commands (i.e. display switch on/off) ? Thank you in advance, Best regards, RE: How to switch off the Local Display using a linux command - Macdelf - 02-18-2021 (02-14-2021, 05:20 PM)pkdick Wrote: Hello Everyone,This worked when I used my 7 inch display. I had this in my .lircrc file to turn the display off when not using. sudo DISPLAY=:0.0 xset dpms force on sudo DISPLAY=:0.0 xset dpms force off RE: How to switch off the Local Display using a linux command - pkdick - 02-19-2021 (02-18-2021, 03:44 PM)Macdelf Wrote:Thank you for this piece of advice ! Do you think that these commands would work in a bash script ? Moreover, would you have the related commands to switch off the touch capability of my display ? By the way I also found that the localui.service created by Tim handles also the display, but I do not know how to stop it using a bash command.(02-14-2021, 05:20 PM)pkdick Wrote: Hello Everyone,This worked when I used my 7 inch display. I had this in my .lircrc file to turn the display off when not using. Best regards RE: How to switch off the Local Display using a linux command - TheOldPresbyope - 02-19-2021 @pkdick Yes, the two commands @Macdelf showed you can be rolled into a bash script. Disabling and enabling the touchscreen from the command line is possible too but it requires additional steps. 1. install the xinput utility Code: sudo apt install xinput 2. find the input id for the touchscreen, looking for the raspberrypi-ts entry Code: DISPLAY=:0.0 xinput --list 3. Now you can disable/enable the touchscreen input with Code: sudo DISPLAY=:0.0 xinput disable <id> --- So, for example, on one of my moOde players with the official 7" LCD touch display (and a USB volume control knob and a FLIRC USB device) Code: pi@moodeLD:~ $ DISPLAY=:0.0 xinput --list I can disable the touchscreen with Code: sudo DISPLAY=:0.0 xinput disable 9 and enable it again with Code: sudo DISPLAY=:0.0 xinput enable 9 Note that this works independently of the display, e.g., you can turn the touchscreen off and on whether the display is on or off. This can lead to confusion ![]() Regards, Kent RE: How to switch off the Local Display using a linux command - pkdick - 02-20-2021 Thank you Kent and Macdelf ! As I said the boot from my Moode setup takes almost one minute. Your solution should help me to leave always on my system and to get access to it very quickly! Best regards, |