Bug 140237 - Rendering bug on macOS 5K secondary monitor
Summary: Rendering bug on macOS 5K secondary monitor
Status: RESOLVED DUPLICATE of bug 138122
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
(earliest affected) release
Hardware: x86-64 (AMD64) macOS (All)
: medium normal
Assignee: Not Assigned
Keywords: bibisectNotNeeded, regression
Depends on:
Blocks: MacOS-Wishlist
  Show dependency treegraph
Reported: 2021-02-07 11:56 UTC by Marcus Hudritsch
Modified: 2021-04-04 15:31 UTC (History)
11 users (show)

See Also:
Crash report or crash signature:

attaching OP's screen clip here (615.36 KB, image/png)
2021-02-07 19:23 UTC, V Stuart Foote
attaching OP's screen clip of macOS monitor layout here (266.07 KB, image/png)
2021-02-08 15:34 UTC, V Stuart Foote

Note You need to log in before you can comment on or make changes to this bug.
Description Marcus Hudritsch 2021-02-07 11:56:40 UTC
LO Writer and Spreadsheet files get not correctly displayed on a secondary monitor. The bug appears in LO version 7.1 (for Mac-Intel) and CollaboraOffice 6.4-20 (for Apple-M1) but not on the LO version 7.0.4. This happens on my MacBookPro M1.
The laptop monitor is ok.
See screenshot: https://www.dropbox.com/s/1t4mpprmz32wtti/RenderBugLibreOffice7.1.png?dl=0
The bug appears no matter if OpenGL is turn on or off.
My MacOS is the latest: 11.2 (20D64)
The Problem appeared on two different external monitors (Samsung and Dell).

Actual Results:
Just open any LO-Writer file on a Mac-M1.

Expected Results:
See screenshot:

Reproducible: Always

User Profile Reset: Yes

OpenGL enabled: Yes

Additional Info:
Display the file correctly.
Comment 1 V Stuart Foote 2021-02-07 19:23:27 UTC
Created attachment 169555 [details]
attaching OP's screen clip here

(In reply to Marcus Hudritsch from comment #0)

Neither your screen clip, attached here directly, nor the write up identifies the screen resoultion of the primary and secondary monitors in use. Nor does it say which of the dsiplays is holding the LO main window shown with rendering issues in the clip.
Comment 2 Marcus Hudritsch 2021-02-08 06:25:56 UTC
My screenshot is a fullscreen screenshot:
From the image you can see the resolution: 2560x1440

I wrote that the problem occurs only on the secondary monitor and NOT on the primary (laptop) monitor. Here you can see the setup:

Comment 3 V Stuart Foote 2021-02-08 15:34:40 UTC
Created attachment 169594 [details]
attaching OP's screen clip of macOS monitor layout here

So, the resolution of the two screens differ. The main display is below 2K, the second a 5K.  Seems similar to SurfaceRect buffer issues of bug 40534
Comment 4 V Stuart Foote 2021-02-08 15:42:52 UTC
Final need info question, please verify the connection to the external monitor is via Thunderbolt and is not an AirPlay linkage. Also, has a LibreOffice session been opened on the laptop display and then dragged onto the external monitor, or is it launched directly on the external at 5K resolution?
Comment 5 Jan-Marek Glogowski 2021-02-08 16:16:00 UTC
Just some info for the referenced bug 40534: that was really Windows only and had to do with Direct X graphics memory handling in page sizes. And the bug just happens while a presentation was running. So it's very unlikely related, even if that is patched in some general memory management code.

The biggest change on MacOS drawing code happened to fix bug 138122, which partly got reverted a few days ago in commit b3737c638671ab39c5e6aaeaf5426d102392cc0a ("Revert "tdf#138122 Detect window scaling for multi display configurations on macOS").

So it would be interesting, if some master dev-build works for you, especially since 7.0 is ok, but 7.1 isn't. Since it's just a partial revert, some other bits of that fix might be related. Or I'm totally wrong. I have no Mac HW, so it's just a hunch.

Daily builds are available at https://dev-builds.libreoffice.org/daily/. More
information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds
Comment 6 Marcus Hudritsch 2021-02-08 17:36:17 UTC
I downloaded and installed LODev The problem is the same: Still scaling errors when the LO window gets dragged onto another monitor with different scaling factors.
I reconfirm that LO 7.0.4 works fine.
Comment 7 Thorsten Wagner 2021-02-08 22:52:06 UTC
Patch to fix this issue is available, but it seems to break some unit tests during building, so patch has been reverted (see tdf#138122). Patch seems to work, but investigation why several unit tests are broken is still ongoing.
Comment 8 Tor Lillqvist 2021-02-10 08:52:00 UTC
As the very initial comment says "The bug appears in LO version 7.1 (for Mac-Intel)", why does the title of this bug talk about M1 as if this was specific to macOS on arm64?
Comment 9 Tor Lillqvist 2021-02-10 08:52:47 UTC
(Edited the title.)
Comment 10 Marcus Hudritsch 2021-02-10 09:26:30 UTC
Because it appeared on my MacBook Pro M1 and this computer had problems with external monitors. That mislead me to this title. Now I know it's not an M1 problem. Sorry.
Comment 11 Timur 2021-02-15 13:45:57 UTC
*** Bug 140423 has been marked as a duplicate of this bug. ***
Comment 12 Timur 2021-02-15 13:48:11 UTC
*** Bug 140390 has been marked as a duplicate of this bug. ***
Comment 13 Timur 2021-02-15 13:56:41 UTC
I cannot test but looks like this was confirmed by duplicates. 
Based on reports I set regression, but with Comment 7 and related See Also bugs, I mark bibisectNotNeeded.
Comment 14 Aron Budea 2021-03-16 00:51:34 UTC
In the end this is duplicate of the big pile that is tdf#138122, right?
Comment 15 Roman Kuznetsov 2021-03-16 04:40:02 UTC
(In reply to Aron Budea from comment #14)
> In the end this is duplicate of the big pile that is tdf#138122, right?

Marcus, please download today's daily build by pink wbove and retest the problem
Comment 16 Russ Herald 2021-03-16 06:35:44 UTC
I have the same problem with the external monitor on my macbook pro (2015), and had submitted this already (but can’t seem to find the original submission.

This weekend I installed 7.0.5, and can confirm that the rendering error on an external monitor does not occur on 7.0.5 on my machine.
Comment 17 steve 2021-03-18 09:18:27 UTC
@Marcus Hudritsch: Could you install LibreOffice nightly build and see if the problem persists using that build:

Note: To open LibreOffice nightly on macOS please refer to: https://support.apple.com/guide/mac-help/open-a-mac-app-from-an-unidentified-developer-mh40616
Comment 18 Wojtek 2021-04-01 05:40:03 UTC
The weird problem with this but is that... it stops after couple of restarts of the LO (usually 5-6 restarts on a given day and then it goes to display/scale normally). This makes absolutely no sense as I don't restart my machine, but each morning after waking up my laptop LO is acting up and I have to go through the process of starting LO, opening my spreadsheet, seeing the bug, restarting and then after a couple of attempts it's back to normal and works fine till the end of the day.

I tried LibreOfficeDev_7.2.0.0.alpha0_MacOS_x86-64.dmg and it worked fine, but it was after my ritual of restarts of the main LO so I'd have to check it tomorrow morning (as weird as it may sound).
Comment 19 Wojtek 2021-04-04 15:05:20 UTC
It seems to work well in recently released LO:

Version: / LibreOffice Community
Build ID: 8a45595d069ef5570103caea1b71cc9d82b2aae4
CPU threads: 8; OS: Mac OS X 10.15.7; UI render: default; VCL: osx
Locale: pl-PL (es.UTF-8); UI: en-US
Calc: threaded
Comment 20 Roman Kuznetsov 2021-04-04 15:28:07 UTC

*** This bug has been marked as a duplicate of bug 138122 ***