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

Screen Savers broken on 2+ monitor system in macOS Sonoma 14.0 #1305

Open
xmddmx opened this issue Jun 5, 2023 · 130 comments
Open

Screen Savers broken on 2+ monitor system in macOS Sonoma 14.0 #1305

xmddmx opened this issue Jun 5, 2023 · 130 comments

Comments

@xmddmx
Copy link

xmddmx commented Jun 5, 2023

This is a follow-up thread to #1286

Initial testing with macOS Sonoma (first beta, 23a5257q) suggests the problem has worsened again:

  • with 2 screens, I am seeing the same problem we saw back in early 13.3 betas: screen 1 is blank, screen 1's content is showing up mis-sized on screen 2. And, it is now back to happening 100% of the time (20 out of 20 failures, using Aerial, using HotCorner)
  • similar problem with other third-party screensavers (such as https://iscreensaver.com ) so this is again not a bug in Aerial.
  • I'm also seeing the same problem with first-party Apple screensavers (such as Message and Shifting Tiles)!

Conclusion: the first beta of Sonoma 14.0 is broken, and seems to be as broken as early betas of Ventura 13.3.

@glouel
Copy link
Collaborator

glouel commented Jun 5, 2023

Can confirm all of the same FYI.

@glouel
Copy link
Collaborator

glouel commented Jun 5, 2023

Also, side note, while they added some "video wallpapers" based on Aerial, there's no screensaver. When you get out of the screensaver (whatever it is), the lock screen plays a video for 3 seconds and stays still.

That's... not what they showed with fanfare during the presentation (seemless playback between screensaver and desktop background, which is definitely an impressive syncing effort).

@xmddmx
Copy link
Author

xmddmx commented Jun 6, 2023

FYI, I've re-submitted this as FB12240576, referencing my prior feedbacks FB12023530 and FB12179420, and also fixed the TItle of this Issue (it said macOS 13.4, but should obviously be 14.0)

@xmddmx xmddmx changed the title Screen Savers broken function on 2+ monitor system in Sonoma 13.4 Screen Savers broken function on 2+ monitor system in Sonoma 14.0 Jun 6, 2023
@xmddmx xmddmx changed the title Screen Savers broken function on 2+ monitor system in Sonoma 14.0 Screen Savers broken on 2+ monitor system in macOS Sonoma 14.0 Jun 6, 2023
@DSBlackHeart
Copy link

Version 14.0 Beta (23A5257q)

Aerial still does not function.

Screenshot 2023-06-06 at 6 33 05 PM

@x86txt
Copy link

x86txt commented Jun 7, 2023

I have also reported it to Apple via the Feedback Assistant. Even the stock included Aerial Video Wallpapers don't work, they just show up as still wallpaper images. Everyone should report it, as the more reports to Apple the more attention it will get. Use the Feedback Assistant that came with the Sonoma Beta. If you don't have it installed, here are instructions for it: https://support.apple.com/guide/feedback-assistant/intro-to-feedback-assistant-fba2e39e53f5/mac

@glouel
Copy link
Collaborator

glouel commented Jun 7, 2023

Even the stock included Aerial Video Wallpapers don't work, they just show up as still wallpaper images.

But to be clear, that's how Apple implemented them. They are not video wallpapers as in, they are not intended to playback all the time (like with Companion). They just play when you login basically, then slowdown to "become" a fixed wallpaper. That's how Apple implemented them. There's not (at least not yet) a screensaver with those dynamic wallpapers... it's weird right now. You can animate them for like 5 seconds by going to your Apple menu top left and pressing "lock screen" (2nd option from the bottom).

Yet they clearly talk about screensavers here : https://www.apple.com/macos/sonoma-preview/

New slow-motion screen savers of breathtaking locations from around the world look beautiful on your large Mac display. When you log in, they seamlessly become your desktop wallpaper.

The log-in thing is here, as long as it's from boot up, or when you come back from display off (basically, a blank lock screen). If you somehow run any screen saver, the (traditional) lock screen will appear on top of the screensaver.

So it's - at the moment - a "lock screen screen saver". I doubt this is their full plan. If it is, I mean... I have a hard time processing this, not gonna lie !

@glouel
Copy link
Collaborator

glouel commented Jun 8, 2023

I'll point to this update here for reference : #1286 (comment)

@RandyMacmini
Copy link

Can confirm all of the same FYI.

I am running 3 monitors and all 3 of mine are using screen savers. I have different ones on each screen.

@glouel
Copy link
Collaborator

glouel commented Jun 19, 2023

I am running 3 monitors and all 3 of mine are using screen savers. I have different ones on each screen.

Do you mean different screensavers or different Aerial videos on each screen using Aerial ? Not sure I follow what you mean here.

@xmddmx
Copy link
Author

xmddmx commented Jun 21, 2023

Sonoma beta 2 is out, and the Screen Saver System Settings has changed a lot.

  1. I am now seeing Apple's "Aerial" screensavers showing up in the Screen Saver settings - I was not seeing any of these in beta 1.
  2. there is a new 'Show on all displays' option (which when Off, gives you a choice of which monitor to show the screensaver on.
  3. behavior is superbly buggy, both with Apple screensavers and third party. I'm seeing new bugs where the legacyScreenSaver engine seems to get stuck running in the background, screensavers are not playing on 2 monitors correctly, etc.

Here's what the System Settings pane looks like now:

image

@xmddmx
Copy link
Author

xmddmx commented Jun 21, 2023

If you choose one of the Apple "Aerial" screen savers, you get a new Show as wallpaper option:

image

@xmddmx
Copy link
Author

xmddmx commented Jun 21, 2023

A new bug I've never seen before: when using your Aerial (not Apple's version) the screensaver actually worked on both screens, but then I was unable to exit! No keypresses or mouse clicks or movement would exit.

About 30 seconds later, the screensaver finally exited (and I heard some 'beep' noises) suggesting the whole system was lagging. Now legacyScreenSaver appears to have hung:

image

In short - lots of new stuff, much of it broken.

@xmddmx
Copy link
Author

xmddmx commented Jun 21, 2023

And when running on a 2 monitor system, with 'Show on all displays' enabled, behavior is again erratic: sometimes it plays only on screen 1, sometimes only on screen 2 (but with screen 1's content), and on rare occasion it will play on 2 screens nor mally, but I've only seen that about 1 out of 10 times.

@glouel
Copy link
Collaborator

glouel commented Jun 21, 2023

Can confirm all this, including the new weird bugginess. Also note that if you go into desktop backgrounds (is it now called wallpaper in settings ??) you have the invert switch, use as screen saver :

Capture d’écran 2023-06-22 à 00 49 26

The important bit is, screensavers can now be run independently on each screen, and in theory you can run 2 different ones simultaneously on different screens (at least that's what they are going for). I think that the new ability to set a separate screensaver on different screen is likely the root cause of all our issues, they might have started implementing stuff around this a while back.

Right now if I set Aerial to all screens in 2 monitor configuration, I get it on either one of them, primary or secondary. The bug previously never displayed on primary. If I set "individually" on both screens, I get the same thing. It's insanely buggy in any case.

Regarding their implementation of aerial screensavers, I think they simply use the desktop window and animate/stop it. they don't create a new separate view. This is what they did previously with the lock screen thing, they just animate the desktop and stop it.

It's unlikely we'll get the ability to make "dynamic wallpaper/screen savers" soon as 3rd party, which obviously sucks.

@DSBlackHeart
Copy link

Hey is it just me or has this thing not worked even close to right for more than a year now ?

@glouel
Copy link
Collaborator

glouel commented Jun 21, 2023

@DSBlackHeart I first reported the bug february 23rd, this was 13.3 beta where they broke it.

Back on topic, if I set a dynamic background (but not as screensaver), and launch screensaver (in that case aerial), when I come back to the desktop, I get the slowed down animation and...

Capture d’écran 2023-06-22 à 00 58 39

Did they really implement this in LEGACYSCREENSAVER 😵‍💫

I can see how that would break legacyScreenSaver for "regular" uses. And that CPU usage for a still frame, seriously (and I have to force quit them if I switch back to regular wallpaper) !

@xmddmx
Copy link
Author

xmddmx commented Jun 21, 2023

Hey is it just me or has this thing not worked even close to right for more than a year now ?

More like 4 months - it's only been since 13.3 betas which started happening in March. Feels like a year though!

The important bit is, screensavers can now be run independently on each screen, and in theory you can run 2 different ones simultaneously on different screens (at least that's what they are going for).

Maybe? they don't really have a good UI for that, as it's only "Run on main screen" which if off, lets you choose 1 monitor to run on. I can't see any way to intentionally choose N arbitrary screensavers for N monitors, can you?

I think that the new ability to set a separate screensaver on different screen is likely the root cause of all our issues, they might have started implementing stuff around this a while back.

good theory

@xmddmx
Copy link
Author

xmddmx commented Jun 21, 2023

Did they really implement this in LEGACYSCREENSAVER 😵‍💫

Yeah, I'm seeing that too. That's a real WTF.

@glouel
Copy link
Collaborator

glouel commented Jun 21, 2023

The important bit is, screensavers can now be run independently on each screen, and in theory you can run 2 different ones simultaneously on different screens (at least that's what they are going for).

Maybe? they don't really have a good UI for that, as it's only "Run on main screen" which if off, lets you choose 1 monitor to run on. I can't see any way to intentionally choose N arbitrary screensavers for N monitors, can you?

It's very clunky but it works just like on the desktop backgrounds side, whatever you set is persisted, if I setup Aerial on one and switch to the other screen, set monterey there, if I pick the first screen back it shows Aerial.

And in that case I can confirm it runs both (and in that case, weirdly enough, fine).

@xmddmx
Copy link
Author

xmddmx commented Jun 21, 2023

I feel like with Sonoma beta 1, some people were talking about the new screensavers. But most of us were not seeing any new screensavers, only wallpaper. This was very confusing to me, and I was wondering if they were confused.

Now in beta 2 I'm seeing actual screensavers.

Could it be possible that poeple were seeing the screensavers in beta 1, but it was only showing up for some people? (a certain region, model of mac, GPU, CPU or something else?)

@glouel
Copy link
Collaborator

glouel commented Jun 21, 2023

I'm 100% sure people just got confused with the lock screen and Craig saying screensavers ;)

In beta 1, if you set the desktop background, you got the animation at login, back from sleep, or pressing lock screen in your Mac menu bar top left. I doubt they A/B tested anything, just people not understanding the difference or reusing Apple's marketing.

9to5mac was infuriating about this for example.

@xmddmx
Copy link
Author

xmddmx commented Jun 21, 2023

It's very clunky but it works just like on the desktop backgrounds side, whatever you set is persisted, if I setup Aerial on one and switch to the other screen, set monterey there, if I pick the first screen back it shows Aerial.

OK, I see what you are saying, and it kinda works.

Unfortunately, this means third-party screensaver authors now have to test for the difference between

  • one screensaver, set to 'Show on all displays'
  • the same screensaver, set to 'Show on one display', but set to show on all displays using this confusing UI.

as well as other possible issues such as

  • two different versions of the same screensaver, both playing on different displays.
  • etc.

Yikes!

@glouel
Copy link
Collaborator

glouel commented Jun 21, 2023

It's very clunky but it works just like on the desktop backgrounds side, whatever you set is persisted, if I setup Aerial on one and switch to the other screen, set monterey there, if I pick the first screen back it shows Aerial.

OK, I see what you are saying, and it kinda works.

Unfortunately, this means third-party screensaver authors now have to test for the difference between

  • one screensaver, set to 'Show on all displays'
  • the same screensaver, set to 'Show on one display', but set to show on all displays using this confusing UI.

Yeah, I think it may not change much, we already had different situations in macOS where your plugin was launched by one process and ran on 2 windows, or launched by 2 separate processes. I know I have code about that laying around in Aerial, I can never remember what the current situation is. The tiny preview in System Preferences was also sometimes sharing the same process (I think they no longer do that, if I had to guess, but not sure).

as well as other possible issues such as

  • two different versions of the same screensaver, both playing on different displays.

Usually this goes very wrong, it's worth trying putting one version in /Library and one in ~/ and set them both, see what happens. System Preferences for example couldn't handle this if you put 2 versions, itonly loaded the UI bundle from one, which lead to hilariously hard crashes to debug if you opened the second. Now I just don't let people put Aerial in /Library for that reason ;)

Adding a bit on the legacy thing, it's late and I'm a bit too tired to investigate but I'm starting to wonder if what they do is, run the unlock screen animation through legacyScreenSaver, and at the same time set the last frame of the animation as a "picture" desktop background proper, and hide (but not kill) the legacyScreenSaver process called Wallpaper. I'm saying this because force quitting it just results in nothing changing visually.

Edit : Thankfully all those changes are brilliantly documented... https://developer.apple.com/documentation/screensaver 😩

@xmddmx
Copy link
Author

xmddmx commented Jun 21, 2023

Yeah, I think it may not change much, we already had different situations in macOS where your plugin was launched by one process and ran on 2 windows, or launched by 2 separate processes. I know I have code about that laying around in Aerial, I can never remember what the current situation is. The tiny preview in System Preferences was also sometimes sharing the same process (I think they no longer do that, if I had to guess, but not sure).

So, with recent versions of iScreensaver, which are written in Swift, there's a nice multi-screen syncrhonization feature, so when transitioning to another asset (image, video, 3D GLTF file...) each screen would talk to the other one and try to wait until all were ready, so they can all run the next effect simultaneously. When it works it's pretty nice.

Because legacyScreensaver did run all instances in the same process, this was fairly easy to do, by just using Swift globals. Or at least it seemed easy and worked on Intel, but when Apple Silicon came around, the memory model changed and having mutliple threads accessing globals no longer worked, as described here: https://developer.apple.com/documentation/apple-silicon/addressing-architectural-differences-in-your-macos-code

In any case, it was solved by adding some protection around the memory access using the synchronized directive or similar, see https://stackoverflow.com/questions/24045895/what-is-the-swift-equivalent-to-objective-cs-synchronized

With Sonoma, this doesn't seem to be working, so I need to go back and check this assumption that all screens are running in different threads but the same process. Maybe it's not true any more?

@glouel
Copy link
Collaborator

glouel commented Oct 12, 2023

Aerial v 3.3.4 (I keep it up to date with Brew :) )
(do you want me to open a new bug for this?)

Thanks for the log and nope, that's fine, I'll fork it if I need more info from you but I see the screen detection failing for some reason. I'll try to get some time and investigate tomorrow and get back to you !

@glouel
Copy link
Collaborator

glouel commented Oct 12, 2023

@uurf Can you go into system settings, monitors, click "organise" and make a screenshot of what you see, like this ?

Capture d’écran 2023-10-12 à 17 33 46

I'm trying to replicate the issue here but I'm having a rough time understanding what is happening ! Thanks !

@uurf
Copy link

uurf commented Oct 12, 2023

This is the Setings>Displays>Arrange dialog:
image
This is Displays in Aerial Options:
image

@glouel
Copy link
Collaborator

glouel commented Oct 12, 2023

Ha, now I'm wondering about the margins !

I did find something else though in your log that may explain the issue, would you be willing to try a beta if I build one for you ? Thanks !

Edit : I think I managed to reproduce the issue, apparently having half of your secondary screen below the primary confuses legacyScreenSaver even more.

Edit again : This is pretty bad, I think our workaround doesn't work in that case for "reasons".

@xmddmx if you have a sec try this window arrangement (left screen bottom below, primary on the right), I'm 100% reproducing the issue here, the left screen view, when viewDidMoveToWindow gets called, has no screen attached to it (view.window.screen = nil). This seems to only happen in this precise arrangement for me.

I tried checking again later (after the pause) but it's still nil.

😩😩😩

@glouel
Copy link
Collaborator

glouel commented Oct 12, 2023

@uurf can you confirm that if you set your screen this way (align the bottoms) in macOS, it spans correctly ?

Capture d’écran 2023-10-12 à 18 31 35

I'll still keep looking for a workaround but until then, this should work. This bug is really getting weird.

@xmddmx
Copy link
Author

xmddmx commented Oct 12, 2023

@glouel are you seeing this in 14.1 ? Given that 14.1 beta 3 is out, I wonder if chasing down bugs in 14.0 is worth our time?

@glouel
Copy link
Collaborator

glouel commented Oct 12, 2023

Yeah it's 100% reproducible here, I'm still running 14.1b2 though.

@uurf
Copy link

uurf commented Oct 12, 2023

When I set the display arrangement to flush:
image
Aerial Display arrangement isn't reflecting it:
image

…but it does seem to be spanning the video correctly.

@glouel
Copy link
Collaborator

glouel commented Oct 12, 2023

You probably need to quit system settings and open it again for Aerial's Displays window to pick it up (when you launch the screensaver it's a separate process so it picks things up again).

In any case, thanks for confirming!

@uurf
Copy link

uurf commented Oct 12, 2023

it looks like it can tolerate an offset unless it's ≥ 50%. Spanning correctly here:
image

but not here:
image

@uurf
Copy link

uurf commented Oct 12, 2023

You probably need to quit system settings and open it again for Aerial's Displays window to pick it up (when you launch the screensaver it's a separate process so it picks things up again).

In any case, thanks for confirming!

I had, still but it didn't pick it up - but it is now 🤷🏻

@glouel
Copy link
Collaborator

glouel commented Oct 12, 2023

@uurf that's... wild and I think you are 100% correct. I don't know what to say...

This seems to work both ways too :

This is not fine :
Capture d’écran 2023-10-12 à 18 51 11

This is fine :
Capture d’écran 2023-10-12 à 18 51 34

legacyScreenSaver : not fine 😩

@glouel
Copy link
Collaborator

glouel commented Oct 12, 2023

I had, still but it didn't pick it up - but it is now 🤷🏻

Sometimes it just gets stuck in Sonoma. Closing System Settings (the whole window) will in general (sometimes given enough time) kill the settings host.

For now I think that <50% will have to do because I don't see much workaround possibility for this (none of this would be an issue if Apple fixed the original bug we reported months ago, it's so sad).

@zeromhz
Copy link

zeromhz commented Oct 13, 2023

the ghost of steve jobs is saying "just avoid aligning them that way"

@glouel
Copy link
Collaborator

glouel commented Nov 9, 2023

Aligning on top of each other also doesn't work fyi.

Apple asked the other day if the bug still occurred (...)

Short term I'll try bringing back the previous workaround as a 3rd line of defence (matching on screen resolution, which only work if your screens have different resolutions obviously).

This is exhausting.

Repository owner deleted a comment Dec 23, 2023
@glouel
Copy link
Collaborator

glouel commented Jan 18, 2024

So the bug is still here in 14.3 RC.

I just released 3.3.6 with that 3rd layer of workarounding, which seems to work fine if you only have 2 monitors (including same resolution), or 3+ with different resolutions.

@uurf you might want to check but I think your old configuration should work again as expected.

@uurf
Copy link

uurf commented Jan 18, 2024

@uurf you might want to check but I think your old configuration should work again as expected.

I can check on Monday.

@amaisano
Copy link

FWIW, I have the same problem on Sonoma with the Drift screensaver. Using just the normal Settings panel to enable it on "all screens" results in it only being on my Macbook screen and 1 of the 2 attached monitors. Both monitors are HDMI, but different resolutions. Curious if any of the workarounds being discussed here would help for core screensavers.

@glouel
Copy link
Collaborator

glouel commented Feb 20, 2024

FWIW, I have the same problem on Sonoma with the Drift screensaver. Using just the normal Settings panel to enable it on "all screens" results in it only being on my Macbook screen and 1 of the 2 attached monitors. Both monitors are HDMI, but different resolutions. Curious if any of the workarounds being discussed here would help for core screensavers.

Ha, that makes sense, off the top of my head, Drift is one of a (small) number of remaining screensavers from Apple that are using the same legacyScreenSaver mess that all third party screensavers have to use.

So yes, should Apple fix their bug, it would fix Drift too. Sadly, last time I reported a bug that also affected one of their screensaver... they didn't fix the bug, and rewrote their screensaver with the new API we don't have access to 🙈

Repository owner deleted a comment from Jcillo507 Feb 21, 2024
Repository owner deleted a comment from AntonioSalazar Feb 21, 2024
@amaisano
Copy link

amaisano commented Feb 21, 2024

I forgot to mention, with the Drift ss issue, when I'm at work docked to a different Thunderbolt3 dock, BOTH my external monitors work as expected - but both external monitors at work are the same resolution. At home, I have a different TB3 dock, but my 2 ext. monitors are different resolutions. So that might be it.

@glouel
Copy link
Collaborator

glouel commented Feb 21, 2024

As far as I know this is mostly a vertical alignment issue, check up the thread for some screenshots of alignments that work/fail and compare with your setup. Screens on top of each other will always fail for example, etc.

@amaisano
Copy link

check up the thread for some screenshots of alignments that work/fail and compare with your setup

Thanks for the tip. I played with my arrangements and DID get Drift working on all monitors! However, it's not how I want the monitors arranged. For the record, Drift only works on all 3 monitors (on internal + both attached) if the TOP of the external monitors are aligned/flush:

image

@glouel
Copy link
Collaborator

glouel commented Feb 23, 2024

check up the thread for some screenshots of alignments that work/fail and compare with your setup

Thanks for the tip. I played with my arrangements and DID get Drift working on all monitors! However, it's not how I want the monitors arranged. For the record, Drift only works on all 3 monitors (on internal + both attached) if the TOP of the external monitors are aligned/flush:

image

This is interesting thanks. This is definitely annoying.

I would very much suggest you try reporting the bug to Apple explaining that it affects Drift and other 3rd party screen savers, using Feedback Assistant on your mac, it would really help. Thanks !

@proteus06
Copy link

I'm seeing the same issue, alignment doesn't seem to be the problem as it was working and then just stopped working out of the blue, really wish this was less buggy like it used to be. I guess we can blame Apple and Sonoma.

Repository owner deleted a comment from DavideStagni Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

12 participants