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

[UI] Wayland Meta Thread #1630

Closed
itsmattkc opened this issue May 12, 2021 · 23 comments
Closed

[UI] Wayland Meta Thread #1630

itsmattkc opened this issue May 12, 2021 · 23 comments
Labels
Help Wanted Assistance from community would be helpful User Interface GUI behavior or interaction (UX) related

Comments

@itsmattkc
Copy link
Contributor

We don't currently have the means to properly support Wayland and there appear to be several issues when using Olive natively on Wayland rather than X11 or XWayland. To prevent clogging up the issue tracker, I'm making this thread as a general list of known issues on Wayland that people can post in and add to instead. If you're an expert with Wayland, feel free to contribute pull requests to solve any of these issues.

If you find other Wayland-exclusive issues, comment here and they will be added to this main post.

@itsmattkc itsmattkc added Help Wanted Assistance from community would be helpful User Interface GUI behavior or interaction (UX) related labels May 12, 2021
@sobotka
Copy link
Collaborator

sobotka commented May 12, 2021

Start a “Discussions” thread and merge there?

@Simran-B Simran-B pinned this issue May 12, 2021
@mara004
Copy link
Contributor

mara004 commented May 12, 2021

@elsandosgrande Could you please check whether you are experiencing #1629 on Gnome Wayland, too?

@mara004
Copy link
Contributor

mara004 commented May 12, 2021

Maybe we could clarify point 1 a little: It's not that the video to be viewed would be completely invisible, only the background flickers and is (half-)transparent, but the video itself is rendered correctly. Maybe that was not clear enough from my screenshots and description.

@mara004
Copy link
Contributor

mara004 commented May 29, 2021

I just tested ae3393f, but it didn't fix #1507.

@mara004
Copy link
Contributor

mara004 commented Jun 2, 2021

The following is not a real issue since it currently does not impact the user, but maybe it's interesting information anyway:
When using Olive as Wayland client, I frequently get this warning on the command-line:

[WARNING] setGrabPopup called with a parent, QtWaylandClient::QWaylandXdgSurface(0x55a5d8f499a0) which does not match the current topmost grabbing popup, QtWaylandClient::QWaylandXdgSurface(0x55a5debc3470) According to the xdg-shell protocol, this is not allowed. The wayland QPA plugin is currently handling it by setting the parent to the topmost grabbing popup. Note, however, that this may cause positioning errors and popups closing unxpectedly because xdg-shell mandate that child popups close before parents ((null):0)

For instance, this message shows up when triggering the pop-up explaining that you can't export an empty sequence. Maybe (probably?) it's with all olive pop-ups, I haven't checked.

@HarshilPatel007
Copy link

@itsmattkc , I've got crash on startup.
here is the DEBUG output.

➜  Desktop ./Olive-2794730a-Linux-x86_64.AppImage
[INFO] Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway. ((null):0)
[DEBUG] QFactoryLoader::QFactoryLoader() checking directory path "/tmp/.mount_Olive-lD07Cd/usr/plugins/platforms" ... ((null):0)
[DEBUG] QFactoryLoader::QFactoryLoader() looking at "/tmp/.mount_Olive-lD07Cd/usr/plugins/platforms/libqxcb.so" ((null):0)
[WARNING] Found metadata in lib /tmp/.mount_Olive-lD07Cd/usr/plugins/platforms/libqxcb.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "xcb"
        ]
    },
    "archreq": 0,
    "className": "QXcbIntegrationPlugin",
    "debug": false,
    "version": 331520
}

 ((null):0)
[DEBUG] Got keys from plugin meta data ("xcb") ((null):0)
[DEBUG] QFactoryLoader::QFactoryLoader() checking directory path "/tmp/.mount_Olive-lD07Cd/usr/bin/platforms" ... ((null):0)
[DEBUG] loaded library "/tmp/.mount_Olive-lD07Cd/usr/plugins/platforms/libqxcb.so" ((null):0)
[WARNING] could not connect to display wayland-0 ((null):0)
[INFO] Could not load the Qt platform plugin "xcb" in "" even though it was found. ((null):0)
[FATAL] This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: xcb.
 ((null):0)
/tmp/.mount_Olive-lD07Cd/AppRun: line 6:  9828 Aborted                 (core dumped) $APPDIR/usr/bin/olive-editor

OS : ARCH-LINUX

@mara004
Copy link
Contributor

mara004 commented Aug 20, 2021

@HarshilPatel007 Yes. This is because you are using the AppImage, which does not ship the Wayland platform plugin. I think it's a known packaging issue (#1487). If you build Olive from source, you'll be able to run the program as native Wayland instance (with a few usability issues, though).

@HarshilPatel007
Copy link

@mara004 , tried to build. but, got errors..!!!!

[  9%] Automatic RCC for ui/graphics/graphics.qrc
[ 10%] Automatic RCC for ts/translations.qrc
[ 10%] Building CXX object app/CMakeFiles/libolive-editor.dir/audio/audiomanager.cpp.o
[ 10%] Building CXX object app/CMakeFiles/libolive-editor.dir/audio/audiovisualwaveform.cpp.o
[ 11%] Building CXX object app/CMakeFiles/libolive-editor.dir/core.cpp.o
[ 12%] Building CXX object app/CMakeFiles/libolive-editor.dir/libolive-editor_autogen/mocs_compilation.cpp.o
[ 12%] Building CXX object app/CMakeFiles/libolive-editor.dir/audio/outputdeviceproxy.cpp.o
[ 12%] Building CXX object app/CMakeFiles/libolive-editor.dir/audio/outputmanager.cpp.o
[ 12%] Building CXX object app/CMakeFiles/libolive-editor.dir/audio/tempoprocessor.cpp.o
[ 12%] Building CXX object app/CMakeFiles/libolive-editor.dir/cli/cliprogress/cliprogressdialog.cpp.o
[ 13%] Building CXX object app/CMakeFiles/libolive-editor.dir/cli/clitask/clitaskdialog.cpp.o
[ 13%] Building CXX object app/CMakeFiles/libolive-editor.dir/codec/ffmpeg/ffmpegdecoder.cpp.o
[ 13%] Building CXX object app/CMakeFiles/libolive-editor.dir/codec/ffmpeg/ffmpegencoder.cpp.o
[ 13%] Building CXX object app/CMakeFiles/libolive-editor.dir/codec/ffmpeg/ffmpegframepool.cpp.o
[ 14%] Building CXX object app/CMakeFiles/libolive-editor.dir/codec/oiio/oiiodecoder.cpp.o
[ 14%] Building CXX object app/CMakeFiles/libolive-editor.dir/codec/oiio/oiioencoder.cpp.o
[ 14%] Building CXX object app/CMakeFiles/libolive-editor.dir/codec/conformmanager.cpp.o
In member function ‘void QVector<T>::append(const T&) [with T = olive::AudioParams]’:
cc1plus: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
In file included from /usr/include/qt/QtCore/qbytearray.h:46,
                 from /usr/include/qt/QtCore/qstring.h:50,
                 from /usr/include/qt/QtCore/qobject.h:47,
                 from /usr/include/qt/QtCore/qtimer.h:48,
                 from /usr/include/qt/QtCore/QTimer:1,
                 from /home/harshil/Desktop/olive/app/codec/ffmpeg/ffmpegdecoder.h:35,
                 from /home/harshil/Desktop/olive/app/codec/ffmpeg/ffmpegdecoder.cpp:21:
/usr/include/qt/QtCore/qarraydata.h:129:8: note: at offset 24 into destination object ‘QTypedArrayData<olive::AudioParams>::<anonymous>’ of size 24
  129 | struct QTypedArrayData
      |        ^~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
make[2]: *** [app/CMakeFiles/libolive-editor.dir/build.make:882: app/CMakeFiles/libolive-editor.dir/codec/ffmpeg/ffmpegdecoder.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:3057: app/CMakeFiles/libolive-editor.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
➜  build git:(master)   ..

@elsandosgrande
Copy link
Collaborator

elsandosgrande commented Aug 21, 2021

@HarshilPatel007 I ran into that issue a few months back myself and a workaround was discovered: #1590

Edit

Quick question: Which version of GCC are you using?

@HarshilPatel007
Copy link

HarshilPatel007 commented Aug 21, 2021

@HarshilPatel007 I ran into that issue a few months back myself and a workaround was discovered: #1590

Edit

Quick question: Which version of GCC are you using?

@elsandosgrande , I'm using gcc (GCC) 11.1.0

edit:
adding -Wno-stringop-overflow after -Wextra in CMakeLists.txt solved the problem. 👍 thanks.

@HarshilPatel007
Copy link

@mara004 @itsmattkc @elsandosgrande ,
got error/crash on startup..!!!!
@mara004 I've compiled from source as you've suggested. but, now got so much errors than previous AppImage.

➜  app git:(master) ✗ ./olive-editor 
[INFO] Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway. ((null):0)
[DEBUG] QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/qt/plugins/platforms" ... ((null):0)
[DEBUG] QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/platforms/libqeglfs.so" ((null):0)
[WARNING] Found metadata in lib /usr/lib/qt/plugins/platforms/libqeglfs.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "eglfs"
        ]
    },
    "archreq": 0,
    "className": "QEglFSIntegrationPlugin",
    "debug": false,
    "version": 331520
}

 ((null):0)
[DEBUG] Got keys from plugin meta data ("eglfs") ((null):0)
[DEBUG] QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/platforms/libqlinuxfb.so" ((null):0)
[WARNING] Found metadata in lib /usr/lib/qt/plugins/platforms/libqlinuxfb.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "linuxfb"
        ]
    },
    "archreq": 0,
    "className": "QLinuxFbIntegrationPlugin",
    "debug": false,
    "version": 331520
}

 ((null):0)
[DEBUG] Got keys from plugin meta data ("linuxfb") ((null):0)
[DEBUG] QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/platforms/libqminimal.so" ((null):0)
[WARNING] Found metadata in lib /usr/lib/qt/plugins/platforms/libqminimal.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "minimal"
        ]
    },
    "archreq": 0,
    "className": "QMinimalIntegrationPlugin",
    "debug": false,
    "version": 331520
}

 ((null):0)
[DEBUG] Got keys from plugin meta data ("minimal") ((null):0)
[DEBUG] QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/platforms/libqminimalegl.so" ((null):0)
[WARNING] Found metadata in lib /usr/lib/qt/plugins/platforms/libqminimalegl.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "minimalegl"
        ]
    },
    "archreq": 0,
    "className": "QMinimalEglIntegrationPlugin",
    "debug": false,
    "version": 331520
}

 ((null):0)
[DEBUG] Got keys from plugin meta data ("minimalegl") ((null):0)
[DEBUG] QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/platforms/libqoffscreen.so" ((null):0)
[WARNING] Found metadata in lib /usr/lib/qt/plugins/platforms/libqoffscreen.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "offscreen"
        ]
    },
    "archreq": 0,
    "className": "QOffscreenIntegrationPlugin",
    "debug": false,
    "version": 331520
}

 ((null):0)
[DEBUG] Got keys from plugin meta data ("offscreen") ((null):0)
[DEBUG] QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/platforms/libqvnc.so" ((null):0)
[WARNING] Found metadata in lib /usr/lib/qt/plugins/platforms/libqvnc.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "vnc"
        ]
    },
    "archreq": 0,
    "className": "QVncIntegrationPlugin",
    "debug": false,
    "version": 331520
}

 ((null):0)
[DEBUG] Got keys from plugin meta data ("vnc") ((null):0)
[DEBUG] QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/platforms/libqwayland-egl.so" ((null):0)
[WARNING] Found metadata in lib /usr/lib/qt/plugins/platforms/libqwayland-egl.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "wayland-egl"
        ]
    },
    "archreq": 0,
    "className": "QWaylandEglPlatformIntegrationPlugin",
    "debug": false,
    "version": 331520
}

 ((null):0)
[DEBUG] Got keys from plugin meta data ("wayland-egl") ((null):0)
[DEBUG] QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/platforms/libqwayland-generic.so" ((null):0)
[WARNING] Found metadata in lib /usr/lib/qt/plugins/platforms/libqwayland-generic.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "wayland"
        ]
    },
    "archreq": 0,
    "className": "QWaylandIntegrationPlugin",
    "debug": false,
    "version": 331520
}

 ((null):0)
[DEBUG] Got keys from plugin meta data ("wayland") ((null):0)
[DEBUG] QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/platforms/libqwayland-xcomposite-egl.so" ((null):0)
[WARNING] Found metadata in lib /usr/lib/qt/plugins/platforms/libqwayland-xcomposite-egl.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "wayland-xcomposite-egl"
        ]
    },
    "archreq": 0,
    "className": "QWaylandXCompositeEglPlatformIntegrationPlugin",
    "debug": false,
    "version": 331520
}

 ((null):0)
[DEBUG] Got keys from plugin meta data ("wayland-xcomposite-egl") ((null):0)
[DEBUG] QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/platforms/libqwayland-xcomposite-glx.so" ((null):0)
[WARNING] Found metadata in lib /usr/lib/qt/plugins/platforms/libqwayland-xcomposite-glx.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "wayland-xcomposite-glx"
        ]
    },
    "archreq": 0,
    "className": "QWaylandXCompositeGlxPlatformIntegrationPlugin",
    "debug": false,
    "version": 331520
}

 ((null):0)
[DEBUG] Got keys from plugin meta data ("wayland-xcomposite-glx") ((null):0)
[DEBUG] QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/platforms/libqwebgl.so" ((null):0)
[WARNING] Found metadata in lib /usr/lib/qt/plugins/platforms/libqwebgl.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "webgl"
        ]
    },
    "archreq": 0,
    "className": "QWebGLIntegrationPlugin",
    "debug": false,
    "version": 331520
}

 ((null):0)
[DEBUG] Got keys from plugin meta data ("webgl") ((null):0)
[DEBUG] QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/platforms/libqxcb.so" ((null):0)
[WARNING] Found metadata in lib /usr/lib/qt/plugins/platforms/libqxcb.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "xcb"
        ]
    },
    "archreq": 0,
    "className": "QXcbIntegrationPlugin",
    "debug": false,
    "version": 331520
}

 ((null):0)
[DEBUG] Got keys from plugin meta data ("xcb") ((null):0)
[DEBUG] QFactoryLoader::QFactoryLoader() checking directory path "/home/harshil/Desktop/olive/build/app/platforms" ... ((null):0)
[DEBUG] loaded library "/usr/lib/qt/plugins/platforms/libqxcb.so" ((null):0)
[WARNING] could not connect to display wayland-0 ((null):0)
[INFO] Could not load the Qt platform plugin "xcb" in "" even though it was found. ((null):0)
[FATAL] This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
 ((null):0)
[1]    21040 abort (core dumped)  ./olive-editor

@mara004
Copy link
Contributor

mara004 commented Aug 21, 2021

Maybe try ./olive-editor -platform wayland. Apparently you are running a cutting-edge distribution with unusual configuration?

The strange thing is that the program should actually select Wayland automatically, but for you it doesn't. Did you build with the Qt/Wayland development libraries installed?
Moreover, it seems that XWayland is completely disabled on your system?

I just built Olive on current Neon User with Plasma Wayland and cannot reproduce your problems.

@mara004
Copy link
Contributor

mara004 commented Aug 21, 2021

The action search Wayland issue apparently fixed itself, so we can cross it out from the list :)
The rendering issue still persists, though.

@elsandosgrande
Copy link
Collaborator

@HarshilPatel007 Do you have QtWayland installed in the first place? It seems like it's not being detected for whatever reason.

There is no issue like that on Ubuntu Hirsute after installing the qtwayland5 and libqt5waylandclient5-dev packages.

@mara004 For what it's worth, Ubuntu (and likely Debian) has the files in /usr/lib/x86_64-linux-gnu/qt5/[…] as opposed to /usr/lib/qt/[…], but they're still detected after building locally, which means that it's not simply a slightly different directory path that's at fault here, at least not on its own.

@mara004
Copy link
Contributor

mara004 commented Aug 22, 2021

@elsandosgrande I don't know; I was just guessing. Missing QtWayland packages could indeed be the cause.

@HarshilPatel007
Copy link

@elsandosgrande , yes I've full QT5 and Wayland setup in my system.
qt5-base xorg-xwayland xorg-xlsclients qt5-wayland glfw-wayland qt5 ffmpeg openimageio opencolorio

@mara004 here is my setup:

sysenv related to Wayland :

  • GDMSESSION=gnome
  • GNOME_SETUP_DISPLAY=:1
  • DESKTOP_SESSION=gnome
  • QT_QPA_PLATFORM=wayland
  • QT_DEBUG_PLUGINS=1
  • QT_IM_MODULE=ibus
  • XDG_SESSION_TYPE=wayland
  • XDG_SESSION_DESKTOP=gnome
  • XDG_CURRENT_DESKTOP=GNOME
  • WAYLAND_DISPLAY=wayland-0

now it's opened(working) after setting QT_QPA_PLATFORM=wayland but, got this glitches in Footage Viewer & Sequence Viewer..!!!
for more info I've attached DEBUG output logs as well.
logs.txt
logs-2.txt

@mara004
Copy link
Contributor

mara004 commented Aug 25, 2021

Interesting that only setting the platform was enough to make it work. Your environment variables seem correct as far as I can tell.
The glitches and flickering are a known, Wayland-specific problem. We already had a kde plasma developer look at the issue and he could rule out some common causes, but so far no one was able fix it.

@thebiblelover7
Copy link

but, got this glitches in Footage Viewer & Sequence Viewer..!!!

I can reproduce the glitches in the Footage & Sequence Viewer too. Other than that, it seems to be working well.

@Simran-B
Copy link
Collaborator

Just stumbled over another Wayland issue reported to the OBS project. The symptoms are quite different, however (completely transparent area):
obsproject/obs-browser#279

It would be worth testing KDE's Qt 5.15 version. The wayland branch has some additional commits: https://invent.kde.org/qt/qt/qtwayland/-/tree/kde/5.15

@Quackdoc
Copy link
Contributor

I was looking into this a bit, currently Wayland works as expected on KDE and Weston for me during brief testing. while Sway and Gnome have the transparency bug. only Sway from what I have tested has an issue with actions search. It comes up, I just cannot type in it for some reason.

@mara004
Copy link
Contributor

mara004 commented Mar 31, 2022

Indeed, I can confirm the observations of @Quackdoc regarding KDE Plasma. After updating/rebuilding Olive on current KDE Neon, rendering now works perfectly - no more flickering. The action search still works, too.

@ghost
Copy link

ghost commented Jun 22, 2022

Resizing the sequence viewer stops after the cursor leaves the view splitter when trying to make it smaller, but works perfectly fine when making it larger in build 99bbb16. This doesn't happen when QT_QPA_PLATFORM is set to xcb.
Distro: ArchLinux
DE: KDE Plasma

2022-06-22.03-35-56.mp4

@Quackdoc
Copy link
Contributor

at some point KDE broke again, hopefully fixed in the PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help Wanted Assistance from community would be helpful User Interface GUI behavior or interaction (UX) related
Projects
None yet
Development

No branches or pull requests

8 participants