Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warnings when starting QGIS (on linux) #46031

Open
2 tasks done
rduivenvoorde opened this issue Nov 14, 2021 · 7 comments
Open
2 tasks done

Warnings when starting QGIS (on linux) #46031

rduivenvoorde opened this issue Nov 14, 2021 · 7 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Build/Install Related to compiling or installing QGIS

Comments

@rduivenvoorde
Copy link
Contributor

What is the bug or the crash?

When starting (self compiled) QGIS master OR 3.22 I get the following warning in my terminal:

Info: Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.

From https://forum.qt.io/topic/126731/what-is-this-warning I concluded that I had to change my start script and added:

export QT_QPA_PLATFORM=wayland
export XDG_SESSION_TYPE=

Which 'solved' it. I'm not sure if this is some relict of my (older) desktop setup or if others also encounter this (apparently safe) warning.

Another warning I only have with master, NOT with 3.22 is:

Warning: QSocketNotifier: Can only be used with threads started with QThread
Stacktrace (piped through c++filt):
/home/richard/bin/qgis_/master/debug/bin/qgis(+0xe24c)[0x55f7ac69e24c]

Googling brought me: https://forum.qt.io/topic/29587/solved-qsocketnotifier-can-only-be-used-with-threads-started-with-qthread
which tells me it has something todo with QFileSystemWatcher and with not using 'start' on a Thread...

Not sure if this is only me, or if this is a potential issue?

Steps to reproduce the issue

Start QGIS from command line, setting some environment vars in bash like below:

#!/usr/bin/env bash

export QT_QPA_PLATFORM=wayland
export XDG_SESSION_TYPE=
export QGIS_PREFIX_PATH=/home/richard/bin/qgis_/master/debug
# see https://qtibia.com/how-to-setup-pycharm-for-qgis-development-under-linux-and-windows/
export PYTHONPATH=$QGIS_PREFIX_PATH/share/qgis/python/plugins:$QGIS_PREFIX_PATH/share/qgis/python:/home/richard/bin/pycharm_/debug-eggs/pydevd-pycharm.egg

export LD_LIBRARY_PATH=$QGIS_PREFIX_PATH/lib:/usr/lib:/usr/lib/grass78/lib
# with Oracle
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/oracle/instantclient_19_9/

# from https://www.qtcentre.org/threads/70250-QMYSQL-Driver-not-Loaded-there-are-no-driver-Available-on-the-QSqlDatabase
# show debug for qt plugins
QT_DEBUG_PLUGINS=0

export QGIS_DEBUG=0
# passing ALL parameters to qgis bin
# eg to be able to call a certain translation
# qgis --lang nl
#gdb /home/richard/bin/qgis_/master/debug/bin/qgis "$@"
/home/richard/bin/qgis_/master/debug/bin/qgis "$@"

Versions

QGIS version 3.23.0-Master QGIS code revision 637e5ca
Qt version 5.15.2
Python version 3.9.8
GDAL/OGR version 3.3.3
PROJ version 8.2.0
EPSG Registry database version v10.038 (2021-10-21)
GEOS version 3.10.1-CAPI-1.16.0
SQLite version 3.36.0
PostgreSQL client version unknown
SpatiaLite version 5.0.1
QWT version 6.1.4
QScintilla2 version 2.11.6
OS version Debian GNU/Linux bookworm/sid

and

QGIS version 3.22.0-Białowieża QGIS code revision 95f7829
Qt version 5.15.2
Python version 3.9.7
Compiled against GDAL/OGR 3.3.2 Running against GDAL/OGR 3.3.3
Compiled against PROJ 8.1.1.%3.%4 Running against PROJ 8.2.0
EPSG Registry database version v10.038 (2021-10-21)
Compiled against GEOS 3.10.0-CAPI-1.16.0 Running against GEOS 3.10.1-CAPI-1.16.0
SQLite version 3.36.0
PostgreSQL client version 14.0 (Debian 14.0-1)
SpatiaLite version 5.0.1
QWT version 6.1.4
QScintilla2 version 2.11.6
OS version Debian GNU/Linux bookworm/sid
       
This copy of QGIS writes debugging output.
       

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

  • I tried with a new QGIS profile

Additional context

No response

@rduivenvoorde rduivenvoorde added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Nov 14, 2021
@gioman gioman added the Build/Install Related to compiling or installing QGIS label Nov 14, 2021
@nyalldawson
Copy link
Collaborator

I wouldn't recommend running qgis under a Wayland session at all. Qt 5 doesn't have great support for Wayland sessions.

@rduivenvoorde
Copy link
Contributor Author

Are you sure? https://doc.qt.io/qt-5/wayland-and-qt.html does not mention that we should not, and in most Distro's I think Wayland/Gnome is more or less mainstream?

$ apt search wayland | grep qt

fcitx5-frontend-qt5/testing,testing,now 5.0.7-2 amd64 [installed,automatic]
gambas3-gb-qt5-wayland/testing,testing 3.16.3-2 amd64
layer-shell-qt/testing,testing 5.23.2-1 amd64
libfcitx5-qt-data/testing,testing,now 5.0.7-2 all [installed,automatic]
libfcitx5-qt-dev/testing,testing 5.0.7-2 amd64
libfcitx5-qt1/testing,testing,now 5.0.7-2 amd64 [installed,automatic]
liblayershellqtinterface-dev/testing,testing 5.23.2-1 amd64
liblayershellqtinterface5/testing,testing 5.23.2-1 amd64
libqt5waylandclient5/testing,testing,now 5.15.2-4 amd64 [installed,automatic]
libqt5waylandclient5-dev/testing,testing 5.15.2-4 amd64
libqt5waylandcompositor5/testing,testing,now 5.15.2-4 amd64 [installed,automatic]
libqt5waylandcompositor5-dev/testing,testing 5.15.2-4 amd64
qml-module-qtwayland-client-texturesharing/testing,testing 5.15.2-4 amd64
qml-module-qtwayland-compositor/testing,testing 5.15.2-4 amd64
qtwayland5/testing,testing,now 5.15.2-4 amd64 [installed,automatic]
qtwayland5-dev-tools/testing,testing 5.15.2-4 amd64
qtwayland5-doc/testing,testing,now 5.15.2-4 all [installed,automatic]
qtwayland5-doc-html/testing,testing 5.15.2-4 all
qtwayland5-examples/testing,testing 5.15.2-4 amd64
qtwayland5-private-dev/testing,testing 5.15.2-4 amd64

@nyalldawson
Copy link
Collaborator

Yep -- there's a lot of unsolved issues, even on current Qt versions. Just scroll through https://pointieststick.com/category/this-week-in-kde/ and you'll see that KDE is STILL working to a usable version under Wayland, and a lot of the issues they work on are upstream.

@Paltis96
Copy link

Looks like Xorg is going to be removed from the codebase in some distributions. Red hut is going to remove it in the 40 Fedora release...

@firefoxlover
Copy link

I wouldn't recommend running qgis under a Wayland session at all. Qt 5 doesn't have great support for Wayland sessions.

I use Fedora KDE with Wayland only since a year or so. Qt perfectly works in Wayland.

Yes @Paltis96 this is important. To be fair, Xwayland will still be there, which is what QGis currently runs in (on Fedora it does not, but displays a warning about incomplete features).

Is there some documentation about what is actually missing? As a beginner I would have no idea, forcing XWayland currently to avoid any issues though.

@nyalldawson
Copy link
Collaborator

Qt perfectly works in Wayland.

As an example: try dragging a panel or a toolbar -- you'll end up with a broken application state that can't be fixed on Wayland.

This particular one is fixed in qt6/KDE plasma 6 Wayland sessions, but not qt5 or qt6/gnome yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Build/Install Related to compiling or installing QGIS
Projects
None yet
Development

No branches or pull requests

6 participants