-
Notifications
You must be signed in to change notification settings - Fork 53
Description
Summary
On a Purism Librem 5 (PureOS Byzantium, Phosh, Wayland), the PureMaps Flatpak 3.4.2 has two problems:
-
Running with the default Wayland backend falls back to
llvmpipe(software rendering), making the UI extremely slow. -
The workaround that worked with previous Flatpak versions
flatpak override --env=QT_QPA_PLATFORM=xcb io.github.rinigus.PureMaps
no longer works. With
QT_QPA_PLATFORM=xcb, PureMaps now fails withqt.qpa.xcb: could not connect to display, even though Xwayland on the host is working and native X11 apps likexeyesrun fine.
So, on this setup there is no way to get GPU accelerated PureMaps via Flatpak anymore: Wayland is software rendered, and xcb cannot connect to X11 inside the sandbox.
Environment
- Device: Purism Librem 5
- OS: PureOS Byzantium (arm64)
- Desktop / shell: Phosh (Wayland)
- PureMaps: Flatpak
io.github.rinigus.PureMaps3.4.2 from Flathub - OSM Scout Server: Flatpak
io.github.rinigus.OSMScoutServer - Flatpak overrides tested:
--device=dri--socket=x11,--socket=fallback-x11--share=ipcQT_QPA_PLATFORM=waylandQT_QPA_PLATFORM=xcb
What used to work
On earlier PureMaps Flatpak versions the following workaround gave me GPU acceleration, at the cost of a blurry interface via Xwayland:
flatpak override --env=QT_QPA_PLATFORM=xcb io.github.rinigus.PureMaps
flatpak run io.github.rinigus.PureMaps
This produced a much smoother UI (faster map panning and zooming), so I assume it was using the Vivante GPU via etnaviv under Xwayland.
Current behavior
1. Wayland path: starts, but uses llvmpipe and is very slow
After resetting overrides and trying Wayland with GPU access:
flatpak override --user --reset io.github.rinigus.PureMaps
flatpak override --user \
--device=dri \
--env=QT_QPA_PLATFORM=wayland \
io.github.rinigus.PureMaps
flatpak run io.github.rinigus.PureMaps
PureMaps starts, but I get the following log output (shortened to the relevant parts):
qt.qpa.qgnomeplatform: Could not find color scheme ""
Current locale: en_US
Translation not found
Fallback icons at /app/share/io.github.rinigus.PureMaps/qml/icons/fallback
Got library name: "/app/lib/qml/io/thp/pyotherside/libpyothersideplugin.so"
libEGL warning: failed to get driver name for fd -1
libEGL warning: MESA-LOADER: failed to retrieve device information
libEGL warning: failed to get driver name for fd -1
MESA: error: ZINK: failed to choose pdev
libEGL warning: egl: failed to create dri2 screen
Acquired QGeoPositionInfoSource: "geoclue2"
Calculate direction using a sequence of coordinates
Replacing system-provided Geoclue2 with the bundled plugin
Tracking "io.github.rinigus.OSMScoutServer"
file:///app/share/io.github.rinigus.PureMaps/qml/PositionSource.qml:71: TypeError: Cannot read property 'center' of null
Translation not found for navigator: "en"
Started DBus service at io.github.rinigus.PureMaps
qml: Initializing voice engine navigator en female
qml: Voice engine: navigator Mimic active=true
qml: Initializing voice engine navigator en female
qml: Voice engine: navigator Mimic active=true
Using QSGMapboxGLTextureNode for map rendering. devicePixelRatio: 2
[ INFO ] "{unknown}[General]: GPU Identifier: llvmpipe (LLVM 19.1.7, 128 bits)"
Service appeared "io.github.rinigus.OSMScoutServer"
Map matching active: true
Key line:
GPU Identifier: llvmpipe (LLVM 19.1.7, 128 bits)
So under Wayland the Flatpak ends up rendering via llvmpipe inside the sandbox (software rasterizer). On the Librem 5 this makes map interaction extremely sluggish.
2. xcb/X11 path: no longer works, cannot connect to display
I tried to reapply the old workaround under the current Flatpak:
flatpak override --user --reset io.github.rinigus.PureMaps
QT_QPA_PLATFORM=xcb flatpak run io.github.rinigus.PureMaps
and also with explicit X11 and DRI permission:
flatpak override --user \
--socket=x11 \
--socket=fallback-x11 \
--share=ipc \
--device=dri \
io.github.rinigus.PureMaps
DISPLAY=:0 QT_QPA_PLATFORM=xcb flatpak run io.github.rinigus.PureMaps
In all cases I get:
qt.qpa.xcb: could not connect to display
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
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, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, xcb.
With QT_DEBUG_PLUGINS=1:
QT_DEBUG_PLUGINS=1 QT_QPA_PLATFORM=xcb flatpak run io.github.rinigus.PureMaps
I see that Qt finds and loads libqxcb.so, but then fails to connect:
QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/plugins/platforms" ...
...
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/plugins/platforms/libqxcb.so"
Found metadata in lib /usr/lib/plugins/platforms/libqxcb.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"xcb"
]
},
...
}
Got keys from plugin meta data ("xcb")
...
loaded library "/usr/lib/plugins/platforms/libqxcb.so"
qt.qpa.xcb: could not connect to display
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
So the plugin itself is present and loaded, but there is no usable X11 display inside the sandbox.
Host Xwayland status
On the host (Librem 5, same session) Xwayland is working fine:
echo "$DISPLAY"
# :0
echo "$XDG_SESSION_TYPE"
# wayland
xeyes
# works, shows xeyes window on screen
Inside the PureMaps Flatpak sandbox
If I open a shell inside the sandbox:
flatpak run --command=sh io.github.rinigus.PureMaps
Then inside the flatpak:
echo "DISPLAY=$DISPLAY"
echo "WAYLAND_DISPLAY=$WAYLAND_DISPLAY"
ls /tmp/.X11-unix 2>/dev/null
I get:
DISPLAY=
WAYLAND_DISPLAY=wayland-0
# /tmp/.X11-unix is empty, no X socket visible
So from inside the sandbox:
WAYLAND_DISPLAYis set towayland-0DISPLAYis empty- There is no
/tmp/.X11-unix/X0or similar
In other words, the Flatpak can see Wayland but has no X11 display at all, which explains the qt.qpa.xcb: could not connect to display error.
Steps to reproduce on Librem 5
-
On a Librem 5 with PureOS Byzantium and Phosh, install PureMaps Flatpak 3.4.2 from Flathub:
flatpak install flathub io.github.rinigus.PureMaps io.github.rinigus.OSMScoutServer -
Run PureMaps normally (Wayland backend):
flatpak run io.github.rinigus.PureMaps- Observe that it starts, but is very slow.
- Check log:
GPU Identifier: llvmpipe (LLVM ...).
-
Try to force X11 backend with xcb (previous workaround):
flatpak override --user --reset io.github.rinigus.PureMaps QT_QPA_PLATFORM=xcb flatpak run io.github.rinigus.PureMapsor:
flatpak override --user \ --socket=x11 \ --socket=fallback-x11 \ --share=ipc \ --device=dri \ io.github.rinigus.PureMaps DISPLAY=:0 QT_QPA_PLATFORM=xcb flatpak run io.github.rinigus.PureMaps -
Observe that PureMaps fails to start with
qt.qpa.xcb: could not connect to display, even thoughxeyesworks on the host.
Expected behavior
-
On Librem 5, it should be possible to run PureMaps with GPU acceleration (no llvmpipe) either:
- via Wayland with a working GLES driver, or
- via xcb/Xwayland, as the previous Flatpak version allowed using the
QT_QPA_PLATFORM=xcboverride.
-
At minimum, the xcb backend should be able to connect to the host Xwayland display from inside the Flatpak sandbox if
--socket=x11(orx11/fallback-x11in the manifest) is granted.
Actual behavior
- Wayland backend runs only with
llvmpipeinside the Flatpak on Librem 5, making PureMaps very slow. - xcb backend cannot connect to any X11 display inside the Flatpak sandbox, so the previously working
QT_QPA_PLATFORM=xcbworkaround no longer works.
Question
Is this something that can be adjusted in the Flatpak manifest or runtime used by PureMaps (for example X11 socket / DRI device permissions, or Qt / Mesa configuration for ARM/Librem 5), so that:
- either Wayland gets proper GPU acceleration again, or
- xcb/Xwayland becomes usable again as a workaround on Librem 5?
I am happy to test any experimental Flatpak builds or additional debug env vars on my Librem 5 if that helps track this down.