davidhi7 / ddcci-plasmoid

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

Monitor detection issue after updating ddcutil to 2.0.0 #49

Closed OPerepadia closed 8 months ago

OPerepadia commented 8 months ago

After ddcutil got updated to 2.0.0, the plasmoid is no longer detecting my monitor. The output of ddcutil detect

busno=6, Feature 0x41 should not exist but ddc_get_nontable_vcp_value() succeeds, returning mh=0x00 ml=0x64 sh=0x00 sl=0x64
busno=6, Feature 0xdd should not exist but ddc_get_nontable_vcp_value() succeeds, returning mh=0x00 ml=0x64 sh=0x00 sl=0x64
busno=6, Feature 0x00 should not exist but ddc_get_nontable_vcp_value() succeeds, returning mh=0x00 ml=0x64 sh=0x00 sl=0x64
Display 1
   I2C bus:  /dev/i2c-6
   DRM connector:           card1-DP-1
   EDID synopsis:
      Mfg id:               DEL - Dell Inc.
      Model:                DELL P2418D
      Product code:         53441  (0xd0c1)
      Serial number:        
      Binary serial number: 
      Manufacture year:     2019,  Week: 4
   VCP version:         2.1

The output of ddcci_plasmoid_backend -d detect

DEBUG ddcci_plasmoid_backend.__main__: backend version: 0.1.8
DEBUG ddcci_plasmoid_backend.__main__: ddcutil version: 2.0.0
DEBUG ddcci_plasmoid_backend.__main__: argv: /home/oleksandr/.local/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: busno=6, Feature 0x41 should not exist but ddc_get_nontable_vcp_value() succeeds, returning mh=0x00 ml=0x64 sh=0x00 sl=0x64
busno=6, Feature 0xdd should not exist but ddc_get_nontable_vcp_value() succeeds, returning mh=0x00 ml=0x64 sh=0x00 sl=0x64
busno=6, Feature 0x00 should not exist but ddc_get_nontable_vcp_value() succeeds, returning mh=0x00 ml=0x64 sh=0x00 sl=0x64
Display 1
   I2C bus:  /dev/i2c-6
   DRM connector:           card1-DP-1
   EDID synopsis:
      Mfg id:               DEL - Dell Inc.
      Model:                DELL P2418D
      Product code:         53441  (0xd0c1)
      Serial number:        
      Binary serial number: 
      Manufacture year:     2019,  Week: 4
   VCP version:         2.1
DEBUG ddcci_plasmoid_backend.ddcci: [stderr] ddcutil detect: 

DEBUG ddcci_plasmoid_backend.ddcci: Found 4 entries at root level
DEBUG ddcci_plasmoid_backend.ddcci: Key busno=6, Feature 0x41 should not exist but ddc_get_nontable_vcp_value() succeeds, returning mh=0x00 ml=0x64 sh=0x00 sl=0x64 does not match pattern for valid display, so skip it
DEBUG ddcci_plasmoid_backend.ddcci: Key busno=6, Feature 0xdd should not exist but ddc_get_nontable_vcp_value() succeeds, returning mh=0x00 ml=0x64 sh=0x00 sl=0x64 does not match pattern for valid display, so skip it
DEBUG ddcci_plasmoid_backend.ddcci: Key busno=6, Feature 0x00 should not exist but ddc_get_nontable_vcp_value() succeeds, returning mh=0x00 ml=0x64 sh=0x00 sl=0x64 does not match pattern for valid display, so skip it
DEBUG ddcci_plasmoid_backend.ddcci: Execute command: `ddcutil getvcp --bus 6 --brief 10`
DEBUG ddcci_plasmoid_backend.ddcci: [code]   ddcutil getvcp --bus 6 --brief 10: 1
DEBUG ddcci_plasmoid_backend.ddcci: [stdout] ddcutil getvcp --bus 6 --brief 10: busno=6, Feature 0x41 should not exist but ddc_get_nontable_vcp_value() succeeds, returning mh=0x00 ml=0x64 sh=0x00 sl=0x64
busno=6, Feature 0xdd should not exist but ddc_get_nontable_vcp_value() succeeds, returning mh=0x00 ml=0x64 sh=0x00 sl=0x64
busno=6, Feature 0x00 should not exist but ddc_get_nontable_vcp_value() succeeds, returning mh=0x00 ml=0x64 sh=0x00 sl=0x64
VCP 10 C 40 100
DEBUG ddcci_plasmoid_backend.ddcci: [stderr] ddcutil getvcp --bus 6 --brief 10: 

DEBUG ddcci_plasmoid_backend.__main__: too many values to unpack (expected 5)
DEBUG ddcci_plasmoid_backend.__main__: Detected 0 working monitor busses, 1 non-working bus.
{"command": "detect", "value": []}

I suspect the issue might be caused by unexpected warnings which are present in the output. But I'm not sure if this is something that should be addressed in ddcutil, or maybe ddcci_plasmoid_backend can simply ignore them

davidhi7 commented 8 months ago

You are right, the backend doesn't expect these warnings and consequently fails to parse the output. In the past months we've found multiple such warnings that need to be explicitly ignored by the backend.

Though you should still report this in the ddcutil bug tracker to decide whether this is a bug in ddcutil or related to your setup behaving weirdly.

davidhi7 commented 8 months ago

Fixed in backend version 0.1.9.