waydabber / BetterDisplay

Unlock your displays on your Mac! Flexible HiDPI scaling, XDR/HDR extra brightness, virtual screens, DDC control, extra dimming, PIP/streaming, EDID override and lots more!
https://betterdisplay.pro
16.9k stars 313 forks source link

Add CLI command to interpret DDC capabilities string and query max/current values for supported commands #3119

Closed waydabber closed 2 days ago

waydabber commented 6 days ago

Built upon this: https://github.com/waydabber/BetterDisplay/issues/2899

waydabber commented 6 days ago

Here is how to invoke the command:

betterdisplaycli get -namelike=DISPLAYNAME -ddcCapabilities

Here is an example of the output:

~ % betterdisplaycli get -namelike=gp -ddcCapabilities
DDC capabilities report for Display 3 (GP27-FUS)
VCP 0x02 (2
- Parsed as command newControlValue
- Current value: 1.
- Maximum value: 2.
VCP 0x04 (4
- Parsed as command restoreFactoryDefaults
- Default control target hardwareFactoryReset
- Mapped control targets: hardwareFactoryReset
- Current value: 0.
- Maximum value: 255.
VCP 0x05 (5
- Parsed as command restoreFactoryLuminanceContrastDefaults
- Current value: 0.
- Maximum value: 1.
VCP 0x08 (8
- Parsed as command restoreFactoryColorDefaults
- Current value: 0.
- Maximum value: 255.
VCP 0x10 (16
- Parsed as command luminance
- Default control target hardwareBrightness
- Mapped control targets: hardwareBrightness
- Current value: 25.
- Maximum value: 100.
VCP 0x12 (18
- Parsed as command contrast
- Default control target hardwareContrast
- Mapped control targets: hardwareContrast
- Current value: 70.
- Maximum value: 100.
VCP 0x14 (20
- Parsed as command selectColorPreset
- Accepted distinct values: 5, 8, 11, 12
- Current value: 12.
- Maximum value: 12.
VCP 0x16 (22
- Parsed as command videoGainRed
- Default control target redHardwareGain
- Mapped control targets: redHardwareGain
- Current value: 50.
- Maximum value: 100.
VCP 0x18 (24
- Parsed as command videoGainGreen
- Default control target greenHardwareGain
- Mapped control targets: greenHardwareGain
- Current value: 50.
- Maximum value: 100.
VCP 0x1A (26
- Parsed as command videoGainBlue
- Default control target blueHardwareGain
- Mapped control targets: blueHardwareGain
- Current value: 50.
- Maximum value: 100.
VCP 0x52 (82
- Parsed as command activeControl
- Current value: 0.
- Maximum value: 255.
VCP 0x60 (96
- Parsed as command inputSelect
- Default control target hardwareInputSource
- Mapped control targets: hardwareInputSource
- Accepted distinct values: 17, 18, 15, 16
- Current value: 17.
- Maximum value: 14.
VCP 0xAC (172
- Parsed as command horizontalFrequency
- Current value: 4556.
- Maximum value: 4.
VCP 0xAE (174
- Parsed as command verticalFrequency
- Current value: 11853.
- Maximum value: 0.
VCP 0xB2 (178
- Parsed as command flatPanelSubPixelLayout
- Current value: 1.
- Maximum value: 8.
VCP 0xB6 (182
- Parsed as command displayTechnologyType
- Current value: 3.
- Maximum value: 5.
VCP 0xC6 (198
- Parsed as command applicationEnableKey
- Current value: 17868.
- Maximum value: 65535.
VCP 0xC8 (200
- Parsed as command displayControllerId
- Current value: 22021.
- Maximum value: 0.
VCP 0xC9 (201
- Parsed as command displayFirmwareLevel
- Current value: 0.
- Maximum value: 65535.
VCP 0xD6 (214
- Parsed as command powerMode
- Default control target hardwareBacklight
- Mapped control targets: hardwarePower, hardwareBacklight
- Accepted distinct values: 1, 4, 5
- Current value: 1.
- Maximum value: 255.
VCP 0xDC (220
- Parsed as command displayApplication
- Accepted distinct values: 0, 2, 3, 5
- Current value: 0.
- Maximum value: 255.
VCP 0xDF (223
- Parsed as command vcpVersion
- Current value: 513.
- Maximum value: 255.
VCP 0xFD (253
- Current value: 116.
- Maximum value: 65535.

~ % betterdisplaycli get -namelike=gp -ddcCapabilitiesString
(prot(monitor)type(lcd)MStarcmds(01 02 03 07 0C E3 F3)vcp(02 04 05 08 10 12 14(05 08 0B 0C) 16 18 1A 52 60( 11 12 0F 10) AC AE B2 B6 C6 C8 C9 D6(01 04 05) DC(00 02 03 05 ) DF FD)mccs_ver(2.1)mswhql(1))