Open riuttner opened 4 days ago
Thanks for the report.
There’s an issue which looks related: Pharo Launcher issue #699. About the window resizing behavior: see Bloc issue #569.
@Rinzwind: Thanks for your hints! The maximum refresh frequency for my monitor at 4K is 60Hz. For me, the phenomenon looks like as if pharo forces a certain video mode with a higher frequency than 60, maybe unintentionally because of not setting a certain parameter explicitely. Most probably pharo should (accidentally) change the current video mode at all.
This a really interesting bug, I started to look at it. I am so surprised how a single windowed application can do that to the whole system.
It looks it is a known problem of OSX 15.1 https://discussions.apple.com/thread/255821676?sortBy=rank But why with Pharo?? I will check
Are you using ProMotion refresh rate in the monitors? As they try to use dynamic refresh rate depending of the applications
Unfortunately this simple solution will not be available for me, as ProMotion seems to only be available for MacBook Pro or Apple Pro Display XDR (see https://support.apple.com/en-us/102297). For my MacBook Air, I do not have any setting for refresh rates.
Hopefully this is not a bug of the kind "we hide our advanced feature for plain hardware, even though it is available internally", and accidentally they turn it on all the time for such hardware ...
Apple SupportYou can switch between refresh rates on your 16-inch MacBook Pro, 14-inch MacBook Pro, or Pro Display XDR.
When using my macbook air (15", M2, 2023, Sequoia 15.1.1, 24GB) with a connected 4K display (LG 43BN70U, both tested via USB-C in or DP in), everything works fine as long as I stay within the same resolution on both macbook and external display (desktop extended or mirrored, macbook lid open). When I close the lid of the macbook, as usual the machine switches to the max resolution of the display, in my case 4K. As long as the pharo vm (latest or earlier one of this year) is not started, everything works fine. I can work with all known mac applications without any issue, fullscreen or normal size. However, when I start Pharo main window, after a few seconds (typically after some mouse moves) most of the screen is covered by flickering horizontal black stripes of different sizes somehow converging to one final position and size (only disappearing for some milliseconds when I move the mouse). See photo (showing area not black due to mirror effect enhanced by camera):
Closing pharo makes the screen look normal again.
I have a second equal display showing the same behaviour. A few months ago, with an earlier pharo and MacOS release, I ran into the same issue, first thinking of nothing related with pharo, but just a cable problem (even though I have a high-quality USB-C to DP cable which worked well for windows notebooks to 4K). At that time I always had pharo open when trying, thus not detecting that everything worked as long as pharo is not running. I also tried with a high-speed USB-C cable, the issue remains.
When asking myself today "why is pharo launcher not affected?", I found out that the effect depends on screen position and size of the window drawn by pharo engine:
What I also tried is having pharo main window with a very low height, moving it to a position where its bottom border is slightly above of absolute half screen height. Resizing it then vertically down just a bit seems to start the effect as soon as the "magical line" of half screen height is crossed. In this screnario I can get a black area from left to right (as usual) that is only a few pixels high.
During resize of pharo main window, the contents (including all fonts) looks like proportionally scaled until the resizing ends. At end of resize, the scaled texts disappear and the window is repainted with restored font sizes. Even if this behaviour looks "normal" to me, I report it here just in case it is unexpected for those who implemented the pharo window framework.