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

Error in get_monitors() for SAMSUNG monitor #117

Closed
nowdob opened this issue Aug 31, 2021 · 3 comments
Closed

Error in get_monitors() for SAMSUNG monitor #117

nowdob opened this issue Aug 31, 2021 · 3 comments

Comments

@nowdob
Copy link

nowdob commented Aug 31, 2021

  • Monitor manufacturer and model number: SAMSUNG and LED Monitor (S24F354FH)
  • Input source (HDMI, VGA, display port, ect.): HDMI
  • Output device (video card, discrete graphics, ect.): discrete graphics
  • Operating system: window 10
  • Python version: 3.9.0
  • monitorcontrol version (monitorcontrol --version): 2.5.1

Steps to Reproduce

I wrote some test code as below. It works well for LG monitor.
However when I tried it with samsung monitor, I got error of InputSourceValueError(255).
I think it fails to get monitor information after software power off for samsung monitor.

I'd like to control monitor power for energy saving.
It would be great if you check it


for monitor in get_monitors():
    with monitor:
        monitorSrc = monitor.get_input_source()  
        if monitorSrc.value != 0:
            monitor.set_power_mode("off_soft")    # succeed to turn off the monitor

time.sleep(5.0)

for monitor in get_monitors():   
    with monitor:
        monitorSrc = monitor.get_input_source()    # raise InputSourceValueError: 255 is not a valid Input Source
        if monitorSrc.value != 0:
            monitor.set_power_mode("on")        
@newAM
Copy link
Owner

newAM commented Aug 31, 2021

Some monitors will cease to respond to DDC-CI commands when in standby or power off, they do it as a power saving feature. Check if your monitor has any power settings in the on-screen menu that could change the behavior.

@nowdob
Copy link
Author

nowdob commented Aug 31, 2021

Thanks for your reply. I'll check related option. In this regard, I have one more question.
If I get return value of inputSource.OFF in get_input_source() function for some monitor. Could I think that the monitor doesn't support DDC-CI commands?

FYI, I experienced that if it got inputSource.OFF return value, I failed turn on or off the monitor during test.

@newAM
Copy link
Owner

newAM commented Aug 31, 2021

There is no good way to determine if a monitor supports DDC-CI or not. Somtimes it is supported but disabled in the on screen display. What the monitor returns when it is off or isn't supported is vendor specific.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants