2487
|
1 #!/bin/sh
|
|
2 # Gabucino - no warranty
|
|
3 # you need fbset, and matroxfb modules loaded
|
|
4
|
|
5 # mode to use on the monitor in "1-Monitor only" and "4-Dualhead" mode
|
|
6 # (from /etc/fb.modes)
|
|
7 DEFAULTMODE="768x576-60"
|
|
8
|
|
9 #echo "You didn't check this file for possible mis-configurations ! :)"
|
|
10 #exit 1
|
|
11
|
|
12 while [ 1 ]; do
|
|
13
|
|
14 clear
|
|
15
|
|
16 echo " [ 1 ] Monitor only"
|
|
17 echo " [ 2 ] Cloning - CRTC1 to Monitor and TV"
|
|
18 echo " [ 3 ] Dualhead - CRTC1 to Monitor, CRTC2 to TV"
|
|
19
|
|
20 #echo " [ 4 ] Cloning - CRTC2 to Monitor and TV"
|
|
21 #echo " [ 5 ] Dualhead - CRTC2 to Monitor, CRTC1 to TV"
|
|
22
|
|
23 echo
|
|
24
|
|
25 #echo " [ Q ] All consoles to fb0"
|
|
26 #echo " [ W ] tty3 to fb1"
|
|
27 #echo
|
|
28
|
|
29 echo " [ A ] 640x512"
|
|
30 echo " [ S ] 640x528"
|
|
31 echo " [ D ] 720x576"
|
|
32
|
|
33 read ABC
|
|
34
|
|
35 case "$ABC" in
|
|
36 1)
|
|
37 matroxset -f /dev/fb1 -m 0
|
|
38 matroxset -f /dev/fb0 -m 1
|
|
39 fbset -a -fb /dev/fb0 $DEFAULTMODE
|
|
40 echo
|
|
41 ;;
|
|
42
|
|
43 2)
|
|
44 matroxset -f /dev/fb1 -m 0
|
|
45 matroxset -f /dev/fb0 -m 3
|
|
46 matroxset 1
|
|
47 # 640x512
|
|
48 fbset -fb /dev/fb1 -left 60 -right 0 -upper 70 -lower 39 -hslen 76 -vslen 4 -xres 640 -yres 512 -bcast true
|
|
49 ;;
|
|
50
|
|
51
|
|
52 3)
|
|
53 fbset -a -fb /dev/fb0 $DEFAULTMODE
|
|
54 echo
|
|
55 matroxset -f /dev/fb0 -m 0
|
|
56 matroxset -f /dev/fb1 -m 2
|
|
57 matroxset -f /dev/fb0 -m 1
|
|
58 matroxset 1
|
|
59 ;;
|
|
60
|
|
61 4)
|
|
62 matroxset -f /dev/fb0 -m 0
|
|
63 matroxset -f /dev/fb1 -m 3
|
|
64 matroxset 1
|
|
65 ;;
|
|
66
|
|
67 5)
|
|
68 matroxset -f /dev/fb1 -m 0
|
|
69 matroxset -f /dev/fb0 -m 2
|
|
70 matroxset -f /dev/fb1 -m 1
|
|
71 matroxset 1
|
|
72 # 640x512
|
|
73 fbset -fb /dev/fb1 -left 60 -right 0 -upper 70 -lower 39 -hslen 76 -vslen 4 -xres 640 -yres 512 -bcast true
|
|
74 ;;
|
|
75
|
|
76 q)
|
|
77 con2fb /dev/fb0 /dev/tty1
|
|
78 con2fb /dev/fb0 /dev/tty2
|
|
79 con2fb /dev/fb0 /dev/tty3
|
|
80 con2fb /dev/fb0 /dev/tty4
|
|
81 con2fb /dev/fb0 /dev/tty5
|
|
82 con2fb /dev/fb0 /dev/tty6
|
|
83 ;;
|
|
84
|
|
85 w)
|
|
86 con2fb /dev/fb1 /dev/tty3
|
|
87 ;;
|
|
88
|
|
89 a)
|
|
90 # 640x512
|
|
91 fbset -fb /dev/fb1 -left 60 -right 0 -upper 70 -lower 39 -hslen 76 -vslen 4 -xres 640 -yres 512 -bcast true
|
|
92 ;;
|
|
93
|
|
94 s)
|
|
95 # 640x528
|
|
96 fbset -fb /dev/fb1 -left 40 -right 0 -upper 63 -lower 29 -hslen 56 -vslen 4 -xres 640 -yres 528 -vxres 640 -vyres 528 -depth 32 -laced false -bcast true
|
|
97 ;;
|
|
98
|
|
99 d)
|
|
100 # 720x576
|
|
101 fbset -fb /dev/fb1 -left 54 -right -36 -upper 55 -lower -6 -hslen 46 -vslen 4 -xres 720 -yres 576 -vxres 720 -vyres 576 -depth 32 -laced false -bcast true
|
|
102 ;;
|
|
103
|
|
104 esac
|
|
105
|
|
106 done
|