I’m trying to get X-Server functioning with raspberrypi4-64 image, it builds just fine but the screen is just black (or if I start more complicated software like Electron it shows garbled stuff), and I get this at the log:
[2020-2-2 01:08:54] [main] Draw call returned Invalid argument. Expect corruption.
Here is the Dockerfile:
# Following does not work, it builds etc. but the image is garbled:
FROM balenalib/raspberrypi4-64:buster as runtime
# This works just fine when using raspberrypi3 image:
# FROM balenalib/raspberrypi3:buster as runtime
# -----------------------------------------------------------------------------
# X-server
FROM runtime as xserver
RUN install_packages xserver-xorg-core xinit
# X command https://www.x.org/releases/X11R7.7/doc/man/man1/Xserver.1.xhtml
RUN printf '\
#!/bin/bash \n\
exec /usr/bin/X -s 0 dpms -nolisten tcp "$@"\
' > /etc/X11/xinit/xserverrc
# Test, with green xterm in the corner
RUN install_packages xterm
CMD ["startx", "-fa", "Monospace", "-bg", "green", "-fg", "black"]
Notice! The above example works just fine Raspberrypi 4 if I use raspberrypi3 image, but I don’t want to, for instance electron 7 is not built for armhf.
I presume you chopped some things from the Dockerfile; it doesn’t seem to be well formed… could you provide the whole thing for clarity, obfuscate values if you need
It’s short, because that is the minimal required to show the error. It works just fine when you uncomment # FROM balenalib/raspberrypi3:buster as runtime but it doesn’t work with raspberrypi4-64 image.
I guess my example is a bit confusing, it’s easier to test with these:
# This works, and shows the green xterm in the corner as expected:
FROM balenalib/raspberrypi3:buster
RUN install_packages xserver-xorg-core xinit xterm
CMD ["startx", "-bg", "green"]
However with raspberrypi4-64 same doesn’t work, it shows just a black screen:
# This shows just the black screen
FROM balenalib/raspberrypi4-64:buster
RUN install_packages xserver-xorg-core xinit xterm
CMD ["startx", "-bg", "green"]
It looks like the X-server is not functional in raspberrypi4-64 images, there are other reports that instructs to just use raspberrypi3 images instead.
@floion of course I can make it to work, because it uses the raspberrypi3 image. But it doesn’t work with raspberrypi4-64 base image, which is the main issue here.
Besides the packages are outdated in that repo. I think my minimal repro is easier for someone to debug.