davidhi7 / ddcci-plasmoid

KDE Plasma widget to adjust the brightness of multiple external monitors
MIT License
390 stars 11 forks source link

Incorrect selection of tiled monitor #39

Closed jcassee closed 10 months ago

jcassee commented 10 months ago

When I use ddcci_plasmoid_backend on my tiled LG 5K monitor, the wrong "submonitor" seems to be selected for control:

$ ddcci_plasmoid_backend -d detect
DEBUG ddcci_plasmoid_backend.__main__: backend version: 0.1.6
DEBUG ddcci_plasmoid_backend.__main__: ddcutil version: 1.4.1
DEBUG ddcci_plasmoid_backend.__main__: argv: /usr/bin/ddcci_plasmoid_backend -d detect
DEBUG ddcci_plasmoid_backend.ddcci: Execute command: `ddcutil detect`
DEBUG ddcci_plasmoid_backend.ddcci: [code]   ddcutil detect: 0
DEBUG ddcci_plasmoid_backend.ddcci: [stdout] ddcutil detect: Invalid display
   I2C bus:  /dev/i2c-16
   DRM connector:           card0-eDP-1
   EDID synopsis:
      Mfg id:               SHP - Sharp Corporation
      Model:
      Product code:         5399  (0x1517)
      Serial number:
      Binary serial number: 0 (0x00000000)
      Manufacture year:     2021,  Week: 10
   DDC communication failed
   This is an eDP laptop display. Laptop displays do not support DDC/CI.

Display 1
   I2C bus:  /dev/i2c-19
   DRM connector:           card0-DP-3
   EDID synopsis:
      Mfg id:               GSM - Goldstar Company Ltd (LG)
      Model:                LG HDR 5K
      Product code:         30497  (0x7721)
      Serial number:        106NTWGDP049
      Binary serial number: 465049 (0x00071899)
      Manufacture year:     2021,  Week: 6
   VCP version:         Detection failed

Display 2
   I2C bus:  /dev/i2c-20
   DRM connector:           card0-DP-4
   EDID synopsis:
      Mfg id:               GSM - Goldstar Company Ltd (LG)
      Model:                LG HDR 5K
      Product code:         30497  (0x7721)
      Serial number:        106NTWGDP049
      Binary serial number: 465049 (0x00071899)
      Manufacture year:     2021,  Week: 6
   VCP version:         2.1
DEBUG ddcci_plasmoid_backend.ddcci: [stderr] ddcutil detect:

DEBUG ddcci_plasmoid_backend.ddcci: Found 3 entries at root level
DEBUG ddcci_plasmoid_backend.ddcci: Key Invalid display does not match pattern for valid display, so skip it
DEBUG ddcci_plasmoid_backend.ddcci: LG HDR 5K id=2: Duplicate monitor found and removed
DEBUG ddcci_plasmoid_backend.ddcci: Execute command: `ddcutil getvcp --bus 19 --brief 10`
DEBUG ddcci_plasmoid_backend.ddcci: [code]   ddcutil getvcp --bus 19 --brief 10: 1
DEBUG ddcci_plasmoid_backend.ddcci: [stdout] ddcutil getvcp --bus 19 --brief 10: VCP 10 ERR
DEBUG ddcci_plasmoid_backend.ddcci: [stderr] ddcutil getvcp --bus 19 --brief 10:

DEBUG ddcci_plasmoid_backend.__main__: Command 'ddcutil getvcp --bus 19 --brief 10' returned non-zero exit status 1.
DEBUG ddcci_plasmoid_backend.__main__: Detected 0 working monitor busses, 1 non-working bus.
{"command": "detect", "value": []}

The first display is my laptop screen, which is correctly ignored. Then the second and third represent the tiled monitor. However, only the second display has VCP enabled, but it is excluded as a duplicate. Of course, that is exactly the one that you would want to get picked.

Maybe the solution is to ignore displays that have "VCP version: Detection failed"?

davidhi7 commented 10 months ago

Fixed in latest release 0.1.8, thanks for reporting!

jcassee commented 10 months ago

Confirmed, the fix works. Thank you for the quick response.