Skip to content

Instantly share code, notes, and snippets.

@nebriv
Last active April 29, 2024 15:50
Show Gist options
  • Star 27 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save nebriv/cb934a3b702346c5988f2aba5ee39f0d to your computer and use it in GitHub Desktop.
Save nebriv/cb934a3b702346c5988f2aba5ee39f0d to your computer and use it in GitHub Desktop.
Dell Display Manager 2.0 command line documentation

Dell Display Manager 2.0 Command Line

Decompiled DLL with ILSpy to identify various commands.

Most commands can be found in DDM2._0_UX.CmdBackground.cmdService_DoWork

Write commands can be prefixed with int:command to specify which monitor to send the command to.

.\DDM.exe /0:writebrightnesslevel 50

Read command output is only shown in the debug console.

Debugging Console

Used to show the output of various read commands

.\DDM.exe /console start

Commands

.\DDM.exe /console start Opens DDM Console

.\DDM.exe /readbrightnesslevel Reads the monitor brightness level

.\DDM.exe /writebrightnesslevel Sets the monitor brightness level

.\DDM.exe /readcontrastlevel Reads the monitor contrast level

.\DDM.exe /writecontrastlevel Sets the monitor contrast level

.\DDM.exe /readcapabilities Read monitor capabilities (in hex)

.\DDM.exe /readsupportedcontrols Read monitor supported controls (in hex)

.\DDM.exe /writecolorpreset Write color presets

.\DDM.exe /readcolorpreset Read color presets

.\DDM.exe /readorientation Read monitor orientation

.\DDM.exe /writeorientation Sets monitor orientation

.\DDM.exe /readmonitoractivehours Read monitor active hours

.\DDM.exe /writeactiveinput

.\DDM.exe /readactiveinput

.\DDM.exe /writepower

.\DDM.exe /writeosdlanguage

.\DDM.exe /osd

.\DDM.exe /readedid

.\DDM.exe /writeuc

.\DDM.exe /readmax

.\DDM.exe /readprivacy

.\DDM.exe /writeprivacy

.\DDM.exe /readfirmwareversion

.\DDM.exe /writevolume

.\DDM.exe /readvolume

.\DDM.exe /autocolorpreset

.\DDM.exe /swapvideo

.\DDM.exe /swapusb

.\DDM.exe /writesubinput

.\DDM.exe /writepxpmode

.\DDM.exe /writepxp

.\DDM.exe /readcontrol

.\DDM.exe /increasecontrol

.\DDM.exe /decreasecontrol

.\DDM.exe /writecontrol

.\DDM.exe /readpossible

.\DDM.exe /autosetup

.\DDM.exe /readmanufactureddate

.\DDM.exe /writemonitorpower

.\DDM.exe /readdisplaymode

.\DDM.exe /writeoptimalresolution

.\DDM.exe /readtiming

.\DDM.exe /readassetattributes

.\DDM.exe /log

.\DDM.exe /savediagnosticreport

.\DDM.exe /assetreport

.\DDM.exe /inventory

.\DDM.exe /surveyonly

.\DDM.exe /readdecodededid

.\DDM.exe /countmonitorsci

.\DDM.exe /monitornumber OR countmonitors

.\DDM.exe /usbpassthrough

.\DDM.exe /lockupdate

.\DDM.exe /noupdate

.\DDM.exe /screennotification

.\DDM.exe /lockrorate

.\DDM.exe /autostartup

.\DDM.exe /powernap

.\DDM.exe /colormanagement

.\DDM.exe /writeapplanguage

.\DDM.exe /telemetry

.\DDM.exe /writeealayout

.\DDM.exe /writeimportpermission

.\DDM.exe /displaymodel

.\DDM.exe /writeloglevel

.\DDM.exe /liveupdate") && ApplicationStartUp.Ota != null)

.\DDM.exe /rescan to refresh the connected devices -Thanks @rtxbae!

Some examples of using the utility on MacOS to enable picture by picture, thanks @sepl2604!

/Applications/DDPM/DDPM.app/Contents/MacOS/DDPM /writepxp pbp-2h-fill USB-C HDMI1 Activate 50-50 PBP

/Applications/DDPM/DDPM.app/Contents/MacOS/DDPM /writepxp off Turn off PBP

@Presjar
Copy link

Presjar commented Mar 17, 2023

When I set my monitor to Manual Color, Display HDR in the DDM UI I am able to return the below in the terminal via ./ddm /readcolorpreset
readcolorpreset = DisplayHDR

If I change the mode to HDR Peak 1000 in the UI, ./ddm /readcolorpreset returns
Command Error

Any ideas how I can find the console command ddm uses from the UI to set the colorpreset to the HDR Peak 1000?
I have tried things such as

HDRPeak1000, HDRPEAK1000, HDR PEAK1000, etc resulting in blablabla = Invalid command

@jdetmold
Copy link

I can't seem to figure out how to swap between Single Display and PBP. if you have any ideas I would love some help!

@rayraystars
Copy link

Hi @jdetmold,

It would be great if you could assign a hotkey directly in the DDM GUI, but until then, I had some success with the following using a U3423WE monitor and ddm 2.1.1.17.

I had PC1 connected to the DisplayPort (DP) and PC2 connected to USB-C

To enter PBP mode:
.\DDM.exe /writepxpmode pbp DP USB-C

To switch back to your active display:
.\DDM.exe /writePXP off

https://www.dell.com/support/kbdoc/en-au/000060112/what-is-dell-display-manager#install:~:text=2%3AWritePxP%20Off-,WritePxpMode,-%5Bmode%20main%20sub1

@7374000XX
Copy link

@nebriv

Hello,

Is there a command to change aspect ratio?

Thank you.

@mikeyX101
Copy link

@Presjar Don't know if you're still interested, but I had a similar need for this so I made a quick executable that approximately does what DDM does to switch to HDRPeak1000 and you can call it from CLI. See: https://github.com/mikeyX101/DDM-HDRPeak1000

It switches between SmartHDR off to HDRPeak1000. I also only could test on my Alienware AW3423DWF so I have no idea if it works properly on other Dell monitors.

Cheers!

@Presjar
Copy link

Presjar commented Jul 9, 2023

@mikeyX101 Thanks for this! Sounds like something I can make use of! I'll check it out and let you know how it goes.

@rtxbae
Copy link

rtxbae commented Jul 20, 2023

There's also /rescan to refresh the connected devices, missing in the list.

@nebriv
Copy link
Author

nebriv commented Jul 20, 2023

@Presjar Don't know if you're still interested, but I had a similar need for this so I made a quick executable that approximately does what DDM does to switch to HDRPeak1000 and you can call it from CLI. See: https://github.com/mikeyX101/DDM-HDRPeak1000

It switches between SmartHDR off to HDRPeak1000. I also only could test on my Alienware AW3423DWF so I have no idea if it works properly on other Dell monitors.

Cheers!

Nice work, thanks for putting that together!

@nebriv
Copy link
Author

nebriv commented Jul 20, 2023

There's also /rescan to refresh the connected devices, missing in the list.

Thank you, updated the list!

@potatowave
Copy link

potatowave commented Aug 11, 2023

EDIT: Got it! /Applications/DDPM/DDPM /WritePxP pbp-2h-fill. The documentation 👎

Hi everyone!

Recently got a u2723qe and was excited to use the CLI to switch some monitor states. I'm finding some commands work, some do not. I'm wondering if syntax is an issue. The documentation is as follows:

/Applications/DDPM/DDPM /1:WritePxPMode Off

This turns the current PiP off.

I would expect one of:

/Applications/DDPM/DDPM /1:WritePxP PBP USB-C HDMI

/Applications/DDPM/DDPM /1:WritePxPMode PBP USB-C HDMI to turn on PBP with USB-C on the left, and HDMI on the right. However it doesn't work. I have also tried 'split' in place of PBP.

Here is Dell's documentation from the DDPM folder:

Command line Interface that DDPM supports
-----------------------------------------------
A rich and flexible command language is supported via the
command-line, and command-line arguments can be combined.
Where appropriate, a specific display can be targeted by
prefacing the command with the enumerated display number, e.g., "2:AutoSetup"; 
if the enumerated number is not specified the 
command will be applied to the current selected display 
or to all displays, as appropriate. Commands include:

WriteActiveInput [DVI2/HDMI/DP2,etc] - switches active input
ReadActiveInput [DVI2/HDMI/DP2,etc] - switches active input
RestoreFactoryDefaults - restores factory defaults*
AutoSetup - executes an autosetup (analog only)*
ReadColorPreset - read the current color preset
WriteColorPreset - set the color preset
RestoreLevelDefaults - restores level defaults*
RestoreColorDefaults - restores color defaults*
WriteBrightnessLevel X - sets brightness to X% (0-100)*
ReadBrightnessLevel X - sets brightness to X% (0-100)*
WriteContrastLevel X - sets contrast to X% (0-100)*
ReadContrastLevel X - sets contrast to X% (0-100)*
WritePower [on/off/standby] - sets the display power mode (standby should be used for central control.)*
WriteOptimalResolution - switches to optimal resolution
WriteEALayout [X] - changes Easy Arrange grid type to X (0-48) where 0 is to turn off EA layout
Rescan - rescans display hardware
ReadControl X Y - sets hex control X to hex value Y
WriteControl X Y - sets hex control X to hex value Y
IncreaseControl X Y - increases the value of control X by Y
DecreaseControl X Y - decreases the value of control X by Y
WritePxP [Off/PiP/PBP Main Sub1] - Change PIP/PBP settings
WriteSubInput[DP1, DP2, HDM1... etc}]- Change the subinput 
SwapVideo - Swaps the main (primary and sub inputs between 2 PCs)
SwapUSB - swaps the usb inputs on the main and sub inputs (for 2 PBP mode only)
Zoom - switches between PxP and fullscreen mode
Exit - terminates the program

@heinrichmichael
Copy link

I got the new Dell U4924DW which supports a feature called "Screen Partition". This splits the ultrawide screen into 2 virtual 27" Monitors which is great during Teams meeting to share the desktop.

Does anyone have an idea how to Switch this mode using DDM or CLI? I did not make it happen using DDM but maybe there is some way using CLI (Console)

@potatowave
Copy link

I'd try using a DDC tool over DDM. It should allow you to read the values. I found that DDM was super slow.

@crutch12
Copy link

Thanks a lot! ❤️

@crutch12
Copy link

You may also get output without debug console, using /log command:

.\DDM.exe /log D:\temp.txt /readbrightnesslevel

@jtbrough
Copy link

jtbrough commented Nov 13, 2023

This is an incredibly useful page, and it is a shame that Dell's own documentation is nowhere near as complete. I recently purchased a Dell U4323QE which includes multiple inputs and a USB KVM feature. That, combined with DDM CLI and a Stream Deck + have given me the ability to swap my display inputs and USB connections with the push of a button.

Just in case anyone seeking something similar comes along, I'll include a few notes:

  • Connect your systems and conduct the KVM configuration within the monitor's OSD
  • Install Dell Display Manager
  • Install and setup Stream Deck software
  • Use "Open" shortcuts in the Stream Deck software, and use the following in the App / File field

For Windows (11)

For the USB-C connection:
"C:\Program Files\Dell\Dell Display Manager 2\DDM.exe" /writeactiveinput USB-C

For DisplayPort 1:
"C:\Program Files\Dell\Dell Display Manager 2\DDM.exe" /writeactiveinput DP1

For DisplayPort 2:
"C:\Program Files\Dell\Dell Display Manager 2\DDM.exe" /writeactiveinput DP2

For HDMI 1:
"C:\Program Files\Dell\Dell Display Manager 2\DDM.exe" /writeactiveinput HDMI1

For HDMI 2:
"C:\Program Files\Dell\Dell Display Manager 2\DDM.exe" /writeactiveinput HDMI2

macOS

For the USB-C connection:
/Applications/DDPM/DDPM.app/Contents/MacOS/DDPM /writeactiveinput USB-C

For DisplayPort 1:
/Applications/DDPM/DDPM.app/Contents/MacOS/DDPM /writeactiveinput DP1

For DisplayPort 2:
/Applications/DDPM/DDPM.app/Contents/MacOS/DDPM /writeactiveinput DP2

For HDMI 1:
/Applications/DDPM/DDPM.app/Contents/MacOS/DDPM /writeactiveinput HDMI1

For HDMI 2:
/Applications/DDPM/DDPM.app/Contents/MacOS/DDPM /writeactiveinput HDMI2

Because the KVM feature of the monitor maps the USB connection to the display input, simply changing the display input causes the corresponding USB connection update to happen automatically by the monitor.

@sepl2604
Copy link

This is awesome! Thank you very much. Got a U3824DW today and currently switch between PBP and off is working, but each command takes 12 sec to complete on my Mac M1 Pro.

Activate 50-50 PBP
/Applications/DDPM/DDPM.app/Contents/MacOS/DDPM /writepxp pbp-2h-fill USB-C HDMI1

Turn off PBP
/Applications/DDPM/DDPM.app/Contents/MacOS/DDPM /writepxp off

@vrij
Copy link

vrij commented Dec 14, 2023

EDIT: Got it! /Applications/DDPM/DDPM /WritePxP pbp-2h-fill. The documentation 👎

Hi @potatowave , did you figure out a way to use this command to auto-flip the two inputs when enabling PBP?

The only way I found to do this would be to use one of the pxp commands, and then \SwapVideo.
Though there needs to be a delay between the two, making this solution rather slow.

@potatowave
Copy link

potatowave commented Dec 14, 2023

I got fed up with the slowness of DDPM and switched to using DDC directly which is much, much faster.

I took this repo: https://github.com/waydabber/m1ddc and made some modifications. This will be useful if you're using an M1 mac. It looks like it's been updated to support some of the functions I wanted but these addresses will be helpful if you wish to make your own fork:

#define LUMINANCE 0x10
#define CONTRAST 0x12
#define VOLUME 0x62
#define MUTE 0x8D
#define PBP 0xE9
#define SWAP_USB 0xE7
#define SWAP_INPUT 0xE5
#define INPUT 0x60
#define SUB_INPUT 0xE8
#define INPUT_ALT 0xF4 // alternate address, used for LG exclusively?
#define STANDBY 0xD6

@pasqualesimonetti
Copy link

Is it possible to change the display's number?

The display number is "wrong" in DDPM
Screenshot 2024-03-25 alle 15 52 37

In Mac OS (and also on Windows DPPM) is "correct"
Screenshot 2024-03-25 alle 15 53 02

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