Support for Raspberry Pi 4

I’ve been trying my hand at getting OpenGL ES 2 graphics working using my RPI4 but have been running into some strange errors:

QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
QOpenGLWidget: Failed to create context
QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
QOpenGLWidget: Failed to create context
composeAndFlush: makeCurrent() failed
composeAndFlush: makeCurrent() failed

The snap is working on amd64/i386 but I just can’t figure out what is missing to get it working on the RPI4 with the VC4 driver. Any help would be appreciated!

Source:

Uploaded for RPI4 to store on beta channel:
sudo snap install --beta mmapper

I’ve tested all the stables, betas and edges; the same thing happens. I’ve messed around with snap interfaces a bit too but didn’t get anywhere. :roll_eyes:

this is pretty cryptic … can you elaborate a little ?

Thanks a bunch for that core18 image, Oliver. It works on my side. Can you tell me if this snap will upgrade automatically once the official 20.04 release is available?

nope, sadly not, this image uses a differently named kernel snap that does not come from the store, once there are official core images you will have to re-flash to get the correct names in the model assertion of the image and to get kernel/gadget updates from the store.

with the ubuntu 19.10 kernel now fully supporting the pi4 (and thanks to the holidays :slight_smile: ), i invested a little time to switch the kernel snap of my core18 image over to it (the snap is still called “linux-raspberrypi-org” so there wont be any upgrade path to the official image, but it is now at least built from the same source the official kernel will use later)

note that there is no way to upgrade to that new image, you need to completely re-flash your SD card if you were using the older one (once using this image you will be able to “snap install --dangerous linux-raspberrypi-org_*_armhf.snap” later in case i provide an updated kernel snap though)

the new image is in the usual place at https://people.canonical.com/~ogra/snappy/raspberrypi4/core18/

the snaps it was built from are in the snaps/ subdir, the old image is still available under old/ for people that want to use the actual raspberrypi.org kernel.

note: this fixes mir-kiosk support !

6 Likes

I’m testing the latest image for raspberry pi 4 (2Gb) but after the Ubuntu Core init config process where i config static IPv4 settings … all works for a couple of minutes after an automatic reboot … after that i get this view and i can’t do any other moves …

https://askubuntu.com/questions/1212911/ubuntu-core-16-on-no-ip-address-tty1-after-reboot

The linked askubuntu question speaks of Ubuntu Core 16, but we do not have raspi4 support in UC16, only in UC18. Are you really using UC16?

I’ve downloaded the image from ogra link :

Ok. There are now official UC18 images that support raspi4:

http://cdimage.ubuntu.com/ubuntu-core/18/stable/current/ubuntu-core-18-arm64+raspi.img.xz
http://cdimage.ubuntu.com/ubuntu-core/18/stable/current/ubuntu-core-18-armhf+raspi.img.xz

Does this problem happen with those images as well?

7 Likes

Thanks with this image installed on Raspberry Pi 4 (2Gb) i’ve solved !!

Hello,
I’m trying to build kernel for PI4 using official repo ( eoan ).
This repo has snapcraft.yml so I’m using it to build it.
However if I try to build kernel for arm64 target I get build error -

make: *** No rule to make target ‘zImage’. Stop

What is correct config to build arm64 kernel for pi4?

how exactly does your snapcraft call look like ?

Hi,
I’m using following command:

snapcraft --target-arch=arm64

Are there extra dependencies for rpi4 kernel?

no, this should theroetically work … are there any other errors above the one you quoted ?

No other errors seen.
If I set target as armhf build succeeds.

If I remove kernel-image-target: zImage from snapcraft.yml build also succeeds.
However, then when I build ubuntu image, boot fails in u-boot with following error
Bad Linux ARM64 Image magic!

I managed to find a solution to the following runtime error:
QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled

You need to set the following environmental variable for the snap to be able to find the EGL drivers:
__EGL_VENDOR_LIBRARY_DIRS: $SNAP/usr/share/glvnd/egl_vendor.d

I’m not sure why desktop-helpers isn’t doing this by default.

Nice. The license is set to “unset” in the Snapcraft Store. In the GitHub project the is no license as well. Could you add a license?

Thanks for the hint, i added a more detailed description, a README and a LICENSE to the code and also set it in the store now …

HI @ogra, I’ve expected GPL in the first place :wink: