Open babaric-dev opened 1 year ago
Yeah, it could be the same issue as in #92. Are you using termux too? Does it happen randomly or every time?
I use Termux. But it doesn't work if I am connecting to a Linux computer either.
Btw, it happens everytime after I leave AVNC in the background for a few minutes.
Can you tell me a bit more about your setup?
If I can reproduce it locally, that would be really helpful.
the display freezes while mouse clicks and keyboard input works
Does the pointer/arrow moves when you click around, or is it frozen too?
Host: Ubuntu 22.04.1 LTS (Termux) VNC server: tigervnc-standalone-server (1.12.0+dfsg-4) Guest: Android 13, Samsung (One UI 5)
Special setup:
PhantomProcessKiller
is disabled with
settings put global settings_enable_monitor_phantom_procs false
Does the pointer/arrow moves when you click around, or is it frozen too?
I don't really understand the question. Anyway, the cursor on screen moved around and the mouse input to the vnc also respects the local cusor position. In short, it is just the display frozen.
Again, same as #92, this never happened in VNC Viewer by RealVNC Limited. I use AVNC simply it looks nicer and is open-source. :)
Do not hesitate to ask if there are more questions :)
I don't really understand the question. Anyway, the cursor on screen moved around and the mouse input to the vnc also respects the local cusor position. In short, it is just the display frozen.
I was trying to rule out any graphics related issue. AVNC uses OpenGL ES to render the framebuffer received from server. It also draws the pointer icon, mostly an arrow, on current pointer position. When you tap on the screen, trying to send a click to remote server, AVNC will update the pointer position to where you tapped, and will redraw the icon on new position.
When display is frozen, if tapping on screen moves the pointer without updating rest of the stuff, than it means that rendering is working correctly, just the framebuffer is not being updated.
Btw, this bug I am facing isn't related to the Android 13 update. It occurs on Android 10 and 12 as well. So, it pretty much isn't a problem about the Android version.
Thanks. Can you check if atleast pointer is still movable as I explained above?
I think a visualization of the issue would help. That's why I screen recorded a session with touches shown:
before.mp4: Before leaving AVNC in background after.mp4: Entering AVNC after a few minutes
Hope this helps so AVNC will get better and better.
Thanks, that's really helpful.
Confirming I got this problem sometime.
I will try to reproduce this locally by setting up Termux on my Android 12 device.
@tuanpham-dev using https://github.com/tuanpham-dev/termux-ubuntu should be enough to get started, right?
@gujjwal00 - Yes, it should. You also need to disable PhantomProcessKiller
to prevent the[Process completed (signal 9) - press Enter]
problem.
@gujjwal00 I use proot-distro with XFCE on Ubuntu 22.04.1. Andronix, termux-ubuntu and similar projects should work too.
disable
PhantomProcessKiller
to prevent the[Process completed (signal 9) - press Enter]
@gujjwal00 Run
/system/bin/device_config put activity_manager max_phantom_processes 2147483647
using ADB. This takes effect until next reboot.
@babaric-dev Yeah, I saw that option when skimming through Termux repo and issues related to Android 12.
Is anyone except me able to reproduce the issue?
I was able to setup Ubuntu with Termux, and I can reproduce it successfully.
Can you try disabling any battery optimizations for AVNC?
I think it works!!! But disabling battery optimizations would drain battery(?)
Btw, how does VNC Viewer by RealVNC Limited work without disabling battery optimizations? (may be hard to answer since it isn't open source)
So here is what I have found so far: When AVNC goes in background, battery optimizer seems to kick-in after 3-4 minutes and suspend AVNC threads. Meanwhile, the server keeps running in Termux. This seems to create some sort of synchronization issue, possibly a timeout, and framebuffer updates seems to stop coming from server. You may notice that the clock on frozen display is stuck far behind the real time.
I haven't yet figured out why only tigervnc shows this behavior.
I think it works!!! But disabling battery optimizations would drain battery(?)
Normally, yes! But in this specific case you are unlikely to notice any difference:
Raw
image quality in advanced server options to avoid CPU used by compression/decompression.Btw, how does VNC Viewer by RealVNC Limited work without disabling battery optimizations? (may be hard to answer since it isn't open source)
Does it show a sticky notification in Android status bar during connection? That may explain why it is not suspended.
Just downloaded VNC Viewer to test it. Apparently, it actually reconnects after being in background for a few minutes.
Steps:
It asks for your password.
Btw, I am not able to enable notifications for the app (I am on Android 13 and notifications are disabled by default). So I cannot answer your question about the notification.
Just downloaded VNC Viewer to test it. Apparently, it actually reconnects after being in background for a few minutes.
AVNC also does this, but only when app's process is killed by Android to reclaim memory. When user switches back to AVNC, it will reconnect to the server. Here, app seems to suspended instead of being killed.
Btw, I am not able to enable notifications for the app (I am on Android 13 and notifications are disabled by default). So I cannot answer your question about the notification.
No problem, thanks for testing VNC Viewer.
So there are two possible workarounds I can think of:
Is anyone except me able to reproduce the issue?
I usually tab back to termux and the problem is solved
I've also had this/#92 happen to me a couple of times now. I've only noticed it when connecting to TigerVNC under Termux on the same device, not when connecting to my Mac[^spaces], but that's probably because I'm more likely to switch out of AVNC in that case (looking things up, switching back to Termux to install packages, etc.).
The last time it happened, I was able to shut down the VNC/X11 server using a keyboard shortcut, but AVNC didn't notice the server going away and switch to the 'Disconnected' screen, even though vncserver -list
confirmed it was no longer running.
[^spaces]: Actually, I have had it get in a similar state with the Mac, but I suspect it's a different issue: that happens when I switch Spaces(/desktops/whatever they're called now) on the Mac, and seems to have nothing to do with what's happening on the tablet.
Hi all, I have been implementing several fixes/workarounds to resolve this issue:
Settings => Viewer => Pause updates when in background
option. AVNC will stop asking for screen updates when in background, which should avoid the synchronization issue.With the 3rd option, you don't need to disable battery optimizations for AVNC. I am hoping to finally fix this for good.
I do some multitasking on my phone. It got 8GB of RAM, a fairly new chip and it runs smoothly. However, in AVNC, after I leave the app and visit a few minutes later, the display freezes while mouse clicks and keyboard input works. May be related to #92 except it occurs even when RAM usage is around 50%.