diff --git a/CHANGELOG.md b/CHANGELOG.md index 3056b3a9c..b80f7c111 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # OpenCore Legacy Patcher changelog ## 0.6.6 +- Implement option to disable ColorSync downgrade on HD 3000 Macs + - Allows for Display Profiles support on some units + - Note: black box rendering issues will likely appear + - Thanks [@jazzzny](https://github.com/Jazzzny) ## 0.6.5 - Update 3802 Patchset Binaries: diff --git a/resources/constants.py b/resources/constants.py index f05f89a0c..23cec43fe 100644 --- a/resources/constants.py +++ b/resources/constants.py @@ -210,6 +210,7 @@ class Constants: self.set_content_caching: bool = False # Set Content Caching self.disable_xcpm: bool = False # Disable XCPM (X86PlatformPlugin.kext) self.set_vmm_cpuid: bool = False # Set VMM bit inside CPUID + self.disable_cat_colorsync: bool = False # Disable the ColorSync patch to regain Display Profiles self.set_alc_usage: bool = True # Set AppleALC usage self.allow_3rd_party_drives: bool = True # Allow ThridPartyDrives quirk self.allow_nvme_fixing: bool = True # Allow NVMe Kernel Space Patches diff --git a/resources/defaults.py b/resources/defaults.py index a976db3ca..b1bdc1156 100644 --- a/resources/defaults.py +++ b/resources/defaults.py @@ -71,6 +71,14 @@ class GenerateDefaults: global_settings.GlobalEnviromentSettings().write_property("MacBookPro_TeraScale_2_Accel", False) self.constants.allow_ts2_accel = False + if self.model in ["MacBookAir4,1","MacBookAir4,2","MacBookPro8,1","MacBookPro8,2","MacBookPro8,3","Macmini5,1"]: + colorsync_status = global_settings.GlobalEnviromentSettings().read_property("Disable_ColorSync_Downgrade") + if colorsync_status is True: + self.constants.disable_cat_colorsync = True + else: + global_settings.GlobalEnviromentSettings().write_property("Disable_ColorSync_Downgrade", False) + self.constants.disable_cat_colorsync = False + if self.model in smbios_data.smbios_dictionary: if smbios_data.smbios_dictionary[self.model]["CPU Generation"] >= cpu_data.cpu_data.skylake.value: # On 2016-2017 MacBook Pros, 15" devices used a stock Samsung SSD with IONVMeController diff --git a/resources/gui/gui_main.py b/resources/gui/gui_main.py index ed59d49b7..75c09566a 100644 --- a/resources/gui/gui_main.py +++ b/resources/gui/gui_main.py @@ -2867,13 +2867,25 @@ class wx_python_gui: self.set_terascale_accel_checkbox.Disable() self.set_terascale_accel_checkbox.SetValue(False) + # Disable ColorSync Downgrade + self.set_colorsync_checkbox = wx.CheckBox(self.frame_modal, label="Disable ColorSync Downgrade") + self.set_colorsync_checkbox.SetValue(self.constants.disable_cat_colorsync) + self.set_colorsync_checkbox.Bind(wx.EVT_CHECKBOX, self.disable_colorsync_click) + self.set_colorsync_checkbox.SetPosition(wx.Point( + self.set_terascale_accel_checkbox.GetPosition().x, + self.set_terascale_accel_checkbox.GetPosition().y + self.set_terascale_accel_checkbox.GetSize().height)) + self.set_colorsync_checkbox.SetToolTip(wx.ToolTip("This option will disable the ColorSync patch used on HD 3000 Macs.\nMainly applicable if you need Display Profile functionality")) + if self.computer.real_model not in ["MacBookAir4,1","MacBookAir4,2","MacBookPro8,1","MacBookPro8,2","MacBookPro8,3","Macmini5,1"]: + self.set_colorsync_checkbox.Disable() + self.set_colorsync_checkbox.SetValue(False) + # Windows GMUX self.windows_gmux_checkbox = wx.CheckBox(self.frame_modal, label="Windows GMUX") self.windows_gmux_checkbox.SetValue(self.constants.dGPU_switch) self.windows_gmux_checkbox.Bind(wx.EVT_CHECKBOX, self.windows_gmux_click) self.windows_gmux_checkbox.SetPosition(wx.Point( - self.set_terascale_accel_checkbox.GetPosition().x, - self.set_terascale_accel_checkbox.GetPosition().y + self.set_terascale_accel_checkbox.GetSize().height)) + self.set_colorsync_checkbox.GetPosition().x, + self.set_colorsync_checkbox.GetPosition().y + self.set_colorsync_checkbox.GetSize().height)) self.windows_gmux_checkbox.SetToolTip(wx.ToolTip("Enable this option to allow usage of the hardware GMUX to switch between Intel and Nvidia/AMD GPUs in Windows.")) # Hibernation Workaround @@ -3156,6 +3168,16 @@ class wx_python_gui: global_settings.GlobalEnviromentSettings().write_property("MacBookPro_TeraScale_2_Accel", False) self.constants.allow_ts2_accel = False + def disable_colorsync_click(self, event=None): + if self.set_colorsync_checkbox.GetValue(): + logging.info("ColorSync Patch Disabled") + global_settings.GlobalEnviromentSettings().write_property("Disable_ColorSync_Downgrade", True) + self.constants.disable_cat_colorsync = True + else: + logging.info("ColorSync Patch Enabled") + global_settings.GlobalEnviromentSettings().write_property("Disable_ColorSync_Downgrade", False) + self.constants.disable_cat_colorsync = False + def force_web_drivers_click(self, event=None): if self.force_web_drivers_checkbox.GetValue(): logging.info("Force Web Drivers Enabled") diff --git a/resources/sys_patch/sys_patch_generate.py b/resources/sys_patch/sys_patch_generate.py index ea4df1ba6..4443e45fa 100644 --- a/resources/sys_patch/sys_patch_generate.py +++ b/resources/sys_patch/sys_patch_generate.py @@ -52,8 +52,8 @@ class GenerateRootPatchSets: required_patches.update({"High Sierra GVA": all_hardware_patchset["Graphics"]["High Sierra GVA"]}) required_patches.update({"WebKit Monterey Common": all_hardware_patchset["Graphics"]["WebKit Monterey Common"]}) required_patches.update({"Intel Sandy Bridge": all_hardware_patchset["Graphics"]["Intel Sandy Bridge"]}) - # Patchset breaks Display Profiles, don't install if primary GPU is AMD - if self.constants.computer.real_model not in ["Macmini5,2", "iMac12,1", "iMac12,2"]: + # Patchset breaks Display Profiles, don't install if primary GPU is AMD. Give users option to disable patch in settings to restore Display Profiles + if self.constants.computer.real_model not in ["Macmini5,2", "iMac12,1", "iMac12,2"] or self.constants.disable_cat_colorsync is False: required_patches.update({"Non-Metal ColorSync Workaround": all_hardware_patchset["Graphics"]["Non-Metal ColorSync Workaround"]}) if self.hardware_details["Graphics: Intel Ivy Bridge"] is True: