kfix / ddcctl

DDC monitor controls (brightness) for Mac OSX command line
GNU General Public License v3.0
1.85k stars 151 forks source link

Unable to switch from display HDMI to display DisplayPort #97

Open wbeuil opened 3 years ago

wbeuil commented 3 years ago

Hi everyone !

I tried ddcctl yesterday and couldn't find what was the problem. Hope you can help me.

First my setup is as follows: I got one MBP 16' that uses the CalDigit TS3 Plus dock to connect to my monitor with HDMI. I got another Windows computer to connect to that same monitor with DisplayPort.

If my monitor is on DisplayPort input and I use the command below, it works as expected:

$ ddcctl -d 1 -i 17 # Switch to HDMI
D: CGDisplay E1206B4D-96E6-B9E8-9618-A39B207D7B21 dispID(#751381991) (1920x1080 0°) 82.00 DPI
I: found 1 external display
I: polling EDID for #1 (ID 751381991 => IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/PEG0@1/IOPP/EGP0@0/IOPP/EGP1@0/IOPP/GFX0@0/AMDRadeonX6000_AmdRadeonControllerNavi14/ATY,Boa@1)
I: got edid.name: ASUS VG279Q1A
D: action: i: 17
D: setting VCP control #96 => 17

Unfortunately, the other way is not working. I can't switch back to DisplayPort from HDMI even though there are no errors. My monitor blinks to a black screen and redirect to HDMI1:

$ ddcctl -d 1 -i 15 # Switch to DisplayPort
D: CGDisplay E1206B4D-96E6-B9E8-9618-A39B207D7B21 dispID(#751381991) (1920x1080 0°) 82.00 DPI
I: found 1 external display
I: polling EDID for #1 (ID 751381991 => IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/PEG0@1/IOPP/EGP0@0/IOPP/EGP1@0/IOPP/GFX0@0/AMDRadeonX6000_AmdRadeonControllerNavi14/ATY,Boa@1)
I: got edid.name: ASUS VG279Q1A
D: action: i: 15
D: setting VCP control #96 => 15

Both of these scenarios have the same output when I query the input display after I use the above commands:

$ ddcctl -d 1 -i \? # Query input display
D: CGDisplay E1206B4D-96E6-B9E8-9618-A39B207D7B21 dispID(#751381991) (1920x1080 0°) 82.00 DPI
I: found 1 external display
I: polling EDID for #1 (ID 751381991 => IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/PEG0@1/IOPP/EGP0@0/IOPP/EGP1@0/IOPP/GFX0@0/AMDRadeonX6000_AmdRadeonControllerNavi14/ATY,Boa@1)
I: got edid.name: ASUS VG279Q1A
D: action: i: ?
D: querying VCP control: #96 =?
I: VCP control #96 (0x60) = current: 17, max: 3

I decided to go with a little hack where I redirect to HDMI2, and since there is no input attached, by default it redirect to DisplayPort everytime. Don't know why though...