Bug 105863 - Flicker when hovering over main menu with default rendering (DW-regression)
Summary: Flicker when hovering over main menu with default rendering (DW-regression)
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
5.0.0.5 release
Hardware: All Windows (All)
: high normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
: 103977 104436 107024 107859 107937 107978 112077 (view as bug list)
Depends on:
Blocks: Main-Menu RenderContext DirectWrite-Regression Flickering-UI
  Show dependency treegraph
 
Reported: 2017-02-08 17:47 UTC by Aron Budea
Modified: 2017-11-08 09:20 UTC (History)
34 users (show)

See Also:
Crash report or crash signature:


Attachments
Simple Calc sheet (660.88 KB, application/vnd.oasis.opendocument.spreadsheet)
2017-09-27 13:10 UTC, Ji-Ef
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aron Budea 2017-02-08 17:47:41 UTC
- Switch to default rendering.
- Start Writer.
- Move mouse over main menu.

=> The menu flickers.

Reproduced with 5.3.0.3, 5.0.0.5 / Windows 7. Not reproduced with 4.4.0.3.
=> regression

Not sure if there's a duplicate, bug 103977 is about menu items, and only related to the new layout engine.
Comment 1 Aron Budea 2017-02-08 17:49:54 UTC Comment hidden (bibisection)
Comment 2 Aron Budea 2017-02-08 17:51:59 UTC
Flickering has started with the comment referenced below. Adding Cc: to Tomaz Vajngerl, please take a look.

https://cgit.freedesktop.org/libreoffice/core/commit/?id=458a827e96523ac52d021f1fd3653b5a734940c0
author		Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>	2015-05-15 11:50:30 (GMT)
committer	Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>	2015-05-16 12:57:16 (GMT)

"further refactor Menu to use RenderContext"
Comment 3 Telesto 2017-02-08 21:24:54 UTC
Confirming: 
Version: 5.4.0.0.alpha0+
Build ID: a296a69c984b17cfbcd249cf6bdc191d08dff2a6
CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-02-06_00:00:55
Locale: nl-NL (nl_NL); Calc: CL

And I will mark bug 103977 as a dupe.
Comment 4 Telesto 2017-02-08 21:25:06 UTC
*** Bug 103977 has been marked as a duplicate of this bug. ***
Comment 5 Xisco Faulí 2017-02-09 11:58:59 UTC
*** Bug 104436 has been marked as a duplicate of this bug. ***
Comment 6 V Stuart Foote 2017-04-14 14:10:08 UTC
*** Bug 107024 has been marked as a duplicate of this bug. ***
Comment 7 Valentin 2017-05-11 18:21:55 UTC
Affected versions are 5.3.3, 5.3.2
In 5.3.1 no flicking
Comment 8 V Stuart Foote 2017-05-18 00:31:28 UTC
*** Bug 107859 has been marked as a duplicate of this bug. ***
Comment 9 V Stuart Foote 2017-05-18 18:57:44 UTC
*** Bug 107937 has been marked as a duplicate of this bug. ***
Comment 10 Jez 2017-05-18 19:13:21 UTC
Can you guys repro the very slow text rendering when selecting text in the LibreOffice Basic editor?  See the GIF in #107937 for an example capture.  If not, my bug should be unmarked as a duplicate.
Comment 11 Aron Budea 2017-05-18 23:26:56 UTC
Jez, Regina just opened a bug on the other issue, so let's track it in that report (bug 107944).
Comment 12 Aron Budea 2017-05-20 22:53:13 UTC
*** Bug 107978 has been marked as a duplicate of this bug. ***
Comment 13 bugzilla2 2017-06-01 11:16:51 UTC
I can confirm the menu-problem on 5.3.3 on Windows 8.1 x64.

Also, I just switched from 5.2.6 to 5.3.3, and overall there seems to be quiet a lot of performance and display problems, but I didn't found a better bugreport then this one.

So, will a fix for the menu-problem also have an impact on other display/performance issues in 5.3 series?

Others thins I noticed in 5.3.3:
- When you close a calc document (ONLY the document, not the whole window!) the "start page" redraws one time.
- When you enter numbers in a cell and press TAB, it sometimes takes "long" until LO formats the cell and jumps to the next cell.
- Overall, 5.3.3 feels noticeable slower with existing data, due to those intermittent unresponsiveness.

Is there a better bugreport for those problems, where I should comment on?
Comment 14 bugzilla2 2017-06-01 11:39:54 UTC
I just went back to 5.2.7:
- The menu-problem does not exist in 5.2.7
- I just realized, that the "start page" redraw happens on 5.2.7 too, so that "issue" seems to be no regression in 5.3.3.
Comment 15 DoMi..... 2017-06-01 14:26:34 UTC
For me, the menu flickers with version above 5.3.1.2. It's ok with version 5.3.1.2 with a NVIDIA Quadro 2000M and drivers 21.21.13.7586.
Comment 16 Bobby Phoenix 2017-06-04 15:29:28 UTC
I just installed 5.3.3.2 yesterday, and everything was steady smooth.  When I booted today, and opened Office, I noticed flickering.  I check settings along with a web search, and it pointed to Hardware Acceleration.  With it on mine was flickering, so I turned it off, and restarted Office.  Everything was fine.  I rebooted PC, and the flickering was back.  I checked settings, and HA was somehow enabled again.  I decided to restart in Safe Mode, do a complete factory reset, and check settings.  HA was disabled, but Use anti-aliasing along with Use OpenGL for all rendering were enabled.  I had no flickering, and everything was fast and smooth.  I rebooted again to see what happens, and it changed setting by itself.  HA was back on, and Use OpenGL for all rendering was off/unchecked.  I reset several times to test, and each reboot the settings would change to HA on, and OpenGL off.  How do I make the setting stick to keep HA off, and OpenGL on?
Comment 17 Bobby Phoenix 2017-06-04 18:15:02 UTC
OK, so I did some testing for my issues, and I found HA will stay unchecked, and Use anti-aliasing along with Use OpenGL for all rendering will stay checked even during shutdowns, and/or reboots, if the LibreOffice Quickstarter is unchecked.  If it's check to start on system start up then HA gets enabled somehow.  It's a workaround for now, but at least I don't have to change settings every time I turn on the computer.
Comment 18 Roman Kuznetsov 2017-06-06 12:34:08 UTC
confirmed for any module LibreOffice in

Version: 5.5.0.0.alpha0+
Build ID: d8e704ef30a6d7f606e58b25be54bbe79c9e40b6
CPU threads: 4; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-06-02_00:43:23
Locale: ru-RU (ru_RU); Calc: group

and in

Version: 5.3.2.1
Build ID: 7f6693c08cc110b9721245fc4bd4f1712e0c086c
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; Layout Engine: new; 
Locale: ru-RU (ru_RU); Calc: single

video Intel HD4000, Windows 7

DriverVersion: 9.17.10.4229
DriverDate: 5-26-2015
DeviceID: PCI\VEN_8086&DEV_0166&SUBSYS_21F717AA&REV_09
AdapterVendorID: 0x8086
AdapterDeviceID: 0x0166
AdapterSubsysID: 0x21f717aa
DeviceKey: System\CurrentControlSet\Control\Video\{92E621FD-7AE7-489A-8F2F-47AFD10834D8}\0000
DeviceString: Intel(R) HD Graphics 4000
Comment 19 MM 2017-06-10 09:28:12 UTC
Refresh problems exists with v5.3.4.1, but not with v5.2.7.2 under windows 7 x64.
But it's not only a menu problem, all options you hover over, flicker maybe even more. Very annoying, so I went back to the old version.
Comment 20 Yousuf Philips (jay) (retired) 2017-06-16 14:35:47 UTC
For me on Windows 8.1, the flicker is barely noticeable in 5.2 and is easily visible in 5.3 and above.
Comment 21 bugzilla2 2017-06-23 13:26:17 UTC
Confirmed again in LibO 5.3.4 and current 6.0 daily :(
Is there anything a non-developer can do to help solve that issue? It seems like even though many people confirmed this issue, no developer has taken care of it right now?
Comment 22 Aron Budea 2017-06-23 23:53:09 UTC
Kendy, do you have any thoughts on what kind of fix could be pursued here? Flickering still affects a couple of UI components in Windows with default rendering, maybe there could be a general approach to fixing them.
Comment 23 Jan Holesovsky 2017-06-26 08:21:38 UTC
Aron: Unfortunately no idea without a real debugging :-(  Smells like not setting clip region correctly, or something in that direction, but can be of course something completely different...
Comment 24 Telesto 2017-06-26 12:15:51 UTC
@Aron: 
Is it possible to reduce the problem, until a proper fix is found? The has become more prominent in two steps.
1. Between 5.3.1.2 and 5.3.2.2 (see comment 7)
* Hoover horizontal over the tool menu. Only the gray cross at the right is flickering in 5.3.1.2 but the full menubar in 5.3.2.2 

2. Between 5.3.0.0.alpha1 and 5.3.0.3
* The mailmerge icon in the tools menu is nearly blinking in 5.3.0.3 if you keep hovering over it, but 'steady' in 5.3.0.0.alpha1
Comment 25 Aron Budea 2017-06-27 01:28:08 UTC
Kendy:
That's too bad. Is the rendering supposed to be double-buffered, btw?
If setting the clip region would be something like what Michael did in bug 91366, that makes things better, but only localizes the issue to two adjacent UI elements (eg. in submenus the involved submenu items still flicker when hovering from one to another).

Telesto:
My experience is a lot different, but I noticed something interesting. Normally I get the flickering with every version from 5.1 to the current one, and it's roughly equally bad.

But when I tried to create a screencast... During video recording there was flickering in 5.4.0.1, but not in 5.2.0.4 (or to be precise, as you described, only the document closer X flickered on the right sometimes).
I wonder what can make a difference here...
Comment 26 Telesto 2017-06-27 07:57:42 UTC
> Telesto:
> My experience is a lot different, but I noticed something interesting.
> Normally I get the flickering with every version from 5.1 to the current
> one, and it's roughly equally bad.

Odd. Nearly all reports around here are about the 5.3 branch (and up). Comment 7, Comment 13, Comment 19, Comment 20, bug 107024#c1. I can reproduce some flickering with older versions, but barely noticeable (same as Jay). Maybe we should split both bugs and reopen bug 107024
Comment 27 Aron Budea 2017-06-28 01:01:00 UTC
(In reply to Telesto from comment #26)
> Maybe we should split both bugs and reopen bug 107024

See Khaled's comment in bug 107024. Maybe the change to DirectWrite in 5.3.2 made the bug more widespread, but I think the underlying issue is the same (and even if not, focusing on the change in 5.3.2 won't get us closer to a solution).
Comment 28 bugzilla2 2017-06-28 15:55:26 UTC
I understand Aron's point of view, but it seems like a lot more people are affected by the bug introduced in 5.3.2 compared to those (is there anyone else then Aron) that had that bug in earlier versions already, thats why I think Telesto's comment is a good idea, to split those two bugs apart.

The one bug that was introduced in 5.3.2 affects a lot more people, so fixing that first would be important. We should not forget, that support for LibO 5.2.x has already ended, so all those users that switched back to 5.2 series because of that bug are in a somewhat uncomfortable position.

If the root cause for two bugs is easy to find, I would of course prefer to fix it that way, but as it seems its not that easy, and reverting the changes introduced in 5.3.2 should be a lot faster.
Comment 29 Xisco Faulí 2017-06-28 16:11:36 UTC
*** Bug 108832 has been marked as a duplicate of this bug. ***
Comment 30 bugzilla2 2017-08-12 10:55:42 UTC
Almost two months passed by since the last posts in this thread, and I can't see any progress :(

I tested 5.3.5 and 5.4.0 and thought the flickering was gone, but sadly the only "progress" seems to be, that LibO now defaults to OpenGL instead of Classic HW-Acceleration. In my opinion, thats not really a progress, because OpenGL Mode has so many drawbacks on its own (Slugish Performance, Ugly Fontrendering aso.). So, LibO users that ant a supported Version have the choice between slow&ugly or flickering - great :/

Went back to unsupported 5.2.7 ....

Please solve that bug in the next releases (for example by undoing the relevant changes introduced in 5.3.2). Please, please, please...
Comment 31 rascal 2017-08-21 11:14:14 UTC
I also experience this (win7-64, 64bit build of LO). On top of that scrolling over text within Writer seems also to be flickering. When I change to OpenGL rendering, not only the menu items stop to flicker but also the text scroll is more fluent.
Comment 32 Telesto 2017-08-29 07:18:09 UTC
*** Bug 112077 has been marked as a duplicate of this bug. ***
Comment 33 bugzilla2 2017-08-30 09:57:04 UTC
Still flickering in 5.4.1.2 :(
Comment 34 Aibara 2017-09-02 16:40:48 UTC
Some comments state that OpenGL rendering solves the issue, but I'd like to point out that there are plenty of older computers out where enabling OpenGL just breaks LO completely (i.e. it just hangs forever until you force it to close). So that's simple not an option on a lot of hardware.

Had to go back to the unsupported 5.2.7 because the flickering was giving a family member a migraine.
Comment 35 george 2017-09-05 09:22:08 UTC
Confirming the bug (windows 10 & LO 5.4.1.2 (x64)

Also I would like to add that enabling "open gl" from tools-->options-->view solves the problem BUT browsing the menus then becomes unresponsive and luggish (nvidia GTX275)
Comment 36 IagoSRL 2017-09-05 09:48:28 UTC
Same as George here.

With Windows 7, LO 5.4.0.3 (x64), OpenGL mode is unusable, on my case scrolling is really slow too.
I have an NVIDIA Gegorce GTX 960 with drivers up-to-date.
Comment 37 IagoSRL 2017-09-05 10:10:01 UTC
An update: I uninstalled the version 5.4 and installed the current 'still' version, v5.3.6, and the problem is still there with standard rendering, BUT enabling the OpenGL mode everything seems to work fine, even smoother scrolling than standard. If I found something going wrong I will let you know.
Comment 38 Oliver Hartig 2017-09-10 20:09:42 UTC
Enabling OpenGL fixes this bug, but opening a menu is very slow even with a good graphic card. Without OpenGL LibreOffice runs fast and smooth but the menu flickers.
Comment 39 sunweb 2017-09-12 03:42:38 UTC
I am using KDE and either GTK or KDE4. For me flickering started once i went from 5.2.7 to 5.3.5.
It is not just menu that is flickering, selection in Macro editor flickers horribly. And if you enable OpenGL it doesn't flicker but it is sooo daaamn slooow.

Note: The problem disappears with GTK3 but it has its own amount of bugs on KDE. Under X11 i can't even copy/paste multiple times with the mouse, only keyboard works fine. Under Wayland it works. But Wayland is unusable even on Gnome(unless you use only Gnome apps) let alone KDE(still under heavy wip).
Comment 40 Aron Budea 2017-09-12 18:26:57 UTC
(In reply to sunweb from comment #39)
> I am using KDE and either GTK or KDE4. For me flickering started once i went
> from 5.2.7 to 5.3.5.
> It is not just menu that is flickering, selection in Macro editor flickers
> horribly. And if you enable OpenGL it doesn't flicker but it is sooo daaamn
> slooow.

It's a different issue, and is tracked separately in bug 107944, FYI.
Comment 41 Oliver Hartig 2017-09-20 10:31:53 UTC Comment hidden (no-value)
Comment 42 bugzilla2 2017-09-21 10:26:09 UTC Comment hidden (no-value)
Comment 43 Aron Budea 2017-09-21 21:00:47 UTC
(In reply to bugzilla2 from comment #42)
> But you don't need to go back soooo far. In 5.2.7 the flicker-issue does not
> exist, and it should be safer then 4.4, which has known safety issues.

This is not correct, for certain GPUs, like my AMD card the issue started with 5.0, with the commit identified in comment 2.
Comment 44 bugzilla2 2017-09-21 21:08:11 UTC
(In reply to Aron Budea from comment #43)
> This is not correct, for certain GPUs, like my AMD card the issue started
> with 5.0, with the commit identified in comment 2.

What AMD GPU (and OS, Driver) are you using? Because I have several AMD GPUs on my own and customers systems, and I never saw that issue on LO versions prior to 5.3.
Comment 45 Aron Budea 2017-09-21 21:45:27 UTC
(In reply to bugzilla2 from comment #44)
> What AMD GPU (and OS, Driver) are you using? Because I have several AMD GPUs
> on my own and customers systems, and I never saw that issue on LO versions
> prior to 5.3.

Now an RX 570 with 17.8.2 drivers, when I opened the ticket I was using an A10-7800 with its integrated GPU, also with recent drivers at the time.
OS is Windows 7.
Comment 46 tommy27 2017-09-23 12:32:08 UTC
I see a lot of flickering under Win8.1 x64 using LibO 5.4.1.2 and a very recent 6.0.0.0 alpha daily build.

to get rid of the flickering I have to select "Tools/Options/Use OpenGL for all rendering" and flag "Ignore OpenGL blacklist" as well.

my graphic card is an "ATI AMD Radeon R5 Graphics"
Comment 47 V Stuart Foote 2017-09-23 14:31:20 UTC
(In reply to tommy27 from comment #46)
> I see a lot of flickering under Win8.1 x64 using LibO 5.4.1.2 and a very
> recent 6.0.0.0 alpha daily build.
> 
> to get rid of the flickering I have to select "Tools/Options/Use OpenGL for
> all rendering" and flag "Ignore OpenGL blacklist" as well.
> 
> my graphic card is an "ATI AMD Radeon R5 Graphics"

Yes no flicker with OpenGL rendering where the UI is fully double buffered, needs attention for default rendering (HA or CPU only).  But flicker aside, you have another issue in that the R5 Grpahics should probably be current enough to not receive an OpenGL blacklist.

Could you give details of the GPU and driver? Done simply by opening Chrome browser and post result of the chrome://gpu diagnostic (just the Version Information and Driver Information); or same with the Firefox about:support diagnostic. Or run Windows own msinfo32 and post (just the System Summary and Display panels).
Comment 48 tommy27 2017-09-23 14:59:30 UTC
(In reply to V Stuart Foote from comment #47)
> (In reply to tommy27 from comment #46)
> > I see a lot of flickering under Win8.1 x64 using LibO 5.4.1.2 and a very
> > recent 6.0.0.0 alpha daily build.
> > 
>> ... 

> Could you give details of the GPU and driver? 
> ...

here's the data I retrieved from Firefox.

Data aggiornamento driver	9-15-2014

Descrizione scheda grafica	AMD Radeon(TM) R5 Graphics

Direct2D attivo	true

DirectWrite attivo	true (6.3.9600.18696)

Driver scheda grafica	aticfx64 aticfx64 aticfx64 aticfx32 aticfx32 aticfx32 atiumd64 atidxx64 atidxx64 atiumdag atidxx32 atidxx32 atiumdva atiumd6a atitmm64

Finestre con accelerazione GPU	1/1 Direct3D 11 (OMTC)

GPU #2 attiva	false

ID dispositivo	0x9851

ID produttore	0x1002

RAM scheda grafica	1024

Rendering WebGL	Google Inc. -- ANGLE (AMD Radeon(TM) R5 Graphics Direct3D9Ex vs_3_0 ps_3_0)

Versione driver	14.301.1001.0

windowLayerManagerRemote	true

AzureCanvasBackend	direct2d

AzureContentBackend	direct2d

AzureFallbackCanvasBackend	cairo

AzureSkiaAccelerated	0
Comment 49 bugzilla2 2017-09-25 13:04:15 UTC
(In reply to Aron Budea from comment #45)
> Now an RX 570 with 17.8.2 drivers, when I opened the ticket I was using an
> A10-7800 with its integrated GPU, also with recent drivers at the time.
> OS is Windows 7.

Hmmm, strange. I just looked up my database, and I sold FM2+ A10 APUs to at least 5 customers. Most if not any of them use LibO and I haven't seen any render Issues before 5.3 on any of those PCs. I never sold the A10-7800 but some APUs with lower and some with higher specs, so I think they all should use very similar GPU-Cores. The only difference could be the OS, because the mentioned customers use win8.1 or win10 and not 7.

Even besides the AMD APUs, I see a lot of different systems on my bench, and I can't imagine one with LibO render-Issues so far (I didn't install newer versions then 5.2.7 so far because of this issue).

BTW: Tested 5.3.6.1 and 5.4.1.2 this weekend and still no improvement :(
Tested on a 2017 MacBook with Windows 10:
5.2.7: Fast and not flickering
5.3.6.1: Flickering and noticeable slower (even without OpenGL)
5.4.1.2: Flickering and MUCH SLOWER (even without OpenGL)

So, the flickering doesn't get any better, but LibO gets slower with any new mayor version :(
Comment 50 Ji-Ef 2017-09-27 13:10:05 UTC
Created attachment 136566 [details]
Simple Calc sheet

Scrolling through it is painfully slow on Windows 10, but very smooth on Windows XP (LibO 5.4.1)
Comment 51 Ji-Ef 2017-09-27 13:12:29 UTC
Just upgraded to 5.4.1 (also tested 5.4.2 from testing/) and I also experience lots of slowness on Windows 10, from the scrolling to the overall UI.

Windows 10 is 64bits, on an Intel Core i5, 6GB of RAM, onboard Intel GPU and dedicated nVidia Graphic Card (9600GT) (can't update drivers anymore as the product is no longer maintained)

Tested LibO installer 32 and 64bits on Windows 10, both on nVidia and Intel GPU, with and without OpenGL, it's all the same slowness, both on scrolling and overall UI. LinO 5.2.7 and 5.3.6 seems to work ok, but not as snappier as on WinXP.

Oh, btw, all of this does not happen on a old 32bits WinXP computer (AMD Sempron & Nvidia onboard GPU)
Comment 52 V Stuart Foote 2017-10-03 16:53:58 UTC
In an interesting effect, the GDI patch just applied against a 5.3.7 release-- tdf#112486 Do not force GDI in no OpenGL, reduces the UI flicker noticeably. 

http://cgit.freedesktop.org/libreoffice/core/commit/?id=5440837e02dee8bc884e02be697bfd4def621d26&h=libreoffice-5-3

=-Testing-=
Windows 10 Ent 64-bit en-US with
Version: 5.3.7.0.0+ (x64)
Build ID: 149f28e9a5d66db18ffb36547b2ba394c303fc4d
CPU Threads: 8; OS Version: Windows 6.19; UI Render: default; Layout Engine: new; 
TinderBox: Win-x86_64@62-TDF, Branch:libreoffice-5-3, Time: 2017-09-30_08:04:07
Locale: en-US (en_US); Calc: CL

=-ref-=
http://dev-builds.libreoffice.org/daily/libreoffice-5-3/
Comment 53 bugzilla2 2017-10-03 19:16:16 UTC
Yeahaaaaa! :)
Just tested this 5.3.7 Daily Build from 2017-09-30 08:04:07, and IT'S WORKIIIIING!!!! :)
Finally a working version of 5.3 series :) Now, please apply patch to current 5.3 and 5.4 series, switch Default-Rendering back to Non OpenGL and we finally have a working and supported LibO Version for the general public :)
Comment 54 Roman Kuznetsov 2017-10-03 20:30:55 UTC
i can confirm fixing of this bug in LibreOffice

Version: 5.3.7.0.0+
Build ID: 8580472270972733cda7fa6ecf23db73359d30bb
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; Layout Engine: new; 
TinderBox: Win-x86@62-TDF, Branch:libreoffice-5-3, Time: 2017-10-02_13:08:01
Locale: ru-RU (ru_RU); Calc: CL

videocard AMD 6450 with latest driver
Comment 55 tommy27 2017-10-04 05:19:44 UTC
I confirm flickering is gone with default rendering using LibO 6.0.0.0.alpha0+
Build ID: b087e451527f2e497ccab83b63b4f10099bfb8b8
CPU threads: 4; OS: Windows 6.3; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-10-03_23:43:39
Locale: it-IT (it_IT); Calc: group

tested under Win8.1 x64

LibO 5.4.1.2 is still affected; I'm confident the next 5.4.2 release will be fixed as well.
Comment 56 V Stuart Foote 2017-10-04 05:32:53 UTC
Sorry, but only corrected for a final 5.3 release of 5.3.7; that patch as is will not be implemented as is in 5.4 or 6.0.

But it points out the location in the code that needs to be reworked, stay tuned...
Comment 57 tommy27 2017-10-04 06:17:49 UTC
are you sure about that?

in my latest test flickering was gone on 6.0.x whilst a previous 6.0.x build I just tested before installing the new one was still affected.
Comment 58 V Stuart Foote 2017-10-04 06:45:53 UTC
(In reply to tommy27 from comment #57)
> are you sure about that?
> 
> in my latest test flickering was gone on 6.0.x whilst a previous 6.0.x build
> I just tested before installing the new one was still affected.

You are correct, sorry.

I just checked again and devs went ahead and committed the patch to master:
https://gerrit.libreoffice.org/#/c/42897/
https://cgit.freedesktop.org/libreoffice/core/commit/?id=01f674a95ddec76dc4c8ecfccdca1773657e47cb

while for 5.4 it is up for code review, but probably will roll unless a major issue crops up
https://gerrit.libreoffice.org/#/c/43109

But before closing, need to know if the folks who had flicker at 5.0.0 as bibisected (comment 2) are also working correctly now. @Aron?
Comment 59 Telesto 2017-10-04 07:19:53 UTC
(In reply to V Stuart Foote from comment #58)
> But before closing, need to know if the folks who had flicker at 5.0.0 as
> bibisected (comment 2) are also working correctly now. @Aron?

The initial report still stands. The menu is flickery, but back to original problem prior 5.3.2.2
Are more obvious example of the same problem: Tools -> Customize -> Menu Tab -> Menu -> Hover over the Menu Dropdown box
Comment 60 Julien L. 2017-10-04 08:48:24 UTC
(In reply to V Stuart Foote from comment #58)
> (In reply to tommy27 from comment #57)
> > are you sure about that?
> > 
> > in my latest test flickering was gone on 6.0.x whilst a previous 6.0.x build
> > I just tested before installing the new one was still affected.
> 
> You are correct, sorry.
> 
> I just checked again and devs went ahead and committed the patch to master:
> https://gerrit.libreoffice.org/#/c/42897/
> https://cgit.freedesktop.org/libreoffice/core/commit/
> ?id=01f674a95ddec76dc4c8ecfccdca1773657e47cb
> 
> while for 5.4 it is up for code review, but probably will roll unless a
> major issue crops up
> https://gerrit.libreoffice.org/#/c/43109
> 

Hi,
I'm new here and I'd like to know in which version of LibreOffice the menu flickering is gone... (the latest 5.3.6.x ?) Thanks for the info :)
Comment 61 Telesto 2017-10-04 08:52:13 UTC
> Hi,
> I'm new here and I'd like to know in which version of LibreOffice the menu
> flickering is gone... (the latest 5.3.6.x ?) Thanks for the info :)

5.3.7.x

Testing version: http://dev-builds.libreoffice.org/daily/libreoffice-5-3/
Comment 62 Aron Budea 2017-10-04 11:48:36 UTC
See my description and initial comments, this is not directly tied to bug 112486 (though for many people it started occurring after that), and is not fixed.
Comment 63 Aron Budea 2017-10-04 12:01:53 UTC
(In reply to V Stuart Foote from comment #58)
> But before closing, need to know if the folks who had flicker at 5.0.0 as
> bibisected (comment 2) are also working correctly now. @Aron?

Oops, I didn't notice this beforehand. Yeah, I tested the fresh 5.3 daily build, and on the system which was affected by this bug since the start the bug was still there (on another where it only started after 5.3.2 the bug was gone).
Comment 64 Mike Kaganski 2017-10-05 06:07:00 UTC
Also most possibly related (though maybe separate): try selecting text in Help-About with a mouse (with default rendering), and observe severe flickering - which remains after commit 01f674a95ddec76dc4c8ecfccdca1773657e47cb.
Comment 65 Roman Kuznetsov 2017-10-20 15:28:59 UTC
bug still repro in 
Version: 6.0.0.0.alpha0+
Build ID: a1f93eee75450c3ab6bc623bfad4f850260b86d0
CPU threads: 4; OS: Windows 6.1; UI render: default; 
Locale: ru-RU (ru_RU); Calc: group
from moggi
build - 18.10.2017

video - intel HD4000

effect is less, than it was, but it is =(
items in open menu almost non flicker, but menu bar still flickers
Comment 66 tommy27 2017-10-21 15:13:23 UTC
I just retested under Win8.1 x64 using last night 6.0.0.0 alpha1+ daily build.

(In reply to Mike Kaganski from comment #64)
> Also most possibly related (though maybe separate): try selecting text in
> Help-About with a mouse (with default rendering), and observe severe
> flickering - which remains after commit
> 01f674a95ddec76dc4c8ecfccdca1773657e47cb.

that's true. good catch.

(In reply to kompilainenn from comment #65)

> bug still repro in 
> Version: 6.0.0.0.alpha0+
> Build ID: a1f93eee75450c3ab6bc623bfad4f850260b86d0
> ...
> 
> effect is less, than it was, but it is =(
> items in open menu almost non flicker, but menu bar still flickers

bug is certainly improved in respect to 5.4.2 (where's is truly annoying) but it not smooth as 5.3.6 is.
Comment 67 Oliver Hartig 2017-10-21 15:45:30 UTC
Yes, with enabling Open GL the flickering is gone but the menu gets much slower, than without Open GL.
Comment 68 OfficeUser 2017-10-26 12:27:40 UTC
When will the fix be integrated to master?
Comment 69 Aron Budea 2017-10-26 12:47:57 UTC
(In reply to OfficeUser from comment #68)
> When will the fix be integrated to master?

It already is (note that it's not a complete fix, just the revert of a piece of code that made things worse compared to before, plus the original issue might only occur with some graphics cards/drivers):
https://cgit.freedesktop.org/libreoffice/core/commit/?id=01f674a95ddec76dc4c8ecfccdca1773657e47cb
Comment 70 Frederic Parrenin 2017-10-29 19:53:57 UTC
Debian 9 on a HP Elitebook 840 G2, LO 5.3.7.2.
The problem still exists for me.
Switching to OpenGL solves the issue, but then sometimes the menu bar and scrollbar becomes all black.
So I am still stuck with 5.2.7 for now.
Comment 71 matheus4551 2017-11-01 14:10:04 UTC
Confirmed on Windows 7, LO 5.4.2, nVidia GT 630. Switching to OpenGL solves the issue as well, but introduces heavy performance hit.
Comment 72 Telesto 2017-11-01 16:22:52 UTC
(In reply to matheus4551 from comment #71)
> Confirmed on Windows 7, LO 5.4.2, nVidia GT 630. Switching to OpenGL solves
> the issue as well, but introduces heavy performance hit.

Like my report: bug 113347 ? I'm still needing a conformation. So please test and report there.. Thanks
Comment 73 matheus4551 2017-11-01 18:03:04 UTC
(In reply to Telesto from comment #72)
> (In reply to matheus4551 from comment #71)
> > Confirmed on Windows 7, LO 5.4.2, nVidia GT 630. Switching to OpenGL solves
> > the issue as well, but introduces heavy performance hit.
> 
> Like my report: bug 113347 ? I'm still needing a conformation. So please
> test and report there.. Thanks

The entire UI gets laggy. Does it happens with you too?
Comment 74 Frederic Parrenin 2017-11-02 17:58:03 UTC
I remarked that on my debian 9 machine, when I use LO 5.4.2 from the backports repository (which uses the gtk3 library), the problem does not occur.
But when I use the version provided by libreoffice.org (which uses gtk2), the problem occurs.
Comment 75 tone90999 2017-11-08 03:01:21 UTC
Confirmed on 5.3.7.1 and 5,4.2.2, but I highly doubt it's not merely a problem for LibreOffice, but a problem caused by both software and hardware. 
Symptoms: 
On 5.3.7.1, it doesn't flicker, because OpenGL cannot be opened, even if the graphics card is not in the OpenGL blacklist. However, some font may be rendered very ugly (possibly due to the lack of OpenGL support). 
On 5.4.2.2, OpenGL can be enabled, but it lags very seriously when scrolling down the document, and the menu apparently flickers. Font rendering is smooth. 
I have also reported that with OpenGL enabled, the UI may get blurry, and a cursor may not click on button properly even if its position is right over the button. 

My computer: Dell XPS15 9550, with Intel i7-6700HQ, 16GB RAM, NVIDIA GTX960M. All display drivers updated to latest version possible. (I doubt if Dell has modified the integrated GPU, because the public display driver can't be installed)

P.S. On another Lenovo Y430P computer, with i5 4210M, NVIDIA GTX850M, version 5.4.2.2, no problem is seen. OpenGL can be enabled and everything runs smoothly except that UI responds slightly slower.
Comment 76 V Stuart Foote 2017-11-08 05:19:15 UTC
(In reply to tone90999 from comment #75)
> ...
> On 5.3.7.1, it doesn't flicker, because OpenGL cannot be opened, even if the
> graphics card is not in the OpenGL blacklist. However, some font may be
> rendered very ugly (possibly due to the lack of OpenGL support). 
> On 5.4.2.2, OpenGL can be enabled, but it lags very seriously when scrolling
> down the document, and the menu apparently flickers. Font rendering is
> smooth. 
> I have also reported that with OpenGL enabled, the UI may get blurry, and a
> cursor may not click on button properly even if its position is right over
> the button. 
> ...

Default rendering (Hardware Accelerated or CPU only) at 5.3.7 is routed back through GDI/GDI+ rendering, by the commit noted in comment 52 and comment 58. So, 5.3.2 -> 5.3.6 had a bad DirectWrite implementation for non-openGL rendering.

While commit for bug 113347 [1], to correct an implementation error with our DirectWrite font handling, has resolved some of the latency and clears up the font stamping and blurriness.

Please check OpenGL rendering with a current build of 6.0.0alpha1+ master > 2017-11-03, or the 5.4.4 build.

The original flickering issue as reported by Aron, comment 2, remains and is noticeable in a few areas of the UI, for example in the Help -> About dialog. But menu flickering is under control.

The obnoxious flickering of 5.3.2 -> 5.3.6 and sluggish OpenGL rendering are both resolved fixed, with proviso that as non-openGL rendering is again routed through DirectWrite for font handling with some future development, some issues may return.

@Aron, are you OK with closing this long issue and moving remaining issue of comment 0 & comment 2 to an enhancement request to implement double buffering for default rendering?

=-ref-=
[1] http://cgit.freedesktop.org/libreoffice/core/commit/?id=11459949e920fab6074bab85e3e1a748e9aee1ee
Comment 77 Aron Budea 2017-11-08 09:20:46 UTC
(In reply to V Stuart Foote from comment #76)
> @Aron, are you OK with closing this long issue and moving remaining issue of
> comment 0 & comment 2 to an enhancement request to implement double
> buffering for default rendering?

Okay, closing this as fixed related to the DW-regression.
I have opened bug 113714, but I'd like it to track the original issue as a whole, including the menu flickering, which I can still reproduce as before.