Need help getting HyperPixel 2" Round to work on Raspberry Pi (Buster Lite)

I’m trying to get the HyperPixel2r to run on my Raspberry Pi 4b, and I’m running into some issues. Here are the exact instructions I used to install the drivers on Buster Lite (I want to do this without the full GUI): GitHub - ShawnHymel/ei-hyperpixel-dress.

When I run demo.py (hyperpixel2r-python/demo.py at master · pimoroni/hyperpixel2r-python · GitHub), I get the following message:

pygame 2.1.2 (SDL 2.0.9, Python 3.7.3)
Hello from the pygame community. https://www.pygame.org/contribute.html
HyperPixel 2 Lots of Circles Demo

Run with: sudo SDL_FBDEV=/dev/fb0 python3 demo.py

Driver "rpi" failed: Could not initialize OpenGL / GLES library
Driver "kmsdrm" failed: Could not initialize OpenGL / GLES library
Driver "fbcon" failed: Could not initialize OpenGL / GLES library
Driver "directfb" failed: Could not initialize OpenGL / GLES library
Driver "svgalib" failed: Could not initialize OpenGL / GLES library
All SDL drivers failed, falling back to raw framebuffer access.

I get the following on my HyperPixel. The framebuffer kinda works…it seems shifted pretty badly.

So, I have a couple of questions:

  1. How can I enable OpenGL / GLES support on Buster Lite? I have not been able to find which library I need to install to make that happen.
  2. Why is my pygame display surface shifted? It should be taking up the full screen, but you can see some residual framebuffer (with terminal output) at the bottom.

Any help would be appreciated!

I also struggled with setting this up. My changes:

  • run all commands with SDL_FBDEV=/dev/fb0 SDL_NOMOUSE=1
  • ignore the error-messages, this is ok
  • remove all size-tweaks in the Pimoroni examples. Pimoroni sets the size to 640x480, as soon as I removed this tweak, everything worked fine
  • Note that Pimoroni also adds an offset to the center. I think this is also not necessary, but I was too lazy to measure this, since it is only 7 pixels
  • many examples work with very fast screen updates which result in flickering. E.g. I changed the update to once per second in the clock.py example (self._clock.tick(1)). In the hue-example I only update after touch-events.
1 Like

Thanks! I couldn’t get writing directly to the framebuffer to work, but the basic pygame version works for some reason.