Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#954781: libqt5core5a: QT will not use Wayland on Gnome

117 views
Skip to first unread message

Norbert Lange

unread,
Mar 23, 2020, 8:30:03 AM3/23/20
to
Package: libqt5core5a
Version: 5.12.5+dfsg-9
Severity: normal

Dear Maintainer,

Runnin any QT Application on Gnome will blacklist Wayland. You see
the explicit message when starting an application from the terminal.

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

(for me this is really annoying as I have a HiDPI and a normal Monitor,
X11 doesnt allow different scaling).

Fedora considers QT 5.12+ ready to enable this by default, see the two used
pathes under [1], Section "Scope".

I'd hope debian could follow here, and use those patches in testing.

[1] - https://fedoraproject.org/wiki/Changes/Qt_Wayland_By_Default_On_Gnome

-- System Information:
Debian Release: bullseye/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.4.0-4-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages libqt5core5a depends on:
ii libc6 2.30-2
ii libdouble-conversion3 3.1.5-5
ii libgcc-s1 10-20200312-2
ii libglib2.0-0 2.64.1-1
ii libicu63 63.2-3
ii libpcre2-16-0 10.34-7
ii libstdc++6 10-20200312-2
ii zlib1g 1:1.2.11.dfsg-2

Versions of packages libqt5core5a recommends:
ii qttranslations5-l10n 5.12.5-1

Versions of packages libqt5core5a suggests:
ii libthai0 0.1.28-3

-- no debconf information

Dmitry Shachnev

unread,
Mar 23, 2020, 8:40:02 AM3/23/20
to
Control: forwarded -1 https://bugreports.qt.io/browse/QTBUG-68619

Hi Norbert!

On Mon, Mar 23, 2020 at 01:23:43PM +0100, Norbert Lange wrote:
> Runnin any QT Application on Gnome will blacklist Wayland. You see
> the explicit message when starting an application from the terminal.
>
> % wireshark
> Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
>
> (for me this is really annoying as I have a HiDPI and a normal Monitor,
> X11 doesnt allow different scaling).
>
> Fedora considers QT 5.12+ ready to enable this by default, see the two used
> pathes under [1], Section "Scope".
>
> I'd hope debian could follow here, and use those patches in testing.

The problem is that upstream Qt considers GNOME/Wayland support not yet ready.

There is an umbrella bug (QTBUG-68619) which depends on some other bugs.
At the moment only one of them is open (QTBUG-68636), so I think as soon
as someone fixes it, it will be possible to enable that support.

--
Dmitry Shachnev

Norbert Lange

unread,
Mar 23, 2020, 9:00:02 AM3/23/20
to
Thanks,

I guess I can always work around by setting the QT_QPA_PLATFORM variable.

And Ill be a bit ignorant and say that In my opinion, the testing flavor would
be a good testbed to find and iron out remaining issue.

In case of wireshark, I haven't found issues with menus (so far),
while the app running inadvertently under X11 causes issues (wrong
scaling, bad text).
So you might get bug reports based on those upstream issue either way ;)

Norbert

charle...@riseup.net

unread,
Oct 15, 2022, 10:10:03 PM10/15/22
to
Hi, Dmitry and other maintainers,

I've came accross this problem a couple months ago because I maintain a
QT application (Kristall). It was pretty hard to pinpoint the need to
install qtwayland5 to make everything work when setting the variable.
Besides the message displayed when running the program via cli, it also
goes to journalctl if running via Icon so users might be worried. To try
to help them, I created a bug against kristall [1] and I'm going to ship
a debian/README to explain the situation.

Thanks to sergiodj, we discovered this bug and that fedora is patching
qt base to run wayland natively in gnome since december of 2019 [2] - so
they've had a lot of time to test and find bugs. The rationale and
benefits are:

"Qt Wayland plugin has been available for a long time, but it hasn't
been in condition where it could be enabled by default. With Qt 5.12 the
state of the Wayland plugin is much better and it's becoming more and
more reliable. It now supports all the needed protocols and has been
enabled by default for non-Gnome Wayland sessions. With Qt Wayland on
Gnome Wayland session we need to support CSD, it's actually the only way
how decorations are going to work in Qt apps right now. Qt Wayland
implements basic decorations, which really doesn't match Gnome Adwaita
theme, therefore there are new CSD being implemented as part of
QGnomePlatform.

To make Qt applications run natively on Wayland we need to modify Qt 5,
specifically qt5-qtbase module, where we allow the Wayland plugin to be
used also for Gnome sessions. The new decorations from QGnomePlatform
will be used automatically once they are fully implemented and updated
in Fedora.

Qt applications running with the Wayland plugin run generally faster and
smoother on Wayland enabled sessions like Gnome Wayland and better
support HiDPI displays (respects desktop scale)."

On Mon, 23 Mar 2020 15:33:40 +0300 Dmitry Shachnev <mit...@debian.org>
wrote:
> On Mon, Mar 23, 2020 at 01:23:43PM +0100, Norbert Lange wrote:
> > Runnin any QT Application on Gnome will blacklist Wayland. You see
> > the explicit message when starting an application from the terminal.
> >
> > % wireshark Warning: Ignoring
> > XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to
> > run on Wayland anyway.
> >
> > (for me this is really annoying as I have a HiDPI and a normal
> > Monitor, X11 doesnt allow different scaling).
> >
> > Fedora considers QT 5.12+ ready to enable this by default, see the
> > two used pathes under [1], Section "Scope".
> >
> > I'd hope debian could follow here, and use those patches in testing.
>
> The problem is that upstream Qt considers GNOME/Wayland support not
> yet ready.
>
> There is an umbrella bug (QTBUG-68619) which depends on some other
> bugs. At the moment only one of them is open (QTBUG-68636), so I think
> as soon as someone fixes it, it will be possible to enable that
> support.

The QTBUG-68619 has been closed because QTBUG-68636 has also been
closed. But the latter has been fixed only in qt 6.2.3 so it won't be
extended to our current qt5 version. It seems to me that this bug is
pretty minor regarding its impact, and I found a lot of matchs in
Debian's bug db regarding the QT_QPA_PLATFORM [3].

That's why I'd like to know if you would consider changing the
qtwayland5 to Recommends or Depends in order to alleviate users burden
if they decide to run wayland natively via the envvar. It's also an
alternative to follow Fedora's approach, though I think the first option
would be preferred.

Thanks and best regards,
Charles

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1018251
[2]
https://fedoraproject.org/wiki/Changes/Qt_Wayland_By_Default_On_Gnome
[3]
https://www.mail-archive.com/search?q=QT_QPA_PLATFORM%3Dwayland&l=debian-bugs-dist%40lists.debian.org

Dmitry Shachnev

unread,
Oct 24, 2022, 3:51:36 AM10/24/22
to
Hi Charles!

On Sun, Oct 16, 2022 at 02:04:14AM +0000, charle...@riseup.net wrote:
> Hi, Dmitry and other maintainers,
>
> I've came accross this problem a couple months ago because I maintain a
> QT application (Kristall). It was pretty hard to pinpoint the need to
> install qtwayland5 to make everything work when setting the variable.
> Besides the message displayed when running the program via cli, it also
> goes to journalctl if running via Icon so users might be worried. To try
> to help them, I created a bug against kristall [1] and I'm going to ship
> a debian/README to explain the situation.
> [...]

Can you please test the Qt version from experimental and check if it works
good for you?

--
Dmitry Shachnev
signature.asc

Dmitry Shachnev

unread,
Nov 3, 2022, 11:10:05 AM11/3/22
to
Hi Carlos!

On Mon, Oct 31, 2022 at 06:55:49PM -0300, Carlos Henrique Lima Melara wrote:
> Took a little while, sorry. Last week was pretty busy. I managed to try
> it today. I will attach the terminal output in the end. So my feedback
> is below.
>
> 1. I wasn't able to reproduce the misplaced menus (QTBUG-68636) in
> unstable or experimental versions.

Me too, actually.

> 2. Your patch makes qt choose the wayland plugin on gnome's wayland
> session by default.

Good. It will reach unstable together with next transition, 5.15.7
or 5.15.8.

> 3. The only problem is that qtwayland5 wayland platform plugin is not
> installed by default in a clean install of debian so applications fail
> to run wayland natively (fallback to xcb).
>
> I think we would need the qtwayland5 installed by default when gnome is
> installed (since wayland is the default there). Do you know which
> package should Depends or Recommends qtwayland5 (maybe gnome-core or
> some other package)?

libqt5gui5 currently suggests it. Do you think it needs to be a
recommendation?

> The terminal output below shows 3 executions of kristall. The first was
> using the version from unstable. The second was using the experimental
> version - fallback to xcb because the wayland platform plugin wasn't
> installed. The third is using experimental's version after qtwayland5
> was installed.
>
> charles@debianSid-vm:~$ kristall
> Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
> defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.mediaplayer"
> Loaded 79 bytes of type "text" / "gemini"
> charles@debianSid-vm:~$ kristall
> qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""
> defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.mediaplayer"
> Loaded 79 bytes of type "text" / "gemini"
> charles@debianSid-vm:~$ kristall
> QSocketNotifier: Can only be used with threads started with QThread
> defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.mediaplayer"
> Loaded 79 bytes of type "text" / "gemini"
> ignoring 1 out of 1
> 2 0 "text/gemini"
> Loaded 1265 bytes of type "text" / "gemini"
> cache: pushing url QUrl("gemini://gemini.circumlunar.space/")
> ignoring 1 out of 1
> 2 0 "text/gemini"
> Loaded 350 bytes of type "text" / "gemini"
> cache: pushing url QUrl("gemini://gemini.circumlunar.space/news/")
> qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
> qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
> Loaded 79 bytes of type "text" / "gemini"

This is probably just debug output, does not indicate actual errors.

--
Dmitry Shachnev
signature.asc

Renato Gallo

unread,
Nov 3, 2022, 11:30:04 AM11/3/22
to
I think it should be more than a recommendation
0 new messages