mviereck / x11docker

Run GUI applications and desktops in docker and podman containers. Focus on security.
MIT License
5.59k stars 375 forks source link

does it work on arm / RaspBerry Pi? #100

Closed lpt2007 closed 5 years ago

lpt2007 commented 5 years ago

Is this working on arm cpu like raspberry pi?

mviereck commented 5 years ago

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!

lpt2007 commented 5 years ago

I will gladly try if you give me how to directions.

eine commented 5 years ago

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.

lpt2007 commented 5 years ago

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

mviereck commented 5 years ago

Do you run raspbian with an X server / a graphical interface? Install x11docker in raspbian. The command x11docker aptman/dbhi:bionic-aarch64 gtkwave should download image aptman/dbhi:bionic-aarch64 and start the application gtkwave in docker.

If you have arch32 instead of arch64, you can e.g. try to build an image with this Dockerfile:

FROM arm32v7/debian
RUN apt-get update
RUN apt-get install xterm

Run the image with x11docker imagename xterm.

lpt2007 commented 5 years ago

Yes I have raspbian with X server and graphical interface.

But I don't have x11docker. Command not found?

I have this cpu: pi@raspberrypi:~ $ cat /proc/cpuinfo processor : 0 model name : ARMv7 Processor rev 4 (v7l) BogoMIPS : 38.40 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xd03 CPU revision : 4

processor : 1 model name : ARMv7 Processor rev 4 (v7l) BogoMIPS : 38.40 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xd03 CPU revision : 4

processor : 2 model name : ARMv7 Processor rev 4 (v7l) BogoMIPS : 38.40 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xd03 CPU revision : 4

processor : 3 model name : ARMv7 Processor rev 4 (v7l) BogoMIPS : 38.40 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xd03 CPU revision : 4

Hardware : BCM2835 Revision : a02082 Serial : 0000000015fde596

mviereck commented 5 years ago

But I don't have x11docker. Command not found?

Well, to use x11docker you need to install x11docker first. Look at installation instructions in the README.

lpt2007 commented 5 years ago

I installed x11docker successfully.

Now I try to run program with it like you say: x11docker aptman/dbhi:bionic-aarch64 gtkwave

And I get this error: error_running_app

mviereck commented 5 years ago

It looks like x11docker has an issue to run xterm. It would do that to ask for pulling the docker image. Please try to pull the image first before running x11docker:

docker pull aptman/dbhi:bionic-aarch64

However, if I understand your /proc/cpuinfo correctly, you have a 32-bit arm cpu. For that reason the image may fail anyway. In that case, try to build a 32-bit-image, e.g. with this Dockerfile:

FROM arm32v7/debian
RUN apt-get update
RUN apt-get install xterm
eine commented 5 years ago

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 arm32v7/debian based image, as suggested by @mviereck.

lpt2007 commented 5 years ago

Hi,

Sorry for delay: I am using this model of rpi: https://www.raspberrypi.org/products/raspberry-pi-3-model-b/

It has Quad Core 1.2GHz Broadcom BCM2837 64bit CPU.

but I think raspbian software is 32bit.

I installed docker with this command: curl -fsSL get.docker.com -o get-docker.sh && sh get-docker.sh and add pi user to docker group sudo usermod -aG docker pi

I also installed docker on raspberry pi 2 with no problem.

For example: send me x11docker command to start firefox.

mviereck commented 5 years ago

For example: send me x11docker command to start firefox.

You need a Docker image with firefox. Steps for creation:

lpt2007 commented 5 years ago

I get error when running docker build:

pi@raspberrypi:~ $ docker build -t firefox /home/pi/docker/firefox
Sending build context to Docker daemon  2.048kB
Step 1/4 : FROM arm32v7/debian
 ---> 31b88b200ce6
Step 2/4 : RUN apt-get update
 ---> Running in 46bec2cdcccb
Get:1 http://security-cdn.debian.org/debian-security stretch/updates InRelease [94.3 kB]
Ign:2 http://cdn-fastly.deb.debian.org/debian stretch InRelease
Get:3 http://cdn-fastly.deb.debian.org/debian stretch-updates InRelease [91.0 kB]
Get:4 http://cdn-fastly.deb.debian.org/debian stretch Release [118 kB]
Get:5 http://cdn-fastly.deb.debian.org/debian stretch Release.gpg [2434 B]
Get:6 http://security-cdn.debian.org/debian-security stretch/updates/main armhf Packages [453 kB]
Get:7 http://cdn-fastly.deb.debian.org/debian stretch-updates/main armhf Packages [5108 B]
Get:8 http://cdn-fastly.deb.debian.org/debian stretch/main armhf Packages [6919 kB]
Fetched 7682 kB in 24s (316 kB/s)
Reading package lists...
Removing intermediate container 46bec2cdcccb
 ---> 93997b1246f0
Step 3/4 : RUN apt-get install -y firefox
 ---> Running in d29e1fd6c3ff
Reading package lists...
Building dependency tree...
Reading state information...
Package firefox is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'firefox' has no installation candidate
The command '/bin/sh -c apt-get install -y firefox' returned a non-zero code: 100
eine commented 5 years ago

Firefox is not named firefox in Debian. Try iceweasel or firefox-esr:

mviereck commented 5 years ago

Firefox is not named firefox in Debian. Try iceweasel or firefox-esr:

Oh, yes, I forgot about that. Change the Dockerfile to:

FROM arm32v7/debian
RUN apt-get update
RUN apt-get install -y firefox-esr
CMD firefox-esr
lpt2007 commented 5 years ago

Finally a success.

I try to run kodi like this: make folder /home/pi/docker make sub-folder under it /home/pi/docker/kodi make file called Dockerfile under kodi folder /home/pi/docker/kodi/Dockerfile

FROM arm32v7/debian
RUN apt-get update
RUN apt-get install -y kodi
CMD kodi

create image: docker build -t kodi /home/pi/docker/kodi

Run image with x11docker kodi

KODI started ok, but using a lot of CPU.

Can something be done about that?

mviereck commented 5 years ago

KODI started ok, but using a lot of CPU. Can something be done about that?

Add option --gpu for hardware acceleration: x11docker --gpu kodi

Finally a success.

:-) Good to know that x11docker also works on arm / Raspberry. Thank you for testing!

lpt2007 commented 5 years ago

:-) Good to know that x11docker also works on arm / Raspberry. Thank you for testing!

Anytime.

I try to run with --gpu. I still have high cpu usage all forur cpu-s about 90%.

error: error_kodi

mviereck commented 5 years ago

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 /dev/dri. Please show me the output of: lspci | grep -i vga

lpt2007 commented 5 years ago

Does your Raspberry have a GPU at all?

Yes. GPU: Broadcom VideoCore IV

Please show me the output of: lspci | grep -i vga

command not working:

pi@raspberrypi:~ $ lspci | grep -i vga
pcilib: Cannot open /proc/bus/pci
lspci: Cannot find any working access method.
lpt2007 commented 5 years ago

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.

eine commented 5 years ago

I am using this model of rpi: raspberrypi.org/products/raspberry-pi-3-model-b

It has Quad Core 1.2GHz Broadcom BCM2837 64bit CPU.

but I think raspbian software is 32bit.

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 /proc/cpuinfo returns BCM2835: the ARMv8 subset is hidden for Raspbian. As a result, 64-bit features are not available in RPi 3 when Raspbian is used. Also, this is why arm32v7 docker images must be used as a base.

However, should any 64-bit OS be used in the RPi 3 (such as Fedora, Arch or Alpine), images based on arm64v8 would work. Still, I wonder if arm32v7 images can be executed on a 64-bit OS.

curl -fsSL get.docker.com -o get-docker.sh && sh get-docker.sh and add pi user to docker group sudo usermod -aG docker pi

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 curl -fsSL get.docker.com | sh - and it worked like a charm.

:-) Good to know that x11docker also works on arm / Raspberry. Thank you for testing!

Do you think it'd be interesting to keep a file/table where contributors can report which platforms they tried x11docker at?

Please show me the output of: lspci | grep -i vga

command not working:

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.

Maybe arm32v7/debian is not made for rpi?

I think that arm32v7 and arm64v8 images have been developed precisely for RPi and single-board-computers (SBCs) in the context of IoT. So, the context fits perfectly.

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.

Maybe because of that kodi is taking a lot of resurces.

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:

Can I somehow build docker image from raspbian I running right now? I try to install & run kodi on it and is working perfectly.

I'd say that the GPU is being used in raspbian, but not inside the container. If so, making some arm32v7/raspbian won't make any difference. This is specially so because Raspbian is based on Debian. However, once we guess how to share the GPU, some files from Raspbian (such as drivers) might need to be added to the container.

eine commented 5 years ago

@lpt2007 did you try this?

FROM arm32v7/debian
RUN apt-get update
RUN apt-get install -y firefox-esr
CMD firefox-esr

or did you try kodi directly?

FROM arm32v7/debian
RUN apt-get update
RUN apt-get install -y kodi
CMD kodi

I can successfully start kodi (and I can reproduce the performance issue), but firefox seems not to work.

mviereck commented 5 years ago

We should help clarify:

  • Is GPU acceleration available in Raspbian?

@lpt2007 Please show the output of: ls -l /dev/dri This folder is shared with the container and should give it access to the GPU hardware.

However, once we guess how to share the GPU, some files from Raspbian (such as drivers) might need to be added to the container.

Add this line to the Dockerfile, it may add some drivers:

RUN apt-get install -y mesa-utils mesa-utils-extra

Do you think it'd be interesting to keep a file/table where contributors can report which platforms they tried x11docker at?

Currently I would only know of amd64 and now arm/RaspBerry. I am not sure what else could be of interest.

eine commented 5 years ago

Please show the output of: ls -l /dev/dri

This does not exist in 2018-11-13-raspbian-stretch.

Currently I would only know of amd64 and now arm/RaspBerry. I am not sure what else could be of interest.

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

I could run tests on RPi 2 B, RPi 3 B+, PYNQ, ROCK960, Pine64 and Orange Pi Plus2.

lpt2007 commented 5 years ago

@lpt2007 did you try this?

FROM arm32v7/debian RUN apt-get update RUN apt-get install -y firefox-esr CMD firefox-esr

I try but not working?

eine commented 5 years ago

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 mesa-utils mesa-utils-extra.

mviereck commented 5 years ago

This does not exist in 2018-11-13-raspbian-stretch.

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 FROM schachr/raspbian-stretch

libEGL warning: DRI2: failed to authenticate

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 XAUTHORITY cookie, and GPU access is allowed with group video.

lpt2007 commented 5 years ago

I also try with raspbian/stretch:

FROM raspbian/stretch
RUN apt-get update
RUN apt-get install -y kodi
CMD kodi

But kodi won't start. Here is log file: x11docker.log

lpt2007 commented 5 years ago

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 XAUTHORITY cookie, and GPU access is allowed with group video.

Maybe this is authentication cookie problem: xauth list and add cookie to container xauth add (coockie get from command xauth list)

lpt2007 commented 5 years ago

What that error mean:

/usr/bin/kodi: 46: /usr/bin/kodi: tvservice: not found
/usr/lib/arm-linux-gnueabihf/kodi/kodi_v7.bin: error while loading shared libraries: libbrcmGLESv2.so: cannot open shared object file: No such file or directory
/usr/bin/kodi: 60: /usr/bin/kodi: tvservice: not found
mviereck commented 5 years ago

What that error mean:

It looks that kodi is missing some packages. tvserver sounds rather harmless. libbrcmGLESv2.so sounds more important. GLES (and EGL) is always related to the GPU.

Add this line to the Dockerfile and build again, it may add some GPU drivers:

RUN apt-get install -y mesa-utils mesa-utils-extra
eine commented 5 years ago

I try but not working?

It was failing, but I now built the image again and it seems to work. Strange... I installed firefox in the host meanwhile, so it might have something to do. I will try again with a fresh raspbian.

Maybe its worth a try to change the base image in Dockerfile to FROM schachr/raspbian-stretch

It tried:

pi@raspberrypi:~/x11docker $ ./x11docker --user=root -i --gpu  schachr/raspbian-stretch bash
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).

'/etc/skel/./.bash_logout' -> '/fakehome/root/./.bash_logout'
'/etc/skel/./.bashrc' -> '/fakehome/root/./.bashrc'
'/etc/skel/./.profile' -> '/fakehome/root/./.profile'
root@70682431a3bd:~# apt update -y && apt install -y kodi && kodi
...
/usr/lib/arm-linux-gnueabihf/kodi/kodi-xrandr: Failed to get size of gamma for output default
libEGL warning: DRI2: failed to authenticate

This might be related: https://github.com/tipam/pi3d/issues/177

mviereck commented 5 years ago

libEGL warning: DRI2: failed to authenticate

Just an idea: As there is no /dev/dri that could be used for GPU access, try with --privileged to allow hardware access in general. E.g. x11docker --gpu -- --privileged -- kodi

If it still fails, it is most probably a missing driver in image.

eine commented 5 years ago

In that case I don't know how to provide GPU access at all. On amd64 this folder is the key.

Is this useful for you? https://www.balena.io/blog/raspberry-pi-gpu-for-containers/

I'm going to try https://hub.docker.com/r/resin/armv7hf-debian and https://hub.docker.com/r/balenalib/armv7hf-debian. Note that resin.io has ben renamed to balena.io.

Just an idea: As there is no /dev/dri that could be used for GPU access, try with --privileged to allow hardware access in general. E.g. x11docker --gpu -- --privileged -- kodi

I will try.

What that error mean:

/usr/bin/kodi: 46: /usr/bin/kodi: tvservice: not found
/usr/lib/arm-linux-gnueabihf/kodi/kodi_v7.bin: error while loading shared libraries: libbrcmGLESv2.so: cannot open shared object file: No such file or directory
/usr/bin/kodi: 60: /usr/bin/kodi: tvservice: not found

I can confirm this with raspbian/stretch.

lpt2007 commented 5 years ago

Just an idea: As there is no /dev/dri that could be used for GPU access, try with --privileged to allow hardware access in general. E.g. x11docker --gpu -- --privileged -- kodi

Not working. Same error libbrcmGLESv2.so.

mviereck commented 5 years ago

Is this useful for you? https://www.balena.io/blog/raspberry-pi-gpu-for-containers/

This looks promising. I am still reading, but this is worth a test already:

x11docker --gpu -- --pid=host -- kodi

If that fails, try:

x11docker --gpu -- --privileged --pid=host -- kodi
eine commented 5 years ago

With x11docker --gpu -- --privileged -- kodi, where the image is https://github.com/mviereck/x11docker/issues/100#issuecomment-455897999, it works without GPU acceleration and I get libEGL warning: DRI2: failed to authenticate. The same with x11docker --gpu -- --pid=host -- kodi and with x11docker --gpu -- --pid=host --privileged -- kodi.

mviereck commented 5 years ago

Please try to with additional MESA installation, it might be still just a missing driver:

RUN apt-get install -y mesa-utils mesa-utils-extra

Further test runs should always include --gpu -- --pid=host --privileged -- to reduce possible sources for issues.

lpt2007 commented 5 years ago

I add this in Dockerfile:

FROM raspbian/stretch
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install -y kodi
RUN apt-get install libraspberrypi0 -y
CMD kodi

This command solves error libbrcmGLESv2.so. RUN apt-get install libraspberrypi0 -y

Now with this command kodi starts ok. x11docker --gpu -- --privileged -- kodi

CPU usage looks normal. I have HDMI-CEC control over kodi with my tv remote, but I lost my keyboard. AUDIO is working ok. How to get keyboard working under kodi?

mviereck commented 5 years ago

Does it also work without --privileged?

If audio is lost without --privileged, add option --alsa

x11docker --gpu --alsa kodi

How to get keyboard working under kodi?

That is strange, I have no idea why the keyboard is lost yet.

lpt2007 commented 5 years ago

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?

lpt2007 commented 5 years ago

x11docker --gpu --alsa kodi

No kodi won't start without --privileged

mviereck commented 5 years ago

No kodi won't start without --privileged

It does not start at all? That's odd, because your previous image based on arm32v7/debian did run without --privileged.

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.

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.

eine commented 5 years ago
$ x11docker --gpu -i --user=root -- --pid=host --privileged -- <image> bash

resin/armv7hf-debian

It is based on Jessie, so kodi is not available.

balenalib/armv7hf-debian

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

kodi is available, but it does not work. libraspberrypi0 is not available.

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 kodi and libraspberrypi0 are available.

It complains about fbset and tvservice, but it works.

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

kodi is available, and it does work. libraspberrypi0 is not available.

armv7/debian

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

kodi is available, and it does work. libraspberrypi0 is not available.

eine commented 5 years ago

Little update. I could install libraspberrypi0 on armv7/debian:

Add these to /etc/apt/sources.list:

deb http://archive.raspbian.org/raspbian stretch main contrib non-free rpi firmware
deb http://archive.raspberrypi.org/debian stretch main

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.

lpt2007 commented 5 years ago

However, kodi is still using the CPU. On my solution cpu is ok.

But I can't get rid of choppy video: picture_problem_show

I run this command: x11docker --gpu --homedir /home/pi/docker/raspbian/ -- --privileged -- kodi-new

mviereck commented 5 years ago

But I can't get rid of choppy video:

Maybe you have missed my comment above: 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.

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.

lpt2007 commented 5 years ago

Maybe you have missed my comment above: 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.

Directly runs ok.

mviereck commented 5 years ago

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:

RUN apt-get install -y libxv1 libxvmc1