Vivante GPU and OpenGL 3 / Vulkan

I know that the Librem 5 and PureOS use the etnaviv open source graphics driver for the integrated Vivante GPU. Unfortunately, this driver does not support OpenGL 3+ or Vulkan, even though the GPU is capable.

I also understand that the proprietary (closed source) driver from Vivante provides support for both OpenGL 3 and Vulkan, enabling that functionality. As far as I can tell, the proprietary driver is included in the NXP version of the Linux kernel.

Don’t hate me, but if someone wanted to enable support for these standards by using the proprietary driver on the Librem 5, is that possible without creating a custom Linux kernel that is a hybrid of the NXP one (which includes the driver) and Purism’s? Is there an easy way to install it as a kernel module or something?

can we use the fund-your-app page for this sort of request ?

1 Like

I have no idea how hard this would be to implement, but here is how to get started.

Download the NXP source code:

sudo apt install git repo
mkdir imx-5.4
cd imx-5.4
repo init -u https://source.codeaurora.org/external/imx/imx-manifest  -b imx-linux-zeus -m imx-5.4.47-2.2.0.xml
repo sync

Then look at the files under drivers/mxc/gpu-viv

See:
https://source.codeaurora.org/external/imx/imx-manifest/tree/README?h=imx-linux-zeus

1 Like

I suppose that would be possible, since there is a section to add new app suggestions when voting with your wallet. I didn’t think about that and only added KeePassXC and Bluetooth vehicle integration (like hands free profile) when I made my contribution.

However, I wonder how receptive Purism would be to spend time on extracting and packaging a closed source driver from the vendor, rather than encouraging further development of the etnaviv driver to support OpenGL 3 and Vulkan. Either way, I think it might be out of scope for Purism.

1 Like

i meant it as you phrased it … not a fan of closed-source-sw

Thank you @amosbatto for pointing me in the right direction. It’s definitely something I can look into. I’m no stranger to compiling and installing code on Linux, but this driver might be a little more tricky. Going from my experience with NVIDIA + nouveau and a few SBC’s (like odroid), you may have to blacklist the etnaviv driver and modify the kernel’s device tree (dtb) or something like that. Also, some drivers need to be signed with a pre-trusted certificate or else the kernel will reject it. I ran into that issue when trying to compile and install a custom version of a certain wireless card driver in CentOS.

I just tried running repo sync and I can’t find the drivers/mxc/gpu-viv directory, so maybe you need to download the i.MX 8M Quad EVK​ to get the proprietary driver, which you can find here:
https://www.nxp.com/design/software/embedded-software/i-mx-software/embedded-linux-for-i-mx-applications-processors:IMXLINUX

(When I tried to download it, it tells me that it can’t verify my email anymore and won’t let me download it.)

Wondering if anyone has yet succeeded in making OpenGL ES 3 work on the Librem 5? Did it work to install the proprietary driver?

@dpacbach, Phoronix reported in Sept. 2020 that Christian Gmeiner was working on OpenGL ES 3 support in the Etnaviv driver for the GC7000Lite GPU.

However, if you watch his presentation from Sept. 2021, Gmeiner says at the end of this presentation that there are a number of things that are higher priority than enabling OpenGL ES 3, and he talks about how Etnaviv coding is a hobby that he does in his free time and how he needs more volunteers, because COVID-19 has cut back the number of employees at companies which contribute to Etnaviv:

It strikes me that people like Gmeiner are unsung heroes, and they need a lot more support than they get.

3 Likes

Thank you for that info, I guess as a short term solution it might be worth it to try to get the proprietary driver working, if only to allow developing OpenGL ES 3 applications for the Librem 5 until then open-source version is implemented.

The first step is for someone who has a company email to register with NXP and then download the proprietary file and post it so the rest of us can use it. NXP only accepts company email addresses, and I no longer have an address that works with NXP.

It seems like OpenGL ES 3 support has gotten closer than ever but no ETA yet. But Christian Gmeiner is still working on it.

4 Likes