Bug 443416 - AppImage deployments lack OpenGL acceleration due to xcbglintegrations missing
Summary: AppImage deployments lack OpenGL acceleration due to xcbglintegrations missing
Status: RESOLVED FIXED
Alias: None
Product: Craft
Classification: Developer tools
Component: Core (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Hannah von Reth
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-06 22:33 UTC by Javier O. Cordero Pérez (Cuperino)
Modified: 2021-10-10 08:43 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Javier O. Cordero Pérez (Cuperino) 2021-10-06 22:33:44 UTC
SUMMARY
During deployment of Qt gui and opengl modules, deployment of "xcb-gl" fails because directory /home/$USER/CraftRoot/plugins/xcbglintegrations// doesn't exist. This results in AppImages lacking the ability to access OpenGL, which results in lower QML performance, due to lack of graphics acceleration.

STEPS TO REPRODUCE
1. Create a Blueprint for a graphics intensive project
2. Have "dev-utils/linuxdeploy" and "dev-utils/appimagetool" specified in blueprints as build dependencies for Linux.
>    def setDependencies(self):
>        self.buildDependencies["dev-utils/linuxdeploy"] = None
>        self.buildDependencies["dev-utils/appimagetool"] = None
>        # ...
3. On a Linux system, run blueprint: `craft project-name`
4. Then package the project as AppImage: `craft --package project-name`.
5. Test AppImage performance against non-containerized build of project.

OBSERVED RESULT
Graphics intensive project AppImage will result in high CPU consumption and frame drops during large animations of many seconds.

Packaging process will output:
>[qt/stdout] -- Deploying module: gui -- 
> [...]
>[qt/stdout] Deploying xcb-gl integrations 
>[qt/stdout] Directory /home/$USER/CraftRoot/plugins/xcbglintegrations// doesn't exist, skipping deployment
>[qt/stdout] 

>[qt/stdout] -- Deploying module: opengl -- 
>[qt/stdout] Deploying xcb-gl integrations 
>[qt/stdout] Directory /home/$USER/CraftRoot/plugins/xcbglintegrations// >doesn't exist, skipping deployment 
>[qt/stdout] 

EXPECTED RESULT
Qt gui and opengl modules deploy correctly. Resulting AppImage has performance equivalent to its non-containerized counterparts.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: KDE neon Testing Edition (host)
KDE Plasma Version: 5.22.90 (host)
KDE Frameworks Version: 5.87.0 (host) 5.86.0 (craft)
Qt Version: 5.15.3 (host) 5.15.2 and kde-qt-5 (craft)
Comment 1 Vincent PINON 2021-10-07 08:24:40 UTC
Hello,
I activated a patch to unlock XCB-GLX in Qt 5.15 yesterday.
Can you test again if it solves your issue?
(rebuilding Qt is quite long, cache is not ready yet...)
Thanks!
Comment 2 Javier O. Cordero Pérez (Cuperino) 2021-10-10 08:43:47 UTC
(In reply to Vincent PINON from comment #1)
> Hello,
> I activated a patch to unlock XCB-GLX in Qt 5.15 yesterday.
> Can you test again if it solves your issue?
> (rebuilding Qt is quite long, cache is not ready yet...)
> Thanks!

The patch worked perfectly.

Not only did it fix access to GPU acceleration, but also fixed various graphical glitches specific to Qt's Material theme on AppImage builds. I had no idea what caused those, but it figures it was related to XCB-GLX, because of the shaders present in that theme.

Thanks for the fix!