You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I've been trying to get Greenfield to work on Android (non-rooted) through Termux and proot with the goal of getting GTK apps to run. This is possible by using Termux and proot, for example you can start hardware-accelerated GTK apps with Termux and Termux-X11 like so:
It's not particularly fast, but it works. With GALLIUM_DRIVER=llvmpipe it uses software rendering, which also works.
The probably biggest issue with this stack however is that it's X11 only, and I would really like to use Wayland - which is where Greenfield could come in handy. I prepared a Docker simple image (https://github.com/pojntfx/hydrapile/tree/main/greenfield), which can successfully start without hardware acceleration (docker run -it -p 8080:8080 -p 8081:8081 pojntfx/greenfield) and with hardware acceleration (docker run -it --privileged -v /dev/dri:/dev/dri -p 8080:8080 -p 8081:8081 pojntfx/greenfield) on my x86_64 system (Dell XPS 13 Plus, i7-1280P) as well as a aarch64 server I've tried (without hardware acceleration, using Hetzner's ARM Cloud VPS servers, these ones: https://www.hetzner.com/press-release/arm64-cloud/).
So I then took the Docker image that can successfully run on said aarch64 server, copy it to my Android phone (Google Pixel 6 Pro), create a proot (Debian 12), and start the compositor proxy CLI and web server (see my notes). So far so good - everything starts up, the native Node extension also works:
The browser console shows no bugs, and data is being sent through the WebSocket - the window just never shows up.
I noticed these logs:
Can't open device path: /dev/dri/renderD128: Permission deniedCan't initialize EGL, wl_dmabuf and wl_drm disabled.
Since we're on Android here we can't directly access the DRI devices. Could it maybe be an option to use software rendering, for example with pixman (like Weston) or something similar? Or am I missing a configuration flag that makes Greenfield not use the llvmpipe or virpipe GL backends?
I noticed that a similar error behavior (apps start successfully, but their windows are never rendered, and no obvious error messages show up) occurs on mainline Linux if I forget to install libegl1-mesa in the Docker container.
Any ideas what might be going on here? Am I maybe missing something obvious? I created a repo for reproduction.
The text was updated successfully, but these errors were encountered:
Usually when everything seems to work but no applications are shown, it's the video encoding that's having issues.
Video encoding in Greenfield is implemented using GStreamer. You can try troubleshooting/changing the behavior of the encoding pipeline without recompiling by tweaking some environment variables. In your case, you can try to see what's going wrong by setting GST_DEBUG=4. That should give you a lot of output to sift through but will (hopefully) also tell you what's going wrong.
Keep in mind that Greenfield proxy (GStreamer actually) also must have some kind of OpenGL implementation (even if it's just a software one) because it relies on an OpenGL shader to do color splitting (alpha+opaque).
Thanks, yes that makes a lot of sense! I managed to get the actual encoding pipeline to work in proot on Android now, but it looks like for it's GL implementation to work properly some components always have to run in actual Android, not proot. I got GL to work on proot (and was able to render shaders w/o problems) - I'll try and use some of these debugging methods for Greenfield too & report back: https://github.com/pojntfx/hydrapile/blob/main/docs/termux-x11-gstreamer-ffmpeg.md
Hi! I've been trying to get Greenfield to work on Android (non-rooted) through Termux and proot with the goal of getting GTK apps to run. This is possible by using Termux and proot, for example you can start hardware-accelerated GTK apps with Termux and Termux-X11 like so:
It's not particularly fast, but it works. With
GALLIUM_DRIVER=llvmpipe
it uses software rendering, which also works.The probably biggest issue with this stack however is that it's X11 only, and I would really like to use Wayland - which is where Greenfield could come in handy. I prepared a Docker simple image (https://github.com/pojntfx/hydrapile/tree/main/greenfield), which can successfully start without hardware acceleration (
docker run -it -p 8080:8080 -p 8081:8081 pojntfx/greenfield
) and with hardware acceleration (docker run -it --privileged -v /dev/dri:/dev/dri -p 8080:8080 -p 8081:8081 pojntfx/greenfield
) on myx86_64
system (Dell XPS 13 Plus, i7-1280P) as well as aaarch64
server I've tried (without hardware acceleration, using Hetzner's ARM Cloud VPS servers, these ones: https://www.hetzner.com/press-release/arm64-cloud/).So I then took the Docker image that can successfully run on said
aarch64
server, copy it to my Android phone (Google Pixel 6 Pro), create aproot
(Debian 12), and start the compositor proxy CLI and web server (see my notes). So far so good - everything starts up, the native Node extension also works:When I then try to start an app (
rem://localhost:8081/gtk4-demo
, for example) the process starts successfully:It also keeps running:
The browser console shows no bugs, and data is being sent through the
WebSocket
- the window just never shows up.I noticed these logs:
Since we're on Android here we can't directly access the DRI devices. Could it maybe be an option to use software rendering, for example with
pixman
(like Weston) or something similar? Or am I missing a configuration flag that makes Greenfield not use thellvmpipe
orvirpipe
GL backends?I noticed that a similar error behavior (apps start successfully, but their windows are never rendered, and no obvious error messages show up) occurs on mainline Linux if I forget to install
libegl1-mesa
in the Docker container.Any ideas what might be going on here? Am I maybe missing something obvious? I created a repo for reproduction.
The text was updated successfully, but these errors were encountered: