-
Notifications
You must be signed in to change notification settings - Fork 379
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
does it work on arm / RaspBerry Pi? #100
Comments
Probably it will work. Basically you need bash, X and Docker on arm, and afaik they all exist e.g. in Raspian. I did not test it myself because I dont have a Raspberry Pi. I assume docker images will have to be based on arm images, too. Most Docker images (and all of x11docker examples) are based on amd64. If you give it a try, I'd quite appreciate your feedback! |
I will gladly try if you give me how to directions. |
Hi @lpt2007! Do you actually have an ARM device with docker installed and running? Should it be an aarch64, you can try: x11docker aptman/dbhi:bionic-aarch64 gtkwave Otherwise, please let us know what did you achieve so far. |
Yes, I have docker up and running on my arm device - os raspbian (debian stretch 9.6). But I don't know what you mean with that? x11docker aptman/dbhi:bionic-aarch64 gtkwave |
Do you run raspbian with an X server / a graphical interface? If you have arch32 instead of arch64, you can e.g. try to build an image with this Dockerfile:
Run the image with |
Yes I have raspbian with X server and graphical interface. But I don't have x11docker. Command not found? I have this cpu: processor : 1 processor : 2 processor : 3 Hardware : BCM2835 |
Well, to use x11docker you need to install x11docker first. Look at installation instructions in the README. |
It looks like x11docker has an issue to run xterm. It would do that to ask for pulling the docker image.
However, if I understand your /proc/cpuinfo correctly, you have a 32-bit arm cpu. For that reason the image may fail anyway.
|
This might be slightly off-topic, but I hope @mviereck will agree with discussing it. I thought that docker is not available on 32-bit systems. See https://docs.docker.com/install/linux/docker-ce/binaries/. Certainly, I have successfully used docker on several ARMv8 devices (ROCK960, Pine64, and Raspberry Pi 3 B+), but I have always used 64-bit OSs. I have had some issues with outdated kernel versions, indeed. Hence, I wonder how is it possible to install docker on a BCM2835 device (which should be either a Raspberry Pi 2 or a Zero). @lpt2007, I'd be so glad if your could tell us some details about the context/procedure:
About this issue, you should try with a |
Hi, Sorry for delay: It has Quad Core 1.2GHz Broadcom BCM2837 64bit CPU. but I think raspbian software is 32bit. I installed docker with this command: I also installed docker on raspberry pi 2 with no problem. For example: send me x11docker command to start firefox. |
You need a Docker image with firefox. Steps for creation:
|
I get error when running docker build:
|
Firefox is not named |
Oh, yes, I forgot about that. Change the Dockerfile to:
|
Finally a success. I try to run kodi like this:
create image: Run image with KODI started ok, but using a lot of CPU. Can something be done about that? |
Add option
:-) Good to know that x11docker also works on arm / Raspberry. Thank you for testing! |
Can you somehow provide terminal output as text instead of an image? It is hard to read, and I donT recognice the error. Does your Raspberry have a GPU at all? If yes, there should be some files in |
Yes. GPU: Broadcom VideoCore IV
command not working:
|
Maybe arm32v7/debian is not made for rpi? Maybe because of that kodi is taking a lot of resurces. Can I somehow build docker image from raspbian I running right now? I try to install & run kodi on it and is working perfectly. |
Just for clarification. ARMv8 devices, such as BCM2837, support two architectures: ARMv7 (32-bit) and ARMv8 (64-bit). Since Raspbian is meant to work in any RPi, it is compiled for ARMv7 only. That's why However, should any 64-bit OS be used in the RPi 3 (such as Fedora, Arch or Alpine), images based on
Thanks! I used to follow this: https://docs.docker.com/install/linux/docker-ce/debian/ But it does not have a section for Raspbian, although binaries exist: https://download.docker.com/linux/ Now I used
Do you think it'd be interesting to keep a file/table where contributors can report which platforms they tried x11docker at?
The Raspberry Pi is based on a system-on-chip (SoC), so there is probably no PCI bus at all. See https://en.wikipedia.org/wiki/File:ARMSoCBlockDiagram.svg for an example of how these devices look like.
I think that However, on the one hand, the main purpose of SBCs in general, and RPis in particular, is not to execute resource hungry graphical applications. It can be done, for sure. But you should expect performance issues.
Kodi is probably taking a lot of resources because it needs to. If you tried kodi outside of a docker container and it works with less resources, then we should focus on the constraints that the docker container imposes. The main constraint can be GPU acceleration, as @mviereck pointed above. We should help clarify:
I'd say that the GPU is being used in raspbian, but not inside the container. If so, making some |
@lpt2007 did you try this?
or did you try kodi directly?
I can successfully start kodi (and I can reproduce the performance issue), but firefox seems not to work. |
@lpt2007 Please show the output of:
Add this line to the Dockerfile, it may add some drivers:
Currently I would only know of amd64 and now arm/RaspBerry. I am not sure what else could be of interest. |
This does not exist in
There are multiple ARM devices with different GPUs. Since x11docker is quite focused on GUI applications, I think it might be interesting to track with which distributions and boards we can enable I could run tests on RPi 2 B, RPi 3 B+, PYNQ, ROCK960, Pine64 and Orange Pi Plus2. |
I try but not working? |
With the kodi Dockerfile above: ./x11docker --gpu kodi
x11docker note: Using X server option --hostdisplay
x11docker note: To allow GPU acceleration (option --gpu) with --hostdisplay,
x11docker will allow trusted cookies. That enables option --clipboard, too.
x11docker note: To allow --hostdisplay with trusted cookies,
x11docker must share host IPC namespace with container (option --hostipc)
to allow shared memory for X extension MIT-SHM.
x11docker note: To allow protection against X security leaks,
please install one or more of:
xpra, Xephyr, nxagent, weston+Xwayland, kwin_wayland+Xwayland or Xnest,
or run a second Xorg server with option --xorg.
x11docker WARNING: Option --hostdisplay with trusted cookies provides
QUITE BAD CONTAINER ISOLATION !
Keylogging and controlling host applications is possible!
It is recommended to use another X server option like --xpra or --nxagent.
x11docker WARNING: Option --hostipc degrades container isolation.
IPC namespace remapping is disabled.
x11docker WARNING: Option --gpu degrades container isolation.
Container gains access to GPU hardware.
This allows reading host window content (palinopsia leak)
and GPU rootkits (compare proof of concept: jellyfish).
/usr/lib/arm-linux-gnueabihf/kodi/kodi-xrandr: Failed to get size of gamma for output default
libEGL warning: DRI2: failed to authenticate
/usr/lib/arm-linux-gnueabihf/kodi/kodi-xrandr: Failed to get size of gamma for output default I get the same output after adding these |
In that case I don't know how to provide GPU access at all. On amd64 this folder is the key. There are several raspbian images on docker hub. Maybe its worth a try to change the base image in Dockerfile to
This one looks interesting. It is a GPU related error. However, I've never heard of any authentication to access the GPU. X access is allowed with |
I also try with raspbian/stretch:
But kodi won't start. Here is log file: |
Does it also work without If audio is lost without
That is strange, I have no idea why the keyboard is lost yet. |
I try to play movie from my network and audio sims to be ok but picture is not ok (squares on picture, choppy picture). I think is not cpu problem, because is very low when I playing movie. Any idea? |
No kodi won't start without |
It does not start at all? That's odd, because your previous image based on
Can you compare with kodi directly installed on the RaspBerry (not in Docker image)? Just to clarify if the issue is related to Docker. It might be as well a general network issue. |
$ x11docker --gpu -i --user=root -- --pid=host --privileged -- <image> bash resin/armv7hf-debianIt is based on Jessie, so kodi is not available. balenalib/armv7hf-debianroot@ad30d9a3384c:~# kodi
/usr/lib/arm-linux-gnueabihf/kodi/kodi-xrandr: Failed to get size of gamma for output default
libEGL warning: DRI2: failed to authenticate
libEGL warning: DRI2: failed to open swrast (search paths /usr/lib/arm-linux-gnueabihf/dri:${ORIGIN}/dri:/usr/lib/dri)
terminate called after throwing an instance of 'std::logic_error'
what(): basic_string::_M_construct null not valid
Aborted (core dumped)
Crash report available at /fakehome/root/kodi_crashlog-20190120_232325.log
root@ad30d9a3384c:~# apt install libraspberrypi0 -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libraspberrypi0
raspbian/stretch/usr/bin/kodi: 1: /usr/bin/kodi: fbset: not found
/usr/bin/kodi: 46: /usr/bin/kodi: tvservice: not found
/usr/bin/kodi: 60: /usr/bin/kodi: tvservice: not found Both It complains about schachr/raspbian-stretch/usr/lib/arm-linux-gnueabihf/kodi/kodi-xrandr: Failed to get size of gamma for output default
libEGL warning: DRI2: failed to authenticate
armv7/debianroot@0358016a4b96:~# kodi
/usr/lib/arm-linux-gnueabihf/kodi/kodi-xrandr: Failed to get size of gamma for output default
libEGL warning: DRI2: failed to authenticate
/usr/lib/arm-linux-gnueabihf/kodi/kodi-xrandr: Failed to get size of gamma for output default
|
Little update. I could install Add these to
Then: apt install -y wget gnupg
wget https://archive.raspbian.org/raspbian.public.key -O - | apt-key add -
wget http://archive.raspberrypi.org/debian/raspberrypi.gpg.key -O - | apt-key add -
apt update -y
apt install -y libraspberrypi0 However, kodi is still using the CPU. I tried adding the packages mentioned in hypriot/x11-on-HypriotOS#2 too. Still the same. I think I am missing some command to reload something after the packages are installed. |
Maybe you have missed my comment above: If network transfer in general is an issue, x11docker can't do anything about it. If the choppy video only appears within docker, but not with a native kodi installation, we can look for a better docker setup. |
Directly runs ok. |
ok. I have no idea yet for a different command setup. But maybe installing some X video libraries helps. Add this line to the Dockerfile and build again:
|
I know. As commented in #100 (comment), I could reproduce your setup based on raspbian/stretch. However, I am now concerned about being able to reproduce it with any other base image. This is the first step to later support
These might also help: |
Not working, no diference |
Please try with suggestions from @1138-4eb, too:
|
After I add this command in Dockerfile, video file won't start |
I wanna try run video from usb key. Please help mi with x11docker command. I try like this, but not working: |
Is any error shown in the terminal at all? Also, are you trying different video files in different formats or just a single one? |
I restart sistem and now vide file start, but result is same - choppy video.
All video are same. |
You might try with different video files in different formats (codecs). Also, it might be worth trying VLC instead of Kodi. |
I have a lot of different file, and they are all choppy
Do you know how to mount usb flash drive under container? |
Either:
or:
|
Thanks @mviereck. I already figured out: But picture on video files still choppy :( |
How can I do that? |
Install |
Let's continue the discussion in #105. |
Is this working on arm cpu like raspberry pi?
The text was updated successfully, but these errors were encountered: