termux / x11-packages

A set of packages using X11 Windows System.
Other
547 stars 145 forks source link

[Bug]: SDL2 Issues #669

Closed IntyLab closed 2 years ago

IntyLab commented 2 years ago

Problem description

Two weeks ago, I suddenly wasn't able to launch jzIntv, which uses SDL2. I posted this comment on Reddit, and fixed the problem by using patchelf.

But a couple days ago, I suddenly was getting severe performance issues. On my tablet, jzIntv is now running so slow I can't even use it.

In this comment, I said I also couldn't recompile jzIntv. I realize I had forgotten to specify the correct Makefile, but even after recompiling, the performance isn't any better. On my phone, which is faster than my tablet, jzIntv works okay but is dropping a lot of video frames.

What steps will reproduce the bug?

  1. Fetch the jzIntv source
  2. Unzip it into the Home folder. It creates a subfolder with everything in it.
  3. Install xorgproto and sdl2 packages if necessary.
  4. cd into jzIntv's /src subfolder.
  5. Make using Makefile.termux_sdl2
  6. Targets will be in the /bin subfolder, including "jzintv" which is the emulator itself.
  7. cd into jzIntv's /examples/4-tris subfolder for a sample game written by the same author.
  8. Correct the typo in line 155 of 4-tris.asm by changing "T1TLE" to "TITLE".
  9. Assemble 4-Tris with this command: ../../bin/as1600 4-tris.asm -o 4-tris.bin
  10. cd back to jzIntv's /bin subfolder, where the files 4-tris.bin and 4-tris.cfg now exist.
  11. Fetch the gromintv.bin and exec.bin files (these are the ones from the unreleased Tutorvision, which will work fine). Put them in this /bin subfolder.
  12. Run 4-Tris with the command jzintv ../examples/4-tris/4-tris.bin -e ./exec.bin -g ./gromintv.bin. You can add the -a0 switch to suppress audio, the -z1 switch to double the display size, and the -q switch to suppress most of the output to stdout.
  13. To quit, press the F1 key.

What is the expected behavior?

When launching jzIntv with 4-Tris as indicated above, it should continuously run at 60 frames.

System information

termux-info:

Application version:
0.118.0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://dl.kcubeterm.com/termux-main/ stable main
# x11-repo (sources.list.d/x11.list)
deb https://packages.termux.org/apt/termux-x11 x11 main
Updatable packages:
libcanberra/x11 0.30-3 aarch64 [upgradable from: 0.30-2]
libvorbis/stable 1.3.7-1 aarch64 [upgradable from: 1.3.7]
libwebp/stable 1.2.2 aarch64 [upgradable from: 1.2.1]
netsurf/x11 3.9-28 aarch64 [upgradable from: 3.9-27]
thunar/x11 4.17.7-4 aarch64 [upgradable from: 4.17.7-3]
xfce4-panel/x11 4.16.3-18 aarch64 [upgradable from: 4.16.3-17]
xfce4-session/x11 4.16.0-6 aarch64 [upgradable from: 4.16.0-5]
Android version:
12
Kernel build information:
Linux localhost 4.14.190-23295036-abN975USQS7GVA1 #2 SMP PREEMPT Wed Jan 12 10:47:53 KST 2022 aarch64 Android
Device manufacturer:
samsung
Device model:
SM-N975U
xtkoba commented 2 years ago

Apparently commit 3e62a85265c4e2f1a4871dbde9965966e6cfdf7f (which enables OpenGL support) affects something, according to the description.

Yisus7u7 commented 2 years ago

@IntyLab

Try this:

pkg install gl4es

export LD_LIBRARY_PATH=$PREFIX/lib/gl4es

./program_name
IntyLab commented 2 years ago

@IntyLab

Try this:

pkg install gl4es

export LD_LIBRARY_PATH=$PREFIX/lib/gl4es

./program_name

Thank you! This did the trick. I'll update my documentation.

I tried it on my tablet so far, since I would have noticed whether it was running well or not. It's running at least as well as before.

Yisus7u7 commented 2 years ago

@xtkoba Apparently, you have to enable OpenGL on the mesa.