Installing Hyperpixel4.0

Hi,

I’m trying to create a GUI project using the examlecode form here:
Running a full desktop in a container (balena.io)
But I need to install the HyperPixel4 screen in the process.

I have tried multiple dockerfile commands without any luck.

I have downoladed the HyperPixel files to rpi3+ to the project folder, but it fails, saying it’s unable to locate the install.sh.

Anyone had any luck with the Hyperpixel display?

Hi

Can you share more details - like your dockerfile?
I see that hyperpixel needs its own drivers from GitHub - pimoroni/hyperpixel4: Driver for the Pimoroni HyperPixel 4.0" Touchscreen Display
And this would be specific to the hardware versions of Pi and screen that you have - so please share those as well

Hi,
Thanks for you reply…

I have an Raspberry Pi 3b+ and the screen is a 4inch HyperPixel with touch.

My docker code looks like this:

FROM balenalib/raspberrypi3:buster

# Install desktop environment
RUN install_packages xserver-xorg-core \
    xinit lxsession desktop-file-utils \
    raspberrypi-ui-mods rpd-icons \
    gtk2-engines-clearlookspix \
    matchbox-keyboard

#RUN install.sh

# disable lxpolkit popup warning
RUN mv /usr/bin/lxpolkit /usr/bin/lxpolkit.bak

RUN curl -sSL https://get.pimoroni.com/hyperpixel4 | bash

RUN echo "#!/bin/bash" > /etc/X11/xinit/xserverrc \
  && echo "" >> /etc/X11/xinit/xserverrc \
  && echo 'exec /usr/bin/X -s 0 dpms -nolisten tcp "$@"' >> /etc/X11/xinit/xserverrc

# Setting working directory
WORKDIR /usr/src/app

COPY start.sh start.sh

# Adding things to autostart will cause them to be launchd automatically on starup
# COPY autostart /etc/xdg/lxsession/LXDE-pi/autostart

ENV UDEV=1

CMD ["bash", "start.sh"]

I have tried with the docker file above, and also including the files in the project, but I’m unable to run the install.sh.

Can you also share the error you see?

Also - are you using the 64 bit version of balenaOS?

This is the error:

Step 4/9 : RUN curl -sSL https://get.pimoroni.com/hyperpixel4 | bash
[main]      ---> Running in 0fca11fd0fe9
[main]     tput: No value for $TERM and no -T specified
[main]
[main]     tput: No value for $TERM and no -T specified
[main]
[main]     ---------------------------------------------------------
[main]     tput: No value for $TERM and no -T specified
[main]
[main]     tput: No value for $TERM and no -T specified
[main]
[main]     PSA: The install process has changed!
[main]     Pi 4 and Pi 3B+ users should read this:
[main]     https://github.com/pimoroni/hyperpixel4/issues/177
[main]     If you're sure you want to install the legacy drivers, use:
[main]     curl -sSL get.pimoroni.com/hyperpixel4-legacy | bash
[main]     tput: No value for $TERM and no -T specified
[main]
[main]     tput: No value for $TERM and no -T specified
[main]
[main]     ---------------------------------------------------------
[main]     Removing intermediate container 0fca11fd0fe9
[main]      ---> 7d03e430a055

I’m using the 32bit… balenaOS 2.98.33

I just tried to install raspberian:

Raspberry Pi OS with desktop

  • Release date: April 4th 2022
  • System: 64-bit
  • Kernel version: 5.15
  • Debian version: 11 (bullseye)

And it works perfect with the screen with this as the only modification to the config file:
dtoverlay=vc4-kms-dpi-hyperpixel4

So the balenaOS somehow does not support it…

Maybe because the desktop feature only supports the buster release and not bullseye…

Hi @jesper,

Thanks for getting back with some of the details my colleague was asking for. I’ve pinged concerned team to see if there is something on balena-os that might restrict hyperpixel4.0. One question on your last input:

Maybe because the desktop feature only supports the buster release and not bullseye…

You are using buster is that not the target release you are looking to use?

Regards,
Nitish

I also want to add here that we have successfully used a Hyperpixel 4 on balenaOS in this project: GitHub - balena-io-playground/pixel-buddy - see the section on Hyperpixel settings. Just define a dtoverlay via the dashboard for hyperpixel4-square-pi3

I tried the bullseye release, but all the packeges in the example will not compile on that…

Looks great… What image can I use for the basics?
What I need is to be able to show two buttons on the screen, and handle the touch event of those.

Hello Jesper,

Following @alanb128 project you can see that you need to set up some environment variables in your dashboard(following this guide) for hyperpixel4 to work properly. You can check the variables used in his project at here. Considering you are using a slightly different setup, you can probably try to replace some of these values by the ones in hyperpixel4 RPi 3b+ config (e.g. RESIN_HOST_CONFIG_dpi_timings → CONFIG_LINES.hdmi_timings).

I have now come a step closer… I think…

I have passed in the config parameters from GitHub - balena-io-playground/pixel-buddy

and tried the basic example here:
GitHub - balena-io-playground/pixel-buddy

Now I get the following error. It’s seems like the display is not fully enabled…

[INFO   ] [Logger      ] Record log in /root/.kivy/logs/kivy_22-06-30_20.txt
 main  [INFO   ] [Kivy        ] v2.1.0
 main  [INFO   ] [Kivy        ] Installed at "/usr/local/lib/python3.7/site-packages/kivy/__init__.py"
 main  [INFO   ] [Python      ] v3.7.13 (default, Jun 11 2022, 11:50:16) 
 main  [GCC 10.2.1 20210110]
 main  [INFO   ] [Python      ] Interpreter at "/usr/local/bin/python"
 main  [INFO   ] [Logger      ] Purge log fired. Processing...
 main  [INFO   ] [Logger      ] Purge finished!
 main  [INFO   ] [Factory     ] 189 symbols loaded
 main  [INFO   ] [Image       ] Providers: img_tex, img_dds, img_sdl2 (img_pil, img_ffpyplayer ignored)
 main  [INFO   ] [Text        ] Provider: sdl2(['text_pango'] ignored)
 main  [INFO   ] [Window      ] Provider: sdl2(['window_egl_rpi'] ignored)
 main  error: XDG_RUNTIME_DIR not set in the environment.
 main  The path /dev/dri/ cannot be opened or is not available
 main  The path /dev/dri/ cannot be opened or is not available
 main  [CRITICAL] [Window      ] Unable to find any valuable Window provider. Please enable debug logging (e.g. add -d if running from the command line, or change the log level in the config) and re-run your app to identify potential causes
 main  egl_rpi - ImportError: cannot import name 'bcm' from 'kivy.lib.vidcore_lite' (/usr/local/lib/python3.7/site-packages/kivy/lib/vidcore_lite/__init__.py)
 main    File "/usr/local/lib/python3.7/site-packages/kivy/core/__init__.py", line 63, in core_select_lib
 main      fromlist=[modulename], level=0)
 main    File "<frozen importlib._bootstrap>", line 1086, in __import__
 main    File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
 main    File "<frozen importlib._bootstrap>", line 983, in _find_and_load
 main    File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
 main    File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
 main    File "<frozen importlib._bootstrap_external>", line 728, in exec_module
 main    File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
 main    File "/usr/local/lib/python3.7/site-packages/kivy/core/window/window_egl_rpi.py", line 12, in <module>
 main      from kivy.lib.vidcore_lite import bcm, egl
 main  
 main  sdl2 - RuntimeError: b'No available video device'
 main    File "/usr/local/lib/python3.7/site-packages/kivy/core/__init__.py", line 71, in core_select_lib
 main      cls = cls()
 main    File "/usr/local/lib/python3.7/site-packages/kivy/core/window/window_sdl2.py", line 165, in __init__
 main      super(WindowSDL, self).__init__()
 main    File "/usr/local/lib/python3.7/site-packages/kivy/core/window/__init__.py", line 1071, in __init__
 main      self.create_window()
 main    File "/usr/local/lib/python3.7/site-packages/kivy/core/window/window_sdl2.py", line 309, in create_window
 main      self.get_gl_backend_name())
 main    File "kivy/core/window/_window_sdl2.pyx", line 114, in kivy.core.window._window_sdl2._WindowSDL2Storage.setup_window
 main    File "kivy/core/window/_window_sdl2.pyx", line 76, in kivy.core.window._window_sdl2._WindowSDL2Storage.die
 main  
 main  x11 - ModuleNotFoundError: No module named 'kivy.core.window.window_x11'
 main    File "/usr/local/lib/python3.7/site-packages/kivy/core/__init__.py", line 63, in core_select_lib
 main      fromlist=[modulename], level=0)
 main    File "<frozen importlib._bootstrap>", line 1086, in __import__
 main    File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
 main    File "<frozen importlib._bootstrap>", line 983, in _find_and_load
 main    File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
 main  
 main  [CRITICAL] [App         ] Unable to get a Window, abort.
Service exited 'main sha256:6da0daf993144ed129b38d35d93abf7b67a95ddca216cbd5bd30e02445dd336a'
1 Like

Hey @Jesper could you please confirm the variables you are using and the dtoverlay?

Thanks!

Hey @mpous

This is the ones i tried now…

and also the custom configuration:

The display are the 800x480 model…

Could you please try the complete project @Jesper ?

@mpous What do you mean by the complete project?

this GitHub - balena-io-playground/pixel-buddy

i understood that you only deployd the gui container, is that correct?

Yes because I do not use the flowdock feature… So i guess it will fail?

Give it a try, just to see if it works (even if you don’t have the Flowdock token)