Bug 160757 - cant start libre office except in safe mode (Skia / Vulkan)
Summary: cant start libre office except in safe mode (Skia / Vulkan)
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
24.2.2.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Skia
  Show dependency treegraph
 
Reported: 2024-04-21 03:05 UTC by colourfuldesu
Modified: 2024-04-25 13:26 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
idk, just export of openGL viewer (9.13 KB, application/x-7z-compressed)
2024-04-22 22:46 UTC, colourfuldesu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description colourfuldesu 2024-04-21 03:05:33 UTC
Description:
cant start libre office except in safe mode

Steps to Reproduce:
1. open libreOffice from start menu
2. saw bit of vague libreOffice splash screen but without the image, just the shadow of it
3. gone, didn't even start

Actual Results:
I cant start libreOffice

Expected Results:
I can start libreOffice


Reproducible: Always


User Profile Reset: Yes

Additional Info:
https://imgur.com/a/LcE6t3z
Comment 1 Julien Nabet 2024-04-21 09:12:04 UTC
Could you give a try at https://wiki.documentfoundation.org/QA/FirstSteps
Comment 2 V Stuart Foote 2024-04-21 13:44:55 UTC
The screen capture looks to show a Skia / Vulkan rendering fail on first launch, with fall back to Skia / raster framing of software rendering (as provided in Safe mode launch).

Follow the first steps to launch with Skia / Vulkan accelerated GPU disabled by checking the 'Force Skia software rendering'mode.
Comment 3 colourfuldesu 2024-04-22 05:19:52 UTC
Sorry for the horrible video quality, i'll avoid that website after this.

I̶ ̶m̶a̶n̶a̶g̶e̶d̶ ̶t̶o̶ ̶f̶i̶x̶ ̶i̶t̶ ̶b̶y̶ ̶l̶a̶u̶n̶c̶h̶i̶n̶g̶ ̶L̶i̶b̶r̶e̶O̶f̶f̶i̶c̶e̶ ̶i̶n̶ ̶S̶a̶f̶e̶ ̶M̶o̶d̶e̶ ̶>̶ ̶C̶o̶n̶f̶i̶g̶u̶r̶e̶ ̶>̶ ̶D̶i̶s̶a̶b̶l̶e̶ ̶H̶a̶r̶d̶w̶a̶r̶e̶ ̶A̶c̶c̶e̶l̶e̶r̶a̶t̶i̶o̶n̶.̶ ̶T̶h̶i̶s̶ ̶s̶o̶l̶u̶t̶i̶o̶n̶ ̶w̶o̶r̶k̶s̶.̶ ̶N̶o̶w̶ ̶I̶ ̶c̶a̶n̶ ̶l̶a̶u̶n̶c̶h̶ ̶L̶i̶b̶r̶e̶O̶f̶f̶i̶c̶e̶.̶

https://youtu.be/iMHoW9Fr7oc I am just confused

Here I upload video. Redo the problem starts at 0:50, LibreOffice cant start, shows splash screen without image and just never starts.

1:20, Settings > View, Use Skia for all rendering checked but not forced. OK, LibreOffice cant launch. Then I try to forced Skia but the option didn't apply regardless.

1:55, The Solution. So I Disable hardware acceleration on safe mode. Now LibreOffie can launch.

2:05, If I do above, Forced Skia and hardware acceleration is enabled this time. It is quite irony where the button does opposite.

Whatever it is, atleast I can launch LibreOffice. Here's my system info:
Ryzen 5 5600H
RX 5500M, 24.3.1 (Wed 13 Feb 2024)
Windows 11 23H2
MSI Bravo 15 B5DD
Comment 4 V Stuart Foote 2024-04-22 13:45:54 UTC
Your new video shows the issue is with the Skia / Vulkan accelerated vector graphics failing graphics testing on startup.

After that failure, relaunch or next launch will be with Vulkan GPU acceleration disabled.

The "Force Skia software rendering" still uses the Skia libs to control GPU but shifts to a raster frame based rendering.

Unchecking both Skia related items, reverts to GDI based graphics rendering. That can be CPU only or Hardware accelerated. So there are actually four (4) rendering paths.

The Safe Mode... dialog is a little unclear. When it launches it opens with GDI rendering, with Hardware Acceleration controlled by CPU. 

IIUC the 'Configure' section to 'Disable hardware acceleration (OpenGL, OpenCL, Vulkan)' will shift from Vulkan vector to raster frame based GPU--but is more directed to not use OpenCL for Calc formulas or OpenGL calls in Impress animations.

And of course resetting to Factory settings and restarting sends you back through the GPU test loops.

There is a QA/dev option to denylist specific GPU hardware and Vulkan driver combinations.  That prevents the initial testing of the GPU with Skia Vulkan calls and launches directly into Skia lib raster frame mode.

We would need the content of the skia.log from %APPDATA%\LibreOffice\4\cache
when the Vulkan details are written. Something like this (from my nVidia GPU)

RenderMethod: vulkan
Vendor: 0x10de
Device: 0x1380
API: 1.3.277
Driver: 552.48.0
DeviceType: discrete
DeviceName: NVIDIA GeForce GTX 750 Ti
Denylisted: no

But can't use it if your skia.log says:
RenderMethod: raster
Compiler: Clang

Which will happen when the Vulkan graphics tests fail, then on restart you fall back to skia raster rendering--or if you have forced raster rendering from the Tools -> Options -> View panel

Please post what you have, or can figure out for your GPU and Vulkan driver.
We have found the GLView utility [1] from realtech-vr.com to provide usable details.

=-ref-=
[1] https://www.realtech-vr.com/home/?page_id=1402
Comment 5 colourfuldesu 2024-04-22 22:46:18 UTC
Created attachment 193809 [details]
idk, just export of openGL viewer
Comment 6 colourfuldesu 2024-04-22 22:48:07 UTC
If LibreOffice can launch, the cache says:
RenderMethod: raster
Compiler: Clang

Oterwise:
RenderMethod: vulkan
Vendor: 0x1002
Device: 0x1638
API: 1.3.260
Driver: 2.0.279
DeviceType: integrated
DeviceName: AMD Radeon(TM) Graphics
Denylisted: no

https://imgur.com/a/UaoYutK
Comment 7 V Stuart Foote 2024-04-23 00:40:26 UTC
Pertinent details from the GLview 7.0 run 7-zip archive, in attachment 193809 [details]

For some reason, system is reporting two GPUs to GLview:

<Device/>
<deviceName>AMD Radeon(TM) Graphics</deviceName>
<apiVersion>1.3.260</apiVersion>
<deviceID>1638</deviceID>
<vendorID>1002</vendorID>
<driverVersion>2.0.279</driverVersion>

and oddly, also

<Device/>
<deviceName>Radeon RX 5500M</deviceName>
<apiVersion>1.3.277</apiVersion>
<deviceID>7340</deviceID>
<vendorID>1002</vendorID>
<driverVersion>2.0.299</driverVersion>

resources assigned to the first are minimal, while the second Radeon RX 5500M should be primary APU for this laptop.

The "successful" LO launch/skia.log is for the first generic Radeon Graphics device. So could be Vulkan calls passed into that GPU are causing the assert/fallback.

Not apparent that our simple deny list process can accommodate?  Meanwhile, edit the LO user profile 'registrymodifications.xcu' [1] and set the Skia stanzas UseSkia and ForceSkiaRaster to "True" [2]


=-ref-=
[1] defaults into user %APPDATA%  so normally C:\Users\<username>\AppData\Roaming\LibreOffice\4\User
[2] these stanzas in the .XCU to force Skia / raster rendering
<item oor:path="/org.openoffice.Office.Common/VCL"><prop oor:name="UseSkia" oor:op="fuse"><value>true</value></prop></item>
<item oor:path="/org.openoffice.Office.Common/VCL"><prop oor:name="ForceSkiaRaster" oor:op="fuse"><value>true</value></prop></item>
Comment 8 V Stuart Foote 2024-04-23 01:01:44 UTC
(In reply to V Stuart Foote from comment #7)
> Pertinent details from the GLview 7.0 run 7-zip archive, in attachment
> 193809 [details]
> 
> For some reason, system is reporting two GPUs to GLview:
> 

OK, this makes more sense now. The Ryzen 5 5600H APU has integrated graphics, and the laptop also has discrete GPU Radeon RX 5500M (Navi 14).

So you can use the AMD Radeon Settings and use the "Switchable Graphcis" tab to assign the LibreOffice program (soffice.exe/soffice.bin) to always run in "High Performance". Restart, verify the settings. Then launch LibreOffice again.

May still get the graphics test assert and fallback, but you should be able to manually adjust the LibreOffice profile for 'UseSkia' and 'ForceSkiaRaster' to check behavior with Skia / Vulkan rendering or forced Skia / Raster rendering.

Please test and let us know.
Comment 9 V Stuart Foote 2024-04-23 01:03:55 UTC
(In reply to V Stuart Foote from comment #8)
> Please test and let us know.

And if you can get the Radeon RX 5500M (Navi 14) to come up in Vulkan rendering mode, as listed in the skia.log, please post that here.
Comment 10 colourfuldesu 2024-04-25 10:23:22 UTC
https://youtu.be/lXYnAcrZVzI

I tested a bit, if I disable "use skia for all rendering", I can launch LibreOffice just as if I enable "use skia for all rendering" and "force skia software rendering" but this time 0:20, I cant launch LibreOffice if I just disable skia at all

0:40 then I try to using dgpu then switch to igpu, no change

1:20 I enable force skia through config and LibreOffice can launch

so the fix is if I disable skia, it launch. If I enable skia AND force skia, it launch. but I need to do the 2nd solution to make libre launch with disabled skia.

somehow if I force enable skia in safe mode, the settings just reverts back that I need to configure it though config file.

I dont know how do I make my dgpu RX5500M came up in vulkan mode, I would prefer it to be the other igpu for battery life reasons

sorry for the late reply, iam just really lazy in college hahaha
Comment 11 colourfuldesu 2024-04-25 10:24:51 UTC Comment hidden (off-topic)
Comment 12 Julien Nabet 2024-04-25 12:34:26 UTC Comment hidden (off-topic)
Comment 13 V Stuart Foote 2024-04-25 13:26:49 UTC
(In reply to colourfuldesu from comment #10)
> https://youtu.be/lXYnAcrZVzI
> 
> I tested a bit, if I disable "use skia for all rendering", I can launch
> LibreOffice just as if I enable "use skia for all rendering" and "force skia
> software rendering" but this time 0:20, I cant launch LibreOffice if I just
> disable skia at all
> 
> 0:40 then I try to using dgpu then switch to igpu, no change
> 
> 1:20 I enable force skia through config and LibreOffice can launch
> 
> so the fix is if I disable skia, it launch. If I enable skia AND force skia,
> it launch. but I need to do the 2nd solution to make libre launch with
> disabled skia.
> 
> somehow if I force enable skia in safe mode, the settings just reverts back
> that I need to configure it though config file.
> 
> I dont know how do I make my dgpu RX5500M came up in vulkan mode, I would
> prefer it to be the other igpu for battery life reasons
> 
> sorry for the late reply, iam just really lazy in college hahaha

The "Switchable Graphics" of making LibreOffice a High Performance is not helping as the Skia Vulkan rendering for the dGPU is failing graphics tests just as the iGPU on the APU is.

Simply put, it looks like you will not be able to run LibreOffice with Skia / Vulkan vector shaders. Might improve with an AMD Vulkan driver change, or not.

Otherwise, stay out of the SafeMode for doing configuration--it doesn't persist. And, your LibreOffice install behaves as expected.  

Editing the registrymodification.xcu to copy in the UseSkia and ForceSkiaRaster stanzas at the 1:18 mark is all that you need.

Edit to toggle the ForceSkiaRaster "True" at 5:10 mark is where you need to be for running LibreOffice.

You can edit it to "False" to test the Vulkan rendering (with either GPU set from "Switchable Graphics"). And if/when the Vulkan graphics tests fail, the stanza will be reset to "True"--leaving you with UseSkia and ForceSkiaRaster both true.

You can set both "False" to force GDI rendering paths, non-Skia.

To be able to denylist your AMD RX 5500M dGPU (which actually only avoids running the Vulkan graphics testing and sets ForceSkiaRaster) we add the device and Vulkan driver details to the denylist. We have both the iGPU, and dGPU details in comment 7 from GLview, just a little reluctant to deny both as we've had other OpenGL era and Vulkan issues with AMD "Switchable Graphics" (Adrenaline, or Win10/11 integrated) and nVidia "Optimus" (nVidia control panel, or Win10/11 integrated).

So, I think you are good for now--but check your drivers from time to time and see if Vulkan behaves.

Setting => NAB as the Skia tests are doing what they should, and we can't really control the Vulkan driver support per GPU.

p.s. -- noticed you have the Java based Nonlinear Solver extension enabled in your install, you can uncheck it in the install wizard and that will save several seconds of config during LO launch.