termux / termux-x11

Termux X11 add-on application.
https://termux.dev
GNU General Public License v3.0
1.94k stars 301 forks source link

[Bug]: Display only gets updated when you open Termux:X11 app #680

Open EdupugantiAkhil opened 1 month ago

EdupugantiAkhil commented 1 month ago

Problem description

Device Name: Amazon Fire HD 10 (2019) Operating System: FireOS 7 (Android 9 32-bit) Termux-x11 app: Nightly Release 20240717 -> app-armeabi-v7a-debug.apk

output.log

in the given logs I started termux-x11 with i3 and opened glmark2, in the beginning I was opening and closing the notification panel to get the screen to refresh and after some time I stopped that and left the termux:x11 app open until the benchmark ended

What steps will reproduce the bug?

NOTE: this was observed on the Amazon Fire HD 10 (Android 9)

  1. run termux-x11 :1 -xstartup i3
  2. perform any action that changes the rendered frame (moving mouse, opening applications ex glmark2)
  3. observe that the frames don't get updated when termux:x11 is active but only get updated when
    • you interact with the notification bar
    • go to the home screen and open termux:x11 app

What is the expected behavior?

the program should refresh the display at a constant rate without having to re-open the termux:x11 app

Thanks a lot for your effort I really appreciate this project!!!

twaik commented 1 month ago

app-universal-debug.zip Can you please install this artifact and toggle "Indirect drawing" in Preferences>Output?

twaik commented 1 month ago

@xiaoyangnoob @jamesgarry1 probably it can fix screen freezes in your case. Can you please try it?

EdupugantiAkhil commented 1 month ago

Thanks for the quick response @twaik

I tried out this feature after reinstalling termux:x11 app so it would be in the default settings

after enabling "Indirect drawing" my display becomes blank (even with -legacy-drawing) and after disabling it behaves normally(bug above)

the new logs are with termux-x11 :1 -xstartup glmark2 and my keyboard not connected and the termux:x11 app was already open before I ran the command

With Indirect drawing (black display)

IndirectDrawing.log

log with interaction with the notification bar IndirectDrawingManualRefresh.log

Without Indirect drawing (initial frame shows up)

Default.log

Without Indirect drawing and interacting with notification bar (screen gets updated every time I come back)

ManualRefresh.log

I think I am able to see the frames just when a new surface is applied (not sure)

If you need anything else from me feel free to ask

twaik commented 1 month ago

app-universal-debug.zip Try this one. Just tell if it works or not. No need to use -legacy-drawing or other options.

twaik commented 1 month ago

app-universal-debug.zip Ok, there is new artifact. Try with and without legacy-drawing.

EdupugantiAkhil commented 1 month ago

Thanks for the new build

I observed that both of them give a black display (like last time) (even the cursor is not visable like last time with indirectDrawing)

Indirect drawing

build3-IndirectDrawing.log

indirect drawing + legacy-drawing

build3-IndirectDrawing-LegacyDrawing.log

jamesgarry1 commented 3 weeks ago

im pretty sure you need to turn off battery saving since they put background apps to foreground

EdupugantiAkhil commented 3 weeks ago

Thanks for the reply @jamesgarry1, would you mind explaining it further I have the battery saver + battery optimization disabled for Termux and Termux:x11 when I shared the logs, is there anything else I should look for

jamesgarry1 commented 2 weeks ago

Thanks for the reply @jamesgarry1, would you mind explaining it further I have the battery saver + battery optimization disabled for Termux and Termux:x11 when I shared the logs, is there anything else I should look for

have you tried go to settings putting them into background, worked for me