Status of OpenGLES 2.0 with Panfrost/Lima

We, in the Manjaro ARM team, have been considering changing the defaults to use the Panfrost and Lima drivers by default for a little while now.

But the only real benefit to doing this, comes if we can enable hardware acceleration aswell.
We have tested this on the Pinebook Pro, with the Panfrost driver, which seems to be running quite well with OpenGL ES 2.0 enabled QT5 packages.

But there is a drawback to doing this.
Some applications expect OpenGL libraries, which does not exist when OpenGL ES is enabled.

I would like to provide these openGLES enabled qt5 packages as separate packages to the regular qt5 packages. This should be fairly easy to do.

But we lack a list of applications that fail to launch on either Lima or Panfrost drivers, with the OpenGL ES 2.0 enabled qt5 packages. So if you are testing these packages, please test out some different applications and let us know what applications do not work.

So here's is the applications we know about:

  • Krita (missing OpenGL symbols in Qt5Gui)
  • Kdenlive (could be same issue as Krita)

Other general bugs:

  • Some tray icons are missing on XFCE (Panfrost, might not be OpenGLES related)
  • Wallpaper gets unset at boot on XFCE (Panfrost, might not be OpenGLES related)
  • Plasma Desktop does not start , blank screen with mouse pointer (Lima, might not be OpenGLES related)
  • Godot Editor has texture issues (Panfrost, might not be OpenGLES related)
  • Chromium BSU only shows black screen (Panfrost, not related to OpenGLES)
  • Blender does not start (Panfrost, requires OpenGL 3 for UI)
2 Likes

Maybe we should approach QT Inc to se if that is wanted that way...

I think it would also be interesting to have a wiki post about how to enable/disable hardware acceleration on the different SOC, panfrost, lima etc..
the status of what works or not.. etc

I think we should maybe make a HW-Accel page that covers all the things (and is linked to from things like mhwd page) .. of course that could/would end up covering specifics like this .. once there is some kind of consensus :wink:

This is in the works for the next Manjaro ARM release. We thought about that. :slight_smile:

1 Like

Setup:

  • Pinebook Pro
  • Manjaro Preview 4 KDE edition
  • Panfrost with qt5 gles

Update 20191205:

  • kdenlive - starts with qt5 es2. Requires mesa-git.
  • chromium-bsu - starts and plays normally with mesa-git.

Problematic programs:

  • Godot Editor (OpenGL ES2 mode) - issues with textures on the menu with Panfrost.
    Not related to qt5 libraries, need to check with Mesa git instead of mesa 19.2.

    • mesa-git -> something is wrong with the matrices but there is no longer an issue with the textures. The UI is flipped (both x && y directions)
  • Blender - doesn't start with Panfrost (requires OpenGL3+ for the UI).
    Unrelated to qt5 gles.

  • NetBeans - crashes the entire system (slow but works on XFCE fbturbo)
    One thing in particular that makes an impression is the license agreement. If it shows on the es2 setup before the system crashes, the window is black.

Confirmed as unrelated:

  • IntelliJ and PyCharm - unrelated crash. Happens on XFCE with fbturbo as well. Maybe it's due to the integrated jdk but I'm not sure.

ToDo:

  • Add XFCE user to this Panfrost+qt5 gles setup.
  • Prepare XFCE + KDE install on sd card wihtout the qt5 gles libraries for verification.
1 Like

To enable Panfrost/Lima:

  • Disable fbturbo:
    • Rename/ move 99-fbturbo.conf from /etc/X11/xorg.d/
      It's better to make a backup of this file.

OR

  • Uninstall fbturbo:
    • pacman -R xf86-video-fbturbo.git

Finally, do a restart.
For best performance, use mesa-git. For Panfrost especially, there are multiple fixes and improvements made since the release of Mesa 19.2 and Mesa 19.3.

To install qt5 gles:
Update (qt5-es2 versions 5.13.2-3.2+):

  • Install: qt5-es2-base qt5-es2-declarative qt5-es2-multimedia qt5-es2-xcb-private-headers

Note: If there is conflict with manjaro-settings, then uninstall and re-install manjaro-settings-manager , manjaro-settings-manager-kcm, manjaro-settings-manager-knotifier and don't use qt-base as dependency for manjaro-settings.

Then:

  • Comment this line QT_QUICK_BACKEND=software in /etc/environment
    Do a restart.

Notes:

  • Update: No longer an issue with 5.13.2-3.2 qt5-es2-base and qt5-es2-xcb-private-headers produce a conflict
  • When installing manjaro-settings-manager don't select qt-base as dependency (it will produce a conflict)
1 Like

Final note on Plasma:

  • After enabling qt5 with es2, select OpenGL2 as compositor and enable the compositor when the session starts
  • While the UI says OpenGL2, Plasma will default to the same gl version as qt. With qt5-es2 libraries, Plasma will use gles2 for compositing.
    • To verify that gles2 is used for compositing: qdbus org.kde.KWin /KWin supportInformation

Source: https://blog.martin-graesslin.com/blog/2015/11/the-return-of-kwin_gles/

I get the following when I run the command qdbus org.kdeKWin /KWin supportInformation:

Service 'org.kdeKWin' does not exist.

I've also noticed that I lose the shadows under my windows if I reboot. They can be restored If I flip the compositor back to XRender. Flipping it back to OpenGL 2.0 then keeps the shadows. Also, dragging the cursor over the KDE taskbar pinned programmes (once a programme preview has appeared) will makes things hang for a few seconds.

Edit: Just realised that I'd missed off checking the box in "System Settings > Display and Monitor > Compositor" to "Enable compositor on startup". The compositor loads on startup now.

1 Like

Should be a typo on my part. Try with org.kde.KWin instead.
I'm not in front of the PBP to double-check. Will update the original comment once I am.

1 Like

Ah... that outputs stuff.

In another post @Strit suggested installing mesa-git in place of mesa. Is this still required, or is mesa sufficient?

mesa-git is "required" at this stage, since all the new panfrost things have not gotten into Mesa 19.2 or even 19.3.
I put required in "'s because you can run it without, but you will have lower performance than you want.

1 Like

Ok. Thanks.

Made several updates to the replies, mostly cleanup.

It's possible to be a bug.
Did you enable compositing on startup? That tick above the compositor type?
Random internet image:

1 Like

Sorry... just replied to my initial comment above. It wasn't a bug. I'd missed the check box. Thank you.

But there is a drawback to doing this. Some applications expect OpenGL libraries, which does not exist when OpenGL ES is enabled.

What about Panfrost with gl4es? Do those stack, or does one replace the other? I'm asking out of ignorance because my knowledge of linux graphics, arm graphics, GL/GLES is... limited

This combination seems like it would get around that drawback.

That's also above my knowledge.
Maybe @Pak0st can tell?

Not entirely sure how gl4es works but it seems like the tutorial posted from @PINE64 on the other thread has that particular setup. You have to start the program from the terminal with gl4es as arguement.

Ayufan's Ubuntu build doesn't have gl4es enabled by default as well. Mrfixit's Debian build however has gl4es enabled all the time.

With mesa-git, glxgears works the same with gl4es and Panfrost native.

With the mesa version that comes by default (19.2 was it?) there is something going wrong - even glxgears are shown with super weird colors when started with gl4es but works normally with Panfrost.

TLDR: Use the gl4es tutorial from the other thread and update to mesa-git.

1 Like

Forum kindly sponsored by