-
Notifications
You must be signed in to change notification settings - Fork 0
/
PLAY
executable file
·39 lines (37 loc) · 1.44 KB
/
PLAY
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
if [ "$1" == "" ] ; then
echo syntax: PLAY filename
exit 1
fi
if [ ! -f $1 ] ; then
echo File $1 does not exist.
exit 2
fi
trap ctrl_c INT
function ctrl_c() {
echo "** Trapped CTRL-C"
# state 0xa [HDMI CEA (16) RGB lim 16:9], 1920x1080 @ 60.00Hz, progressive
#/boot/config.txt:
# #hdmi_safe=1
# # uncomment if hdmi display is not detected and composite is being output
# hdmi_force_hotplug=1
# hdmi_group=1
# hdmi_mode=16
# #hdmi_drive=2
# #config_hdmi_boost=4
sudo tvservice -p
sudo chvt 2 # change to different virtual terminal
sudo chvt 1 # change back to the previous virtual terminal
# need to do this automatically from saved tvservice output:
fbset -g 1920 1080 1920 1080 32 # adjust the size of the framebuffer
echo -n ondemand | sudo tee /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor > /dev/null
}
echo -n performance | sudo tee /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor > /dev/null
sudo tvservice --off
sudo ./$1
sudo tvservice -p
sudo chvt 2 # change to different virtual terminal
sudo chvt 1 # change back to the previous virtual terminal
# need to do this automatically from saved tvservice output:
fbset -g 1920 1080 1920 1080 32 # adjust the size of the framebuffer
echo -n ondemand | sudo tee /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor > /dev/null