JohnCoates / Aerial

Apple TV Aerial Screensaver for Mac
MIT License
20.75k stars 1.05k forks source link

Video not fullscreen #1350

Closed tricki closed 7 months ago

tricki commented 7 months ago

General troubleshooting tips

Before logging an issue please check that:

If none of this fixes your issue, tell us about the problem you are experiencing or the feature you'd like to request.

Required information

In order to help us sort your issue, we ask that you provide the following information:

Description of issue

Sometimes the video is not fullscreen on my primary (external) monitor, but stuck to the bottom left corner at roughly half the screen's width (see screenshot). It always happens when I return after a break, so I'm not sure whether it starts like that or whether it starts correctly and then breaks. This doesn't happen on the secondary (built-in) screen.

I've had this issue for a while, just never took the time to report it. I've also had some other issues after updating to Sonoma (e.g. screen was always black) but those seem to have resolved themselves.

I activated Debug Mode and manually launched Aerial (using the Companion's "Launch Now" option). It opened correctly 5 times, but the 6th time I could reproduce the bug. One thing that sticks out from the log is 42 instances of 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 The data couldn’t be read because it isn’t in the correct format., but I'm not sure what data this is referring to.

Here are my "Display" settings:

image

Screenshot:

Screenshot 2023-11-30 at 10 47 36

glouel commented 7 months ago

Hi @tricki

Sorry about the issue, I have to say this one is a bit concerning because of all the "old" bugs that reappeared in Sonoma, I don't think this one made the list yet.

Can you share the AerialLog.txt with your multiple tests ? Or remake one quickly (try to note the time where this happens). This would help me investigate.

Also, can you share a screenshot of your monitors alignments in System Settings (you have to click organize to see this view) :

Capture d’écran 2023-11-30 à 16 39 22

Most remaining bugs right now happens when there's not a 50% vertical overlap between your monitors (so, say, you have a monitor below and to the left of a main monitor).

Thanks and again, sorry about those issues that keeps coming back, Apple is trying hard to break my patience somehow 😅

tricki commented 7 months ago

By bad for not including the log, I had it prepared and everything 🤦

I had deleted the existing log and manually launched Aerial 6 times until the bug showed up, then immediately disabled the logging.

AerialLog.txt

image

No worries, I've had my share of problems with Apple (just App Store related).

If you need more info, I'm happy to help.

Update: I've also tried messing with the display arrangement to see if that changes anything, but sadly not.

image
glouel commented 7 months ago

No worries thanks I'll have a look. Your original arrangement should be ok so please go back to it. The 2nd one is the one causing some issues at the moment. I'll get back to you asap !

Edit : What's the scaling factor/resolution of your monitors ? Looks like you may have .811 of pixels somewhere and that likely breaks some of my code.

I'm seeing 5527.81102530128px width for one of your screens. I'll see if I can replicate that but it should be an easy fix.

tricki commented 7 months ago

Ah yes, I have a custom scaling, completely forgot about that. I'm not sure where I can get a numberical factor, but here's a screenshot of the external monitor:

image

image

I've done some tests with the other scaling options and was able to reproduce the problem on all but "Larger Text" (1920x1080). But depending on which one is selected, the portion of the screen that is black is different.

FYI I didn't see your "Edit:" until today, since I didn't receive a second notification.

glouel commented 7 months ago

Yeah, my bad, I tend to edit when I just posted it but people who rely on emails do miss them.

I have to say I'm a bit puzzled, because you mention that only 1920x1080 works as expected, which is itself a scaling. When scaling messes up, usually only the middle option (which is native resolution) is the one that works !

It also looks like I'm correctly reading your resolution (3360.0 x 1890.0) and there's no particular issue or .8something pixels, so maybe I'm thinking about all this wrong ?

I'll try to play around with my monitors here, see if I can trigger anything, but I had another idea in the meantime, can you remove the 2cm margin bottom right here ?

Capture d’écran 2023-12-04 à 16 55 11

It's possible that under Sonoma the many workarounds I had to put for multimonitor support broke that feature, maybe. Thanks !

glouel commented 7 months ago

Ok I've tried to dig this more this morning, I tried practically every resolution mismatch between my 2 monitors and can't seem to reproduce anything. I also tried many many variations of margin alignments and it's always correct.

I ended up digging more in your logs and I think there might be a clue around here. You mentioned your last run was bugged and the others weren't. I did first a cursory check trying to match each instance of AerialViews, from their init to their startAnimation, see if somehow stuff got corrupted .

2023-11-30 10:58:19.441 : 🖼️ AVinit (.saver) (0.0, 0.0, 2056.0, 1329.0) p: false o: false
2023-11-30 10:58:19.442 : 🖼️ <AerialView: 0x12821afa0> viewDidMoveToWindow frame: (0.0, 0.0, 2056.0, 1329.0) window: Optional(<NSServiceViewControllerWindow: 0x128110a70>)
...
2023-11-30 10:58:19.963 : 🖼️ <AerialView: 0x12821afa0> startAnimation frame (0.0, 0.0, 2056.0, 1329.0) bounds (0.0, 0.0, 2056.0, 1329.0)

That's your internal screen

2023-11-30 10:58:19.456 : 🖼️ AVinit (.saver) (0.0, 0.0, 3360.0, 1890.0) p: false o: false
2023-11-30 10:58:19.457 : 🖼️ <AerialView: 0x127743250> viewDidMoveToWindow frame: (0.0, 0.0, 3360.0, 1890.0) window: Optional(<NSServiceViewControllerWindow: 0x128629390>)
2023-11-30 10:58:19.963 : 🖼️ <AerialView: 0x127743250> startAnimation frame (0.0, 0.0, 3360.0, 1890.0) bounds (0.0, 0.0, 3360.0, 1890.0)

That's your external Dell

So at the very least, Aerial is internally consistent, we get told by macOS we are on X by Y screen, and we play such a resolution.

I do get a weird discrepancy though on your failed run, and I'm not quite sure what to make of it :

2023-11-30 10:58:19.456 : 🖼️ AVinit (.saver) (0.0, 0.0, 3360.0, 1890.0) p: false o: false
2023-11-30 10:58:19.457 : 🖼️ <AerialView: 0x127743250> viewDidMoveToWindow frame: (0.0, 0.0, 3360.0, 1890.0) window: Optional(<NSServiceViewControllerWindow: 0x128629390>)
2023-11-30 10:58:19.457 : Optional(<NSScreen: 0x12843e980; name="Built-in Retina Display"; backingScaleFactor=2.000000; frame={{-2056, 141}, {2056, 1329}}; visibleFrame={{-2056, 141}, {2056, 1285}}>)

So what happens to you is, when the bug happens, only the bottom right portion of the video plays on your internal), and on the dell the video gets played at the size of your internal display, on the big one. I would also expect that the left part of the video plays on the right screen.

So basically, macOS mixes up screens (again, I've been fighting this for 10 months now ?) but in a new fancy way I hadn't seen before. I do have an idea for a tentative fix though.

Would you be willing to try a test build if I get my fix running ? Thanks !

tricki commented 7 months ago

It's a company Mac, so I'd have to get permission for that.

But interestingly, after an OS update to 14.1.2 I cannot reproduce the problem anymore. Maybe the update fixed a bug, or maybe my system was corrupt in some way that the update reset...

Anyway, thanks so much for the help and effort! I'll close this for now, but will reopen if it happens again.

If you'd like some more info (e.g. another log) I'm happy to help.

glouel commented 7 months ago

That's interesting, thanks for the update. Let me know if it somehow reappears.