Skip to content

Commit 370d6cf

Browse files
Add check for M1 Pro/Max Macbook Pro HDMI (MonitorControl#904)
1 parent 2805f40 commit 370d6cf

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

MonitorControl/Support/Arm64DDC.swift

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,8 +278,13 @@ class Arm64DDC: NSObject {
278278
if let modelData = IORegistryEntryCreateCFProperty(platformExpertDevice, "model" as CFString, kCFAllocatorDefault, 0).takeRetainedValue() as? Data, let modelIdentifierCString = String(data: modelData, encoding: .utf8)?.cString(using: .utf8) {
279279
modelIdentifier = String(cString: modelIdentifierCString)
280280
}
281-
// First service location of Mac Mini HDMI is broken for DDC communication
282-
if ioregService.transportDownstream == "HDMI", ioregService.serviceLocation == 1, modelIdentifier == "Macmini9,1" {
281+
// First service location of M1 Mac Mini & Macbook Pro HDMI is broken for DDC communication
282+
let ddcBlockedModels = [
283+
"Macmini9", // Mac mini M1 2020
284+
"MacBookPro18", // Macbook Pro M1 Pro/Max 2021 (14", 16")
285+
]
286+
let isBlockedModel = ddcBlockedModels.contains { $0.starts(with: modelIdentifier) }
287+
if ioregService.transportDownstream == "HDMI", ioregService.serviceLocation == 1, isBlockedModel {
283288
return true
284289
}
285290
return false

0 commit comments

Comments
 (0)