컴퓨터에 연결된 현재 모니터의 속기 버전을 추출했습니다.
예를 들면 다음과 같습니다. vendor "VSC", prod id "18500"
우분투의 모니터 환경 설정에서로 식별됩니다 Viewsonic Corporation 16".
사람이 읽을 수있는 양식을 추출하려면 어떻게해야합니까? ... 그리고 모니터가 CRT또는 인지 어떻게 알 수 LCD있습니까? (이것은 실제로이 퀘스트에서 시작한 것입니다)
EDID 형식은 Wikipedia에서 찾을 수 있습니다. 확장 표시 식별 데이터
다음은 EDID Vendor및Product id
edid=$(xrandr -q --verbose |
sed -n '/^[[:space:]]\+00ffffffffffff00/,/[^a-fA-F0-9[:space:]]/{
/[^a-fA-F0-9[:space:]]/d
s/[[:space:]]\+//g; p}')
nibble=({0..1}{0..1}{0..1}{0..1})
vend=$(for i in {16..19} ;do
printf "%s" ${nibble[$((16#${edid:$i:1}))]}
done)
vend="$(for i in 1 6 11 ;do
printf \\x$(printf %x $((2#${vend:$i:5} +64)))
done)"
prod=$((16#${edid:22:2}${edid:20:2}))
printf "monitor: vendor \"%s\", prod id \"%s\"\n" "${vend}" "$prod"
편집 : 다음은 xrandr -q verboseEDID 16 진수 덤프의 끝까지 outpt 의 주요 행입니다.
Screen 0: minimum 320 x 200, current 1280 x 960, maximum 8192 x 8192
VGA1 connected 1280x960+0+0 (0x47) normal (normal left inverted right x axis y axis) 320mm x 240mm
Identifier: 0x41
Timestamp: 26386
Subpixel: unknown
Clones:
CRTC: 0
CRTCs: 0 1
Transform: 1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000
filter:
EDID:
00ffffffffffff005a63444809000000
15090101682018b1e84f22a157479925
0f484ffffe00315945596159714f8140
818001010101000000ff004848393231
30303030390a2020000000fd0032781e
46ff000a202020202020000000fc0056
696577536f6e696320453737000000fc
00312d320a2020202020202020200084
1280x1024 (0x46) 108.0MHz +HSync +VSync
h: width 1280 start 1328 end 1440 total 1688 skew 0 clock 64.0KHz
v: height 1024 start 1025 end 1028 total 1066 clock 60.0Hz
1280x960 (0x47) ....
...
... etc