Bug 135370 - LO does not refresh screen with Skia/Vulkan and nVidia cards
Summary: LO does not refresh screen with Skia/Vulkan and nVidia cards
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.0.0.1 rc
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.1.0 target:7.0.3
Keywords:
: 135357 136458 136990 137507 (view as bug list)
Depends on:
Blocks: Skia
  Show dependency treegraph
 
Reported: 2020-08-01 18:29 UTC by VistaMail1
Modified: 2020-12-01 16:59 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
fails to refresh (20.15 KB, image/png)
2020-08-01 18:30 UTC, VistaMail1
Details
WinDbg ST of 7.0.1.2 Writer hung when minimized and restored (20.32 KB, text/plain)
2020-09-24 18:28 UTC, V Stuart Foote
Details

Note You need to log in before you can comment on or make changes to this bug.
Description VistaMail1 2020-08-01 18:29:47 UTC
Description:
After having minimized my Writer, it seemed frozen.
This was not true!
It was just not refreshed.
Please check screenshots.

Steps to Reproduce:
see screenshots
HINT: in my case Writer was minimized to the taskline, before this occured.

Actual Results:
does not refresh display of document

Expected Results:
show me the document with the recent edits


Reproducible: Always


User Profile Reset: No



Additional Info:
[Information automatically included from LibreOffice]
Locale: de
Module: TextDocument
[Information guessed from browser]
OS: Windows (All)
OS is 64bit: no
Comment 1 VistaMail1 2020-08-01 18:30:52 UTC
Created attachment 163860 [details]
fails to refresh

the document looks frozen, but on reopen we see, that it is properly saved.
Comment 2 VistaMail1 2020-08-01 18:33:28 UTC
to add: it was a small document, which loads at sudden. And my PC is very fast. So it shall not be due to the content.
Comment 3 Telesto 2020-08-02 04:56:52 UTC
One time occurence reproducible. If reproducible add a document and some steps. I'm not totally unfamilair, with this kind of problem. However more info is needed to being able to solve this
Comment 4 Dieter 2020-08-02 14:35:53 UTC
(In reply to Telesto from comment #3)
> One time occurence reproducible. If reproducible add a document and some
> steps. I'm not totally unfamilair, with this kind of problem. However more
> info is needed to being able to solve this

=> NEEDINFO
Comment 5 VistaMail1 2020-08-03 07:29:06 UTC
"more info", "need info"...
not too helpful postings: Which info exactly? 

Please 
- take a writer-document by yourself and try to 
- open it
- minimize, keep minimized for a while and work on
- resize
- edit again
- check

Would be great, if you could share your own results with the community.
Such infos we need!
Comment 6 Telesto 2020-08-03 07:43:57 UTC
(In reply to VistaMail1 from comment #5)
> "more info", "need info"...
> not too helpful postings: Which info exactly? 
> 
> Please 
> - take a writer-document by yourself and try to 
> - open it
> - minimize, keep minimized for a while and work on
> - resize
> - edit again
> - check
> 
> Would be great, if you could share your own results with the community.
> Such infos we need!

Thanks for the reply: I'm maybe not specific enough
So this happens with any document, unrelated to the content? 
1. Open Writer; empty doc
2. minimize, keep minimized for a while and work on (you mean 10 minutes maybe; default auto save interval. Or Longer/ shorter
3. Restore
4. edit again
5. check

I assume this - mostly is -to be related to the content and/or or file format used. Attaching an example document your using showing the problematic behaviour would be really helpful to reduce the number of possibility's

https://wiki.documentfoundation.org/QA/Bugzilla/Sanitizing_Files_Before_Submission
Comment 7 VistaMail1 2020-08-03 08:10:54 UTC
"empty document" did not reproduce, it did not occur.

I had to save it by a name.
So this is the list to reproduce

open LO
click new document
file "save as.." as something.odt
minimise
resize
try to edit

=> problem
Comment 8 Telesto 2020-08-03 08:22:35 UTC
No repro for me
Version: 7.1.0.0.alpha0+ (x64)
Build ID: <buildversion>
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: ru-RU (nl_NL); UI: en-US
Calc: CL

Already tried resetting the user profile?
https://wiki.documentfoundation.org/UserProfile
Comment 9 VistaMail1 2020-08-03 13:45:19 UTC
I tried to reset profile and after this it worked again - once.
After those lucky cliks, I saw my annoying problem again.

I had chosed the reset profile suggestion, which has the first 2 items checked: reset configuration and reset extensions.

Version 7.0.0.2
Comment 10 Xisco Faulí 2020-08-03 15:38:24 UTC
Thanks for reporting this issue.
Could you please paste the info from Help - about LibreOffice ?

I have set the bug's status to 'NEEDINFO'. Please change it back to
'UNCONFIRMED' once the information has been provided
Comment 11 VistaMail1 2020-08-03 17:52:40 UTC
Version: 7.0.0.2 (x64)
Build ID: c01aa64b6c3d89ebe5fe69c28c7adb24eb85249c
CPU-Threads: 8; BS: Windows 10.0 Build 19041; UI-Render: Skia/Vulkan; VCL: win
Locale: de-AT (de_AT); UI: de-DE
Calc: CL
Comment 12 Telesto 2020-08-03 18:03:54 UTC
@VistaMail1
Sorry, for all the requests.. 

Next try -> tools -> Options -> LibreOffice(DEV) -> View -> Check Force Skia Raster rendering

Is the issue still present after this?
Comment 13 VistaMail1 2020-08-03 18:45:25 UTC
I am happy to help the community.


-> tools -> Options 
Unfortunately I cannot find such a menu (German version).
Tools? Nope.

I have an "extras" and a "writer-tools", but none of them has options with the 
mentioned sub-menu.
Can you kindly count whith tab to click in the top-line?
Or is there anywhere a command-prompt?
Comment 14 Telesto 2020-08-03 18:59:07 UTC
Extra -> Optionen -> LibreOffice -> Ansicht -> Grafikausgabe -> Rendern der Skia Software erzwingen.

Das letzte klingt ein bischen absurd "Rendern der Skia Software erzwingen"; aber das is nur meine Meinung :-)
Comment 15 VistaMail1 2020-08-04 08:56:58 UTC
@Telestro!!!
Deine Meinung ist richtig gut. Im besten Fall ist das Problem für mich damit behoben!

(= so many thanks to Telestro. In best of all cases, this may have solved it.)

I keep watching.

This I have to add:

- open document
- edit
- minimize
- resize
- edit on, worked fine

================

- open document
- edit
- save document (!!)
- minimize
- resize
- edit on, rendering problem


This is a snapshot. The next days will show, if the solution stays to be one.
Comment 16 Telesto 2020-08-04 09:44:41 UTC
@Luboš
This is about a Skia Vulkan quirk. It's apparently solved by switching to Raster. Not sure if you have some question for the initial poster.. I expect this type of issue being reported more often in the future (as i'm do see similar kinds of drawing issues, with my old and broken drivers)
Comment 17 Xisco Faulí 2020-08-04 11:30:10 UTC
*** Bug 135357 has been marked as a duplicate of this bug. ***
Comment 18 mvoit 2020-08-04 15:58:08 UTC
Hi,

I have this same issue on my desktop PC that has an nVidia GTX 750 Ti graphics card (drivers dated 2020-01-29) and Libreoffice 7.0.0.3 uses the Skia/Vulkan UI renderer.
I don't need to open an existing document or save a document. Just start Writer or Impress with an empty document, type something, minimize, then maximize is enough to freeze the document window.
Enabling "Force Skia software rendering" works fine as a workaround for this "quirk".

With Libreoffice 6.x this never happened, but I can't tell now if this system was actually using "Skia/Vulkan" as UI renderer back in Libreoffice 6.x.

The other components of Libreoffice 7 (Calc, Draw, etc.) do not seem to be affected by this bug.  

I have Libreoffice 7.0.0.3 installed on two more laptop computers with Intel graphics where Libreoffice uses the Skia/Raster UI renderer and there is no such problem.
Comment 19 VistaMail1 2020-08-04 17:41:41 UTC
interesting!
here: nVidia, GForce GT 730
Comment 20 Telesto 2020-08-05 08:52:39 UTC
(In reply to mvoit from comment #18)
> With Libreoffice 6.x this never happened, but I can't tell now if this
> system was actually using "Skia/Vulkan" as UI renderer back in Libreoffice
> 6.x.
Skia/Vulkan is a new feature 7.0
Comment 21 Luboš Luňák 2020-08-21 12:38:42 UTC
I cannot reproduce. Can somebody reproduce this on something else than Windows+nVidia?
Comment 22 Luboš Luňák 2020-09-07 14:38:54 UTC
*** Bug 136458 has been marked as a duplicate of this bug. ***
Comment 23 Luboš Luňák 2020-09-24 09:41:13 UTC
*** Bug 136990 has been marked as a duplicate of this bug. ***
Comment 24 V Stuart Foote 2020-09-24 18:28:59 UTC
Created attachment 165820 [details]
WinDbg ST of 7.0.1.2 Writer hung when minimized and restored

me to... Windows 10 (1909) 64-bit, en-US with

Version: 7.0.1.2 (x64)
Build ID: 7cbcfc562f6eb6708b5ff7d7397325de9e764452
CPU threads: 8; OS: Windows 10.0 Build 18363; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL

and recent masters (TB39 x86, TB77 x64)

RenderMethod: vulkan
Vendor: 0x10de
Device: 0xffe
API: 1.1.119
Driver: 442.296.0
DeviceType: discrete
DeviceName: Quadro K2000
Blacklisted: no

threads with nvoglv64, and nvopencl64 (more than I'd expect of these)--but main thread doesn't seem graphics related just vclplug_winlo!ImplSalYield()
Comment 25 Commit Notification 2020-09-29 07:58:40 UTC
Luboš Luňák committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/f8d6eb6f171dbcf7e3aa4afa0da32bd504f473dc

blacklist Windows/nVidia for Skia/Vulkan (tdf#135370, tdf#136036, tdf#136407)

It will be available in 7.1.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 26 Noel Grandin 2020-09-30 12:42:59 UTC
Can reproduce with 
   Windows 10
   GeForce GTX 1070
   Driver version 451.67
Definitely has something to do with the transition from minimized to not-minimised.
Comment 27 Commit Notification 2020-09-30 13:01:21 UTC
Luboš Luňák committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/3f7e5e0fa3916cfb80212969257bee58dae96c54

blacklist Windows/nVidia for Skia/Vulkan (tdf#135370, tdf#136036, tdf#136407)

It will be available in 7.0.3.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 28 mvoit 2020-10-04 18:48:53 UTC
For some reason blacklisting doesn't work for me with os="windows". I am running Windows 10. If I modify skia_blacklist_vulkan.xml to 
<entry os="10" vendor="nvidia">
    <device id="all"/>
</entry>
then Vulkan is disabled.

By the way, a note regarding the bug itself. 
I noticed if I do a 'minimize all' by clicking the small area at the right end of the Windows 10 taskbar and then restore the Libreoffice window, then the document window does not freeze, no matter how many times I try. 
If I minimize the Libreoffice window by clicking the "_" on the window itself and then restore it, it freezes at the first try.
Comment 29 VistaMail1 2020-10-07 15:12:44 UTC
to my mind, it does not freeze at all.
It only looks alike.

Do this:
On having thought a document frozen, type something.
Save the document.
Reopen it again.

For me the new text shows up.

So the problem in my case was one of rendering. This means: The text is accepted fine, but not shown.

The workaround can be found somewhere in the thread.
Comment 30 Luboš Luňák 2020-10-12 11:15:20 UTC
(In reply to mvoit from comment #28)
> For some reason blacklisting doesn't work for me with os="windows". I am
> running Windows 10. If I modify skia_blacklist_vulkan.xml to 
> <entry os="10" vendor="nvidia">
>     <device id="all"/>
> </entry>
> then Vulkan is disabled.

I cannot reproduce, if I try that (with "amd" for my system), even "windows" blacklists properly. Can you reproduce that problem also with a developer build (https://dev-builds.libreoffice.org/daily/master/)?
Comment 31 mvoit 2020-10-13 22:00:20 UTC
(In reply to Luboš Luňák from comment #30)

Hi,

I've just tried with the latest developer builds of 7.0.3.0 and 7.1.0.0 and blacklisting/denying nVidia in Windows with os="windows" works.


But this is interesting. If I remove nVidia from the deny list (and hence enable Skia/Vulkan) in the latest dev build of 7.1.0.0 from 2020-10-11 (Version: 7.1.0.0.alpha0+ (x64) Build ID: fca525d570f4fada3db1a9bbee2e88a5a02839d9) I am not able to get the graphics to freeze anymore.

To countercheck I downloaded and installed the oldest available dev build of 7.1.0.0 from 2020-09-29 (Build ID: 3c6177be2705303044e3de262689d593f3d0f282) and found that the Skia/Vulkan bug was still present.

Re-installed Build ID fca525d570f4fada3db1a9bbee2e88a5a02839d9 again and enabled Vulkan -> works fine for me.

Can you make something out of this? 
If it's of any help to you I would be willing to try out some more builds in between the two I mentioned.
Comment 32 Luboš Luňák 2020-10-16 08:10:05 UTC
I do not see any change between the two versions that looks like it would fix this, but if even, this is not the only problem that has led me to blacklisting nvidia. As long as bug #136036 and bug #136407 exist, it needs to stay that way. Can you reproduce those with the latest build?
Comment 33 V Stuart Foote 2020-10-16 13:56:28 UTC
*** Bug 137507 has been marked as a duplicate of this bug. ***
Comment 34 mvoit 2020-10-16 22:35:14 UTC
(In reply to Luboš Luňák from comment #32)

On my system I have never seen the "artifacts" or "garbled icons" as described in bug #136036 and bug #136407 with any version of LO 7.x, neither with the current version of the nVidia driver nor with the previous one. I cannot reproduce this bug.
Perhaps it only happens on some of nVidia's chipsets, but not all? 


Regarding the topic of this thread. 
I must have been bit too bored this evening :-) so I tried out some more dev builds and found that with 7.1.0.0.alpha0+ (x64) of 2020-10-06 and 2020-10-08 the graphics still freezes on minimize->maximize, but with the builds dated 2020-10-09 and 2020-10-10 I can't reproduce the problem anymore. So I guess one of the modifications made in Build ID 75030b3a2d4336c494fbe799fb809a37ed7e582f of 2020-10-09 must have the side effect of curing this problem, at least for me. 

The content of my skia.log from .\AppData\Roaming\LibreOfficeDev\4\cache:
RenderMethod: vulkan
Vendor: 0x10de
Device: 0x1380
API: 1.2.133
Driver: 452.24.0
DeviceType: discrete
DeviceName: GeForce GTX 750 Ti
Denylisted: no
Comment 35 Luboš Luňák 2020-11-13 15:17:50 UTC
It seems this has been worked around as a side effect of d18731f71c60cbb6c02cabb042004b1aa9454de8.
Comment 36 V Stuart Foote 2020-11-13 15:47:23 UTC
(In reply to Luboš Luňák from comment #35)
> It seems this has been worked around as a side effect of
> d18731f71c60cbb6c02cabb042004b1aa9454de8.

That or possibly the d18731f71c60cbb6c02cabb042004b1aa9454de8 commit, but think we're covered either way for Vulkan use on nVida GPUs with updated driver's API changes.
Comment 37 V Stuart Foote 2020-11-15 17:43:53 UTC
The loss of document control on minimize/maximize toggle is now being prevented 
for 7.0.3 by the denylist handling for nVidia GPU Vulkan rendering.  

Unfortunately it does not resolve with a driver version update as suggested bug 138145, and Vulkan rendering for nVidia GPUs with latest >= 257.36.0 still have this issue with the 7.0 release.

The minimize/maximize toggle loss of control is not evident on recent master against 7.1.0 builds [1].

=-ref-=
[1] containing
https://gerrit.libreoffice.org/c/core/+/104047
https://gerrit.libreoffice.org/c/core/+/105762
Comment 38 V Stuart Foote 2020-11-15 17:57:20 UTC
(In reply to V Stuart Foote from comment #37)
Loss of document control with minimize/maximize toggle with nVidia Vulkan rendering enabled.


for nVidia Driver Version with 27.21.14.5206 (2020-08-13)
=-=-=
Version: 7.0.2.2 (x64)
Build ID: 8349ace3c3162073abd90d81fd06dcfb6b36b994
RenderMethod: vulkan
Vendor: 0x10de
Device: 0x1380
API: 1.2.133
Driver: 452.24.0
DeviceType: discrete
DeviceName: GeForce GTX 750 Ti
Blacklisted: no


and for nVidia Driver Version 27.21.14.5730 (2020-11-07)
still issues of bug 135370 with
=-=-=
Version: 7.0.2.2 (x64)
Build ID: 8349ace3c3162073abd90d81fd06dcfb6b36b994
RenderMethod: vulkan
Vendor: 0x10de
Device: 0x1380
API: 1.2.142
Driver: 457.120.0
DeviceType: discrete
DeviceName: GeForce GTX 750 Ti
Blacklisted: no


no better on update LO to
Version: 7.0.3.1 (x64)
Build ID: d7547858d014d4cf69878db179d326fc3483e082
RenderMethod: vulkan
Vendor: 0x10de
Device: 0x1380
API: 1.2.142
Driver: 457.120.0
DeviceType: discrete
DeviceName: GeForce GTX 750 Ti
Blacklisted: yes
Comment 39 V Stuart Foote 2020-11-15 18:21:33 UTC
(In reply to V Stuart Foote from comment #37)
> ... with latest >= 257.36.0

s/257.36.0/457.36.0

=-ref-=
https://gerrit.libreoffice.org/c/core/+/105642