Bug 503487

Summary: Help pages and rkward welcome page don't render correctly
Product: [Applications] rkward Reporter: d_tassos
Component: User InterfaceAssignee: RKWard Team <rkward-devel>
Status: RESOLVED FIXED    
Severity: normal CC: d_tassos, thomas.friedrichsmeier
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Manjaro   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Screenshot of rkward welcome screen showing the garbled rendering.
Console output when starting system rkward or appimage without or without GPU

Description d_tassos 2025-04-28 17:49:39 UTC
Created attachment 180740 [details]
Screenshot of rkward welcome screen showing the garbled rendering.

SUMMARY
 When I open RKward the welcome page as well as any help pages I open for example using ?cut do not render correctly. Script files (*R, *Rmd) render OK.

STEPS TO REPRODUCE
1. Open Rkward.
2. If welcome page is active then it is not rendered correctly.
3. Open a help page for a function for example ?cut and it will not be rendered correcty.

OBSERVED RESULT

Garbled output, see attached screenshot.

EXPECTED RESULT

Should see correctly rendered readable html files.

Operating System: Manjaro Linux 
KDE Plasma Version: 6.3.4
KDE Frameworks Version: 6.12.0
Qt Version: 6.9.0
Kernel Version: 6.12.21-4-MANJARO (64-bit)
Graphics Platform: Wayland


ADDITIONAL INFORMATION
---Problem description---
Please fill in the missing bits *in English*.

Please give a brief summary on the problem:
###Please fill in###

What - in detail - did you do directly before you encountered this problem?
###Please fill in###

When you try to repeat the above, does the problem occur again (no, sometimes, always)?
###Please fill in###

If applicable: When doing the same thing in an R session outside of RKWard, do you see the same problem?
###Please fill in###

Do you have any further information that might help us to track this problem down? In particular, if applicable, can you provide sample data and sample R code to reproduce this problem?
###Please fill in###

RKWard is available in many different packagings, and sometimes problems are specific to one method of installation. How did you install RKWard (which file(s) did you download)?
###Please fill in###


---Session Info---
-- Frontend --
RKWard version: 0.8.1z+0.8.2+devel1
KDE Frameworks version (runtime): 6.12.0
KDE Frameworks version (compile time): 6.12.0
Qt version (runtime): 6.9.0
Qt version (compile time): 6.9.0
Using QWebEngine for HTML rendering
Running on: Manjaro Linux
Local config directory: /home/user/.config
RKWard storage directory: /home/user/.rkward/
Backend version (as known to the frontend): 4.4.3

Debug message file (this may contain relevant diagnostic output in case of trouble):
/tmp/rkward.frontend

-- Backend --
Debug message file (this may contain relevant diagnostic output in case of trouble):
/tmp/rkward.rbackend

R version (compile time): 4.4.3  (2025-02-28 r87843)

R runtime session info:
R version 4.4.3 (2025-02-28)
Platform: x86_64-pc-linux-gnu
Running under: Manjaro Linux

Matrix products: default
BLAS:   /usr/lib/libblas.so.3.12.0 
LAPACK: /usr/lib/liblapack.so.3.12.0

locale:
 [1] LC_CTYPE=en_US.UTF-8          LC_NUMERIC=C                 
 [3] LC_TIME=sv_SE.UTF-8           LC_COLLATE=en_US.UTF-8       
 [5] LC_MONETARY=sv_SE.UTF-8       LC_MESSAGES=en_US.UTF-8      
 [7] LC_PAPER=sv_SE.UTF-8          LC_NAME=sv_SE.UTF-8          
 [9] LC_ADDRESS=sv_SE.UTF-8        LC_TELEPHONE=sv_SE.UTF-8     
[11] LC_MEASUREMENT=sv_SE.UTF-8    LC_IDENTIFICATION=sv_SE.UTF-8

time zone: Europe/Stockholm
tzcode source: system (glibc)

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] rkward_0.8.2

loaded via a namespace (and not attached):
[1] compiler_4.4.3 tools_4.4.3    grid_4.4.3     lattice_0.22-7
Comment 1 Thomas Friedrichsmeier 2025-04-29 13:29:06 UTC
Thanks for reporting! From your description, this seems to affect pages that are rendered using QWebEngine, internally.

Do you see this using the AppImage of RKWard, or another method of installation? If the latter, can you reproduce it with the AppImage (https://cdn.kde.org/ci-builds/education/rkward/master/linux/ for latest builds)?

Did this work correctly on the same system, previously? If so, can you perhaps pin it to an update of RKWard / Qt / KDE frameworks?
Comment 2 d_tassos 2025-04-29 15:11:56 UTC
Running the appimage then everything seems OK.

I very recently updated Manjaro which I think brought in new versions of QT and plasma frameworks.

Rkward has been working fine until the last couple of days. I previously had Rkward installed using the "rkward 0.8.0-1" from AUR which started showing this problem. I then replaced it with "rkward-git v0.7.3.r614.g006263f89-1" also from AUR which has the same problem.

I just updated my laptop, also running Manjaro and saw that it indeed brought a new version of QT6, including the webengine. However, it is not showing the same problem, very peculiar.
Comment 3 d_tassos 2025-04-29 15:27:45 UTC
Running rkward from a terminal on my desktop I get the bellow errors:

[29690:29766:0429/172312.423623:ERROR:vaapi_wrapper.cc(1243)] Empty codec maximum resolution
[29690:29766:0429/172312.423657:ERROR:vaapi_wrapper.cc(1153)] FillProfileInfo_Locked failed for va_profile VAProfileJPEGBaseline and entrypoint VAEntrypointVLD

While I don't get any errors on my laptop where rkward runs fine.
Comment 4 Thomas Friedrichsmeier 2025-04-29 17:09:36 UTC
So, if I understand correctly, you have:

Desktop PC, using system Qt, KF5 based version of RKWard: BROKEN
Desktop PC, using AppImage: works
Laptop, using system Qt: works
Laptop, using AppImage: works

Right? To me this seems to point to a problem with the Manjaro QWebEngine packages. As you diagnosed further, this seems to be related to hardware acceleration, specifically. To confirm this, you could try running RKWard with

  QTWEBENGINE_CHROMIUM_FLAGS="--disable-gpu" rkward

Via the same environment variable, you can also set some logging options (e.g. "--enable-logging --log-level=0 --v=1"; see https://doc.qt.io/qt-6/qtwebengine-debugging.html) which might help pinpointing further differences esp. between the AppImage build and the system Qt. My first guess is that QWebEngine hardware acceleration is broken and blacklisted on your desktop GPU, but the Manjaro Qt package may fail to respect the blacklist.
Comment 5 Thomas Friedrichsmeier 2025-04-29 17:11:05 UTC
> Desktop PC, using system Qt, KF5 based version of RKWard: BROKEN

(Actually both KF5-based version (0.7.3) and KF6-based version (0.8.0) seem to be broken)
Comment 6 d_tassos 2025-05-02 16:16:15 UTC
Created attachment 180884 [details]
Console output when starting system rkward or appimage without or without GPU
Comment 7 d_tassos 2025-05-02 16:16:31 UTC
I tested this :

> QTWEBENGINE_CHROMIUM_FLAGS="--disable-gpu" rkward

on my desktop PC with discreet GPU and that fixes it, so the welcome page for example looks as it normally does. So indeed, it seems that when the qtwebengine uses the GPU then it is garbled.

I actually have two laptops, one with intel + igpu and one AMD + igpu and on both those system rkward works OK. I haven't tried the appimage or the above command on those since there are no problems there.

I have attached a text file with the console output when I start the rkward-git from AUR or the appimage, both with or without disabling the GPU in case that would be of any help.
Comment 8 Thomas Friedrichsmeier 2025-05-03 20:57:34 UTC
Ok, thanks. I do not see a smoking gun, however, or at least I do not recognize one. All working conditions seem to log (given line number differs when using the system lib):

> gpu_init.cc(1079)] Vulkan disabled or failed to initialize

Unfortunately, I can neither see any details why AppImage disables GPU/Vulkan, nor do I see anything standing out in the log of the broken condition (except that it's remarkably short, for some reason?).

One additional thing you may want to check is running chromium on your desktop machine (qwebengine essentially just warps chromium, though not necessarily in the same version), and enter "chrome://gpu/" in the navigation bar. I do guess it will show "Vulkan disabled" among a lot of other info, as I suspect is needed for correct rendering, there.

Going forward, for RKWard I suppose, I will add an easier way to turn off webengine GPU support, to make it easier to work around this problem. However, the actual bug to address is going to be in the QWebEngine package in your distribution, so you should report the problem, there.
Comment 9 d_tassos 2025-05-27 14:06:16 UTC
Sorry for the very long time to respond, I haven't worked much on my desktop recently.

Anyway, I checked the chrome://gpu/ and indeed the vulcan was disabled as it was on both my laptops that are working fine.

However, there was an update recently for my distribution and one of the many packages that were updated was the qtwebengine. Now things work again as normal. Don't know if it was the updated qtwebengine that did it or something else though.

Thanks a lot for the effort of helping to poinpoint the origin of the problem.
Comment 10 Thomas Friedrichsmeier 2025-06-04 17:23:24 UTC
Thanks for the feedback. Closing this, then.