Bug 106526 - Impress dual head presentation to 4K or QHD resolution monitor or projector has presentation screen tearing
Summary: Impress dual head presentation to 4K or QHD resolution monitor or projector h...
Status: RESOLVED DUPLICATE of bug 40534
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
4.4.7.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: needs4Kmonitors needsQHDmonitors
Keywords:
Depends on:
Blocks: HiDPI
  Show dependency treegraph
 
Reported: 2017-03-14 08:09 UTC by craig@arno.com
Modified: 2024-03-28 12:54 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Picture of both screens in Slide Show (1019.11 KB, image/jpeg)
2017-03-14 08:09 UTC, craig@arno.com
Details
First Screen Paint on native Surfacebook @ 1080p resoution (22.65 KB, image/jpeg)
2017-03-26 16:32 UTC, craig@arno.com
Details
Refresh-paint, replaces "first-paint about <1 second later. (13.69 KB, image/jpeg)
2017-03-26 16:36 UTC, craig@arno.com
Details

Note You need to log in before you can comment on or make changes to this bug.
Description craig@arno.com 2017-03-14 08:09:39 UTC
Created attachment 131874 [details]
Picture of both screens in Slide Show

Dual monitor setup, click on "Start from First Slide - F5" and presenters view shows up fine on Surface Book display, but 4K monitor used as presentation display shows "junk" <photo attached>.

Machine:
 Windows 10 professional
 Surface Book 3000x2000 (4K) display, i7-6600U, 16GB RAM, 1TB SSD
 External monitor connected through display port running in 2160p mode (4K)

I tried LibreOffice 5.3.0 x64, 5.3.0 x86, 5.2.6 x64, 5.2.5 x64, 5.1.6 x64, 5.0.6.3 x64, 4.4.7.2 x86.  All failed the same way.  Swapping screens changed behavior slightly, but the "presentation" screen was always messed up, the presenters screen always rendered correctly.

5.3.0 x86 produced a crash report http://crashreport.libreoffice.org/stats/crash_details/a30c4775-586d-4200-a4e9-c72ea0033876

I tried OpenOffice 4.1.3 and both displays looked right, except the presentation display was on the smaller display and the presenters window was on the large display with no way to swap the two as there is in LibreOffice.
Comment 1 craig@arno.com 2017-03-14 21:10:57 UTC
Looking at the crash report, it appears calling routines and line numbers are reported (i.e. great diagnostic information).

A cursory code look, I would suspect trouble starts at https://cgit.freedesktop.org/libreoffice/core/tree/slideshow/source/engine/slideshowimpl.cxx?h=libreoffice-5-3#n1382  in the addView() routine when the second call to add the Presenter's screen is called.

I see a number of design patterns used which aren't in my background, so a developer more practiced in these patterns and this specific code area will need to do the debugging.

I hope it will be relatively straightforward for a developer to discover why this code fails on a dual 4K screen and works fine on a dual 1080p screen set.  My guess is there is a constant or two for memory allocation which needs to be updated from 1920x1080 to 4096x2160 so memory isn't overflowed and corrupted by a pointer passing a boundary and writing where it shouldn't.  This is based on watching the screen initially paint right, then be overwritten and corrupted by what I assume is an update pass.

This code will not work on today's current batch of 4K laptop screens with auxiliary 4K monitor, like what I'm running.

Let me know if I can help whoever is looking at this issue.
Comment 2 craig@arno.com 2017-03-16 08:24:36 UTC
I need to have a working solution by July 1 2017, or else I have to find another presentation tool to use.  I'm working on my presentation now, in Impress, and I'd really like to use LibreOffice Impress for this presentation.  How can I help?
Comment 3 Buovjaga 2017-03-16 08:44:08 UTC
(In reply to craig@arno.com from comment #2)
> I need to have a working solution by July 1 2017, or else I have to find
> another presentation tool to use.  I'm working on my presentation now, in
> Impress, and I'd really like to use LibreOffice Impress for this
> presentation.  How can I help?

If you would like to become familiar with the code in general, Chris Sherlock has this work-in-progress book:
https://chrissherlock1.gitbooks.io/inside-libreoffice/content/

The information on submitting code and getting in contact with developers (on IRC and mailing list) is here: https://wiki.documentfoundation.org/Development/GetInvolved
Comment 4 craig@arno.com 2017-03-16 16:21:19 UTC
I was afraid I'd get this response, which is not totally unwarranted.  I'm an electrical engineer working on a "High Speed Electronic Design" presentation.  This presentation will take most of my time between now and my deadline.  So here is what I can do beyond what I've done so far; I need to finish my presentation first, which I expect will take me close to my deadline.  Then if there is time, I can try to get up to speed on and fix the LO display driver code.  Help from anybody else to address and repair this is appreciated.

The risk is I may not finish my presentation in time to fix my LibreOffice problem for the presentation I must complete.  I will leave this report in an unassigned state until I have real time to look at this.  I hope someone with necessary skill and time will pick this up and fix it prior to when I might have time.  Please don't wait for me to finish my presentation.  I just finished an ugly divorce and am rebuilding my life.  This is just one more piece of chaos, and I may not have the bandwidth to also add this to my efforts.

Thank you for the links, I did look at them, and will keep this Windows based project in the back of my mind.  Windows is where I'm having the problem, so it makes sense to work on the problem in Windows, but I'd also like to try the build/debug in Linux.  If you have any pointers for setting up the Eclipse IDE for debugging LibreOffice C++ software for Windows and Linux LibreOffice development, I could use this too.

BTW, I'd deem the Importance of this issue as either "Major" or "Critical" as it likely affects multiple platforms and impacts the overall acceptance of the LibreOffice suite if it can't run on current hardware platforms (which use 4K monitors/projectors).  It's definitely not "Medium" with 4K commodity hardware available at relatively inexpensive prices.  My 43-inch 4K monitor/TV was under $500, which is why I bought it for development.  Others will be doing the same when faced with building a current system.

Thanks,
Craig
Comment 5 V Stuart Foote 2017-03-16 16:51:21 UTC
@craig,

Display port should be able to drive the external 4K @60hz, but that is at the upper end that the HD Graphics 520 chip in the i7-6600U is going to support.

For starters you probably need to update the Intel driver from the 15.40 4463 installed (20.19.15.4463) to current 15.45 (21.20.16 / 15.45.14.4590) [1] and test with that. The Intel community for Graphics is a good resource [2].

Otherwise, perhaps back the screen resolution for the 4K external down to 2560 x 1600 resolution [3]?  Reduced resolution should not be a problem with the external 4K monitor/or projector you will need to present on.


=-ref-=
[1] https://downloadcenter.intel.com/download/26563/Graphics-Intel-Graphics-Driver-for-Windows-15-45-

[2] https://communities.intel.com/community/tech/graphics

[3] https://www.microsoft.com/surface/en-us/support/music-photos-and-video/connect-surface-to-a-tv-display-or-projector?os=windows-10#Setup
Comment 6 Buovjaga 2017-03-16 16:56:18 UTC
Well, crashes are taken quite seriously and the good thing is that you have the crash report data, so maybe someone will pick this up. The QA team can also bring this report up in the weekly meeting of the Engineering Steering Committee.

I am so far doing QA and only reading books about C++..

Eclipse integration has not gotten too far it seems: https://wiki.documentfoundation.org/Development/IDE#Eclipse_CDT

However, the Visual Studio integration has received a lot of work in the recent months. Also the IDE story in general has been improved, but it's still a long road. As proof you can skim the search results here: https://cgit.freedesktop.org/libreoffice/core/log/bin/gbuild-to-ide?qt=grep&q=gbuild

Still, there are instructions for debugging via Eclipse, so you could try it sometime: https://wiki.documentfoundation.org/Development/How_to_debug#Debugging_with_Eclipse_CDT_on_Linux

I remember there was a foundation budget item about getting 4k monitors to developers, so perhaps this report could be shoved in front of those who received them..
Comment 7 V Stuart Foote 2017-03-16 17:07:31 UTC
Yes, but dual 4K display capability will remain a corner case among LO users for some time yet. Simply performing QA and validation of the issue is challenging.

Back at work next week I will be able to test on a dual WQHD (2560 x 1440) system, but I and most will not have access to dual 4K systems (Surface Book + 4K display, or PC and 2 4K displays).

Not clear how this can be called critical. And I'd like OPs response to updated Intel drivers for the GPU.
Comment 8 V Stuart Foote 2017-03-16 17:22:58 UTC
@craig,

Another thought. 

Since MS provides the Surface Book with discrete nVidia GPU why is that not running? Can you go ahead and add LibreOffice to the program list in the nVidia Control Panel?  

And here also you'll want to have up to date nVidia drivers as well.
Comment 9 Buovjaga 2017-03-16 17:24:09 UTC
It's critical because the effect is critical. https://wiki.documentfoundation.org/images/0/06/Prioritizing_Bugs_Flowchart.jpg

Reverting priority change, though..
Comment 10 craig@arno.com 2017-03-16 17:41:39 UTC
Thanks for the fast response guys.  I'll look at all this new information and see about debug tomorrow.  I did try adding Impress to the Control panel for each GPU processor and neither worked.  I'll check out your other recommendations tomorrow.

I promised my son I'd help him move to a new college residence today, which requires trailers for hauling and travel.
Comment 11 craig@arno.com 2017-03-26 16:32:46 UTC
Created attachment 132149 [details]
First Screen Paint on native Surfacebook @ 1080p resoution

Caught this image on "first paint" bringing up the Slideshow.

This behavior is the same at 3000x2000 resolution.
Comment 12 craig@arno.com 2017-03-26 16:36:25 UTC
Created attachment 132150 [details]
Refresh-paint, replaces "first-paint about <1 second later.

This screen quickly replaces the "First screen" in Slideshow on the Surfacebook display at 1920x1080 resolution.  This behavior is the same on the Surfacebook single display at 3000x2000 "native" resolution.
Comment 13 craig@arno.com 2017-03-26 16:49:21 UTC
I downloaded the Intel driver and tried to install:

---------------------------
Error
---------------------------
The driver being installed is not validated for this computer. Please obtain the appropriate driver from the computer manufacturer.

Setup will exit.

Would you like more information?
Click Yes to be directed to the Intel support website.
---------------------------
Yes   No   
---------------------------
http://www.intel.com/content/www/us/en/support/graphics-drivers/000005469.html

http://www.intel.com/content/www/us/en/support/detect.html



This corrupt slideshow screen behavior reproduces on my Surfacebook single display (without an external monitor) in 3000x2000 pixel and 1920x1080 pixel settings.  This same presentation works fine on my dual screen 1080p monitor Linux system.  My Linux system isn't portable, the Surfacebook is portable.  I'll be doing the presentation with the Surfacebook machine.

My Dual screen Surfacebook setup otherwise works, with my other applications, notably, VLC, other parts of LibreOffice, Altium Designer (even 3D view), etc.

If there are no other suggestions, I think we're still looking at debug of LibreOffice Impress on Surfacebook configured with one external 4K screen and native display.  The Surfacebook is running at 3000x2000 32-bit/60Hz (as near as I can tell since Microsoft SW won't tell me bit depth and refresh rate directly).  The TV is running at 4096x2160 pixels.  I also tried 3140x2160, 1920x1080 and saw no change in behavior.

If I'm doing debug (later, most likely after the presentation), then I'll probably use the better supported Visual Studio environment, just to get the job done.
Comment 14 craig@arno.com 2017-05-21 02:53:12 UTC
Good news (for me)!

On my Surfacebook i7/16GB/1TB:
Primary Display set to 3000x2000 150% scaling
Secondary 4K display set to 1280 x 1024 100% scaling

After updating the NVIDIA driver http://www.geforce.com/drivers/results/117271/nvidiaupdate to
 381.65-notebook-win10-64bit-international-whql

 and using [Windows System -> Control Panel -> NVIDIA Control Panel] to set Libre Office Impress 5.3.2.2 x64 to use the High-Performance NVIDIA processor,

then setting the secondary display to 1280x1024

Libre Office Impress works well enough to use for my presentation!

I finally gained access to the lecture hall and found the projector uses 1280 x 1024 resolution settings.

Modes which still don't work involve setting the Surfacebook secondary display to 1920 x 1080, or 4K 4096 x 2160.

After more experimenting, the highest resolution mode for the secondary display which works is 1360 x 768.  Any resolution below 1360 x 768 (which includes 1280x1024) appears to work.  Anything higher than 1360 x 768 doesn't work.

I'd still call this issue major or critical, but at least I can do my presentation!
Comment 15 V Stuart Foote 2017-05-21 16:39:00 UTC
OK confirming, now have an external 4K monitor to test against (Samsung MU6300 40").  With 5.3.3.2 running on Windows 10 Home on a Lenovo Ideapad FLEX4 w/Intel i7-7500 and Intel HD Graphics 620 GPU -- native display panel is 1920x1080 at ~141 PPI

HDMI connection to the external defaults to duplicate of the 1920x1080. Setting the Windows Display Settings shows the desktop mirrored with content scaled 300%.

A presentation in mirrored mode displays scaled on the 4K and the 1080p display panel--the 4K a bit pixelated.

Using Windows Display settings set "Extend these displays"; and set LO Impress -> Slide Show -> Slide Show Settings: Multiple Displays Presentation Display drop list from default Auto -> Display 2 (external); and run presentation. The slides display, but are notably pixelated from scaling applied (by Windows).

Again with Windows Display Settings, set the 4K display to scale at 100%, and repeat.

This works correctly with OpenGL rendering, and also with CPU only rendering:
presentation to external 4K is clear and crisp at full 4K resolution as driven by the Intel GPU

But with "Use Hardware acceleration": the presentation rendered to 4K display is garbled as OP reports.

Use OpenGL or CPU only rendering and Presentation mode is correctly rendered.

Also, I had the same result on a MS Surface Pro 4 (Intel i7-6650DU w/Iris Graphics 540)  2736x1824 at ~267 PPI with LO 5.1.1.3; presentation mode renders garbled with "Use hardware acceleration" but is correct for OpenGL rendering, or CPU only rendering.

So this seems to be related to the later introduced font rendering issues of see also bug 107090 (at 5.3), and this behavior of the non-OpenGL hardware acceleration of the Presentation canvas is a LO issue--at least on Windows builds.

Curious if folks with HiDPI under Linux builds are having the same issues?
Comment 16 V Stuart Foote 2017-05-21 16:44:41 UTC
@craig, could you please test with the various rendering modes: 

CPU only rendering 
"Use OpenGL for all rendering"
"Use hardware acceleration"

All three with and without the "Use anti-alaising" enabled.

Setting CPU only is all boxes on Tools -> Options -> View: Graphics Output unchecked and LO restarted. The "anti-alaising" should toggle enabled/disabled from the dialog without restart.

Are you affected in all the modes, or as for me, only using the "Use hardware acceleration" rendering?
Comment 17 craig@arno.com 2017-05-21 21:12:45 UTC
Unless otherwise specified, laptop display 3000x2000, external display 4096x2160.
Times are how long it takes for both screens to change and become available.

Without Hardware acceleration and without OpenGL screen redraw @4K:
  10 Seconds with Use Anti-Aliasing
  10 Seconds without Use Anti-Aliasing

To get OpenGL the Intel Integrated Graphics had to be selected in the NVIDIA Control panel before OpenGL would stay selected @4K:
  10 Seconds with Use Anti-Aliasing
  11 Seconds without Use Anti-Aliasing

High-Performance NVIDIA processor, external display 1280x1024
With Hardware acceleration and without OpenGL screen redraw:
  3 Seconds with Use Anti-Aliasing
  4 Seconds without Use Anti-Aliasing

High-Performance NVIDIA processor, external display 1280x1024
Without Hardware acceleration and with OpenGL screen redraw:
  3 Seconds with Use Anti-Aliasing
  4 Seconds without Use Anti-Aliasing

High-Performance NVIDIA processor, external display 1280x1024
Without Hardware acceleration and without OpenGL screen redraw:
  3 Seconds with Use Anti-Aliasing
  4 Seconds without Use Anti-Aliasing

Intel Integrated Graphics, external display 1280x1024
With Hardware acceleration and without OpenGL screen redraw:
  3 Seconds with Use Anti-Aliasing
  4 Seconds without Use Anti-Aliasing

Intel Integrated Graphics, external display 1280x1024
Without Hardware acceleration and with OpenGL screen redraw:
  3 Seconds with Use Anti-Aliasing
  3 Seconds without Use Anti-Aliasing

Intel Integrated Graphics, external display 1280x1024
Without Hardware acceleration and without OpenGL screen redraw:
  4 Seconds with Use Anti-Aliasing
  4 Seconds without Use Anti-Aliasing


Seems like no matter what I do in 1280x1024 mode, LO Impress will take 3-4 seconds to paint both screens on an i7-4core Surfacebook, 16GB RAM. Selecting either GPU doesn't seem to make a difference (I'm stunned).

Two of the three modes worked in 4K.  However the display took 10-11 seconds to redraw at this resolution in the two working modes.

When running OpenGL, the presenter display on the Surfacebook had a bizarre moving colored artifact constantly running along a diagonal from the bottom left corner to the top right. As a presenter display, it was still usable, but distracting.
Comment 18 V Stuart Foote 2018-03-21 03:31:58 UTC
*** Bug 116521 has been marked as a duplicate of this bug. ***
Comment 19 V Stuart Foote 2018-03-21 03:43:55 UTC
As in comment 14
After more experimenting, the highest resolution mode for the secondary display which works is 1360 x 768.  Any resolution below 1360 x 768 (which includes 1280x1024) appears to work.  Anything higher than 1360 x 768 doesn't work.

So any 4K or QHD monitor/projector will cause issues when driven by LibreOffice with "Use Hardware Acceleration" graphics mode.  Presentation at higher resolution with CPU only rendering or OpenGL rendering do not tear.

Frederic, could test the Impress presentation using OpenGL rendering and CPU only rendering as compared to Use Hardware Acceleration.
Comment 20 V Stuart Foote 2018-03-21 03:53:45 UTC
Dropping severity back to Normal; few if any reports of crashing as in OP. Actual x86 crash in OGLTranslo.dll -> vclcanvaslo.dll at 5.3.0.3 seemingly a non-issue.

Will do a bit of testing on current releases.
Comment 21 V Stuart Foote 2018-03-21 04:04:09 UTC
Actually, going to duplicate this to bug 40534 - slide tearing or not shown in LARGE screens (high resolution) with hardware acceleration enabled

*** This bug has been marked as a duplicate of bug 40534 ***
Comment 22 tsevelyna 2019-06-08 10:52:05 UTC Comment hidden (spam)
Comment 23 james demongin 2019-10-22 04:47:20 UTC Comment hidden (spam)