Skip to content

Instantly share code, notes, and snippets.

@crash5
Created April 11, 2021 10:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save crash5/0fb13b188f6bf88825909807565ffab2 to your computer and use it in GitHub Desktop.
Save crash5/0fb13b188f6bf88825909807565ffab2 to your computer and use it in GitHub Desktop.
Workaround for CoreELEC 19.x-Matrix green screen error when TV switched on after the tv box.
#!/bin/sh
# Workaround for CoreELEC 19.x-Matrix green screen error when TV switched on
# after the tv box.
#
# Tested on:
# - X96 Max+ (CoreELEC 19.0, 19.1 rc1/rc2)
#
# Original idea from user dasdreHmomenT on
# https://discourse.coreelec.org/t/matrix-wrong-output-mode-set-on-boot/15142
#
# File location: ~/.config/autostart.sh
display_mode_file="/sys/class/display/mode"
original_value=$(cat "$display_mode_file")
temp_value1="720p50hz"
temp_value2="720p60hz"
if [ "$original_value" = "$temp_value1" ]; then
echo "$temp_value2" > "$display_mode_file"
else
echo "$temp_value1" > "$display_mode_file"
fi
echo "$original_value" > "$display_mode_file"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment