Can't Install Using Flatpak

I recently reinstalled pencil2d after a while, but had problems with hearing the audio within the program. This happened the last time I installed it, and back then, I was able to install the required plugin. That didn’t work this time, so I tried installing the AppImage, which still didn’t work. I saw an old topic with the same issue and the solution given was installing pencil2d using flatpak. When I ran the code in my linux terminal, I got this response: Looking for matches… error: No remote refs found for ‘flathub’ That happens when I run it regularly and with sudo.

How should I resolve this?

I experienced this problem, which I solved using the instalation library, for the version of Linux I use, I my case Linux Mint.

The instructions on our website assume that you have already installed flatpak and set up the flathub repository (which is the main community repository for flatpak apps). You can find full setup instructions of these for your distribution here. Most likely you will just need to run flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo

Thank you. I was able to install it, but now it crashes after a short time with this error The cached device pixel ratio value was stale on window update. Please file a QTBUG which explains how to reproduce. 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. 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. The Wayland connection broke. Did the Wayland compositor die?

Seems like some issue between Qt (the development framework Pencil2D uses) and your Wayland-based display server. Unfortunately there’s not a lot we can do about this, but I will try to look into the issue a bit more. Can you please tell me what Linux distribution & version you are using?

What you can try to do as a workaround is run flatpak override --env=QT_QPA_PLATFORM=xcb org.pencil2d.Pencil2D in your terminal. This should force the Pencil2D flatpak to run with XWayland instead, which you may have better luck with.

I am using a Debian Bullseye VM on a Chromebook. Here’s my uname -a output. Linux penguin 6.6.56-05934-gf790fe104dba #1 SMP PREEMPT_DYNAMIC Wed, 25 Dec 2024 22:23:38 -0800 x86_64 GNU/Linux1

After running the override command, I got this output.

qt.qpa.xcb: could not connect to display 
qt.qpa.plugin: From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin.
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, linuxfb, minimal, minimalegl, offscreen, vkkhrdisplay, vnc, wayland-egl, wayland, xcb.

I have finally had a chance to take a closer look at this issue and I have an update for you @boko06.

I was not able to reproduce your first crash on Wayland. Looking more closely at the error messages, my best guess is that it might have something to do with your display setup. If you’re moving Pencil2D between screens with different pixel ratios for example, that could be related to these error messages.

As for it failing to start with XWayland, I was able to reproduce this issue. A fix for this is currently under review and I will follow up here with upgrade instructions once my changes have been accepted on flathub. This fix may also help with the first issue, I do not know for sure though.

Alright. So the changes I made have been accepted. First run flatpak upgrade to upgrade Pencil2D, and then flatpak override --reset to revert the previous override changes and start fresh. I recommend first just trying to run it like this. It’s possible that the upgraded version of Qt will fix whatever crash you were having with Wayland.

If you continue to get that crash after a short time, then I have a different set of instructions that you can try. You can start the application with flatpak run --nosocket=wayland --nosocket=fallback-x11 --socket=x11 org.pencil2d.Pencil2D -platform xcb . This is the correct way to run the application without Wayland and shouldn’t produce the error your were seeing earlier. If Pencil2D does not crash when starting in this way, you can make it so it always starts with these arguments by running flatpak override --nosocket=wayland --nosocket=fallback-x11 --socket=x11 --env=QT_QPA_PLATFORM=xcb org.pencil2d.Pencil2D .

If you get a chance to try this, please let us know how it goes.

1 Like