Wayland/weston, Qt and RDP connection...

Matti Ristimäki Matti.Ristimaki at planmeca.com
Fri Jan 13 20:07:07 UTC 2023


Hi,



Thanks for the reply!



Jep, this might be the reason...

> --modules=systemd-notify.so --modules=screen.share.so

This might be a long shot but it is screen-share.so (hyphen).





We did try the RDP-weston -session this way too...



1.

Running RDP-weston -session manually via terminal and after that forcing weston-smoke to the RDP-weston -session.



First weston rdp-backend command via terminal. Notice, that here the "--modules=screen-share.so" is written correctly: (And after that WAYLAND_DISPLAY=wayland-0 is running...)



weston --backend=rdp-backend.so --modules=screen-share.so --rdp-tls-cert=/data/etc/ssh/tls.crt --rdp-tls-key=/data/etc/ssh/tls.key



2.

Opening RDP session from the remote computer...still "empty" screen as it should be.



[cid:image001.png at 01D92798.8B720D00]





3.

Forcing weston-smoke to the RDP-weston -session with below command.

root at sm2s-imx8mp:/opt/cpx# WAYLAND_DISPLAY=wayland-0 weston-smoke



Aaand it works like a charm!

weston-smoke appears to the RDP-weston -session and "smoke animation is alive" when mouse is hovered from the remote computer via RDP:



[cid:image002.png at 01D92798.8B720D00]





4.

However...



When driving the Qt GUI in RDP-weston -session, it gives a bit different failure code:



/opt/cpx/cpx.sh: line 84:   943 Segmentation fault      ./cpx --rotate=0 "$@"





Done same way than weston-smoke...forced Qt GUI to be started in the RDP-weston -session using below command:

root at sm2s-imx8mp:~# WAYLAND_DISPLAY=wayland-0 /opt/cpx/cpx.sh

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



root at sm2s-imx8mp:~# WAYLAND_DISPLAY=wayland-0 /opt/cpx/cpx.sh

qt.core.logging: Loading "logging.ini" ...

qt.core.plugin.factoryloader: checking directory path "/usr/lib/plugins/platforms" ...

qt.core.plugin.factoryloader: looking at "/usr/lib/plugins/platforms/libqwayland-generic.so"

qt.core.plugin.loader: Found metadata in lib /usr/lib/plugins/platforms/libqwayland-generic.so, metadata=



.

.

.

The looong version from QT DEBUG log is in the attachment (wayland-qt-cpx---Segmentation fault---log file.txt)

.

.

.



qt.core.plugin.factoryloader: Got keys from plugin meta data QList("bradient")

qt.core.plugin.factoryloader: checking directory path "/opt/cpx/wayland-decoration-client" ...

qt.core.library: "/usr/lib/plugins/wayland-decoration-client/libbradient.so" loaded library

qml: Using display

qml:    Name: rdp

qml:    Model: rdp

qml:    Resolution: 1024x768

qml:    Pixel density: 3.94 px/mm

qml:    Device pixel ratio: 1

qml:    Rotation: 0

qml:    Live update: false

Loaded frontend from:  "qrc:/frontend/small/main.qml"

planmeca.dbus: CanUpdaterDBusInterface : Waiting for service "com.planmeca.updater"

planmeca.dbus: CanUpdaterDBusInterface : Waiting for service "com.planmeca.updater"

planmeca.dbus: CanUpdaterDBusInterface : Waiting for service "com.planmeca.updater"

planmeca.dbus: CanUpdaterDBusInterface : Waiting for service "com.planmeca.updater"

planmeca.dbus: CanUpdaterDBusInterface : Waiting for service "com.planmeca.updater"

planmeca.dbus: CanUpdaterDBusInterface : Waiting for service "com.planmeca.updater"

planmeca.dbus: CanUpdaterDBusInterface : Waiting for service "com.planmeca.updater"

planmeca.dbus: CanUpdaterDBusInterface : Waiting for service "com.planmeca.updater"

planmeca.dbus: CanUpdaterDBusInterface : Waiting for service "com.planmeca.updater"

planmeca.dbus: CanUpdaterDBusInterface : Waiting for service "com.planmeca.updater"

planmeca.dbus: CanUpdaterDBusInterface : Waiting for service "com.planmeca.updater"

planmeca.dbus: CanUpdaterDBusInterface : Waiting for service "com.planmeca.updater"

/opt/cpx/cpx.sh: line 84:   943 Segmentation fault      ./cpx --rotate=0 "$@"

root at sm2s-imx8mp:~#

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------





BR,



-Matti







-----Original Message-----
From: Marius Vlad <marius.vlad at collabora.com>
Sent: perjantai 13. tammikuuta 2023 16.05
To: Matti Ristimäki <Matti.Ristimaki at planmeca.com>
Cc: wayland-devel at lists.freedesktop.org
Subject: Re: Wayland/weston, Qt and RDP connection...



On Fri, Jan 13, 2023 at 12:13:41PM +0000, Matti Ristimäki wrote:

> Hi,

Hi,

>

> Any tips, where/how to debug RDP related problem with Wayland/Weston. Not kind of sure if this is Weston problem or Qt problem...

>

> Goal:

> Trying to create a RDP connection to a Qt GUI-application.

What do you mean exactly?  Don't you mean the other way around?



Weston starts with the RDP backend and you connect to it with a client that knows about the RDP protocol. Who is the client and who's the server in your case? It is no clear what you are trying to achieve.

>

>

> [Service]

> # Requires systemd-notify.so Weston plugin.

> Type=notify

> EnvironmentFile=/etc/default/weston

> ExecStart=/usr/bin/weston --log=${XDG_RUNTIME_DIR}/weston.log

> --modules=systemd-notify.so --modules=screen.share.so

This might be a long shot but it is screen-share.so (hyphen).

>

>

> Problem:

> Seems, that the Qt application doesn't start after adding the "--modules=screen.share.so" to services. And it doesn't start:

Yeah, same issue here.

>

> root at sm2s-imx8mp:~# journalctl -u cpx.service

> -- Journal begins at Fri 2023-01-13 08:19:03 CET, ends at Fri

> 2023-01-13 10:26:26 CET. -- Jan 13 08:20:06 sm2s-imx8mp systemd[1]: Started CPX Control Panel.

> Jan 13 08:20:06 sm2s-imx8mp cpx.sh[769]: qt.core.logging: Loading "logging.ini" ...

> Jan 13 08:20:06 sm2s-imx8mp cpx.sh[769]: Failed to create wl_display

> (No such file or directory) Jan 13 08:20:06 sm2s-imx8mp cpx.sh[769]:

> EGL: Warning: No default display support on wayland Jan 13 08:20:06

> sm2s-imx8mp cpx.sh[769]: qt.qpa.wayland: EGL not available Jan 13 08:20:06 sm2s-imx8mp cpx.sh[769]: qt.qpa.plugin: Could not load the Qt platform plugin "wayland-egl" in "" even though it was found.

> Jan 13 08:20:06 sm2s-imx8mp cpx.sh[769]: This application failed to

> start because no Qt platform plugin could be initialized. Reinstalling the app> Jan 13 08:20:06 sm2s-imx8mp cpx.sh[769]: Available platform plugins are: wayland, offscreen, vnc, minimal, minimalegl, vkkhrdisplay, eglfs, waylan>

> Jan 13 08:20:06 sm2s-imx8mp cpx.sh[764]: /opt/cpx/cpx.sh: line 84:   769 Aborted                 ./cpx --display=LVDS-1 --rotate=0 "$@"

> Jan 13 08:20:06 sm2s-imx8mp systemd[1]: cpx.service: Main process

> exited, code=exited, status=134/n/a Jan 13 08:20:06 sm2s-imx8mp systemd[1]: cpx.service: Failed with result 'exit-code'.

This kind of sounds like there's no Wayland compositor to connect to.

Maybe weston is failing to start because it can't find that module.



Printing that weston is saying maybe useful. Maybe journalctl -t weston says something?

>

>

> Basic overview:

>

> Running "first" weston with...

> drm-backend

> screen-share

> Qt-application (CPX Control Panel is the Qt application)

So basically your Qt application is a simple Qt application after all.

>

> ...and when the screen.share.so starts the "second" Weston, a RDP

> command is executed from weston.ini* rdp-backend fullscreen-shell

>

>

> *=weston.ini will run the rdp-backend.so

>

> [screen-share]

> command=@bindir@/weston --backend=rdp-backend.so

> --rdp-tls-cert=/data/etc/ssh/tls.crt

> --rdp-tls-key=/data/etc/ssh/tls.key --shell=fullscreen-shell.so

> --no-clients-resize --no-config start-on-startup=true

>

Right, if you use the screen-share module that would basically run that command and in turn what would start another weston instance which you can connect to it with a RDP client. It scrapes off the content and it sends it over RDP.

>

>

> More about platform(iMX8, Poky (Yocto Project Reference Distro)) and Qt debug print can be found at:

>

> https://forum.qt.io/topic/142178/qt-qpa-plugin-could-not-load-the-qt-p

> latform-plugin-wayland-egl-in-even-though-it-was-found

>

>

>

> BR,

>

>

> -Matti

>

>

> Matti Ristimäki

> Test Engineer

> Dental Care Units & CAD/CAM Division

>

> This e-mail may contain confidential or privileged information and is intended solely for the person to whom it is addressed. If you have received this e-mail in error, please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. We will not be liable for direct, indirect, special or consequential damages arising from the alteration of this e-mail, or as a result of any virus being passed on or as of transmission of this e-mail in general.

This e-mail may contain confidential or privileged information and is intended solely for the person to whom it is addressed. If you have received this e-mail in error, please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. We will not be liable for direct, indirect, special or consequential damages arising from the alteration of this e-mail, or as a result of any virus being passed on or as of transmission of this e-mail in general.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20230113/a0ebd78e/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 14478 bytes
Desc: image001.png
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20230113/a0ebd78e/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 329984 bytes
Desc: image002.png
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20230113/a0ebd78e/attachment-0003.png>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: wayland-qt-cpx---Segmentation fault---log file.txt
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20230113/a0ebd78e/attachment-0001.txt>


More information about the wayland-devel mailing list