# raspberrypi4-64 (arm64) X-Server does not work

**URL:** <https://forums.balena.io/t/raspberrypi4-64-arm64-x-server-does-not-work/60744>\
**Category:** balenaOS\
**Created:** [February 1, 2020, 11:12pm UTC](https://forums.balena.io/t/raspberrypi4-64-arm64-x-server-does-not-work/60744 "2020-02-01T23:12:36Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ciantic](https://avatars.discourse-cdn.com/v4/letter/c/8797f3/32.png) [@Ciantic](https://forums.balena.io/u/Ciantic)\
**Post date:** [February 1, 2020, 11:12pm UTC](https://forums.balena.io/t/raspberrypi4-64-arm64-x-server-does-not-work/60744/1 "2020-02-01T23:12:36Z")

</div>

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 use `balena push 1.2.3.4` local push.

---

<div class="post-metadata">

**Author:** ![richbayliss](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/richbayliss/32/1054_2.png) [@richbayliss](https://forums.balena.io/u/richbayliss)\
**Post date:** [February 3, 2020, 2:12pm UTC](https://forums.balena.io/t/raspberrypi4-64-arm64-x-server-does-not-work/60744/2 "2020-02-03T14:12:17Z")

</div>

Hey,

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 👍

---

<div class="post-metadata">

**Author:** ![Ciantic](https://avatars.discourse-cdn.com/v4/letter/c/8797f3/32.png) [@Ciantic](https://forums.balena.io/u/Ciantic)\
**Post date:** [February 3, 2020, 2:23pm UTC](https://forums.balena.io/t/raspberrypi4-64-arm64-x-server-does-not-work/60744/4 "2020-02-03T14:23:12Z")

</div>

[@richbayliss](https://forums.balena.io/u/richbayliss) It is well formed? That is exactly what I tried. Do you have an error somewhere?

Here is the output

 ![image](https://global.discourse-cdn.com/balena/original/2X/0/01516d5a2e3b8b36d345d54e9b7906cafbeda9f2.png)

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.

---

<div class="post-metadata">

**Author:** ![richbayliss](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/richbayliss/32/1054_2.png) [@richbayliss](https://forums.balena.io/u/richbayliss)\
**Post date:** [February 3, 2020, 2:29pm UTC](https://forums.balena.io/t/raspberrypi4-64-arm64-x-server-does-not-work/60744/5 "2020-02-03T14:29:06Z")

</div>

Sorry, I misread it - your `FROM...` blocks threw me with the `runtime`, `xserver` naming… nevermind.

I’ll see if I can reproduce 👍

---

<div class="post-metadata">

**Author:** ![Ciantic](https://avatars.discourse-cdn.com/v4/letter/c/8797f3/32.png) [@Ciantic](https://forums.balena.io/u/Ciantic)\
**Post date:** [February 3, 2020, 2:53pm UTC](https://forums.balena.io/t/raspberrypi4-64-arm64-x-server-does-not-work/60744/6 "2020-02-03T14:53:31Z")

</div>

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"]
```

---

<div class="post-metadata">

**Author:** ![richbayliss](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/richbayliss/32/1054_2.png) [@richbayliss](https://forums.balena.io/u/richbayliss)\
**Post date:** [February 3, 2020, 3:34pm UTC](https://forums.balena.io/t/raspberrypi4-64-arm64-x-server-does-not-work/60744/7 "2020-02-03T15:34:56Z")

</div>

I can confirm the same behaviour. Not really sure what to suggest though, sorry. I’ll see if any of our team have any ideas 👍

---

<div class="post-metadata">

**Author:** ![Ciantic](https://avatars.discourse-cdn.com/v4/letter/c/8797f3/32.png) [@Ciantic](https://forums.balena.io/u/Ciantic)\
**Post date:** [February 3, 2020, 3:39pm UTC](https://forums.balena.io/t/raspberrypi4-64-arm64-x-server-does-not-work/60744/11 "2020-02-03T15:39:57Z")

</div>

Okay thanks for looking at this. Best support!

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.

Is there a bug report I could follow?

---

<div class="post-metadata">

**Author:** ![richbayliss](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/richbayliss/32/1054_2.png) [@richbayliss](https://forums.balena.io/u/richbayliss)\
**Post date:** [February 3, 2020, 5:17pm UTC](https://forums.balena.io/t/raspberrypi4-64-arm64-x-server-does-not-work/60744/12 "2020-02-03T17:17:22Z")

</div>

Not yet that I can see. I created one here and linked it to the thread 👍

> <https://github.com/balena-os/balena-raspberrypi/issues/452>
>
> \# Following does not work, it builds etc. but the image is garbled:
> FROM balenalib/raspberrypi4-64:buster as runtime
> \# This works just fine when...

---

<div class="post-metadata">

**Author:** ![floion](https://avatars.discourse-cdn.com/v4/letter/f/45deac/32.png) [@floion](https://forums.balena.io/u/floion)\
**Post date:** [February 3, 2020, 7:36pm UTC](https://forums.balena.io/t/raspberrypi4-64-arm64-x-server-does-not-work/60744/14 "2020-02-03T19:36:01Z")

</div>

Hi, can you try to run [https://github.com/balena-io-playground/x11-window-manager](https://github.com/balena-io-playground/x11-window-manager) and see if that works for you please?

---

<div class="post-metadata">

**Author:** ![Ciantic](https://avatars.discourse-cdn.com/v4/letter/c/8797f3/32.png) [@Ciantic](https://forums.balena.io/u/Ciantic)\
**Post date:** [February 3, 2020, 8:06pm UTC](https://forums.balena.io/t/raspberrypi4-64-arm64-x-server-does-not-work/60744/15 "2020-02-03T20:06:01Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![nghiant2710](https://avatars.discourse-cdn.com/v4/letter/n/90db22/32.png) [@nghiant2710](https://forums.balena.io/u/nghiant2710)\
**Post date:** [February 4, 2020, 10:03am UTC](https://forums.balena.io/t/raspberrypi4-64-arm64-x-server-does-not-work/60744/16 "2020-02-04T10:03:36Z")

</div>

Hi,

We are able to reproduce the issue on our end and will let you know when it’s fixed

---

<div class="post-metadata">

**Author:** ![gustavopch](https://avatars.discourse-cdn.com/v4/letter/g/6de8d8/32.png) [@gustavopch](https://forums.balena.io/u/gustavopch)\
**Post date:** [August 25, 2020, 3:17pm UTC](https://forums.balena.io/t/raspberrypi4-64-arm64-x-server-does-not-work/60744/20 "2020-08-25T15:17:04Z")

</div>

@nghiant2710 Any news?
