Skip to content
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

please add support 32 bit (armv8l) in termux-x11.deb #43

Closed
sukualam opened this issue Oct 5, 2021 · 46 comments
Closed

please add support 32 bit (armv8l) in termux-x11.deb #43

sukualam opened this issue Oct 5, 2021 · 46 comments
Labels
question Further information is requested

Comments

@sukualam
Copy link

sukualam commented Oct 5, 2021

Actually my android is 64 bit, but I try 32 bit termux bootstrap (for testing box86 wine).

I want to try wayland in 32 bit termux environment and when i try install termux-x11.deb it fails. I try to extract the .deb and i see no armv8l (32 bit i think) libs..

Im noob to compile.. Pls add it. Thx..

(previously, when i use normal termux (64 bit), the termux-x11 work fine , i can run xfce4 desktop)

@twaik
Copy link
Member

twaik commented Oct 5, 2021

Sorry, but I do not think it will help. Termux-x11 just wraps termux's Xwayland binary. You should use 32bit Termux environment.

@ghost
Copy link

ghost commented Oct 5, 2021

any specific error? it should support all architectures.

Architecture: all

@ghost ghost added the question Further information is requested label Oct 5, 2021
@sukualam
Copy link
Author

sukualam commented Oct 5, 2021

I try uname -m (in 32 bit termux environment) it shows armv8l , and i think there is no folder for that arch in termux-x11.deb ... while i install the .deb error says cannot stat libstarter ....

@twaik
Copy link
Member

twaik commented Oct 5, 2021

It is really arch independent, but it contains JNI library that helps to start Xwayland. But a package contains libraries for all 4 architectures.

@twaik
Copy link
Member

twaik commented Oct 5, 2021

and i think there is no folder for that arch in termux-x11.deb

Check in /data/data/com.termux/files/usr/libexec/termux-x11

@sukualam
Copy link
Author

sukualam commented Oct 5, 2021

I try install termux-x11.deb in 32 bit termux bootstrap and this is the log
Setting up xwayland (1.20.5-7) ... Setting up termux-x11 (1.02.06) ... mv: cannot stat '/data/data/com.termux/files/usr/libexec/termux-x11//libstarter.so': No such file or directory dpkg: error processing package termux-x11 (--configure): installed termux-x11 package post-installation script subprocess returned error exit status 1 Errors were encountered while processing: termux-x11 E: Sub-process /data/data/com.termux/files/usr/bin/dpkg returned an error code (1) ~ $

And i try to check /data/data/com.termux/files/usr/libexec/termux-x11

.../libexec/termux-x11 $ ls -la total 3282 drwxr-xr-x 6 u0_a185 u0_a185 3488 Oct 5 13:32 . drwx------ 7 u0_a185 u0_a185 3488 Oct 5 13:32 .. drwxr-xr-x 2 u0_a185 u0_a185 3488 Oct 5 13:32 arm64-v8a drwxr-xr-x 2 u0_a185 u0_a185 3488 Oct 5 13:32 armeabi-v7a -rw-r--r-- 1 u0_a185 u0_a185 3334747 Oct 4 12:26 starter.apk -rwxr-xr-x 1 u0_a185 u0_a185 454 Oct 4 12:26 termux-startx11 drwxr-xr-x 2 u0_a185 u0_a185 3488 Oct 5 13:32 x86 drwxr-xr-x 2 u0_a185 u0_a185 3488 Oct 5 13:32 x86_64 .../libexec/termux-x11 $

@twaik
Copy link
Member

twaik commented Oct 5, 2021

Can you please try this script and post a log here?

#!/data/data/com.termux/files/usr/bin/bash
set -x
[ -z "$PREFIX" ] && PREFIX=/data/data/com.termux/files/usr
ABI=
case `uname -m` in
  arm) ABI=armeabi-v7a;;
  aarch64) ABI=arm64-v8a;;
  i686) ABI=x86;;
  x86_64) ABI=x86_64;;
esac
mv $PREFIX/libexec/termux-x11/$ABI/libstarter.so $PREFIX/libexec/termux-x11/

@sukualam
Copy link
Author

sukualam commented Oct 5, 2021

~ $ ./test
+ '[' -z /data/data/com.termux/files/usr ']'
+ ABI=
+ case `uname -m` in
++ uname -m
+ mv /data/data/com.termux/files/usr/libexec/termux-x11//libstarter.so /data/data/com.termux/files/usr/libexec/termux-x11/
mv: cannot stat '/data/data/com.termux/files/usr/libexec/termux-x11//libstarter.so': No such file or directory
~ $

@sukualam
Copy link
Author

sukualam commented Oct 5, 2021

In 64 bit , the uname detect aarch64 but when im in 32 bit, the uname detect armv8l

@agnostic-apollo
Copy link
Member

Use dpkg --print-architecture

@sukualam
Copy link
Author

sukualam commented Oct 5, 2021

~ $ dpkg --print-architecture
arm
~ $

@ghost
Copy link

ghost commented Oct 5, 2021

The script can be fixed by replacing uname to dpkg --print-architecture or something to fix having 32-bit installations on a 64-bit device

ghost pushed a commit that referenced this issue Oct 5, 2021
Termux 32-bit Installations on 64-bit OS can report architecture differently
use "dpkg --print-architecture" to report the correct current arch instead based on Termux repo architecture information
@sukualam
Copy link
Author

sukualam commented Oct 5, 2021

while use (replace with) dpkg --print-architecture instead uname -m , it managed to copy the file libstarter.so from armeabi-v7a folder succesfully, but when i run termux-x11, it just show output: killed.

Finally i copy libstarter.so from arm64-v8a folder manually and it seem work (it opens termux x11 app and no error notification)

@ghost
Copy link

ghost commented Oct 5, 2021

perhaps the 32-bit libstarter.so can't be used in 64-bit Termux:X11 installation. jnilibs from other arches needs to be removed and 32-bit should be keeped (needs APK repack) if you're using 32-bit Termux installation


other than that 32-bit libs can't be used on 64-bit and vice versa. it needs to be 64-bit

@twaik
Copy link
Member

twaik commented Oct 5, 2021

As I said before the package has no architecture dependent libraries that are used by Termux. But there are some libraries that are used by JVM and should fit it.
starter.apk does not contain jni libraries. Repack will not help. Jni libraries should be kept in termux's filesystem.

@twaik
Copy link
Member

twaik commented Oct 5, 2021

We can try to make starter check what architecture of JNI library it needs. Or just run /system/bin/uname -m instead of dpkg or termux's uname.

@sukualam
Copy link
Author

sukualam commented Oct 5, 2021

I realize this is somewhat complicated 🥴, after the install problem is solved (libraries finally copied), now it seems this 32 bit mode cant display program for now, i think maybe i need to back to 64 bit mode..

@twaik
Copy link
Member

twaik commented Oct 5, 2021

@sukualam You were right when you decided to report it. Anyway we should fix it.

@RalfWerner
Copy link

RalfWerner commented Oct 5, 2021

Anyway we should fix it.

Yes! I've also no success to start XClient=fluxbox see here up to last What is wrong or missing?
Check with version 8 and PiP (shot1 Termux/X11 in Picture Instead of Phone/Calculator) and version 9 (shot 2-3)

Screenshot

grafik

between 2 and 3 is the empty X11-screen (with toast: Service was Created) instead of fluxbox and stop after 10 sec.
/data/data/com.termux/files/usr/libexec/termux-x11/termux-startx11 doing the same.

@sukualam
Copy link
Author

sukualam commented Oct 5, 2021

@sukualam You were right when you decided to report it. Anyway we should fix it.

Oh ok thanks, btw.. For now the 32 bit things (Termux:x11, wayland implementation) on 64 bit machine seems not working yet, i even got segmentation fault when run: env DISPLAY=:1 glxgears

@twaik
Copy link
Member

twaik commented Oct 5, 2021

Yes! I've also no success to start

Post logs...

Oh ok thanks, btw.. For now the 32 bit things (Termux:x11, wayland implementation) on 64 bit machine seems not working yet, i even got segmentation fault when run: env DISPLAY=:1 glxgears

I think first of all you should try other stuff, like xterm/pcmanfm/geany/putty. And of cource I need logs.

@sukualam
Copy link
Author

sukualam commented Oct 6, 2021

Screenshot

Screenshot_20211006-103839_Termux_X11

I clean install 32 bit termux bootstrap, and install xwayland and install termux-x11.deb file (while the .deb install script success, it actually copy libstarter.so from armeabi-v7a folder, and i manually replace from arm64-v8a folder)

Then i install geany

After that i run

export XDG_RUNTIME_DIR=${TMPDIR}
termux-x11

In new tab, i run
env DISPLAY=:0 geany

And it shows the program...

I think i need test in 32 bit proot-distro again, because yesterdey everything fail.. Maybe i use wrong command.

@sukualam
Copy link
Author

sukualam commented Oct 6, 2021

Screenshot

Screenshot_20211006-105338_Termux_X11

I install aterm from termux and try to run it. Then it actually displayed in termux x11 app, and i try run command glxinfo , glxgears , still segmentation fault...

Btw, fluxbox run fine..

@twaik
Copy link
Member

twaik commented Oct 6, 2021

I think that is a problem of current glx implementation, not of termux-x11

@sukualam
Copy link
Author

sukualam commented Oct 6, 2021

Yes, I think so 😎 , btw the .deb still copy from wrong folder arch.

@twaik
Copy link
Member

twaik commented Oct 6, 2021

Can you please try this script and post a log?

#!/data/data/com.termux/files/usr/bin/bash
set -x
[ -z "$PREFIX" ] && PREFIX=/data/data/com.termux/files/usr
ABI=
ARCH=`/system/bin/uname -m`
case $ARCH in
  arm) ABI=armeabi-v7a;;
  aarch64) ABI=arm64-v8a;;
  i686) ABI=x86;;
  x86_64) ABI=x86_64;;
esac
echo $ARCH $ABI

@sukualam
Copy link
Author

sukualam commented Oct 6, 2021

Screenshot

Screenshot_20211006-112831_Termux

looks like that

@twaik
Copy link
Member

twaik commented Oct 6, 2021

Again please?

#!/data/data/com.termux/files/usr/bin/bash
set -x
ABI=
ARCH=`/system/bin/uname -m`
case $ARCH in
  arm*) ABI=armeabi-v7a;;
  aarch64) ABI=arm64-v8a;;
  i686) ABI=x86;;
  x86_64) ABI=x86_64;;
esac
echo arch is $ARCH, abi is $ABI

@sukualam
Copy link
Author

sukualam commented Oct 6, 2021

Screenshot

Screenshot_20211006-113834_Termux

btw if i use file from that ABI folder, the termux-x11 command crash

@twaik
Copy link
Member

twaik commented Oct 6, 2021

Wait. Do you use arm64 lib with your device (armv8)?

@sukualam
Copy link
Author

sukualam commented Oct 6, 2021

My android is 64 bit, i install termux 32 bit bootstrap from this script https://github.com/WMCB-Tech/termux-prefix-switcher/ to switch in 32 bit prefix in termux

But when install termux-x11.deb , and run termux-x11, it instant crash if i didn't use libstarter.so from arm64-v8a ...

I dont know why, so i just manually replace that lib (libstarter.so) armeabi-v7a version to arm64-v8a version

@RalfWerner
Copy link

Post logs...

@twaik They ar part of screenshots contains everything that is necessary for repetition and what is logged. In shot1 (version 8 - no problem), the four process checks (PID1-4 = 13768,13879,15786 and 24534) are well recognizable and also the Taskbar/workspace-manager of fluxbox above Extra Keys (EK).
For version 9, I kept myself striktly to your instructions (README). Recognizable PID2 is missing as I expected, PID3 has a different name (termux x11) and the rest is behind it. What are you expecting?
The device here is arm/armv7l and all pkg actions are done on this.

@sukualam you've success with fluxbox - nice - could you see the taskbar with set EK on? Should I also play with a mixtures of 32/64 versions or wait until @twaik has a solution or could at least repeat the problem?

@sukualam
Copy link
Author

sukualam commented Oct 6, 2021

Post logs...

@twaik They ar part of screenshots contains everything that is necessary for repetition and what is logged. In shot1 (version 8 - no problem), the four process checks (PID1-4 = 13768,13879,15786 and 24534) are well recognizable and also the Taskbar/workspace-manager of fluxbox above Extra Keys (EK). For version 9, I kept myself striktly to your instructions (README). Recognizable PID2 is missing as I expected, PID3 has a different name (termux x11) and the rest is behind it. What are you expecting? The device here is arm/armv7l and all pkg actions are done on this.

@sukualam you've success with fluxbox - nice - could you see the taskbar with set EK on? Should I also play with a mixtures of 32/64 versions or wait until @twaik has a solution or could at least repeat the problem?

actually after that, i just install xfce4 instead, and it run fine.. For the bottom panel (dock), somewhat it overlapped with termux x11 Extra Keys. Until now, i just hide Extra Keys and the bottom panel showed up.

I think this 32 bit prefix is still broken for running somewhat GLX or things like accelerator in xwayland, if use tigervnc, it will use llvm-renderer and somewhat use software rendering and can run glxgears just fine in VNC but low fps.

@RalfWerner
Copy link

somewhat it overlapped with termux x11 Extra Keys

Something or complete? The X11 PiP in the shot1 was made with the ekeys branch. There same EK lines are used as in Termux (several lines possible). If you switch on EK and Reseed... Choice, and use non-floating Onscreen-KB, should be visible also in XFCE4 (I like fluxbox.. more and it do the same) the complete screen. All input areas (keyboard response) also at the bottom should be visible, like in VNC - that's the way?

@sukualam
Copy link
Author

sukualam commented Oct 6, 2021

Screenshot

Screenshot_20211006-181400_Termux_X11

Notice the small bottom tooltip? it actually from bottom xfce panel, i hover the mouse to that location...

the screen resolution is changed when reseed and show android keyboard.. When i close android keyboard the resolution back to previous size..

@RalfWerner
Copy link

RalfWerner commented Oct 6, 2021

The Reseed choice effect is expected. My question was related to EK! Could you move your Application/workspace line from Top to Bottom (default in fluxbox) and open a terminal there, and is it still visible with EK? -- your battery is low :)

@sukualam
Copy link
Author

sukualam commented Oct 6, 2021

Screenshot

Screenshot_20211006-195208_Termux_X11

I try move panel to make it look like above Extra Keys (default is still overlapped with Extra Keys), and i toggle keyboard on/off with fast and i see something like that..

@RalfWerner
Copy link

That's not okay yet. Administration of the EK is outside the XServer, that communicating with xfce4. Here is fluxbox. better. But that's not this topic and is partially solved in #19, where unfortunately new disadvantages have been added.

Thanks for the information about this version. It seems it works like version 4 with PID3=Xwayland (Shot1). I'm waiting for @twaik's answer to my failed fluxbox start with version 9.

@sukualam
Copy link
Author

sukualam commented Oct 6, 2021

Oh ok too... so far this issue seems solved (termux-x11.deb installation) while i still need to manually copy the correct libstarter.so lib...

I guess the GLX problem and some 3D things issue in 32 bit termux is another topic here..

@zanfix
Copy link

zanfix commented Oct 6, 2021

Hi here, I have a similar problem...

My device: Samsung galaxy tab s6, android 10, one ui 2.5

dpkg -i termux-x11.deb fails at post install.

from termux:
uname -m prints "armv8l" and "dpkg --print-architecture" prints "aarch64"

edit: To complete the post install I modified the file /data/data/com.termux/files/usr/var/lib/dpkg/info/termux-x11.postinst:

#!/data/data/com.termux/files/usr/bin/bash
[ -z "$PREFIX" ] && PREFIX=/data/data/com.termux/files/usr
ABI=
case `uname -m` in
  arm) ABI=armeabi-v7a;;
  aarch64) ABI=arm64-v8a;;
  armv8l) ABI=arm64-v8a;;
  i686) ABI=x86;;
  x86_64) ABI=x86_64;;
esac
mv $PREFIX/libexec/termux-x11/$ABI/libstarter.so $PREFIX/libexec/termux-x11/

@twaik
Copy link
Member

twaik commented Oct 8, 2021

They ar part of screenshots contains everything that is necessary for repetition and what is logged.

If I asked you to tell then I failed to understand what exactly has happened. Post logs.

could you see the taskbar with set EK on

Extra Keys pull request is still unmerged. Ask people to test it in the corresponding discussion.

I think this 32 bit prefix is still broken for running somewhat GLX or things like accelerator in xwayland, if use tigervnc, it will use llvm-renderer and somewhat use software rendering and can run glxgears just fine in VNC but low fps.

Xwayland itself has no acceleration. Tigervnc does not has it too. As I know there is something like software rendering. Bit it is not a part of Termux:X11, because T:X11 is not a Xserver implementation, it is just a backend for Xwayland.

twaik added a commit that referenced this issue Oct 8, 2021
@twaik
Copy link
Member

twaik commented Oct 8, 2021

@sukualam @zanfix
Please, try again with new artifact.

@sukualam
Copy link
Author

sukualam commented Oct 8, 2021

@sukualam @zanfix Please, try again with new artifact.

Screenshot

Screenshot_20211008-193238_Termux_X11

Ok, i clean remove termux-x11 and uninstall the termux X11 app too... Then i try the latest artifact, and i can say now that bug about termux-x11.deb is gone (i can start termux-x11 normally now in 32 bit termux bootstrap)

Btw, maybe this another issue, the extra keys in termux X11 app is still overlapping with few % of bottom region of display output (the xfce bottom panel in my case) .. But when i enable PiP, and i minimize the Termux X11, and then returned it again to full size, its no more overlapping, and the dock is visible now..

@twaik
Copy link
Member

twaik commented Oct 8, 2021

@zanfix ?

@zanfix
Copy link

zanfix commented Oct 8, 2021

@zanfix ?

Yes... it installs with no problem now... I had a seg fault on xfce4 start, but will put it in the other issue I closed?

Started fine the second time (after restarting termux and termux:x11)

Note: I started from a clean termux installation...

@twaik
Copy link
Member

twaik commented Oct 9, 2021

I think so...

@twaik twaik closed this as completed Oct 9, 2021
@termux termux locked and limited conversation to collaborators Jul 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

5 participants