This is most likely a bug in the compositor.

Started by steveG, June 14, 2024, 02:04:46 PM

Previous topic - Next topic

steveG

Hello,

I have been using avidemux on Debian 11 and 12 of Chromebook for almost three years. About one month ago, an annoying issue started to come up.

The issue looks related to overlay. The movie loaded to edit does not appear correctly in the avidemux window. Instead the picture behind avidemux, such as desktop picture, appears in the window. And avidemux itself tends to blink.

I find the message below in terminal.

qt.qpa.wayland: Ignoring unexpected wl_surface.enter received for output with id: 7 screen name: "Screen5" screen model: "unknown" This is most likely a bug in the compositor.

Could anyone advise how to fix or workaround ??

Best regards,

eumagga0x2a

Running Avidemux on Wayland is entirely unsupported, albeit has been reported as working in some cases. Please make sure you launch it within an X session.

steveG

Hello,

THank you for your advice. Now I've found the way to workaound. The below seems working.

setting the parameter `--platform 'xcb'`.

Best regards,

eumagga0x2a


joma

Hello,
i have some information and maybe it can help to fix the issue with the transparent window under Wayland.

I run Avidemux on Fedora with QT6 and Wayland. As known, there is the issue with the transparent video window.The xcb option solves the issue but runs Avidemux via XWayland and not natively under Wayland.

A long time ago when I switched from Windows to Linux I searched for program to cut my mpg2 files. I found ttcut in the Internet and used it. I ported it from qt4 to qt5 and now compiled it under QT6. It also uses OpenGl. I got the same problem as Avidemux under Wayland. The Video frame got transparent under Wayland. Using the xcb option solved the issue.

By accident I found the reason for the issue. The code used the method glClearColor(0.0f, 0.0f, 0.0f, 0.0f) to set the black background of the video window of type QOpenGLWidget (PS: the default values are also all zeros). The last parameter of this method is transparency. The value 0.0f means fully transparent and this is what Wayland is doing. It seems that X11 ignores this. I changed the value to 1.0f and now the program runs without the xcb option natively under Wayland and QT6. No issue with a transparent video frame.

Maybe the issue in Avidemux is similar and could be solved easily.

eumagga0x2a

@joma, please provide more info (Fedora version, graphics card, drivers, the origin of Avidemux build and build options used). The change you suggest doesn't help on Fedora 40 with NVIDIA graphics card using the closed-source driver, the error is

qt.qpa.wayland: Could not create EGL surface (EGL error 0x3003)

qt.qpa.wayland: eglSwapBuffers failed with 0x300d, surface: 0x0

and the program terminates. Adding --platform xcb to command line is still required.

In any case, OpenGL display remains broken starting with Qt 6.4.0 (setUniformValue() fails).


joma

#6
Hello,
I am using the KDE Version of Fedora 40. KDE Plasma 6.1.4, KDE Frameworks 6.5.0, QT Version 6.7.2. My Hardware is an Intel i5-13500 with integrated Intel Xe Graphics.
I use Avidemux from the RPMFusion Repository 2.8.1.-4.fc40. This may be an old version. I have seen that in Fedora 41 RPMFusion there is a newer version 2.8.2git20240430. Maybe I should wait for this version.

I did some tests now.
When I start avidemux then the behaviour depends on the used Display configuration.
- Video Display: QT or OpenGL, Enable OpenGL support on: Black Window with Cursor displayed several times, then no Display, No error messages in Terminal
- Video Display: QT or OpenGL, Enable OpenGL support off: No picture displayed
- Video Display: LibVA, Enable OpenGL support off: I get:
[displayXError] 07:04:20-467  LibVA Error : <vaPutSurface ( ADM_coreLibVA::display, img->surface, (Drawable)widget, 0, 0, sourceWidth, sourceHeight, 0, 0, displayWidth, displayHeight, NULL,0 ,0):invalid parameter:18>
18 =<invalid parameter>
 [putX11Surface] 07:04:20-467  putX11Surface failed
- Video Display: LibVA, Enable OpenGL support on: The Window showing Artefacts from Cursor and other window parts and same error message.

When I start avidemux with the --platform xcb option I get the same errors when using libVA. Only the configuration with Video Display Qt or OpenGL are ok.

The case Video Display: QT, Enable OpenGL support on:  looks similar to the transparency issue I described above.

These are different issues than the mentioned NVIDIA problem.

joma

#7
Additional Info:
Video Display: QT, Enable OpenGL support on: The simpleRender is used and a black video is shown which paints my Mouse Movement, no error messages in terminal. This is what also happend in my case
 [simpleRender] 11:06:58-823  creating simple render.
 [init] 11:06:58-823  init, simple render. w=720, h=576,zoom=1,0000
 [spawnRenderer] 11:06:58-823  simpleRenderer init ok
 [UI_resize] 11:06:58-823  Resizing the main window to 965x788 px
[RDR] Resizing to 720 x 576

Video Display: OpenGL, Enable OpenGL support on: A short black video frame is shown which immediately disappears and just a gray frame is shown, no error messages in terminal
 [QtGlRender] 11:30:05-389  Creating GL Renderer
 [init] 11:30:05-389  [GL Render] Initialising renderer
 [QtGlAccelWidget] 11:30:05-389  [QTGL]  Creating glWidget
 [init] 11:30:05-389  [GL Render] Setting widget display size to 720 x 576
 [initTextures] 11:30:05-391  Gl : Allocating context and frameBufferObjects
 [initOnce] 11:30:05-391  [GL Render] OpenGL Vendor: Intel
 [initOnce] 11:30:05-391  [GL Render] OpenGL Renderer: Mesa Intel(R) UHD Graphics 770 (ADL-S GT1)
 [initOnce] 11:30:05-391  [GL Render] OpenGL Version: 4.6 (Compatibility Profile) Mesa 24.1.6
 [initOnce] 11:30:05-391  [GL Render] OpenGL Extensions:
......
 [initializeGL] 11:30:05-395  [GL Render] Init successful
 [spawnRenderer] 11:30:05-396  QtGl init ok
 [UI_resize] 11:30:05-396  Resizing the main window to 965x788 px
[RDR] Resizing to 720 x 576