Skip to content

Instantly share code, notes, and snippets.

@eparadis
Created October 27, 2021 00:54
Show Gist options
  • Save eparadis/ea5d64f82165e5db32c93737f42dfa66 to your computer and use it in GitHub Desktop.
Save eparadis/ea5d64f82165e5db32c93737f42dfa66 to your computer and use it in GitHub Desktop.
script to switch to composite output on the NTC PocketCHIP
#!/bin/bash
export DISPLAY=:0
export XAUTHORITY=/home/chip/.Xauthority
C=`xrandr | grep 480x272 | grep "*"`
if [ "$C" = "" ]; then :
echo "composite active, switch back"
xrandr --output Composite-1 --off
xrandr --output None-1 --mode 480x272
else :
echo "display active, switching to composite"
xrandr --output None-1 --off
#xrandr --output Composite-1 --mode NTSC
# comments from the original forum suggested "NTSC5" solved some display options on different monitors and TVs
xrandr --output Composite-1 --mode NTSC5
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment