Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for USB C #170

Open
hawktang opened this issue May 19, 2022 · 2 comments
Open

Support for USB C #170

hawktang opened this issue May 19, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@hawktang
Copy link

USB C listed as 27

monitorcontrol --set-input-source 27

is not working

Monitor 1: U3219Q
Available Inputs:
InputSource.DP1*
InputSource.HDMI1
27
Monitor 2:
Available Inputs:
Monitor 3: VG27AQ
Available Inputs:
InputSource.DP1*
InputSource.HDMI1
InputSource.HDMI2

@newAM
Copy link
Owner

newAM commented May 19, 2022

USB type C is not part of the specification, if this doesn't work there's not much that can be done about it.

@newAM newAM added the bug Something isn't working label May 19, 2022
@kojiishi
Copy link

monitor.get_input_source() fails if the current is an unlisted value, such as 27. I'm using DELL monitors on Windows.

Traceback (most recent call last):
  File "C:\Users\kojii\AppData\Local\Programs\Python\Python310\lib\site-packages\monitorcontrol\monitorcontrol.py", line 464, in get_input_source
    return InputSource(value)
  File "C:\Users\kojii\AppData\Local\Programs\Python\Python310\lib\enum.py", line 385, in __call__
    return cls.__new__(cls, value)
  File "C:\Users\kojii\AppData\Local\Programs\Python\Python310\lib\enum.py", line 710, in __new__
    raise ve_exc
ValueError: 27 is not a valid InputSource

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\src\bin\dpswitch.py", line 35, in <module>
    run()
  File "C:\src\bin\dpswitch.py", line 25, in run
    current_input = monitor.get_input_source()
  File "C:\Users\kojii\AppData\Local\Programs\Python\Python310\lib\site-packages\monitorcontrol\monitorcontrol.py", line 466, in get_input_source
    raise InputSourceValueError(f"{value} is not a valid InputSource", value)
monitorcontrol.monitorcontrol.InputSourceValueError: 27 is not a valid InputSource

I'm not sure if the specification allows such non-standard values, but great if it can return the raw value without errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants