Created attachment 189111 [details] Writer with Skia enabled Since upgrading to 7.6.0.3 I have a green background instead of a transparent background for interface elements. With Skia disabled, there's no issue. Attached 2 screenshots, one with Skia enabled, one with Skia disabled. Software / Hardware MacOS 10.15.7 (19H2026) MacBook Pro (16", 2019) 2,6 GHz Intel Core i7 16 Go ram AMD Radeon Pro 5300M 4 Go Intel UHD Graphics 630 1536 Mo
Created attachment 189112 [details] Writer with Skia disabled
*** Bug 157149 has been marked as a duplicate of this bug. ***
Confirmed by duplicate. Marking as a regression, hopefully someone can bibisect. Can you test version 7.6.1 and see if it's still reproduced? It's currently a pre-release at the bottom of the page: https://www.libreoffice.org/download/download-libreoffice/ Thank you.
As for me, 7.6.1.2 does not affected by the issue reported. Everything is fine.
(In reply to CTAC from comment #4) > As for me, 7.6.1.2 does not affected by the issue reported. > > Everything is fine. Ah, let's close as "works for me" then, as we haven't identify what fixed it. Hurri39, can you confirm that it is fixed for you too in 7.6.1 ?
Created attachment 189527 [details] Writer 7.6.1.2 with Skia enabled
(In reply to Stéphane Guillou (stragu) from comment #5) > (In reply to CTAC from comment #4) > > As for me, 7.6.1.2 does not affected by the issue reported. > > > > Everything is fine. > > Ah, let's close as "works for me" then, as we haven't identify what fixed it. > > Hurri39, can you confirm that it is fixed for you too in 7.6.1 ? Sorry but bug is still here with 7.6.1.2 See last attached screenshot.
I believe that this bug is a duplicate of https://bugs.documentfoundation.org/show_bug.cgi?id=145988. That bug was fixed in the master builds to version m116 whereas the LibreOffice 7.6 builds use the older Skia version m111. @Hurri39: there are two different "Skia enabled" states: Skia/Metal and Skia/Raster. That other bug only occurred when Skia/Metal, not Skia/Raster, was enabled so can you enable Skia/Raster by selecting the LibreOffice > Preferences menu item and, in the dialog that appears, click on LibreOffice > View, check both of the following checkboxes, and restart: - Use Skia for all rendering - Force Skia software rendering When both are checked (i.e. Skia/Raster is enabled) to the bug stop occurring? If yes, then that would be a good indication that this bug is the same bug as https://bugs.documentfoundation.org/show_bug.cgi?id=145988.
(In reply to Patrick Luby from comment #8) > I believe that this bug is a duplicate of > https://bugs.documentfoundation.org/show_bug.cgi?id=145988. That bug was > fixed in the master builds to version m116 whereas the LibreOffice 7.6 > builds use the older Skia version m111. > > @Hurri39: there are two different "Skia enabled" states: Skia/Metal and > Skia/Raster. That other bug only occurred when Skia/Metal, not Skia/Raster, > was enabled so can you enable Skia/Raster by selecting the LibreOffice > > Preferences menu item and, in the dialog that appears, click on LibreOffice > > View, check both of the following checkboxes, and restart: > > - Use Skia for all rendering > - Force Skia software rendering > > When both are checked (i.e. Skia/Raster is enabled) to the bug stop > occurring? If yes, then that would be a good indication that this bug is the > same bug as https://bugs.documentfoundation.org/show_bug.cgi?id=145988. Yes, you're right. Forcing software rendering is OK Issue only occurs when using Skia/Metal.
Could Hurri and CTAC also please check that a master build with Skia/Metal works well? https://dev-builds.libreoffice.org/daily/master/current.html CTAC says that using Skia/Raster did not make a difference in bug 157149, and no repro in 7.6.1.2 in comment 4, so I am a bit confused...
please tell me, which version should I try: macOS MacOSX-aarch64@tb92-TDF 2023-09-12 15:47:06 MacOSX-x86_64@tb92-TDF 2023-09-11 17:00:41 MacOSX-aarch64@tb94-TDF 2023-09-13 05:26:55 MacOSX-x86_64@tb94-TDF 2023-09-13 03:50:44 on MacBookPro i9 + Intel UHD Graphics 630 1536 Mb ?????
(In reply to CTAC from comment #11) > please tell me, which version should I try: The most recent one that matches your architecture (I believe it's x86_64 for you)
Created attachment 189545 [details] Issue with Skia/Metal on developper release
(In reply to Stéphane Guillou (stragu) from comment #10) > Could Hurri and CTAC also please check that a master build with Skia/Metal > works well? > https://dev-builds.libreoffice.org/daily/master/current.html > > CTAC says that using Skia/Raster did not make a difference in bug 157149, > and no repro in 7.6.1.2 in comment 4, so I am a bit confused... Issue is still there on developper release with Skia/Metal enabled (see screenshot "Issue with Skia/Metal on developper release" )
As I can see, 24.2.0.0.alpha0+ (X86_64) does not show bug with SKIA disabled and show with SKIA enabled. With SKIA enabled, whole screen of the MacOS flics to black for a second when starts LibreOffice. Preferences does not save checkbox settings of the SKIA configuration after restart. Can't find how to attach screenshots with checboxes/green garbage on the screen.
Created attachment 189547 [details] Dev 24.0.0.2 SKIA=on
Created attachment 189548 [details] Dev 24.0.0.2 SKIA=off
(In reply to CTAC from comment #15) > With SKIA enabled, whole screen of the MacOS flics to black for a second > when starts LibreOffice. > @CTAC: so there are actually two types of "Skia enabled" settings so I would like to know which of the two is set. While running the 24.2 nightly build with Skia enabled, can you select the LibreOfficeDev > About LibreOfficeDev menu and, in the dialog that appears, click on the button next to the "Version Information" text in the center of the dialog. This should copy detailed information including the Skia setting so paste the data into comment in this bug like below: Version: 24.2.0.0.alpha0+ (AARCH64) / LibreOffice Community Build ID: 798de29936b9a0c618bd31629936a4c836429e90 CPU threads: 8; OS: Mac OS X 12.6.8; UI render: Skia/Raster; VCL: osx Locale: en-US (en_US.UTF-8); UI: en-US Calc: threaded
I'm not sure that this will help you: Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 43df1237a091e2b0f4495d5a7e959f7beaab025d CPU threads: 16; OS: Mac OS X 10.15.7; UI render: default; VCL: osx Locale: ru-RU (ru_RU.UTF-8); UI: en-US Calc: threaded (NO green garbage, Use hardware acceleration OFF, Use Skia for all rendering OFF, Force Skia software rendering DISABLED/OFF) Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 43df1237a091e2b0f4495d5a7e959f7beaab025d CPU threads: 16; OS: Mac OS X 10.15.7; UI render: Skia/Metal; VCL: osx Locale: ru-RU (ru_RU.UTF-8); UI: en-US Calc: threaded (WITH green garbage, Use hardware acceleration DISABLED/OFF, Use Skia for all rendering ON, Force Skia software rendering OFF) Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 43df1237a091e2b0f4495d5a7e959f7beaab025d CPU threads: 16; OS: Mac OS X 10.15.7; UI render: Skia/Raster; VCL: osx Locale: ru-RU (ru_RU.UTF-8); UI: en-US Calc: threaded (NO green garbage, Use hardware acceleration DISABLED/OFF, Use Skia for all rendering ON, Force Skia software rendering ON) Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 43df1237a091e2b0f4495d5a7e959f7beaab025d CPU threads: 16; OS: Mac OS X 10.15.7; UI render: default; VCL: osx Locale: ru-RU (ru_RU.UTF-8); UI: en-US Calc: threaded (NO green garbage, Use hardware acceleration ON, Use Skia for all rendering OFF, Force Skia software rendering OFF)
(In reply to CTAC from comment #19) > (NO green garbage, Use hardware acceleration OFF, Use Skia for all rendering > OFF, Force Skia software rendering DISABLED/OFF) > > (WITH green garbage, Use hardware acceleration DISABLED/OFF, Use Skia for > all rendering ON, Force Skia software rendering OFF) > > (NO green garbage, Use hardware acceleration DISABLED/OFF, Use Skia for all > rendering ON, Force Skia software rendering ON) Thank you for the data. This is exactly what I was looking for. From the above, this bug only occurs with Skia/Metal. This confirms to me that you have found another case of https://bugs.documentfoundation.org/show_bug.cgi?id=145988. In that other bug, we found that Skia/Metal (that is, Skia draws directly to machine's GPU) does not work with some GPU models on Intel Macs. LibreOffice's recent upgrade to a newer version of Skia fixed that other bug, but it appears that there are still some GPUs that Skia/Metal will still not work with. So now that we know Skia/Raster works when Skia/Metal does not, one possibility is to force LibreOffice to run Skia/Raster when Skia/Metal is first loaded if we can detect that your GPU is likely not to work. I need to do some more research to come up with a way to identify if a machine has your GPU. I will post again when I have more news to report.
@Hurri39 and @CTAC: After thinking about this bug, I am wondering if this bug is due to an uncaught error. Can you do the following steps?: 1. Launch LibreOffice 7.6 or a recent nightly build. 2. Verify that Skia/Metal is enabled by selecting the LibreOffice > About LibreOffice menu item. If Skia/Metal is enabled, the "User Interface" line in the About dialog should contain "Skia/Metal". 3. Open an empty Writer document and after you see this bug occur, select the LibreOffice > About LibreOffice menu item again. In step 3, does the the "User Interface" line in the About dialog change to "Skia/Raster" or is it still "Skia/Metal"?
(In reply to Patrick Luby from comment #21) > @Hurri39 and @CTAC: > > After thinking about this bug, I am wondering if this bug is due to an > uncaught error. Can you do the following steps?: > > 1. Launch LibreOffice 7.6 or a recent nightly build. > > 2. Verify that Skia/Metal is enabled by selecting the LibreOffice > About > LibreOffice menu item. If Skia/Metal is enabled, the "User Interface" line > in the About dialog should contain "Skia/Metal". > > 3. Open an empty Writer document and after you see this bug occur, select > the LibreOffice > About LibreOffice menu item again. > > In step 3, does the the "User Interface" line in the About dialog change to > "Skia/Raster" or is it still "Skia/Metal"? Just tested. Skia/Metal is still indicated for me. But I noticed something. After resizing the window, the bug disappears for this window. It's clean. Re-Opening this window or opening a new one brings back the green background.
(In reply to Hurri39 from comment #22) > Just tested. > Skia/Metal is still indicated for me. > > But I noticed something. > After resizing the window, the bug disappears for this window. It's clean. > Re-Opening this window or opening a new one brings back the green background. It is very interesting that after resizing, the bug does not occur. I will need to think about this and see if I can come up with some theory as to why the drawing in a newly opened window fails but redrawing to the same window works.
I recently fixed Skia bug https://bugs.documentfoundation.org/show_bug.cgi?id=157312. The fix for that bug probably unrelated to this bug, but still I am curious if the other bug fix causes any change to this bug. Can you install this morning's (25 September 2023) nightly master build and see if the areas that have green background have changed when using Skia/Metal? Also, does the window still redraw without any green background when you resize the window?
(In reply to Patrick Luby from comment #24) > I recently fixed Skia bug > https://bugs.documentfoundation.org/show_bug.cgi?id=157312. The fix for that > bug probably unrelated to this bug, but still I am curious if the other bug > fix causes any change to this bug. > > Can you install this morning's (25 September 2023) nightly master build and > see if the areas that have green background have changed when using > Skia/Metal? > > Also, does the window still redraw without any green background when you > resize the window? Just tested and no changes with the developper nightly release. Resizing the windows is giving the same result. I'll try to attached a video showinf that.
Created attachment 189830 [details] Video of issue with Skia Metal using developper nightly release
(In reply to Hurri39 from comment #26) > Created attachment 189830 [details] > Video of issue with Skia Metal using developper nightly release Thank you for the video. One thing that caught my eye is when you moved the mouse over the "Calc Spreadsheet" button in the Start Center, that button gets filled with green when you move the mouse to another button. This seems like it might be an easier case to debug so I will try to find the drawing commands that are being called when the mouse leaves one of these buttons. I am hoping that some very specific drawing commands such as "invert drawn pixels" cause this bug. Can you try running the nightly master build from the Terminal using the following steps?: 1. Open the Terminal application and run the following command: /Applications/LibreOfficeDev.app/Contents/MacOS/soffice 2. In the Start Center window, move your mouse over the "Calc Spreadsheet" button and then move your mouse over "Writer Document" button. 3. After you see the "Calc Spreadsheet" button get filled with green, copy any messages in the Terminal window into a comment in this bug.
(In reply to Patrick Luby from comment #27) > (In reply to Hurri39 from comment #26) > > Created attachment 189830 [details] > > Video of issue with Skia Metal using developper nightly release > > Thank you for the video. One thing that caught my eye is when you moved the > mouse over the "Calc Spreadsheet" button in the Start Center, that button > gets filled with green when you move the mouse to another button. This seems > like it might be an easier case to debug so I will try to find the drawing > commands that are being called when the mouse leaves one of these buttons. I > am hoping that some very specific drawing commands such as "invert drawn > pixels" cause this bug. > > Can you try running the nightly master build from the Terminal using the > following steps?: > > 1. Open the Terminal application and run the following command: > > /Applications/LibreOfficeDev.app/Contents/MacOS/soffice > > 2. In the Start Center window, move your mouse over the "Calc Spreadsheet" > button and then move your mouse over "Writer Document" button. > > 3. After you see the "Calc Spreadsheet" button get filled with green, copy > any messages in the Terminal window into a comment in this bug. Nothing happens in the terminal until I Quit the app. Then I get this : warn:sal.osl.pipe:3553:163275:sal/osl/unx/pipe.cxx:353: shutdown() failed: ENOTCONN warn:sal.osl.pipe:3553:163372:sal/osl/unx/pipe.cxx:389: accept() failed: ECONNABORTED
(In reply to Hurri39 from comment #28) > Nothing happens in the terminal until I Quit the app. > Then I get this : > warn:sal.osl.pipe:3553:163275:sal/osl/unx/pipe.cxx:353: shutdown() failed: > ENOTCONN > warn:sal.osl.pipe:3553:163372:sal/osl/unx/pipe.cxx:389: accept() failed: > ECONNABORTED Looks like Skia is silently failing so I will continue looking at how the Start Center buttons are redrawn after they receive a "mouse leave". I will post again when I have some news.
While debugging, I found a small Skia bug that may have something in common with this bug: after drawing a native control (i.e. a push button or a toolbar background), the native control's pixel buffer is immediately deleted. But with Skia/Metal, those pixels may still be needed since Skia/Metal may render the pixel buffer asynchronously. So, to fix this particular bug, I have committed the following patch that keeps a native control's pixel buffer alive until Skia says it is safe to delete it: https://gerrit.libreoffice.org/c/core/+/157333 The above patch will be in tomorrow's (28 September 2023) nightly master build. Does anything change in the Start Center buttons or Writer toolbar due to the above patch?
(In reply to Patrick Luby from comment #30) > While debugging, I found a small Skia bug that may have something in common > with this bug: after drawing a native control (i.e. a push button or a > toolbar background), the native control's pixel buffer is immediately > deleted. But with Skia/Metal, those pixels may still be needed since > Skia/Metal may render the pixel buffer asynchronously. So, to fix this > particular bug, I have committed the following patch that keeps a native > control's pixel buffer alive until Skia says it is safe to delete it: > > https://gerrit.libreoffice.org/c/core/+/157333 > > The above patch will be in tomorrow's (28 September 2023) nightly master > build. Does anything change in the Start Center buttons or Writer toolbar > due to the above patch? Just tried the new nightly build. But without success. Still the same behavior.
(In reply to Hurri39 from comment #31) > Just tried the new nightly build. > But without success. Still the same behavior. At this point, I am guessing that this bug is deep within the Skia semi-transparent bitmap blending code. I am no expert on Apple's Metal APIs, but it seems that the latest versions of Skia no longer support Metal for one or more GPUs when running macOS Catalina. I see from your original comment that you are running macOS Catalina. Are you able to reboot into macOS Big Sur on your machine or any other machine that suffers from this bug? If yes, do you also see this bug in macOS Big Sur? If no, then I can write a patch that forces LibreOffice to run Skia/Raster whenever Skia/Metal is selected.
I'm using Catalina because some software I need cannot run on BigSur, sorry. I'll keep my seetings to software rendering.
(In reply to Hurri39 from comment #33) > I'm using Catalina because some software I need cannot run on BigSur, sorry. > I'll keep my seetings to software rendering. No problem. I was just curious if this bug also occurs on Big Sur or not. For now, I'll assume that this bug only occurs on Catalina. LibreOffice already has a list of configurations that are known to not work well with Skia/Vulkan (the Linux equivalent of Skia/Metal). If a configuration is in that list, LibreOffice will silently check the "Force Skia software rendering" the checkbox and use Skia/Raster. So, I can fix this bug by adding macOS Catalina to the list of incompatible Skia/Metal configurations.
Patrick Luby committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/fe3fa1699f12eb007d26bbb19f5ff80826bc384f tdf#156881 Disable Metal with AMD Radeon Pro 5XXX GPUs on macOS Catalina It will be available in 24.2.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.
I have committed a fix that should silently switch to Skia/Raster if your settings are set to Skia/Metal and you are running macOS Catalina with an AMD Radeon Pro 5300M or 5500M GPU. My fix should be in tomorrow's (02 October 2023) master nightly build. Does anyone still see the green drawing artifacts the Start Center buttons or Writer toolbar due to the above patch when using Skia/Metal? If the fix does *not* work on your machine, can you run the nightly build in the Terminal using the following command?: /Applications/LibreOfficeDev.app/Contents/MacOS/soffice You should see a "Default MTLDevice is" message in the Terminal like the following when Skia is enabled. Can you paste that message into this bug?: warn:vcl.skia:1627:7493086:vcl/quartz/cgutils.mm:105: Default MTLDevice is "Apple M1 Pro"
(In reply to Patrick Luby from comment #36) > I have committed a fix that should silently switch to Skia/Raster if your > settings are set to Skia/Metal and you are running macOS Catalina with an > AMD Radeon Pro 5300M or 5500M GPU. > > My fix should be in tomorrow's (02 October 2023) master nightly build. Does > anyone still see the green drawing artifacts the Start Center buttons or > Writer toolbar due to the above patch when using Skia/Metal? > > If the fix does *not* work on your machine, can you run the nightly build in > the Terminal using the following command?: > > /Applications/LibreOfficeDev.app/Contents/MacOS/soffice > > You should see a "Default MTLDevice is" message in the Terminal like the > following when Skia is enabled. Can you paste that message into this bug?: > > warn:vcl.skia:1627:7493086:vcl/quartz/cgutils.mm:105: Default MTLDevice is > "Apple M1 Pro" Just tested nightly build. It's OK ! You can change this bug report to RESOLVED if you want to.
(In reply to Hurri39 from comment #37) > Just tested nightly build. > It's OK ! > You can change this bug report to RESOLVED if you want to. Excellent! I will also submit this patch for the next version of LibreOffice 7.6.
Patrick Luby committed a patch related to this issue. It has been pushed to "libreoffice-7-6": https://git.libreoffice.org/core/commit/16b1a4a820d1273246eb6483f74320c90f5de4b2 tdf#156881 Disable Metal with AMD Radeon Pro 5XXX GPUs on macOS Catalina It will be available in 7.6.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.
verified as per https://bugs.documentfoundation.org/show_bug.cgi?id=156881#c37