#1104602 megapixels gui fails because gtk4 dropped support for GLES 2.0

Package:
megapixels
Source:
megapixels
Description:
GTK3 camera app for mobile using the V4L2 media request API
Submitter:
Boud Roukema
Date:
2025-12-23 23:03:01 UTC
Severity:
normal
Tags:
#1104602#5
Date:
2025-05-02 19:11:45 UTC
From:
To:
Dear Maintainer,

    * What led up to the situation?

I have been using Megapixels on the PinePhone v1.2b for a bit under
four years on Mobian/Debian testing (bookworm prior to bookworm
becoming stable; trixie right now). Over the last few years it has
generally worked well for taking photos.

    * What exactly did you do (or not do) that was effective (or
      ineffective)?

1. I tapped the Megapixels gui on the PinePhone touchscreen with my finger.

2. I ran 'megapixels |& tee log' from the command line.

    * What was the outcome of this action?

1. A pop-up message stated "Unable to create a GL context".

2.  A pop-up message stated "Unable to create a GL context" and
the file "log" consists of:

MPCamera: VIDIOC_SUBDEV_S_FRAME_INTERVAL error 25, Inappropriate ioctl for device
megapixels: ../src/dispatch_common.c:872: epoxy_get_proc_address: Assertion `0 && "Couldn't find current GLX or EGL context.\n"' failed.

    * What outcome did you expect instead?

I expected to see a gui for taking photos.


    * Developer's point of view *

Martijn Braam has explained the problem in a blog:

   "There's steady progress towards Megapixels 2.0 Alpha 2 with a lot
   of small improvements, but there's also a massive roadblock
   introduced by the GTK developers..."

   "In the case of Megapixels [the problem is] the NGL backend for GTK4. The
   4.17 release made in Februar[y] dropped the GL backend in favor of the
   NGL and Vulkan renderers. Which is great if you're on the latest and
   greatest Macbooks."

   "The issue is that GTK now also dropped for GLES 2.0 which means
   that a lot of older devices are no longer GPU accelerated in
   GTK4. For Megapixels it's an even bigger issue since the debayering
   depends on GPU acceleration so it won't run at all if GTK4 doesn't
   have an OpenGL context anymore."

https://blog.brixit.nl/megapixels-2-0-progress/


    * Workaround *

At https://forum.pine64.org/showthread.php?pid=124299 a proposed
workaround is to use a fork of gtk4 that describes itself as
"Fork of GTK to restore OpenGL ES 2.0 support":
https://github.com/kkofler/gtk

    * Possible Debian or upstream solutions *

Guesses based on dicussion at #mobian:

The gtk4 fork seems unlikely to be a solution at the Debian level, unless
someone proposes a gtk4-opengl-es2.0 fork and it's accepted into
Debian. That would only make sense if discussed with the gtk4
community.

Convincing the main gtk4 upstream community, or the Debian-level
gtk4 maintainers, to retain the OpenGL ES 2.0 facilities is probably
unrealistic.

    * Debian release of trixie as stable *

Since this appears to make Megapixels unusable to all Debian/trixie
users (which includes Mobian/trixie), I've put "grave" as the severity
level. This is one of the three "release-critical" severity levels.

#1104602#10
Date:
2025-05-13 12:28:56 UTC
From:
To:
On Fri, 2 May 2025 21:11:45 +0200 (CEST) Boud Roukema  <bouddebbug@cosmo.torun.pl> wrote:
 > Package: megapixels
 > Version: 1.8.3-1
 > Severity: grave
 > Tags: upstream
 > Justification: renders package unusable
 >
 > Dear Maintainer,
 >
 > * What led up to the situation?
 >
 > I have been using Megapixels on the PinePhone v1.2b for a bit under
 > four years on Mobian/Debian testing (bookworm prior to bookworm
 > becoming stable; trixie right now). Over the last few years it has
 > generally worked well for taking photos.

Does megapixels work on Pinephone Pro or other devices supported by
mobian or droidian ?

If it works on other devices, I think it'd still be useful to ship this
with trixie and lower severity to important. As bug is actually gtk 4
dropping support for OpenGL 2.0 and megapixels can work with older gtk
versions or devices with OpenGL 3.0 support.

#1104602#15
Date:
2025-05-13 13:35:08 UTC
From:
To:
hi Pirate Praveen, all,
https://blog.brixit.nl/megapixels-2-0-progress , PinePhone Pro (PPP)
should work with Megapixels-2.0 - i.e. compiling from the upstream
source, not necessarily Debian - for GPU Mali T860 + OpenGL 3.1 +
OpenGL ES 3.1.  This earlier blog from 2023-11-09 explains more about
Megapixels-1.* vs Megapixels-2.* development:
https://blog.brixit.nl/megapixels-2-0/

However, I don't see any Debian package for Megapixels-2.0. What we have
is Megapixels-1.* :

- https://tracker.debian.org/pkg/megapixels has 1.8.3-1 as the most recent version

So I think that the question should probably be reworded to:

Does megapixels-1.* work on Pinephone Pro or any of the devices
running Mobian or Droidian ?

As an ordinary user (non-maintainer) of this package, I see at least
three possibilities to justify downgrading the severity:

(i) The Debian version of megapixels-1.* works on Pinephone Pro or at
   least one of the devices running Mobian or Droidian - this would need
   people to reliably confirm this; or

(ii) someone proposes (ITP - intent to package) a gtk4-opengl-es2.0
   fork (or with some similar name) and gets it accepted into Debian
   fast enough before the trixie freeze; and gets 'megapixels'
   (i.e. megapixels-1.*) updated to build with that fork and checked to
   work on at least one of the Mobian or Droidian supported devices in
   time for the freeze; or

(iii) someone packages Megapixels-2.0, e.g. as 'megapixels-2' or as an
   'upgrade' for the current 'megapixels' package fast enough before
   the freeze; and this new 'mexapixels-2' is confirmed to work on at
   least PPP and/or one or more of the Droidian-supported devices.

An alternative (ii.2) could be if Mobian accepted to have 'gtk4-opengl-es2.0'
as a Mobian-specific-and-not-Debian-proper package, but my impression
is that that would be seen as contrary to the aim of having as few
Mobian-specific-and-not-yet-or-not-ever-Debian packages as possible.

Cheers
Boud

#1104602#20
Date:
2025-05-16 07:21:50 UTC
From:
To:
Hi,

Le 13/05/2025 à 15:35, Boud Roukema a écrit :

FWIW Megapixels v2.0 has not been released yet (still in alpha stage),
and therefore cannot be packaged for Debian yet. The alpha releases will
be uploaded to experimental waiting for the final release.

Yes, it does work on (at least) sargo.

Anyway, this is not a bug in Megapixels itself but a side-effect of GTK4
dropping support for GLES 2.0. As a consequence, I'm re-assigning this
bug to gtk4 with downgraded severity.

Cheers,
Arnaud

#1104602#33
Date:
2025-05-18 15:10:04 UTC
From:
To:
hi all,

For people following this thread, here are sargo/Pixel3a wiki/status
pages:

Mobian: https://wiki.debian.org/InstallingDebianOn/Google/Pixel3a

Droidian: https://devices.droidian.org/#/devices/sargo

I guess the long-term solution for other Megapixels users, such as
Mobian/PinePhone, will be when Megapixels-2.0 is ready upstream and
when Debian 'megapixels' becomes the 2.0 version (same package or
separate package)?

Cheers
Boud

#1104602#38
Date:
2025-12-23 22:56:28 UTC
From:
To:
Hi,

Le Sun, May 18, 2025 at 05:10:04PM +0200, Boud Roukema a écrit :
Megapixels-2 are working. I have the following error message with Megapixels
version 2.0.0-1 from unstable (on a trixie system):

Failed to initialize OpenGL context: Unable to create a GL context

megapixels: ../src/dispatch_common.c:872: epoxy_get_proc_address: Assertion `0 && "Couldn't find current GLX or EGL context.\n"' failed.

Antoine