Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix screensaver on MacOS 14 #5611

Merged
merged 8 commits into from
May 3, 2024
Merged

Fix screensaver on MacOS 14 #5611

merged 8 commits into from
May 3, 2024

Conversation

CharlieFenton
Copy link
Contributor

@CharlieFenton CharlieFenton commented May 3, 2024

MacOS 14 again broke BOINC's screensavers. This is a workaround for that issue. It requires new logic in the BOINC screensaver and requires project applications to link their graphics apps with a new version of the BOINC graphic library libboinc_graphics2.a.

As of OS 10.13, app windows can no longer appear on top of screensavers, so we have used Mach comunication and IOSurfaceBuffer to display the graphics output of the child graphics apps in the screensaver's window. The default and project graphics apps have used the bootstrap_check_in() API to create the Mach port and the screensaver has used the bootstrap_look_up() API to connect to the port.

MacOS 14 added a security restriction to screensavers blocking the use of the bootstrap_look_up() API, but it still allows screensavers to use the bootstrap_check_in() API. For backward compatibility on earlier versions of MacOS with existing project graphics apps, this change first tries to use the old method (bootstrap_check_in() in the graphics app and bootstrap_look_up() in the screensaver.) If that fails, it tries the reverse approach: bootstrap_check_in() in the screensaver and bootstrap_look_up() in the graphics app.

This allows older versions MacOS (and older versions of BOINC's screensaver) to display graphics apps built with both the old and new libraries. It allows the new BOINC screensaver to display both graphics apps built with the new and old libraries on earlier versions of MacOS. Finally, it allows the new BOINC screensaver to display graphics apps built with the new libraries on MacOS 14.

IMPORTANT: this screensaver code checks the BOINC version number used to build the graphics libraries used for building the graphics app, so the libraries must be built with at least BOINC version 7.24.4.

@CharlieFenton CharlieFenton marked this pull request as draft May 3, 2024 09:15
@AenBleidd
Copy link
Member

@CharlieFenton, I suggest to check for the 8.0 version since it's not released yet, and this is the version we will be releasing. Is this ok for you?

@CharlieFenton
Copy link
Contributor Author

@CharlieFenton, I suggest to check for the 8.0 version since it's not released yet, and this is the version we will be releasing. Is this ok for you?

That is not a good idea, because although 8.0 has not been promoted to official release, it has been released as an alpha test version available to the public for downloading, and people may have downloaded it. It would cause confusion if we release a build with the same version number as the alpha version but built from different sources. Any time the source files are changed after we have made a version available for download, we must change the version number.

@AenBleidd
Copy link
Member

Yes, but I mean, we will release it probably as 8.0.2. If you want - you can make the check for this (and higher) versions.
What I definitely don't want to do is to make a new minor release, and start the whole procedure again.

@CharlieFenton
Copy link
Contributor Author

Yes, but I mean, we will release it probably as 8.0.2. If you want - you can make the check for this (and higher) versions.
What I definitely don't want to do is to make a new minor release, and start the whole procedure again.

OK, but unfortunately the minimum version number must be hard coded in the source code. I can change that to 8.0.2, but if the final release version is different, it won't work properly. How soon do you expect we will promote 8.0.x to recommended version?

@AenBleidd
Copy link
Member

I expect to have it promoted before the end of this month

@CharlieFenton
Copy link
Contributor Author

I wanted to get a hot fix out as soon as possible. Should I do a quick release of 7.24.4 for the Mac, then as a temporary measure?

@AenBleidd
Copy link
Member

@CharlieFenton, sounds ok to me

Charlie Fenton added 2 commits May 3, 2024 04:59
@CharlieFenton
Copy link
Contributor Author

OK, then once you have merged this, I'll cherry-pick it into the 7.24 branch and release it as 7.24.4

@CharlieFenton CharlieFenton marked this pull request as ready for review May 3, 2024 12:09
@AenBleidd AenBleidd merged commit 4609036 into master May 3, 2024
100 checks passed
@AenBleidd AenBleidd deleted the MacOS14_SS_hotfix2 branch May 3, 2024 13:07
@AenBleidd
Copy link
Member

@CharlieFenton, merged. Thank you for the hotfix. Please proceed with the hotfix release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants