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
|
2488
|
9 echo "You didn't check this file for possible mis-configurations ! :)"
|
|
10 exit 1
|
2487
|
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)
|
2560
|
44 con2fb /dev/fb1 /dev/tty3 # Strange, this eliminates green bars
|
2487
|
45 matroxset -f /dev/fb1 -m 0
|
|
46 matroxset -f /dev/fb0 -m 3
|
|
47 matroxset 1
|
|
48 # 640x512
|
|
49 fbset -fb /dev/fb1 -left 60 -right 0 -upper 70 -lower 39 -hslen 76 -vslen 4 -xres 640 -yres 512 -bcast true
|
2560
|
50 con2fb /dev/fb0 /dev/tty3 # Ok, now we can take it back
|
2487
|
51 ;;
|
|
52
|
|
53
|
|
54 3)
|
|
55 fbset -a -fb /dev/fb0 $DEFAULTMODE
|
|
56 echo
|
|
57 matroxset -f /dev/fb0 -m 0
|
|
58 matroxset -f /dev/fb1 -m 2
|
|
59 matroxset -f /dev/fb0 -m 1
|
|
60 matroxset 1
|
|
61 ;;
|
|
62
|
|
63 4)
|
|
64 matroxset -f /dev/fb0 -m 0
|
|
65 matroxset -f /dev/fb1 -m 3
|
|
66 matroxset 1
|
|
67 ;;
|
|
68
|
|
69 5)
|
|
70 matroxset -f /dev/fb1 -m 0
|
|
71 matroxset -f /dev/fb0 -m 2
|
|
72 matroxset -f /dev/fb1 -m 1
|
|
73 matroxset 1
|
|
74 # 640x512
|
|
75 fbset -fb /dev/fb1 -left 60 -right 0 -upper 70 -lower 39 -hslen 76 -vslen 4 -xres 640 -yres 512 -bcast true
|
|
76 ;;
|
|
77
|
|
78 q)
|
|
79 con2fb /dev/fb0 /dev/tty1
|
|
80 con2fb /dev/fb0 /dev/tty2
|
|
81 con2fb /dev/fb0 /dev/tty3
|
|
82 con2fb /dev/fb0 /dev/tty4
|
|
83 con2fb /dev/fb0 /dev/tty5
|
|
84 con2fb /dev/fb0 /dev/tty6
|
|
85 ;;
|
|
86
|
|
87 w)
|
|
88 con2fb /dev/fb1 /dev/tty3
|
|
89 ;;
|
|
90
|
|
91 a)
|
|
92 # 640x512
|
|
93 fbset -fb /dev/fb1 -left 60 -right 0 -upper 70 -lower 39 -hslen 76 -vslen 4 -xres 640 -yres 512 -bcast true
|
|
94 ;;
|
|
95
|
|
96 s)
|
|
97 # 640x528
|
|
98 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
|
|
99 ;;
|
|
100
|
|
101 d)
|
|
102 # 720x576
|
|
103 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
|
|
104 ;;
|
|
105
|
|
106 esac
|
|
107
|
|
108 done
|