Closed hansm629 closed 7 months ago
Did you try -legacy-drawing
mode?
According to the log there was no connection. Did you open application during recording this log?
According to the log there was no connection. Didyou open application during recording this log?
-legacy-drawing
Even if you run it in that mode, the same black screen appears.
No separate applications were run while executing the debug command. T_T
It does not matter what runs in session. What matters is what happens during connection attempt which did not happen (according to the log)...
I think I can try to fix it with Remote Test Lab by Samsung. But it will happen a bit later, I am kind of busy with other projects.
@twaik
After reinstalling Termux-X11, the X server ran in -legacy-drawing mode! :)
First of all, I think #544 that I posted can be closed.
but
https://github.com/termux/termux-x11/issues/495
Like the issue, the X server color was displayed strangely.
Issue #495 appears to be a compatibility issue caused by the Exynos GPU's ANGLE driver. Are there any plans to fix it?
Have the same problem, but it still hasn’t been solved after using -legacy-drawing...
Device: S24 (Exynos CPU) Also just sharing that I initially could only get it to work with the -legacy-drawing flag. Not sure why though, but a week later with some config changes, it works without it. I'll play around to find out why it's working without it now.
I found something that may cause a problem. Try https://github.com/termux/termux-x11/actions/runs/7973490833 artifact with -force-bgra
and -legacy-drawing
in different combinations.
@hansm629 you did not switch to main applcation during capturing this log so it is useless. Can you make one more log but with switching to main application please?
Unfortunately I failed to setup Remote Test Lab of Samsung. RDB does not want to connect. I could check this if someone wants to lend me device (remotely). But now I can not fix it.
Can someone please check if build 592 can run without -legacy-drawing
flag?
@hansm629 ?
Ok, it seems like that works in Remote Test Lab (yeah, I tested this without adb).
@yueziji @chris-mcdonald-dev ?
@twaik Sorry for the late reply. I'm working right now, so I'll test it after work. (I have the S24+ at home.)
@hansm629 are you home?
@twaik I am currently leaving work. I'm a little late because I worked overtime. We will provide feedback within 2 hours.
@twaik
I will provide feedback on the test results.
X11 is displayed well on Galaxy S24+ (Exynos2400 Ver) even without the -legacy-drawing
option.
However, it seems to show somewhat worse performance compared to -legacy-drawing
.
As shown in the attached video and screenshot, there is a symptom that the Windows window breaks when moved quickly.
https://github.com/termux/termux-x11/assets/101167173/cfdef5de-877b-4876-ab58-b9d1c7420aac
Yeah, seems like a tearing. Can you please make a screen recording using screen capturing tool and not record a screen with another device? Pixels and focus distance changes confuse me.
@twaik I'm thinking it may be a PRoot problem, so I'm uninstalling Debian 12 and reinstalling it.
If there are any symptoms after installation, I will capture a video and upload it.
I think it will take some time~
Try to use regular termux's xfce for test. And please tell me if it is reproducible.
@twaik The same symptom occurs on both PRoot Debian and Termux XFCE.
But strangely, the above symptoms disappear when I use a screen capture application.
Let's find a way to capture video of the symptoms.
When running xfce with Termux native on a Snapdragon device, it is very smooth, but in the case of Exynos 2400 If you don't use the "-legacy-drawing" option, you'll see frame drops and screen tearing if you move the window quickly... Hmm...
Let's try to do glFinish()
before calling eglSwapBuffers.
app-universal-debug.zip
Or, even better, before drawing cursor. app-universal-debug.zip Check if it fixes tearing.
@twaik Sorry for the late reply. The two apks you provided still occasionally cause GUI frame drops and tearing on the X11 server.
But interestingly, the GUI operates smoothly when glmark2 (or glmark2-es2) is running or a video is being played using VLC.
Could this be related to the Exynos2400's Xclipse 940 GPU
driver?
Xclipse 940
uses Angle EGL
, not the regular EGL driver.
In an X11 server environment
Case1: virglrenderer-android
Case2: angle-android + virglrenderer-android
Case3: vulkan-loader-android + mesa-zink + virglrenderer-mesa-zink
When running glmark2 (or glmark2-es2)
, the total score was only 60 to 70 fps.
It's just a guess, but I assume there is a problem with libEGL_angle.so
, the default driver for Exynos2400 Xclipse 940 GPU
.
Is there a possibility that this could cause problems with compatibility and performance with Termux-X11?
@twaik
oh! oh my god!
I changed the value of vblank_mode
from auto -> off
in xfwm4.xml
.
Performance has improved!!!
Now on Exynos 2400
Works smoothly in both Termux native XFCE
environment and PRoot Linux XFCE
environment!
What does this option have to do with it?
There were no problems with Exynos using the Snapdragon series and the existing Mali GPU.
This problem occurred with the Exynos 2400, which was changed to an AMD RDNA3 base GPU
.
Is this also a compatibility issue with the Exynos 2400 Android libEGL_angle.so
driver?
Is tearing problem fixed with disabling vblank mode too?
Is tearing problem fixed with disabling vblank mode too?
Yes! :)
I have a few ideas how to make that work. But I need to research something.
@twaik If you need testing, please let me know anytime. :)
app-universal-debug.zip Try this.
Diff is for me. diff.txt
Do not forget to enable vblank.
@hansm629 ?
@twaik I'm going out for a while right now. I'll tell you the test results when I get back home! :)
@twaik
Intermittent performance degradation (GUI tearing) still occurs when the vblank_mode option is set to auto.
This happens more clearly when zink or virgl is applied to X11.
ah! I discovered an interesting symptom.
This time, after applying WSI Layer to Xclipse940, I am conducting several tests in combination with zink.
Case 1. In the case of Vulkan + mesa-zink 22.0.5 (tur-repo)
, if the value of vblank_mode in xfce4's xml settings is auto, the display refresh rate is recognized as 30Hz(?!) on the xfce4 desktop.
(When turned off, normal performance occurs at 60Hz)
Case 2. In the case of Vulkan + mesa 24.0.5 (main-repo)
, if the value of vblank_mode in xfce4's xml settings is auto, the xfce4 desktop screen is displayed in black and only the mouse pointer is visible.
In virglrenderer-android
, when the value of vblank_mode is set to auto, the performance of glmark2, glmark2-es2, etc. is reduced by half compared to before turning off, resulting in lower performance and intermittent GUI tearing.
Wait. Vulkan and Zink rendering are different issue. Try to use it with llvmpipe. NO hardware acceleration, only software.
And maybe you should try original apk (from action or release) with llvmpipe, not the one I sent. Only for check.
Wait. Vulkan and Zink rendering are different issue. Try to use it with llvmpipe. NO hardware acceleration, only software.
Oh, come to think of it In the case of the newly delivered version There is no such symptom in llvmpipe. (In previous versions, the same symptom existed in lvmpipe)
Both Termux native XFCE and PRoot Linux XFCE
When using X11 by applying zink or virgl (virpipe)
If the vblank_mode value is auto, slowdown or GUI tearing will occur!
So probably it is a problem of zink or virgl since I did not change any behaviour that can affect them. Probably I can try to change fake PRESENT extension behaviour to make it spawn vblank events when Android Choreographer sends event. But I am not sure if it can fix this.
@twaik First of all, it seems to be okay if I set the vlbank_mode value to off and use it, but will there be any problems if the value is off?
I have no idea.
@twaik First, let's set the value to off and use it.
I tested it further
With X11 in llvmpipe state At least there doesn't seem to be any GUI tearing symptoms when running a program using the zink or virpipe environment variable in the terminal.
For Exynos 2400 It seems clear that this only happens when zink or virpipe is applied to X11.
So that is definitely a problem of zink and virgl. I'll research something to generate vblank events with Android's Choreographer, but I am not sure it will fix this.
Probably buffer turnip/zink/wsi-layer uses is being released too early so it's content is veing rewritten. @xMem can you please investigate this?
Because Android's graphics architecture does not allow mixing different GraphicBuffers in the same frame HardwareComposer posts. I mean it posts only the latest frame, and it can not be accessed in while it is being drawn.
Probably buffer turnip/zink/wsi-layer uses is being released too early so it's content is veing rewritten. @xMeM can you please investigate this?
This is due to missing implicit synchronization, so the X server reads incomplete frames.
Can we somehow fix this? Probably I should implement something on X server side?
Can we somehow fix this? Probably I should implement something on X server side?
I need to wait for a fence before calling xcb_present_pixmap, because turnip kgsl cannot export the fence as sync file fd, so these need to be implemented in WSI.
Problem description
The X server is showing a black screen on Galaxy S24+ (Exynos2400 ver).
The X-shaped mouse pointer does not appear either.
20240128.txt
What steps will reproduce the bug?
XFCE4 not running in Termux
PRoot-Distro Linux also doesn't run.
What is the expected behavior?
There is nothing in particular.