Skip to content

Instantly share code, notes, and snippets.

@chk1
Last active February 23, 2024 23:05
Show Gist options
  • Save chk1/3ec8fdb9bfc238d5272f3b58b5d3a9c6 to your computer and use it in GitHub Desktop.
Save chk1/3ec8fdb9bfc238d5272f3b58b5d3a9c6 to your computer and use it in GitHub Desktop.
Dell S2721dgf/S2721dgfa volume control via Dell Display Manager (ddm) on Windows

Using Dell Display Manager (ddm.exe) to change the volume on Dell S2721dgf gaming monitor

Download Dell Display Manager from the Dell website: https://www.dell.com/support/kbdoc/de-de/000060112/was-ist-dell-display-manager

References from the Dell Forum:

Autohotkey Script

Executing a ddm command has a delay of approx. 2 second.

; The path to ddm.exe
ddm_exe = "C:\Program Files\Dell\Dell Display Manager 2\DDM.exe"

; Right shift + volume Up = Monitor volume up by 5
>+Volume_Up::Run, %ddm_exe% /IncreaseControl 62 5

; Right shift + volume Down = Monitor volume down by 5
>+Volume_Down::Run, %ddm_exe% /DecreaseControl 62 5

; Right shift + mute = Monitor volume zero
>+Volume_Mute::Run, %ddm_exe% /WriteControl 62 0

More things

Switching inputs with a .bat script (e.g. usage with StreamDeck)

@echo off
"C:\Program Files\Dell\Dell Display Manager 2\DDM.exe" /WriteActiveInput DP

Figuring out the values

Start ddm in console mode, a 2nd console window will open that prints the results:

ddm.exe /console start

To figure out your input values, either as readable names (1) or control values (2), switch the inputs on your monitor and type these commands (easy if you have a 2nd monitor too):

ddm.exe /readactiveinput
ddm.exe /readcontrol 60

Values for the S2721DGF monitor are by default:

Input name Control code
DP 0F0F
HDMI 0F11
HDMI 0F12

To give them distinct names, like HDMI1 and HDMI2, open Dell Display Manager and go to the Input Source page. You can then use those names in your scripts. Check the values after a GPU driver update, they might get lost.

To switch your monitor to HDMI2 then, you can use one of these commands:

ddm.exe /WriteActiveInput HDMI2
ddm.exe /WriteControl 60 0F12

References

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