Skip to content

Checking input works for one monitor but not the other (both same model) #130

Description

@brilthor
  • Monitor manufacturer and model number: See ddcutil info below for list
  • Input source (HDMI, VGA, display port, ect.): DP and DP via DP->HDMI active adapter
  • Output device (video card, discrete graphics, ect.): VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] (rev e7)
  • Operating system: Arch linux
  • Python version: Python 3.9.7
  • monitorcontrol version (monitorcontrol --version):

Steps to Reproduce

Iterate through monitors checking which input is selected:

#!/bin/env python
import monitorcontrol

for monitor in monitorcontrol.get_monitors():
    with monitor:
        print(monitor.get_input_source())

InputSource.DP1
Traceback (most recent call last):
  File "switch_monitor_input.py", line 8, in <module>
    print(monitor.get_input_source())
  File "venv/lib/python3.9/site-packages/monitorcontrol/monitorcontrol.py", line 389, in get_input_source
    value = self._get_vcp_feature(code) & 0xFF
  File "venv/lib/python3.9/site-packages/monitorcontrol/monitorcontrol.py", line 175, in _get_vcp_feature
    current, maximum = self.vcp.get_vcp_feature(code.value)
  File "venv/lib/python3.9/site-packages/monitorcontrol/vcp/vcp_linux.py", line 180, in get_vcp_feature
    ) = struct.unpack(">BBBBHH", payload)
struct.error: unpack requires a buffer of 8 bytes

display info from ddcutil:

Display 1
   I2C bus:  /dev/i2c-11
   EDID synopsis:
      Mfg id:               ACR
      Model:                CB282K
      Product code:         1887
      Serial number:        
      Binary serial number: 1898...
      Manufacture year:     2020,  Week: 12
   VCP version:         2.1

Display 2 <-- this one
   I2C bus:  /dev/i2c-12
   EDID synopsis:
      Mfg id:               ACR
      Model:                CB282K
      Product code:         1887
      Serial number:        
      Binary serial number: 1898...
      Manufacture year:     2020,  Week: 12
   VCP version:         2.1

Display 3
   I2C bus:  /dev/i2c-13
   EDID synopsis:
      Mfg id:               ACR
      Model:                CB282K
      Product code:         1887
      Serial number:        
      Binary serial number: 18983...
      Manufacture year:     2020,  Week: 12
   VCP version:         2.1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions