I use ddcutil as a command line alternative to physically pressing the buttons on my monitor to change input from HDMI to DisplayPort, and have it initially set it up to switch from one to the other using two commands -

  1. ddcutil -d 1 setvcp 60 0x0f tells the monitor to switch to DisplayPort (-d 1 is "display 1", "setvcp" is the command to change the setting, "60" is the monitor's code for the input feature, and "0x0f" is the code for display port) and

  2. ddcutil -d 1 setvcp 60 0x11 is the same thing with "0x11" being the code for HDMI

These two commands work successfully and as expected.

Where I need help at the moment is with creating a single script that checks to see what the current state of the monitor is and switches to the other input based on what the current state is. This way I can bind the script to a single "toggle" button on my keyboard, instead of having two separate buttons, one for DP and one for HDMI.

ddcutil's man pages indicate that the command ddcutil -d 1 getvcp 60 --brief will return the current state of the monitor - I tried this and it seems to work when on display port; the output when on displayport is: VCP 60 SNC x0f. When i switch to HDMI though and run the same command, the output is the same: "VCP 60 SNC x0f".

So this may really be a two-pronged question:

  1. can you help me figure out why when on HDMI the getvcp command does not return the expected "VCP 60 SNC x11"? I think figuring this out may be a pre-requisite to my second question:
  2. can you help me write a bash script as described above?

1 Answer 1


I am the developer of ddcutil

How feature x60 (Input Source) behaves varies by monitor. Some monitors accept commands only from the current input source, others accept input from any source. Given that setvcp works for getvcp fails, I suspect it's a bug in the monitor's DDC/CI implementation.

One thing worth trying is issuing the command "ddcutil scs" (Save Current Settings) immediately after setvcp. Some monitors implement this command, some don't, and how they interpret it varies.

One other thing of note: Some monitors accept DDC/CI commands only from the currently selected input, others will accept them on any input. Have you tested the getvcp command from the input source? If the HDMI input source is Windows, you can use EnTech's softMccs to issue any DDC command.

  • will this app work with switching HDMI 1 to HDMI 2?
    – jason
    Apr 23, 2022 at 18:20
  • As my answer described, there's a lot of variation in how monitor manufacturers implement feature x60 (Input Source). You'll have to try it to find out if it works for you. One additional thing to be aware of is that not all monitors respect the MCCS standard that values x11 and x12 represent HDMI-1 and HDMI-2. Apr 26, 2022 at 6:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .