Hi all, sorry to be yet another new user adding to the support requests, but had something of a conundrum for quite some time now and browsing various wikis and other threads hasn’t managed to yield any results yet. Tried my best to explain whole setup, but tl;dr is at the bottom for convenience.
Setup
So, my current situation is, I have a Raspberry Pi 2 running OSMC hooked up to my speakers and my main monitor (via HDMI) in my room. This is then linked with my Kodi controller app on my phone so I can control it from my sofa. My main PC then shares this monitor with the rPi. The idea is to have the monitor set to auto so it can switch between the two devices as and when required. The OSMC Pi ideally would remain on at all times so it can also act as an airplay speaker unit, and only use the screen when I want to watch something.
Problem
So, the problem arises due to several factors. Firstly, it is impossible to set input priority on the monitor, meaning once it has found an input to display, it will continue to display this unit manually changed using the OSD, or the input is powered off. As the Pi is on constantly, and the PC is only powered on when needed, the display will pretty much always end up stuck on the OSMC output. Only way I can get the display back to the PC without changing the monitor input manually is to send the Pi to sleep. As wake on LAN doesn’t work on the Pi, the only way to then turn it back on is to pull the plug and reseat (not ideal).
Solution
My idea to get around this issue therefore is to have a short script on the OSMC Pi that will allow me to toggle whether the display is being output or not, then trigger this script with my phone (essentially allowing me to turn the screen output on/off). Normally, I would do this through xrandr
on Debian systems, however when I ssh into it and run an xrandr command I get -bash: xrandr: command not found
(i.e. implying xrandr is not installed). Does this mean OSMC uses a different display manager? If yes, does it have a similar command set to xrandr that allows display manipulation?
TL;DR
Is there a specific command to run in the OSMC shell to get it to stop outputting through the HDMI ad visa versa? Ideally looking for a single line bash command.
Thanks in advance for any help!