termux / termux-packages

A package build system for Termux.
https://termux.dev
Other
13.27k stars 3.06k forks source link

Mesa: glxgears crashes on 32bit ARM devices #10226

Closed Yisus7u7 closed 2 years ago

Yisus7u7 commented 3 years ago

Problem description

The window comes out for a few seconds and then disappears

Screenshot_20210726-122626

Info: Android 8.0 32 bits 2GB of ram DE: lxqt WM: Openbox Using vnc

In proot it works, but in termux anything related to OpenGL does not want to work

Steps to reproduce

Expected behavior

Yisus7u7 commented 3 years ago

Screenshot_20211016-152508 Screenshot_20211016-152816

@xeffyr Posh Shell (armhf alpine, proot) has no problem running openGL, so the error will be that any specific hardware/driver cannot be accessed?

Yisus7u7 commented 3 years ago

Apparently Xephyr and Posh Shell have no problem with openGL apart from its very poor performance.

Note that both use wayland

Yisus7u7 commented 3 years ago

Screenshot_20211017-165820 Screenshot_20211017-165749

@xeffyr Solved! Turn on mesa hardware acceleration

https://gxmersam.blogspot.com/p/getting-hardware-acceleration-on-termux.html?m=1

Yisus7u7 commented 3 years ago

Screenshot_20211017-170718

Screenshot_20211017-170626

Enabling on mesa hardware acceleration

Yisus7u7 commented 3 years ago

The performance is excellent, there is no lag, everything goes very fast

sukualam commented 3 years ago

The performance is excellent, there is no lag, everything goes very fast

Does it run on debian proot/chroot?

Yisus7u7 commented 3 years ago

The performance is excellent, there is no lag, everything goes very fast

Does it run on debian proot/chroot?

No, it is fully native in termux x11

https://youtu.be/hsO-Os9jr8g

AbdullahBinJahed commented 3 years ago

The performance is excellent, there is no lag, everything goes very fast

Does it run on debian proot/chroot?

No, it is fully native in termux x11

https://youtu.be/hsO-Os9jr8g

what really !!! have to check right now !!! 😃

DLC01 commented 3 years ago

Screenshot_20211017-165820 Screenshot_20211017-165749

@xeffyr Solved! Turn on mesa hardware acceleration

https://gxmersam.blogspot.com/p/getting-hardware-acceleration-on-termux.html?m=1

this is currently using the llvmpipe driver unless you specified GALLIUM_DRIVER=zink

sukualam commented 3 years ago

Actually its better to run in chroot linux because it hss many 3D app/games , also box86 wine.. But if it still in termux desktop, i think there is no app/games there..

DLC01 commented 3 years ago

IMG_20211018_105206 IMG_20211018_105117 this was using the Zink driver

sukualam commented 3 years ago

IMG_20211018_105206 IMG_20211018_105117 this was using the Zink driver

Can it work on Adreno 506?

DLC01 commented 3 years ago

IMG_20211018_105206 IMG_20211018_105117 this was using the Zink driver

Can it work on Adreno 506?

it should work on all GPUs that support vulkan

sukualam commented 3 years ago

IMG_20211018_105206 IMG_20211018_105117 this was using the Zink driver

Can it work on Adreno 506?

it should work on all GPUs that support vulkan

Can you give me tutorial link? I tried few days ago, i read tutorial somewhere, but in the end, i compile and not work.. Is it like turnip? do you have tutorial?

I will try in chroot..

DLC01 commented 3 years ago

IMG_20211018_105206 IMG_20211018_105117 this was using the Zink driver

Can it work on Adreno 506?

it should work on all GPUs that support vulkan

Can you give me tutorial link? I tried few days ago, i read tutorial somewhere, but in the end, i compile and not work.. Is it like turnip? do you have tutorial?

I will try in chroot..

you could try the instructions in https://github.com/suhan-paradkar/tewmux-disabled/releases/download/mesa-hw/instructions.tar.gz

i dont know weather it will work in an chroot envionment

Dawimpy commented 3 years ago

You can try this in chroot environment

AbdullahBinJahed commented 3 years ago

The performance is excellent, there is no lag, everything goes very fast

Does it run on debian proot/chroot?

No, it is fully native in termux x11

https://youtu.be/hsO-Os9jr8g

ok i couldn't get it to work ... i'll ask you in telegram ... please respond me there

Yisus7u7 commented 3 years ago

Screenshot_20211022-204551 Screenshot_20211022-204516

@xeffyr @suhan-paradkar

I just killed two birds with one stone

1 - OpenGL crash in 32 bits arm devices

How to fix it?

And voila!, everything will work smoothly in both Xwayland and vnc.

2 - How to fix gl4es is slow

Just follow the steps in step 1, and voila, gl4es will go fast and smooth.

Additional Notes

Do not use ndk-multilib for compilation, leave OpenGL broken for compilation of more packages in the future

It works perfectly, I don't get segmentation failures and the optimization is excellent, I don't know if this works also in 64 bits.

The slowness of gl4es must be because the graphics are forced, since mesa does not provide a correct rendering, I think that explains why gl4es is slow

I was guided by this page :

https://gxmersam.blogspot.com/p/getting-hardware-acceleration-on-termux.html?m=1

And I go back and repeat, I'm not using zink, you don't need zink to work.

I hope you find all this information useful

DLC01 commented 3 years ago

from what i have seen before mesa has some issues when compiling in ci, mainly saying llvm-config not found

Yonle commented 3 years ago

@Yonle

Please do not mention me as i'm not interested with this. I repeat, do not mention random user.

AbdullahBinJahed commented 3 years ago

a little help ? i just can't seem to get it work 😥

Yisus7u7 commented 3 years ago

@Yonle

Please do not mention me as i'm not interested with this. I repeat, do not mention random user.

Sorry I mentioned it by mistake

ghost commented 3 years ago

Lots of off-topic and overquoting.

I'm locking issue now. If you know how to fix - submit a pull request with changes to package versions, build configuration and patches (whatever is required).

xtkoba commented 2 years ago

Note that mesa-demos, the package that contains glxgears, has been disabled now. This issue is not worth being open.