blob: 74af0be5c3a11f08e6b6ac4a8838cd6826b92cd9 (
plain)
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
|
#!/bin/sh
if [ "$1" = -v ]; then
opt_v="$1"
shift
fi
if [ "$1" = -h -o "$1" = --help ]; then
opt_h="$1"
shift
fi
if [ $# != 1 ]; then
echo "usage: monitor-probe [-v] <X driver>"
echo "(X driver is one of: i810, nv, radeon...)"
exit 1
fi
X_driver="$1"
if [ $EUID != 0 ]; then
echo "you must be root to run this program"
exit 1
fi
[ -n "$opt_v" ] && echo "probing EDID"
monitor-edid $opt_v && exit 0
[ -n "$opt_v" ] && echo "probing using X"
monitor-probe-using-X $X_driver && exit 0
[ -n "$opt_v" ] && echo "probing DMI"
lspcidrake | sed -n 's/^\(Resolution\|Diagonal_size\):\([^:]*\):.*/\1: \2/p'
|