[GH-ISSUE #238] DDC commands not being issued reliably when building with Xcode > 11.3.1 #185

Closed
opened 2026-05-05 05:21:36 -06:00 by gitea-mirror · 5 comments
Owner

Originally created by @JoniVR on GitHub (Jun 10, 2020).
Original GitHub issue: https://github.com/MonitorControl/MonitorControl/issues/238

On recent versions of Xcode, I get some reliability issues with DDC in MonitorControl. I'm not sure why this is happing but I'm wondering if anyone else is running into this too.

Note: I haven't tested all the versions after 11.3.1 but current last version (11.5 and the one version below that don't work for me).

Originally created by @JoniVR on GitHub (Jun 10, 2020). Original GitHub issue: https://github.com/MonitorControl/MonitorControl/issues/238 On recent versions of Xcode, I get some reliability issues with DDC in MonitorControl. I'm not sure why this is happing but I'm wondering if anyone else is running into this too. Note: I haven't tested all the versions after 11.3.1 but current last version (11.5 and the one version below that don't work for me).
gitea-mirror 2026-05-05 05:21:36 -06:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@realav commented on GitHub (Aug 15, 2020):

I can confirm that keys are not working when built with Xcode 11.6, although works fine on Xcode 11.3.1.

<!-- gh-comment-id:674420344 --> @realav commented on GitHub (Aug 15, 2020): I can confirm that keys are not working when built with **Xcode 11.6**, although works fine on Xcode 11.3.1.
Author
Owner

@JoniVR commented on GitHub (Aug 15, 2020):

Glad to know someone else noticed this too. Commands are working intermittently but not consistently. Should really test if it's a DDC.swift issue.

<!-- gh-comment-id:674421161 --> @JoniVR commented on GitHub (Aug 15, 2020): Glad to know someone else noticed this too. Commands are working intermittently but not consistently. Should really test if it's a DDC.swift issue.
Author
Owner

@JoniVR commented on GitHub (Oct 3, 2020):

I just went back to test some more, DDC commands are not being issues consistently when using keys on version 11.4 and up. I'm pretty sure commands are being sent to DDC but the display values are not always being updated.

@reitermarkus, could you please test if this also happens for you if you have time? I ran the tests on your DDC.swift repo and everything seems fine, commands mostly work when dragging using the slider.
Using shortcuts or clicking in the slider to instantly change the value doesn't work.

<!-- gh-comment-id:703084752 --> @JoniVR commented on GitHub (Oct 3, 2020): I just went back to test some more, DDC commands are not being issues consistently when using keys on version 11.4 and up. I'm pretty sure commands are being sent to DDC but the display values are not always being updated. @reitermarkus, could you please test if this also happens for you if you have time? I ran the tests on your DDC.swift repo and everything seems fine, commands mostly work when dragging using the slider. Using shortcuts or clicking in the slider to instantly change the value doesn't work.
Author
Owner

@JoniVR commented on GitHub (Nov 22, 2020):

DDC.swift issue can be resolved by including the DDC.swift framework manually and then removing the serialNumber function from EDID+Extension.swift as it seems to conflict somewhere. Will dig into why this is happening soon but at least we have a general idea of what it could be.

<!-- gh-comment-id:731768502 --> @JoniVR commented on GitHub (Nov 22, 2020): DDC.swift issue can be resolved by including the DDC.swift framework manually and then removing the `serialNumber` function from `EDID+Extension.swift` as it seems to conflict somewhere. Will dig into why this is happening soon but at least we have a general idea of what it could be.
Author
Owner

@Takuro-Ito commented on GitHub (Apr 10, 2021):

commands mostly work when dragging using the slider.
Using shortcuts or clicking in the slider to instantly change the value doesn't work.

I just found out that func valueChanged(slider: NSSlider) in SliderHandler.swift is called multiple times (mostly 3 to 5 times for dragging) and it works fine using the slider.
So I modified code in override func stepBrightness(isUp: Bool, isSmallIncrement: Bool) in ExternalDisplay.swift like this and it works fine using key tap.

// Send DDC command at least 3 times to get consistent result with my environment.
for _ in 0 ..< 3 {
  _ = self.ddc?.write(command: .brightness, value: ddcValue)
}

But I don't think this is a legitimate solution and don't know why Xcode built DDC.swift works fine without sending commands multiple times on a key tap.
Any ideas? @JoniVR @reitermarkus

<!-- gh-comment-id:817180499 --> @Takuro-Ito commented on GitHub (Apr 10, 2021): > commands mostly work when dragging using the slider. > Using shortcuts or clicking in the slider to instantly change the value doesn't work. I just found out that `func valueChanged(slider: NSSlider)` in `SliderHandler.swift` is called multiple times (mostly 3 to 5 times for dragging) and it works fine using the slider. So I modified code in `override func stepBrightness(isUp: Bool, isSmallIncrement: Bool)` in `ExternalDisplay.swift` like this and it works fine using key tap. ```swift // Send DDC command at least 3 times to get consistent result with my environment. for _ in 0 ..< 3 { _ = self.ddc?.write(command: .brightness, value: ddcValue) } ``` But I don't think this is a legitimate solution and don't know why Xcode built `DDC.swift` works fine without sending commands multiple times on a key tap. Any ideas? @JoniVR @reitermarkus
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/MonitorControl#185
No description provided.