Skip to content

Commit 0f8b5da

Browse files
committed
Sigh. Redo the logic.
Signed-off-by: Hector Martin <[email protected]>
1 parent f91a268 commit 0f8b5da

1 file changed

Lines changed: 57 additions & 47 deletions

File tree

src/main.py

Lines changed: 57 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -844,62 +844,72 @@ def main(self):
844844
self.sysinfo.show()
845845
print()
846846

847-
if self.sysinfo.sfr_full_ver != self.sysinfo.sros_full_ver:
848-
p_error("Mismatched System Firmware / System Recovery detected!")
849-
print()
850-
p_warning("Critical bugs in Apple's update process introduced in macOS Sonoma 14.0 and")
851-
p_warning("macOS Ventura 13.6 can cause your System Recovery to not be updated properly.")
852-
p_warning("It is not safe to install a new OS on this computer until this is resolved.")
853-
p_warning("Please apply all macOS updates available and try again. If the problem remains,")
854-
p_warning("you will have to wait until Apple fixes their buggy update process.")
855-
print()
856-
p_warning("More information:")
857-
print()
858-
p_plain( f" {col(BLUE, BRIGHT)}https://github.com/AsahiLinux/docs/wiki/macOS-Sonoma-Boot-Failures{col()}")
859-
print()
860-
if (self.sysinfo.device_class in PROMOTION_DEVICES and
861-
split_ver(self.sysinfo.sfr_ver) > split_ver(BUGGY_SFR_MIN)):
862-
hz = self.sysinfo.get_refresh_rate()
847+
if (self.sysinfo.device_class in PROMOTION_DEVICES and
848+
split_ver(self.sysinfo.sfr_ver) >= split_ver(BUGGY_SFR_MIN)):
849+
850+
hz = self.sysinfo.get_refresh_rate()
851+
852+
if split_ver(self.sysinfo.sros_full_ver) < split_ver(BUGGY_SFR_MIN):
853+
p_error("Mismatched System Firmware / System Recovery detected!")
854+
print()
855+
p_warning("You have a machine with a ProMotion display, with a System Firmware version")
856+
p_warning("newer than 14.0 and a System Recovery version older than 14.0. Due to a")
857+
p_warning("critical Apple bug, this combination can lead to an unbootable system under")
858+
p_warning("certain conditions.")
859+
print()
860+
p_warning("More information:")
861+
print()
862+
p_plain( f" {col(BLUE, BRIGHT)}https://github.com/AsahiLinux/docs/wiki/macOS-Sonoma-Boot-Failures{col()}")
863+
print()
864+
865+
p_info(f" Current refresh rate: {col()}{hz}")
866+
print()
867+
863868
if hz != "120.00Hz":
864-
p_error(f"{col(BLINK)}CRITICAL WARNING: {col(NBLINK)}You have a ProMotion display machine set to a display refresh")
865-
p_error("other than 120Hz / ProMotion mode.")
869+
p_error(f"{col(BLINK)}CRITICAL ERROR: {col(NBLINK)}Your display refresh rate is set to")
870+
p_error("something other than 120Hz / ProMotion mode.")
866871
print()
867872
p_error("You MUST change this to ProMotion mode IMMEDIATELY. Your machine is currently")
868873
p_error("unable to use System RecoveryOS, which is a very dangerous situation.")
869-
p_error("This is a critical Apple bug.")
874+
p_error("This is a critical Apple bug. Do NOT use non-ProMotion mode until this bug is")
875+
p_error("confirmed fixed.")
876+
print()
877+
sys.exit(1)
870878
else:
871-
p_warning(f"{col(BLINK)}WARNING:{col(NBLINK)} You have a ProMotion display machine. Your display refresh is set to")
872-
p_warning("ProMotion mode. DO NOT CHANGE THIS TO ANY OTHER MODE. Doing so would make your")
873-
p_warning("System RecoveryOS stop working, which is a very dangerous situation.")
874-
p_warning("This is a critical Apple bug.")
879+
p_warning(f"{col(BLINK)}WARNING:{col(NBLINK)} Your display refresh is set to ProMotion mode.")
880+
p_warning("DO NOT CHANGE THIS TO ANY OTHER MODE. Doing so would make your System RecoveryOS")
881+
p_warning("stop working, which is a very dangerous situation. This is a critical Apple bug.")
882+
print()
883+
p_warning("You may continue the install, but you MUST NOT change the refresh rate until")
884+
p_warning("Apple fixes this bug. Doing so would break your system. Proceed at your own")
885+
p_warning("risk.")
875886
print()
876-
sys.exit(1)
877-
878-
if (self.sysinfo.device_class in PROMOTION_DEVICES and
879-
split_ver(self.sysinfo.sfr_ver) > split_ver(BUGGY_SFR_MIN)):
880-
p_warning( "WARNING: You have a MacBook Pro with a ProMotion display, and you have")
881-
p_warning(f"System Firmware version {BUGGY_SFR_MIN} or newer. These firmware versions are")
882-
p_warning( "buggy and will NOT correctly boot older versions of macOS, nor Asahi Linux,")
883-
p_warning( "if the display is configured for a refresh rate other than ProMotion (120Hz).")
884-
print()
885-
hz = self.sysinfo.get_refresh_rate()
886-
p_info(f" Current refresh rate: {col()}{hz}")
887-
print()
888-
if hz != "120.00Hz":
889-
p_error("Your display is not set to ProMotion mode (120 Hz). Please change your")
890-
p_error("display refresh rate to ProMotion mode in System Settings and try again.")
887+
if not self.yesno("Continue anyway?"):
888+
sys.exit(0)
891889
print()
892-
p_error("It is not safe to multi-boot with a non-ProMotion refresh rate until")
893-
p_error("Apple fixes this bug.")
890+
else:
891+
p_warning( "WARNING: You have a MacBook Pro with a ProMotion display, and you have")
892+
p_warning(f"System Firmware version {BUGGY_SFR_MIN} or newer. These firmware versions are")
893+
p_warning( "buggy and will NOT correctly boot older versions of macOS, nor Asahi Linux,")
894+
p_warning( "if the display is configured for a refresh rate other than ProMotion (120Hz).")
894895
print()
895-
sys.exit(1)
896+
p_info(f" Current refresh rate: {col()}{hz}")
897+
print()
898+
if hz != "120.00Hz":
899+
p_error("Your display is not set to ProMotion mode (120 Hz). Please change your")
900+
p_error("display refresh rate to ProMotion mode in System Settings and try again.")
901+
print()
902+
p_error("It is not safe to multi-boot with a non-ProMotion refresh rate until")
903+
p_error("Apple fixes this bug.")
904+
print()
905+
sys.exit(1)
896906

897-
p_warning("You are currently using ProMotion mode. You may continue the install")
898-
p_warning("but you MUST NOT change the refresh rate until Apple fixes this bug.")
899-
p_warning("There is nothing we can do on our end. Proceed at your own risk.")
900-
print()
901-
if not self.yesno("Continue anyway?"):
902-
sys.exit(0)
907+
p_warning("You are currently using ProMotion mode. You may continue the install")
908+
p_warning("but you MUST NOT change the refresh rate until Apple fixes this bug.")
909+
p_warning("There is nothing we can do on our end. Proceed at your own risk.")
910+
print()
911+
if not self.yesno("Continue anyway?"):
912+
sys.exit(0)
903913

904914
self.chip_min_ver = CHIP_MIN_VER.get(self.sysinfo.chip_id, None)
905915
self.device = DEVICES.get(self.sysinfo.device_class, None)

0 commit comments

Comments
 (0)