Open psimovec opened 5 months ago
so the issue in reality is that phone GPUs don't support OpenGL, they support OpenGLES (GL embedded systems). this is a limitation with phones, thats what the Mali gpu (or any other arm64 gpu used in phones) supports (Android and IOS are all also GLES but their toolkits are built for GLES so this is transparent to them) usually toolkits provide 2 versions, one for GL, one for GLES. GTK (used in shell and most apps) has a GL renderer, and it has a GLES renderer which we use QT applications also have a GL version for the GUI library, and they have a GLES version looks like kitty which uses GLFW doesn't support GLES at all. one way to get around this is using GL4ES (which i have a custom branch which works on our device, will publish to my personal repository soon), but GL4ES is not very performant, it gives GL compatibility by translating calls, but it is also pretty slow If you really want to use that app, you can wait for me to release my version of GL4ES and use my (soon to be written) installation guide
I see, that would kinda defeat some purpose of using GPU accellerated kitty, but it might be worth trying out of curiosity, I'll use some alternatives for now.
looks like glfw has support for gles but its not auto detected or enabled by default at all it can be forcefully enabled by exporting GLFW_CLIENT_API=GLFW_OPENGL_ES_API
tried GLFW_CLIENT_API=GLFW_OPENGL_ES_API kitty
or export GLFW_CLIENT_API=GLFW_OPENGL_ES_API; kitty
and the error is the same. Do I need to install any requirements for this to work?
i tried it from a remote shell and it was fine ssh furios@10.15.19.82
DISPLAY=:0 GLFW_CLIENT_API=GLFW_OPENGL_ES_API kitty
and it ran fine i can look into how it can be integrated into the system so that this step is not required and glfw just works
I tried to run it using ssh and that worked too, no success running it directly from the phone.
the issue is with WAYLAND_DISPLAY
unset WAYLAND_DISPLAY
forcing it to run in xwayland is a workaround for some reason on a wayland display it can't access egl configs
that's weird, works for me after unsetting it
So the workaround to be able to run it from desktop entry is:
cat /usr/share/applications/kitty.desktop | sed "s/^Exec=kitty/Exec=sh -c 'unset WAYLAND_DISPLAY; kitty'/" > ~/.local/share/applications/kitty.desktop
Perhaps the kitty
package could be patched in similar way?
modifying the desktop file can work
you can also open up kitty itself as its python and just del os.environ['WAYLAND_DISPLAY']
but the "right" solution is to figure out what is wrong with glfw3 when this is reached https://github.com/glfw/glfw/blob/master/src/platform.c#L95 and why eglconfig doesn't like GLFW_PLATFORM_WAYLAND
Steps to reproduce:
sudo apt install kitty && kitty
Seems like there is some openGL issue.