You are not logged in.

#1 2023-02-23 13:40:40

benm
Member
Registered: 2021-03-28
Posts: 69

[SOLVED] Visual bug in QML based GUIs (bug reported, workaround found)

I am facing a serious bug in the Nextcloud client where the rendering of the system tray window is invisible.

I have reported this issue to Nextcloud Github here.

https://github.com/nextcloud/desktop/issues/5443

This problem is present for me with the app in the official Arch repo and when I compile Nextcloud from source downloaded from Github, but it is not present in the AppImage provided by Nextcloud. I was able to edit the source code to find a workaround, but the fact that the AppImage is working makes me think there is something broken in the backend. I am looking for suggestions to see if there is something I should be checking on my end.

Last edited by benm (2023-03-04 19:19:53)

Offline

#2 2023-02-23 15:01:00

benm
Member
Registered: 2021-03-28
Posts: 69

Re: [SOLVED] Visual bug in QML based GUIs (bug reported, workaround found)

Based on some troubleshooting it appears this problem applies to other apps with QML GUIs as the problem showed up in KDE Kasts as well as Nextcloud.

https://bugs.kde.org/show_bug.cgi?id=466274

Editing the title of the original post.
Original title: Visual bug in Nextcloud desktop client

The Kasts dev was able to reproduce my issue by forcing software rendering: `QT_OPENGL=software QT_QUICK_BACKEND=software QML_SCENE_DEVICE=softwarecontext kasts &`

Last edited by benm (2023-02-23 15:02:33)

Offline

#3 2023-02-23 17:04:58

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,530
Website

Re: [SOLVED] Visual bug in QML based GUIs (bug reported, workaround found)

In the QT bug report you showed output indicating that whatever the output was for was running on XWayland, so this would describe why it is not able to use hardware rendering.

Also, both problematic apps you mention depend on qt5.  Do you have qt5-wayland installed?  Are you setting QT_QPA_PLATFORM=wayland?

EDIT: sorry, I could have sworn I saw something mentioning you were using wayland.  Please disregard this post.

Last edited by Trilby (2023-02-23 19:24:54)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#4 2023-02-23 17:17:31

benm
Member
Registered: 2021-03-28
Posts: 69

Re: [SOLVED] Visual bug in QML based GUIs (bug reported, workaround found)

Trilby wrote:

In the QT bug report you showed output indicating that whatever the output was for was running on XWayland, so this would describe why it is not able to use hardware rendering.

Also, both problematic apps you mention depend on qt5.  Do you have qt5-wayland installed?  Are you setting QT_QPA_PLATFORM=wayland?

When I have Display: x11 server: X.Org v: 21.1.7 with: Xwayland v: 22.1.8 does this mean that I am actually running Xwayland or that it is my version of Xwayland present in my X11 server? My understanding is that Xwayland is an X compatibility layer for running X11 apps in Wayland, but I am not using Wayland.

The video info I reported in the QT forum is from running inxi -Gxx so this should just be status information. I do have qt5-wayland installed, and I do not have QT_QPA_PLATFORM set (ECHO $QT_QPA_PLATFORM is empty).

In troubleshooting this error I have installed Wayland as it has been about a year since I last tried it and determined my setup was not ready for it. It's possible that qt5-wayland was left over installed from then but my aim is to be on X11 exclusively until wayland support is more mature.

Offline

#5 2023-02-23 17:29:07

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,738

Re: [SOLVED] Visual bug in QML based GUIs (bug reported, workaround found)

It doesn't mean that no. Can you post your xorg log and

glxinfo -B

from mesa-utils.

Offline

#6 2023-02-23 17:46:18

benm
Member
Registered: 2021-03-28
Posts: 69

Re: [SOLVED] Visual bug in QML based GUIs (bug reported, workaround found)

xorg log:

http://0x0.st/HsJR.txt

glxinfo -B:

name of display: :0
display: :0  screen: 0
direct rendering: Yes
Memory info (GL_NVX_gpu_memory_info):
    Dedicated video memory: 6144 MB
    Total available memory: 6144 MB
    Currently available dedicated video memory: 5749 MB
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: NVIDIA GeForce GTX 1060 6GB/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 525.89.02
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.6.0 NVIDIA 525.89.02
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)

OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 525.89.02
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

Offline

#7 2023-02-24 03:23:05

benm
Member
Registered: 2021-03-28
Posts: 69

Re: [SOLVED] Visual bug in QML based GUIs (bug reported, workaround found)

Update: I have discovered that in both Nextcloud Desktop and Kasts, I could work around the GUI bug with source code edits that effectively disabled an OpacityMask in QML.

Description: https://doc.qt.io/qt-5/qml-qtgraphicale … ymask.html

The documentation states: Note: This effect is available when running with OpenGL. This makes me wonder if my problem is being caused by OpenGL.As shown above I have OpenGL active.

I also have these packages installed pacman -Qs OpenGL

local/freeglut 3.4.0-1
    Provides functionality for small OpenGL programs
local/gl2ps 1.4.2-2
    an OpenGL to PostScript printing library
local/glew 2.2.0-6
    The OpenGL Extension Wrangler Library
local/glm 0.9.9.8-1
    C++ mathematics library for 3D software based on the OpenGL Shading Language (GLSL) specification
local/glslang 11.13.0-2
    OpenGL and OpenGL ES shader front end and validator
local/glu 9.0.2-3
    Mesa OpenGL utility library
local/lib32-glu 9.0.2-3
    Mesa OpenGL utility library (32 bits)
local/lib32-libepoxy 1.5.10-1
    Library handling OpenGL function pointer management
local/lib32-libglvnd 1.6.0-1
    The GL Vendor-Neutral Dispatch library
local/lib32-mesa 22.3.6-1
    An open-source implementation of the OpenGL specification (32-bit)
local/libepoxy 1.5.10-1
    Library handling OpenGL function pointer management
local/libglvnd 1.6.0-1
    The GL Vendor-Neutral Dispatch library
local/mesa 22.3.6-1
    An open-source implementation of the OpenGL specification
local/nvidia-utils 525.89.02-2
    NVIDIA drivers utilities
local/qt6-shadertools 6.4.2-1 (qt6)
    Provides functionality for the shader pipeline that allows Qt Quick to operate on Vulkan, Metal, and
    Direct3D, in addition to OpenGL

I am not sure how to further troubleshoot OpenGL because it seems clear that for whatever reason OpenGL or Qt5 is not honoring the opacity mask.

Offline

#8 2023-02-24 20:18:26

benm
Member
Registered: 2021-03-28
Posts: 69

Re: [SOLVED] Visual bug in QML based GUIs (bug reported, workaround found)

Is this an Arch Linux bug for the packaging of the QT libraries?

Offline

#9 2023-02-24 20:33:56

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,738

Re: [SOLVED] Visual bug in QML based GUIs (bug reported, workaround found)

Potentially, what kind of Qt version is used in the Appimage? Arch uses a community updated Qt5 port with some more patches, chances are there some regression there.

Offline

#10 2023-02-24 20:41:02

benm
Member
Registered: 2021-03-28
Posts: 69

Re: [SOLVED] Visual bug in QML based GUIs (bug reported, workaround found)

That is an excellent question. I have extracted the app image and can look at the files but I do not know how to check their versions.

Offline

#11 2023-02-24 21:00:54

benm
Member
Registered: 2021-03-28
Posts: 69

Re: [SOLVED] Visual bug in QML based GUIs (bug reported, workaround found)

I am not sure if I did the right thing but I ran

readelf -a -W ~/Applications/squashfs-root/linuxdeployqt-squashfs-root/usr/lib/libQt5Core.so.5

These were the results. I am not quite sure what I am looking at though.

http://0x0.st/HsEh.txt

Offline

#12 2023-02-24 21:49:12

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,738

Re: [SOLVED] Visual bug in QML based GUIs (bug reported, workaround found)

That's good enough, we have Qt_5.8 at most here while on Arch we are up to date on the current Qt_5.15(+ kde patches) so potentially a regression somewhere but these are quite a few versions to potentially sift through.

Offline

#13 2023-02-24 22:21:14

benm
Member
Registered: 2021-03-28
Posts: 69

Re: [SOLVED] Visual bug in QML based GUIs (bug reported, workaround found)

I am running a backup now before attempting, but I am assuming that the main test would be to downgrade some libraries.

Offline

#14 2023-02-25 12:22:06

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,738

Re: [SOLVED] Visual bug in QML based GUIs (bug reported, workaround found)

That'd generally be a bad idea as many things assume the current version, and while Qt5 should be backwards compatible I doubt it's forwards compatible trivially.

However something I recently noticed looking at my environment. Plasma currently sets QSG_RENDER_LOOP=basic to workaround a crashing bug. What happens if you unset that for kasts e.g.

QSG_RENDER_LOOP= kasts

Offline

#15 2023-02-25 14:37:38

benm
Member
Registered: 2021-03-28
Posts: 69

Re: [SOLVED] Visual bug in QML based GUIs (bug reported, workaround found)

I am assuming you mean

 QSG_RENDER_LOOP=basic kasts

vs

 QSG_RENDER_LOOP= kasts

But neither command made any impact. I looked up the command and also tried =threaded, and it also had no effect.

Offline

#16 2023-02-25 14:56:34

seth
Member
Registered: 2012-09-03
Posts: 51,229

Re: [SOLVED] Visual bug in QML based GUIs (bug reported, workaround found)

Offline

#17 2023-02-25 15:10:08

benm
Member
Registered: 2021-03-28
Posts: 69

Re: [SOLVED] Visual bug in QML based GUIs (bug reported, workaround found)

printenv
SHELL=/bin/bash
SESSION_MANAGER=local/solomon:@/tmp/.ICE-unix/1009,unix/solomon:/tmp/.ICE-unix/1009
WINDOWID=132120583
COLORTERM=truecolor
CSF_MDTVTexturesDirectory=/usr/share/opencascade/resources/Textures
XDG_CONFIG_DIRS=/home/ben/.config/kdedefaults:/etc/xdg
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session1
CSF_DrawPluginDefaults=/usr/share/opencascade/resources/DrawResources
LANGUAGE=
D_DISABLE_RT_SCREEN_SCALE=1
CSF_LANGUAGE=us
CSF_MIGRATION_TYPES=/usr/share/opencascade/resources/StdResource/MigrationSheet.txt
SHELL_SESSION_ID=ef8d81a2b1384eb5a33c16f7ec5d8a37
DESKTOP_SESSION=plasma
CSF_OCCTResourcePath=/usr/share/opencascade/resources
GTK_RC_FILES=/etc/gtk/gtkrc:/home/ben/.gtkrc:/home/ben/.config/gtkrc
XCURSOR_SIZE=24
CSF_STEPDefaults=/usr/share/opencascade/resources/XSTEPResource
EDITOR=/usr/bin/vim
GTK_MODULES=canberra-gtk-module:appmenu-gtk-module
XDG_SEAT=seat0
PWD=/home/ben/cloud/scripts
XDG_SESSION_DESKTOP=KDE
LOGNAME=ben
XDG_SESSION_TYPE=x11
DRAWHOME=/usr/share/opencascade/resources/DrawResources
SYSTEMD_EXEC_PID=1030
XAUTHORITY=/home/ben/.Xauthority
CSF_StandardLiteDefaults=/usr/share/opencascade/resources/StdResource
MOTD_SHOWN=pam
GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/home/ben/.gtkrc-2.0:/home/ben/.config/gtkrc-2.0
HOME=/home/ben
LANG=en_US.UTF-8
XDG_CURRENT_DESKTOP=KDE
KONSOLE_DBUS_SERVICE=:1.598
KONSOLE_DBUS_SESSION=/Sessions/1
PROFILEHOME=
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
INVOCATION_ID=a4a0a40076cd4f40ae08f1c5e1eaaacf
KONSOLE_VERSION=221202
MANAGERPID=926
CSF_ShadersDirectory=/usr/share/opencascade/resources/Shaders
CSF_EXCEPTION_PROMPT=1
CSF_XmlOcafResource=/usr/share/opencascade/resources/XmlOcafResource
KDE_SESSION_UID=1000
CSF_SHMessage=/usr/share/opencascade/resources/SHMessage
XDG_SESSION_CLASS=user
TERM=xterm-256color
USER=ben
COLORFGBG=15;0
CSF_StandardDefaults=/usr/share/opencascade/resources/StdResource
KDE_SESSION_VERSION=5
PAM_KWALLET5_LOGIN=/run/user/1000/kwallet5.socket
CSF_IGESDefaults=/usr/share/opencascade/resources/XSTEPResource
DISPLAY=:0
CSF_XCAFDefaults=/usr/share/opencascade/resources/StdResource
SHLVL=1
XDG_VTNR=1
CSF_PluginDefaults=/usr/share/opencascade/resources/StdResource
UBUNTU_MENUPROXY=1
CSF_TObjMessage=/usr/share/opencascade/resources/TObj
XDG_SESSION_ID=2
CASROOT=/usr
XDG_RUNTIME_DIR=/run/user/1000
DEBUGINFOD_URLS=https://debuginfod.archlinux.org
QT_AUTO_SCREEN_SCALE_FACTOR=0
JOURNAL_STREAM=8:24245
CSF_XSMessage=/usr/share/opencascade/resources/XSMessage
XCURSOR_THEME=Vimix-dark
MMGT_CLEAR=1
XDG_DATA_DIRS=/home/ben/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share
KDE_FULL_SESSION=true
PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/brlcad-bin/bin:/var/lib/flatpak/exports/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
CSF_TObjDefaults=/usr/share/opencascade/resources/StdResource
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
KDE_APPLICATIONS_AS_SCOPE=1
MAIL=/var/spool/mail/ben
DRAWDEFAULT=/usr/share/opencascade/resources/DrawResources/DrawDefault
OLDPWD=/home/ben
KONSOLE_DBUS_WINDOW=/Windows/1
_=/usr/bin/printenv

Seth, I am assuming you posted the VLC issue because of the mention the QT_QUICK_BACKEND=software, which was raised by kasts dev. For testing, I have tried =software, =rhi, and =openvg and each retained the same problem.

Offline

#18 2023-02-25 15:16:47

seth
Member
Registered: 2012-09-03
Posts: 51,229

Re: [SOLVED] Visual bug in QML based GUIs (bug reported, workaround found)

Would have been too easy.

Since you've a hybrid graphics system, do you face the same behavior when running on the intel chip?

Offline

#19 2023-02-25 15:28:43

benm
Member
Registered: 2021-03-28
Posts: 69

Re: [SOLVED] Visual bug in QML based GUIs (bug reported, workaround found)

seth wrote:

Would have been too easy.

Since you've a hybrid graphics system, do you face the same behavior when running on the intel chip?

Not sure as I exclusively use the Nvidia. When I built this desktop, I started without a dedicated GPU years back and added the nvidia later which is why I got an intel with integrated graphics. I saw your other thread on switching graphics but this appears to be geared towards laptops over desktops. https://bbs.archlinux.org/viewtopic.php?id=273085

Offline

#20 2023-02-25 15:42:16

seth
Member
Registered: 2012-09-03
Posts: 51,229

Re: [SOLVED] Visual bug in QML based GUIs (bug reported, workaround found)

Not sure as I exclusively use the Nvidia

Not according to the xorg log - you're running on the nvidia GPU and the output is attached there, but the IGP is still active.
If you can, entirely disable the IGP - alternatively try to run on it.

Maybe we also have a look at "qtdiag-qt5" (or qtdiag6, if those are Qt6 processes)

Offline

#21 2023-02-25 16:19:32

benm
Member
Registered: 2021-03-28
Posts: 69

Re: [SOLVED] Visual bug in QML based GUIs (bug reported, workaround found)

I remembered that in my troubleshooting over the last few days that I ran nvidia-xconfig, so I was suspicious that intel graphics really were still starting. So I archived my old Xorg logs and rebooted to make sure I was getting fresh logs. Based on the new log, it appears to not have any intel graphics loaded. I am not experienced reading xorg logs but the initially posted log had iris in it and the new log does not, so that makes me think that nvidia-xconfig handled that.

http://0x0.st/HsGV.txt

qtdiag-qt5 gives me this output.

http://0x0.st/HsGW.txt

This suggests to me that Qt5 believes my setup supports OpenGL hardware rendering.

Offline

#22 2023-02-25 21:33:51

seth
Member
Registered: 2012-09-03
Posts: 51,229

Re: [SOLVED] Visual bug in QML based GUIs (bug reported, workaround found)

For a rather quick test, you could try to run it in a xephyr session, which will get you llvm/mesa rendering (instead of nvidia)

Offline

#23 2023-02-26 13:43:24

benm
Member
Registered: 2021-03-28
Posts: 69

Re: [SOLVED] Visual bug in QML based GUIs (bug reported, workaround found)

Smart. Kasts is still broken in xephyr

Offline

#24 2023-02-28 03:03:14

benm
Member
Registered: 2021-03-28
Posts: 69

Re: [SOLVED] Visual bug in QML based GUIs (bug reported, workaround found)

Seth, is there a method to take the known-working libs from the appimage of Nextcloud and use them with Kasts in order to narrow down which ones are the problem?

Offline

#25 2023-02-28 07:28:38

seth
Member
Registered: 2012-09-03
Posts: 51,229

Re: [SOLVED] Visual bug in QML based GUIs (bug reported, workaround found)

https://superuser.com/questions/1301583 … n-appimage
You can then LD_PRELOAD them or add them to LD_LIBRARY_PATH and that will make kasts crash for pretty much sure - Qt 5.8 is from 6 years ago and if the toolchain (and glibc) is equally old it'll be massively incompatible w/ a recent build of kasts.

https://invent.kde.org/groups/qt/-/issues - I kinda don't like that the kasts author AND vlc need to enforce the software rasterizer to get there, but that's on unspecified Qt versions as well.
You could try the behavior w/ a different user account and outside a KDE session or maybe just

QT_STYLE_OVERRIDE= QT_QPA_PLATFORMTHEME=gtk3 XDG_CURRENT_DESKTOP= kasts

Offline

Board footer

Powered by FluxBB