GLES 3.0 for Librem 5

This more recently…

3 Likes
3 Likes

Woohoo progress!

I feel like this isn’t getting the attention it deserves but it’s a really big deal for L5 and GNU/Linux mobile.

5 Likes

This would be absolutely stunning.
Currently Flutter apps on Librem 5 seem to be damned to use only software rendering, resulting in very improvable performance…

2 Likes

How do you check this and how install the app?

1 Like

I observed that when running a self compiled Flutter app. Flutter does not fallback to software rendering by default and showed an error. There is an open issue here: Support software rendering fallback on Linux · Issue #151389 · flutter/flutter · GitHub

Another app example is FluffyChat, see: Installing / using fluffychat

Some suggested to use Flatseal for unchecking GPU acceleration. In my case I just added Flatpak support today and only tried to run the app manually. The workaround was like:

export LIBGL_ALWAYS_SOFTWARE=1
./myapp
3 Likes

I just install FluffyChat using FlatHub in my Byzantium backports environment (mesa 24.3.2) and can conclude that it works pretty well.

The side effect is I found dozens very nice apps written in flutter that I’d like to try :blush:

2 Likes

Thanks for your follow up @galilley

I should have mentioned that I’m on Mobian and perhaps assumed too early that it generally doesn’t work because of missing GLES 3.0 I didn’t dig deeper so far. Would you mind testing whether a binary compiled by me works for you flawlessly? :eyes:

If so, you could download the ARM build here: v0.13.0 - epinez/Energize - Codeberg.org

2 Likes

Looks like it works as expected…


Of course, gles3 is still not supported, but some of its critical parts are. So, Mesa version matter.

2 Likes
4 Likes

Thank you! :slightly_smiling_face: That’s really nice to hear. I’ll have a look at what’s the problem on Mobian

1 Like

I can not find this commit to follow it…

1 Like

Okay so here’s a quick follow up. tl;dr: export GDK_GL=gles needed.


Check mesa versions:

mobian@mobian:~/Downloads$ apt list --installed "mesa-*"       

mesa-libgallium/testing,now 25.0.3-1 arm64 [installed,automatic]
mesa-va-drivers/testing,now 25.0.3-1 arm64 [installed,automatic]
mesa-vdpau-drivers/testing,now 25.0.3-1 arm64 [installed,automatic]

Try to run app directly:

mobian@mobian:~/Downloads$ ./energize/energize 

(energize:2188): Gdk-CRITICAL **: 14:37:23.943: gdk_gl_context_make_current: assertion 'GDK_IS_GL_CONTEXT (context)' failed

** (energize:2188): WARNING **: 14:37:23.943: Failed to initialize GLArea: Unable to create a GL context

** (energize:2188): CRITICAL **: 14:37:23.970: FlutterEngineDisplayId fl_display_monitor_get_display_id(FlDisplayMonitor *, GdkMonitor *): assertion 'FL_IS_DISPLAY_MONITOR(self)' failed

** (energize:2188): CRITICAL **: 14:37:23.970: FlutterEngineDisplayId fl_display_monitor_get_display_id(FlDisplayMonitor *, GdkMonitor *): assertion 'FL_IS_DISPLAY_MONITOR(self)' failed

Try to run fluffychat directly (build from Github):

mobian@mobian:~/Downloads$ ./fluffychat 

(fluffychat:2754): Gdk-CRITICAL **: 14:53:15.412: gdk_gl_context_make_current: assertion 'GDK_IS_GL_CONTEXT (context)' failed

** (fluffychat:2754): WARNING **: 14:53:15.412: Failed to initialize GLArea: Unable to create a GL context

** (fluffychat:2754): WARNING **: 14:53:15.455: gtk.dart: failed to call method: No engine to send to

** (fluffychat:2754): WARNING **: 14:53:15.455: gtk.dart: failed to call method: No engine to send to

** (fluffychat:2754): WARNING **: 14:53:15.456: gtk.dart: failed to call method: No engine to send to

(fluffychat:2754): Gdk-CRITICAL **: 14:53:41.400: gdk_gl_context_make_current: assertion 'GDK_IS_GL_CONTEXT (context)' failed

** (fluffychat:2754): WARNING **: 14:53:41.400: Failed to uninitialize GLArea: Unable to create a GL context
embedder.cc (2429): 'FlutterEngineRemoveView' returned 'kInvalidArguments'. Engine handle was invalid.

(fluffychat:2754): GLib-GObject-CRITICAL **: 14:53:41.402: g_object_weak_unref: couldn't find weak ref 0xffffb3e89ba0(0xaaab184befc8)

Hmm, but why is the installed FluffyChat version via Flathub working?

mobian@mobian:~/Downloads$ grep Exec /var/lib/flatpak/exports/share/applications/im.fluffychat.Fluffychat.desktop

Exec=/usr/bin/flatpak run --branch=stable --arch=aarch64 --command=env --file-forwarding im.fluffychat.Fluffychat GDK_GL=gles fluffychat @@u %U @@

Ah, it’s setting the environment variable GDK_GL=gles
Can also be found in their Flathub manifest.

Run app again with env:

mobian@mobian:~/Downloads$ env GDK_GL=gles bash -c ./energize/energize

Gdk-Message: 15:10:11.935: Unable to load  from the cursor theme

<GUI plopping up and working>

Working hardware acceleration included.

2 Likes

While GLES 3.0 will just add power save on active-mode and not in inactive-mode and suspend-mode. We already have big issues on power save on inactive-mode and suspend-mode i hope it is bugs on software and not on hardware, if it is hadware-bug we need Librem 5 Fir Release to tackle this powersave erratas.

Librem 5 Still Wonderfull!

1 Like

I just curious if Gnu Emerald will be the first one with GLES3 native for L5. :anguished:

Amber
Byzantium
Crimson
Dawn
Emerald

1 Like
5 Likes

@austriancoder is a Super HERO!

6 Likes

@austriancoder bring support for compute-shaders(GPGPU) / Indirect-Drawing feature for Etnaviv.
please please. :pray: :pray: You are a Super Hero!.

Libobscura on gpgpu-accel @dcz ?

1 Like

Libobscura seems to be dead.

2 Likes

Thanks :pray: @austriancoder
THE REAL FUTURE FOR LIBREM 5 IT IS IN THE HANDS OF Christian Gmeiner. Otherwise the Librem 5 it would be a Museum Piece only.

5 Likes