Vestel TV가 대기 모드인지 어떻게 확인하나요? (X11, HDMI)

Vestel TV가 대기 모드인지 어떻게 확인하나요? (X11, HDMI)

xrandr두 번째 모니터(스마트 TV)가 켜져 있는지 꺼져 있는지에 따라 설정을 자동으로 변경하고 싶습니다 .

내가 생각할 수 있는 어떤 검사나 유틸리티도 꺼짐(대기) 상태와 켜짐("신호 대기 중") 상태를 구별할 수 없습니다. 하지만 TV를 켜면 4가지 이벤트가 나타나기 udevadm monitor --property때문에일부시스템의 일부는 TV의 상태를 알아야 합니다...

KERNEL[14640.475012] change   /devices/pci0000:00/0000:00:01.1/0000:01:00.0/0000:02:00.0/0000:03:00.0/drm/card0 (drm)
ACTION=change
DEVPATH=/devices/pci0000:00/0000:00:01.1/0000:01:00.0/0000:02:00.0/0000:03:00.0/drm/card0
SUBSYSTEM=drm
HOTPLUG=1
CONNECTOR=99
DEVNAME=/dev/dri/card0
DEVTYPE=drm_minor
SEQNUM=4821
MAJOR=226
MINOR=0

UDEV  [14640.477739] change   /devices/pci0000:00/0000:00:01.1/0000:01:00.0/0000:02:00.0/0000:03:00.0/drm/card0 (drm)
ACTION=change
DEVPATH=/devices/pci0000:00/0000:00:01.1/0000:01:00.0/0000:02:00.0/0000:03:00.0/drm/card0
SUBSYSTEM=drm
HOTPLUG=1
CONNECTOR=99
DEVNAME=/dev/dri/card0
DEVTYPE=drm_minor
SEQNUM=4821
USEC_INITIALIZED=7772035
ID_PATH=pci-0000:03:00.0
ID_PATH_TAG=pci-0000_03_00_0
ID_FOR_SEAT=drm-pci-0000_03_00_0
MAJOR=226
MINOR=0
DEVLINKS=/dev/dri/by-path/pci-0000:03:00.0-card
TAGS=:master-of-seat:seat:uaccess:
CURRENT_TAGS=:master-of-seat:seat:uaccess:

KERNEL[14641.187063] change   /devices/pci0000:00/0000:00:01.1/0000:01:00.0/0000:02:00.0/0000:03:00.0/drm/card0 (drm)
ACTION=change
DEVPATH=/devices/pci0000:00/0000:00:01.1/0000:01:00.0/0000:02:00.0/0000:03:00.0/drm/card0
SUBSYSTEM=drm
HOTPLUG=1
CONNECTOR=99
DEVNAME=/dev/dri/card0
DEVTYPE=drm_minor
SEQNUM=4822
MAJOR=226
MINOR=0

UDEV  [14641.188317] change   /devices/pci0000:00/0000:00:01.1/0000:01:00.0/0000:02:00.0/0000:03:00.0/drm/card0 (drm)
ACTION=change
DEVPATH=/devices/pci0000:00/0000:00:01.1/0000:01:00.0/0000:02:00.0/0000:03:00.0/drm/card0
SUBSYSTEM=drm
HOTPLUG=1
CONNECTOR=99
DEVNAME=/dev/dri/card0
DEVTYPE=drm_minor
SEQNUM=4822
USEC_INITIALIZED=7772035
ID_PATH=pci-0000:03:00.0
ID_PATH_TAG=pci-0000_03_00_0
ID_FOR_SEAT=drm-pci-0000_03_00_0
MAJOR=226
MINOR=0
DEVLINKS=/dev/dri/by-path/pci-0000:03:00.0-card
TAGS=:master-of-seat:seat:uaccess:
CURRENT_TAGS=:master-of-seat:seat:uaccess:

/var/log/Xorg.0.logTV가 대기 모드에서 켤 때마다 다음 메시지도 볼 수 있습니다.

[ 18229.550] (II) AMDGPU(0): EDID vendor "HPN", prod id 14116
[ 18229.550] (II) AMDGPU(0): Using hsync ranges from config file
[ 18229.550] (II) AMDGPU(0): Using vrefresh ranges from config file
[ 18229.550] (II) AMDGPU(0): Printing DDC gathered Modelines:
[ 18229.551] (II) AMDGPU(0): Modeline "2560x1440"x0.0  241.50  2560 2608 2640 2720  1440 1443 1448 1481 +hsync -vsync (88.8 kHz eP)
[ 18229.551] (II) AMDGPU(0): Modeline "2560x1440"x0.0  604.25  2560 2608 2640 2720  1440 1443 1448 1543 +hsync -vsync (222.2 kHz e)
[ 18229.551] (II) AMDGPU(0): Modeline "2560x1440"x0.0  497.75  2560 2608 2640 2720  1440 1443 1448 1525 +hsync +vsync (183.0 kHz e)
[ 18229.551] (II) AMDGPU(0): Modeline "2560x1440"x0.0  304.25  2560 2608 2640 2720  1440 1443 1448 1492 +hsync -vsync (111.9 kHz e)
[ 18229.551] (II) AMDGPU(0): Modeline "1920x1080"x0.0  148.50  1920 2008 2052 2200  1080 1084 1089 1125 +hsync +vsync (67.5 kHz e)
[ 18229.551] (II) AMDGPU(0): Modeline "1280x720"x0.0   74.25  1280 1390 1430 1650  720 725 730 750 +hsync +vsync (45.0 kHz e)
[ 18229.551] (II) AMDGPU(0): Modeline "720x480"x0.0   27.00  720 736 798 858  480 489 495 525 -hsync -vsync (31.5 kHz e)
[ 18229.551] (II) AMDGPU(0): Modeline "640x480"x0.0   25.18  640 656 752 800  480 490 492 525 -hsync -vsync (31.5 kHz e)
[ 18229.551] (II) AMDGPU(0): Modeline "1920x1080"x0.0  297.00  1920 2008 2052 2200  1080 1084 1089 1125 +hsync +vsync (135.0 kHz e)
[ 18229.551] (II) AMDGPU(0): Modeline "1920x1080"x0.0  297.00  1920 2448 2492 2640  1080 1084 1094 1125 +hsync +vsync (112.5 kHz e)
[ 18229.551] (II) AMDGPU(0): Modeline "800x600"x0.0   40.00  800 840 968 1056  600 601 605 628 +hsync +vsync (37.9 kHz e)
[ 18229.551] (II) AMDGPU(0): Modeline "720x400"x0.0   28.32  720 738 846 900  400 412 414 449 -hsync +vsync (31.5 kHz e)
[ 18229.551] (II) AMDGPU(0): Modeline "1024x768"x0.0   65.00  1024 1048 1184 1344  768 771 777 806 -hsync -vsync (48.4 kHz e)
[ 18229.551] (II) AMDGPU(0): Modeline "1920x1200"x0.0  193.25  1920 2056 2256 2592  1200 1203 1209 1245 -hsync +vsync (74.6 kHz e)
[ 18229.551] (II) AMDGPU(0): Modeline "1680x1050"x0.0  146.25  1680 1784 1960 2240  1050 1053 1059 1089 -hsync +vsync (65.3 kHz e)
[ 18229.551] (II) AMDGPU(0): Modeline "(null)"x59.9  118.25  1600 1696 1856 2112  900 903 908 934 -hsync +vsync (56.0 kHz e)
[ 18229.551] (II) AMDGPU(0): Modeline "1440x900"x0.0  106.50  1440 1520 1672 1904  900 903 909 934 -hsync +vsync (55.9 kHz e)
[ 18229.551] (II) AMDGPU(0): Modeline "1280x1024"x0.0  108.00  1280 1328 1440 1688  1024 1025 1028 1066 +hsync +vsync (64.0 kHz e)
[ 18229.551] (II) AMDGPU(0): Modeline "1280x800"x0.0   83.50  1280 1352 1480 1680  800 803 809 831 -hsync +vsync (49.7 kHz e)
[ 18230.263] (--) AMDGPU(0): HDMI max TMDS frequency 300000KHz
[ 18230.266] (II) AMDGPU(0): EDID vendor "HPN", prod id 14116
[ 18230.266] (II) AMDGPU(0): Using hsync ranges from config file
[ 18230.266] (II) AMDGPU(0): Using vrefresh ranges from config file
[ 18230.266] (II) AMDGPU(0): Printing DDC gathered Modelines:
[ 18230.266] (II) AMDGPU(0): Modeline "2560x1440"x0.0  241.50  2560 2608 2640 2720  1440 1443 1448 1481 +hsync -vsync (88.8 kHz eP)
[ 18230.266] (II) AMDGPU(0): Modeline "2560x1440"x0.0  604.25  2560 2608 2640 2720  1440 1443 1448 1543 +hsync -vsync (222.2 kHz e)
[ 18230.266] (II) AMDGPU(0): Modeline "2560x1440"x0.0  497.75  2560 2608 2640 2720  1440 1443 1448 1525 +hsync +vsync (183.0 kHz e)
[ 18230.266] (II) AMDGPU(0): Modeline "2560x1440"x0.0  304.25  2560 2608 2640 2720  1440 1443 1448 1492 +hsync -vsync (111.9 kHz e)
[ 18230.266] (II) AMDGPU(0): Modeline "1920x1080"x0.0  148.50  1920 2008 2052 2200  1080 1084 1089 1125 +hsync +vsync (67.5 kHz e)
[ 18230.266] (II) AMDGPU(0): Modeline "1280x720"x0.0   74.25  1280 1390 1430 1650  720 725 730 750 +hsync +vsync (45.0 kHz e)
[ 18230.266] (II) AMDGPU(0): Modeline "720x480"x0.0   27.00  720 736 798 858  480 489 495 525 -hsync -vsync (31.5 kHz e)
[ 18230.266] (II) AMDGPU(0): Modeline "640x480"x0.0   25.18  640 656 752 800  480 490 492 525 -hsync -vsync (31.5 kHz e)
[ 18230.266] (II) AMDGPU(0): Modeline "1920x1080"x0.0  297.00  1920 2008 2052 2200  1080 1084 1089 1125 +hsync +vsync (135.0 kHz e)
[ 18230.266] (II) AMDGPU(0): Modeline "1920x1080"x0.0  297.00  1920 2448 2492 2640  1080 1084 1094 1125 +hsync +vsync (112.5 kHz e)
[ 18230.266] (II) AMDGPU(0): Modeline "800x600"x0.0   40.00  800 840 968 1056  600 601 605 628 +hsync +vsync (37.9 kHz e)
[ 18230.266] (II) AMDGPU(0): Modeline "720x400"x0.0   28.32  720 738 846 900  400 412 414 449 -hsync +vsync (31.5 kHz e)
[ 18230.266] (II) AMDGPU(0): Modeline "1024x768"x0.0   65.00  1024 1048 1184 1344  768 771 777 806 -hsync -vsync (48.4 kHz e)
[ 18230.266] (II) AMDGPU(0): Modeline "1920x1200"x0.0  193.25  1920 2056 2256 2592  1200 1203 1209 1245 -hsync +vsync (74.6 kHz e)
[ 18230.266] (II) AMDGPU(0): Modeline "1680x1050"x0.0  146.25  1680 1784 1960 2240  1050 1053 1059 1089 -hsync +vsync (65.3 kHz e)
[ 18230.266] (II) AMDGPU(0): Modeline "(null)"x59.9  118.25  1600 1696 1856 2112  900 903 908 934 -hsync +vsync (56.0 kHz e)
[ 18230.266] (II) AMDGPU(0): Modeline "1440x900"x0.0  106.50  1440 1520 1672 1904  900 903 909 934 -hsync +vsync (55.9 kHz e)
[ 18230.266] (II) AMDGPU(0): Modeline "1280x1024"x0.0  108.00  1280 1328 1440 1688  1024 1025 1028 1066 +hsync +vsync (64.0 kHz e)
[ 18230.266] (II) AMDGPU(0): Modeline "1280x800"x0.0   83.50  1280 1352 1480 1680  800 803 809 831 -hsync +vsync (49.7 kHz e)

내 시스템 및 설정에 대한 정보는 다음과 같습니다.

TV(Vestel, 2015, 브랜드 "Telefunken")는 DisplayPort-HDMI 케이블을 통해 내 그래픽 카드(AMD Radeon RX 6700 XT)에 연결되어 있으며, 이는 차례로 드라이버에 의해 제어됩니다 amdgpu. 저는 Debian Sid 시스템에서 X11과 i3wm을 사용하고 있습니다.

mic@mic:~$ uname -a
Linux mic 6.5.0-3-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.5.8-1 (2023-10-22) x86_64 GNU/Linux
mic@mic:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux trixie/sid
Release:        n/a
Codename:       trixie

TV가 대기 상태인지 알려줄 수 있는 표시에 대해 다음 명령과 위치를 확인했습니다.

mic@mic:~$ xrandr --verbose
Screen 0: minimum 320 x 200, current 2560 x 1440, maximum 16384 x 16384
DisplayPort-0 connected primary (normal left inverted right x axis y axis)
        Identifier: 0x54
        Timestamp:  10692081
        Subpixel:   unknown
        Clones:    
        CRTCs:      0 1 2 3 4 5
        Transform:  1.000000 0.000000 0.000000
                    0.000000 1.000000 0.000000
                    0.000000 0.000000 1.000000
                   filter: 
        EDID: 
                00ffffffffffff0058b3003700000000
                01190103805932780acf74a3574cb023
                09484cafef80b3009500a94090408100
                81808140010108e80030f2705a80b058
                8a00501d7400001e023a801871382d40
                582c4500501d7400001e000000fc0034
                305548445f4c43445f54560a000000fd
                00303e0f463c000a20202020202001d0
                020344f15c0106070203151611121304
                14051f902021225d5e5f606162636465
                6629090707150750570600830100006e
                030c001000f83c20008004030201e50f
                0000600c011d803e73382d407e2c4580
                00d05200001e011d80d0721c2d20102c
                258000d05200009e0000000000000000
                00000000000000000000000000000013
        GAMMA_LUT_SIZE: 4096 
                range: (0, -1)
        DEGAMMA_LUT_SIZE: 4096 
                range: (0, -1)
        GAMMA_LUT: 0 
                range: (0, 65535)
        CTM: 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 
                0 1 
        DEGAMMA_LUT: 0 
                range: (0, 65535)
        TearFree: auto 
                supported: off, on, auto
        subconnector: HDMI 
                supported: Unknown, VGA, DVI-D, HDMI, DP, Wireless, Native
        HDCP Content Type: HDCP Type0 
                supported: HDCP Type0, HDCP Type1
        Content Protection: Undesired 
                supported: Undesired, Desired, Enabled
        vrr_capable: 0 
                range: (0, 1)
        Colorspace: Default 
                supported: Default, BT709_YCC, opRGB, BT2020_RGB, BT2020_YCC
        max bpc: 16 
                range: (8, 16)
        underscan vborder: 0 
                range: (0, 128)
        underscan hborder: 0 
                range: (0, 128)
        underscan: off 
                supported: off, on, auto
        scaling mode: None 
                supported: None, Full, Center, Full aspect
        link-status: Good 
                supported: Good, Bad
        CONNECTOR_ID: 99 
                supported: 99
        non-desktop: 0 
                range: (0, 1)
  1920x1080 (0x59) 148.500MHz +HSync +VSync
        h: width  1920 start 2008 end 2052 total 2200 skew    0 clock  67.50KHz
        v: height 1080 start 1084 end 1089 total 1125           clock  60.00Hz
  1920x1080 (0x5a) 148.500MHz +HSync +VSync
        h: width  1920 start 2448 end 2492 total 2640 skew    0 clock  56.25KHz
        v: height 1080 start 1084 end 1089 total 1125           clock  50.00Hz
  1920x1080 (0x5b) 148.352MHz +HSync +VSync
        h: width  1920 start 2008 end 2052 total 2200 skew    0 clock  67.43KHz
        v: height 1080 start 1084 end 1089 total 1125           clock  59.94Hz
  1920x1080 (0x5c) 74.250MHz +HSync +VSync
        h: width  1920 start 2008 end 2052 total 2200 skew    0 clock  33.75KHz
        v: height 1080 start 1084 end 1089 total 1125           clock  30.00Hz
  1920x1080 (0x5d) 74.250MHz +HSync +VSync
        h: width  1920 start 2448 end 2492 total 2640 skew    0 clock  28.12KHz
        v: height 1080 start 1084 end 1089 total 1125           clock  25.00Hz
  1920x1080 (0x5e) 74.250MHz +HSync +VSync
        h: width  1920 start 2558 end 2602 total 2750 skew    0 clock  27.00KHz
        v: height 1080 start 1084 end 1089 total 1125           clock  24.00Hz
  1920x1080 (0x5f) 74.176MHz +HSync +VSync
        h: width  1920 start 2008 end 2052 total 2200 skew    0 clock  33.72KHz
        v: height 1080 start 1084 end 1089 total 1125           clock  29.97Hz
  1920x1080 (0x60) 74.176MHz +HSync +VSync
        h: width  1920 start 2558 end 2602 total 2750 skew    0 clock  26.97KHz
        v: height 1080 start 1084 end 1089 total 1125           clock  23.98Hz
  1600x1200 (0x61) 162.000MHz +HSync +VSync
        h: width  1600 start 1664 end 1856 total 2160 skew    0 clock  75.00KHz
        v: height 1200 start 1201 end 1204 total 1250           clock  60.00Hz
  1680x1050 (0x62) 119.000MHz +HSync -VSync
        h: width  1680 start 1728 end 1760 total 1840 skew    0 clock  64.67KHz
        v: height 1050 start 1053 end 1059 total 1080           clock  59.88Hz
  1400x1050 (0x63) 101.000MHz +HSync -VSync
        h: width  1400 start 1448 end 1480 total 1560 skew    0 clock  64.74KHz
        v: height 1050 start 1053 end 1057 total 1080           clock  59.95Hz
  1280x1024 (0x64) 135.000MHz +HSync +VSync
        h: width  1280 start 1296 end 1440 total 1688 skew    0 clock  79.98KHz
        v: height 1024 start 1025 end 1028 total 1066           clock  75.02Hz
  1280x1024 (0x65) 108.000MHz +HSync +VSync
        h: width  1280 start 1328 end 1440 total 1688 skew    0 clock  63.98KHz
        v: height 1024 start 1025 end 1028 total 1066           clock  60.02Hz
  1440x900 (0x66) 88.750MHz +HSync -VSync
        h: width  1440 start 1488 end 1520 total 1600 skew    0 clock  55.47KHz
        v: height  900 start  903 end  909 total  926           clock  59.90Hz
  1280x960 (0x67) 108.000MHz +HSync +VSync
        h: width  1280 start 1376 end 1488 total 1800 skew    0 clock  60.00KHz
        v: height  960 start  961 end  964 total 1000           clock  60.00Hz
  1280x800 (0x68) 71.000MHz +HSync -VSync
        h: width  1280 start 1328 end 1360 total 1440 skew    0 clock  49.31KHz
        v: height  800 start  803 end  809 total  823           clock  59.91Hz
  1152x864 (0x69) 108.000MHz +HSync +VSync
        h: width  1152 start 1216 end 1344 total 1600 skew    0 clock  67.50KHz
        v: height  864 start  865 end  868 total  900           clock  75.00Hz
  1280x720 (0x6a) 74.250MHz +HSync +VSync
        h: width  1280 start 1390 end 1430 total 1650 skew    0 clock  45.00KHz
        v: height  720 start  725 end  730 total  750           clock  60.00Hz
  1280x720 (0x6b) 74.250MHz +HSync +VSync
        h: width  1280 start 1720 end 1760 total 1980 skew    0 clock  37.50KHz
        v: height  720 start  725 end  730 total  750           clock  50.00Hz
  1280x720 (0x6c) 74.176MHz +HSync +VSync
        h: width  1280 start 1390 end 1430 total 1650 skew    0 clock  44.96KHz
        v: height  720 start  725 end  730 total  750           clock  59.94Hz
  1024x768 (0x6d) 78.750MHz +HSync +VSync
        h: width  1024 start 1040 end 1136 total 1312 skew    0 clock  60.02KHz
        v: height  768 start  769 end  772 total  800           clock  75.03Hz
  1024x768 (0x6e) 75.000MHz -HSync -VSync
        h: width  1024 start 1048 end 1184 total 1328 skew    0 clock  56.48KHz
        v: height  768 start  771 end  777 total  806           clock  70.07Hz
  1024x768 (0x6f) 65.000MHz -HSync -VSync
        h: width  1024 start 1048 end 1184 total 1344 skew    0 clock  48.36KHz
        v: height  768 start  771 end  777 total  806           clock  60.00Hz
  832x624 (0x70) 57.284MHz -HSync -VSync
        h: width   832 start  864 end  928 total 1152 skew    0 clock  49.73KHz
        v: height  624 start  625 end  628 total  667           clock  74.55Hz
  800x600 (0x71) 50.000MHz +HSync +VSync
        h: width   800 start  856 end  976 total 1040 skew    0 clock  48.08KHz
        v: height  600 start  637 end  643 total  666           clock  72.19Hz
  800x600 (0x72) 49.500MHz +HSync +VSync
        h: width   800 start  816 end  896 total 1056 skew    0 clock  46.88KHz
        v: height  600 start  601 end  604 total  625           clock  75.00Hz
  800x600 (0x73) 40.000MHz +HSync +VSync
        h: width   800 start  840 end  968 total 1056 skew    0 clock  37.88KHz
        v: height  600 start  601 end  605 total  628           clock  60.32Hz
  800x600 (0x74) 36.000MHz +HSync +VSync
        h: width   800 start  824 end  896 total 1024 skew    0 clock  35.16KHz
        v: height  600 start  601 end  603 total  625           clock  56.25Hz
  720x576 (0x75) 27.000MHz -HSync -VSync
        h: width   720 start  732 end  796 total  864 skew    0 clock  31.25KHz
        v: height  576 start  581 end  586 total  625           clock  50.00Hz
  720x480 (0x76) 27.027MHz -HSync -VSync
        h: width   720 start  736 end  798 total  858 skew    0 clock  31.50KHz
        v: height  480 start  489 end  495 total  525           clock  60.00Hz
  720x480 (0x77) 27.000MHz -HSync -VSync
        h: width   720 start  736 end  798 total  858 skew    0 clock  31.47KHz
        v: height  480 start  489 end  495 total  525           clock  59.94Hz
  640x480 (0x78) 31.500MHz -HSync -VSync
        h: width   640 start  656 end  720 total  840 skew    0 clock  37.50KHz
        v: height  480 start  481 end  484 total  500           clock  75.00Hz
  640x480 (0x79) 31.500MHz -HSync -VSync
        h: width   640 start  664 end  704 total  832 skew    0 clock  37.86KHz
        v: height  480 start  489 end  492 total  520           clock  72.81Hz
  640x480 (0x7a) 25.200MHz -HSync -VSync
        h: width   640 start  656 end  752 total  800 skew    0 clock  31.50KHz
        v: height  480 start  490 end  492 total  525           clock  60.00Hz
  640x480 (0x7b) 25.175MHz -HSync -VSync
        h: width   640 start  656 end  752 total  800 skew    0 clock  31.47KHz
        v: height  480 start  490 end  492 total  525           clock  59.94Hz
  720x400 (0x7c) 28.320MHz -HSync +VSync
        h: width   720 start  738 end  846 total  900 skew    0 clock  31.47KHz
        v: height  400 start  412 end  414 total  449           clock  70.08Hz
DisplayPort-1 disconnected (normal left inverted right x axis y axis)
        Identifier: 0x55
        Timestamp:  10692081
        Subpixel:   unknown
        Clones:    
        CRTCs:      0 1 2 3 4 5
        Transform:  1.000000 0.000000 0.000000
                    0.000000 1.000000 0.000000
                    0.000000 0.000000 1.000000
                   filter: 
        GAMMA_LUT_SIZE: 4096 
                range: (0, -1)
        DEGAMMA_LUT_SIZE: 4096 
                range: (0, -1)
        GAMMA_LUT: 0 
                range: (0, 65535)
        CTM: 0 
        DEGAMMA_LUT: 0 
                range: (0, 65535)
        TearFree: auto 
                supported: off, on, auto
        subconnector: Unknown 
                supported: Unknown, VGA, DVI-D, HDMI, DP, Wireless, Native
        HDCP Content Type: HDCP Type0 
                supported: HDCP Type0, HDCP Type1
        Content Protection: Undesired 
                supported: Undesired, Desired, Enabled
        vrr_capable: 0 
                range: (0, 1)
        Colorspace: Default 
                supported: Default, BT709_YCC, opRGB, BT2020_RGB, BT2020_YCC
        max bpc: 16 
                range: (8, 16)
        underscan vborder: 0 
                range: (0, 128)
        underscan hborder: 0 
                range: (0, 128)
        underscan: off 
                supported: off, on, auto
        scaling mode: None 
                supported: None, Full, Center, Full aspect
        link-status: Good 
                supported: Good, Bad
        CONNECTOR_ID: 108 
                supported: 108
        non-desktop: 0 
                range: (0, 1)
mic@mic:~$ ddcutil detect
Invalid display
   I2C bus:  /dev/i2c-4
   DRM connector:           card0-DP-1
   EDID synopsis:
      Mfg id:               VES - Vestel Elektronik Sanayi ve Ticaret A. S.
      Model:                40UHD_LCD_TV
      Product code:         14080  (0x3700)
      Serial number:        
      Binary serial number: 0 (0x00000000)
      Manufacture year:     2015,  Week: 1
   DDC communication failed
mic@mic:/sys/class/drm/card0-DP-1$ cat connector_id dpms enabled modes status uevent 
99
Off
disabled
1920x1080
1920x1080
1920x1080
1920x1080
1920x1080
1920x1080
1920x1080
1920x1080
1920x1080
1920x1080
1600x1200
1680x1050
1400x1050
1280x1024
1280x1024
1440x900
1280x960
1280x800
1152x864
1280x720
1280x720
1280x720
1024x768
1024x768
1024x768
832x624
800x600
800x600
800x600
800x600
720x576
720x576
720x480
720x480
720x480
720x480
640x480
640x480
640x480
640x480
640x480
720x400
connected
DEVTYPE=drm_connector
mic@mic:/sys/class/drm/card0-DP-1$ xxd -g1 edid 
00000000: 00 ff ff ff ff ff ff 00 58 b3 00 37 00 00 00 00  ........X..7....
00000010: 01 19 01 03 80 59 32 78 0a cf 74 a3 57 4c b0 23  .....Y2x..t.WL.#
00000020: 09 48 4c af ef 80 b3 00 95 00 a9 40 90 40 81 00  .HL........@.@..
00000030: 81 80 81 40 01 01 08 e8 00 30 f2 70 5a 80 b0 58  [email protected]
00000040: 8a 00 50 1d 74 00 00 1e 02 3a 80 18 71 38 2d 40  ..P.t....:..q8-@
00000050: 58 2c 45 00 50 1d 74 00 00 1e 00 00 00 fc 00 34  X,E.P.t........4
00000060: 30 55 48 44 5f 4c 43 44 5f 54 56 0a 00 00 00 fd  0UHD_LCD_TV.....
00000070: 00 30 3e 0f 46 3c 00 0a 20 20 20 20 20 20 01 d0  .0>.F<..      ..
00000080: 02 03 44 f1 5c 01 06 07 02 03 15 16 11 12 13 04  ..D.\...........
00000090: 14 05 1f 90 20 21 22 5d 5e 5f 60 61 62 63 64 65  .... !"]^_`abcde
000000a0: 66 29 09 07 07 15 07 50 57 06 00 83 01 00 00 6e  f).....PW......n
000000b0: 03 0c 00 10 00 f8 3c 20 00 80 04 03 02 01 e5 0f  ......< ........
000000c0: 00 00 60 0c 01 1d 80 3e 73 38 2d 40 7e 2c 45 80  ..`....>s8-@~,E.
000000d0: 00 d0 52 00 00 1e 01 1d 80 d0 72 1c 2d 20 10 2c  ..R.......r.- .,
000000e0: 25 80 00 d0 52 00 00 9e 00 00 00 00 00 00 00 00  %...R...........
000000f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 13  ................

그러나 이 파일들 중 어느 것도 변경 사항을 보여주지 않았습니다. Xorg 로그 또는 udevadm 이벤트에도 TV가 켜져 있는지 꺼져 있는지에 대한 표시가 포함되어 있지 않습니다.

답변1

이 문제를 조사하는 동안 나는 달렸습니다.

ddcutil interrogate

"가능한 가장 많은 정보를 수집"할 것을 약속합니다.

실제로 1분에 5,000줄이 넘는 정보를 인쇄했습니다.

차이 계산했다하나의 중요한 메시지를 생성합니다.

    Probing bus /dev/i2c-4 using command "i2cdetect -y 4"
            0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
       00:                         -- -- -- -- -- -- -- -- 
       10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
       20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
-      30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
+      30: -- -- -- -- -- -- -- -- -- -- 3a -- -- -- -- -- 
       40: 40 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
       50: 50 51 -- -- 54 -- -- -- -- -- -- -- -- -- -- -- 
       60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
       70: -- -- -- -- -- -- -- --      

실제로 내 TV의 경우 i2cdetect -y 4 0x3a 0x3a대기 상태가 안정적으로 보고됩니다.

그리고 python3-smbus,

import smbus
smbus.SMBus(4).read_byte(0x3a)

TV가 대기 상태이면 올라가고 OSError, TV가 켜져 있으면 성공적으로 돌아옵니다.

CONNECTOR_IDI2C/SM 버스 번호는 보고된 필드에서 확인할 수 있습니다 xrandr --verbose. 동일한 커넥터 ID를 에서 찾을 수 있습니다 /sys/class/drm/*/connector_id. 일치하는 하위 폴더에 readlink ddc버스 번호가 생성됩니다.

불행하게도 이 솔루션은 제게는 충분히 효과가 있었지만 이 특정 TV에서만 작동하는 것 같습니다. 다른 모니터가 켜져 있는데도 I2C 버스의 어떤 주소에도 응답하지 않습니다.

관련 정보