Bug 506105

Summary: VNC connection freezes after some inactivity seconds
Product: [Applications] kstars Reporter: imahgin
Component: generalAssignee: Jasem Mutlaq <mutlaqja>
Status: RESOLVED NOT A BUG    
Severity: normal CC: ilikefoss, orestes
Priority: NOR    
Version First Reported In: 3.7.6   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description imahgin 2025-06-24 11:22:17 UTC
SUMMARY
KStars clock interferes with VNC when connected using a hotspot.
I'm using an Arch Linux distribution -AstroArch- with KStars+Ekos+INDI installed on a RBP5
I've enabled a hotspot to connect wirelessly and VNC -ran from a Mint distribution- works as expected until I run KStars.
At that point, if there is an inactivity about 2-5 seconds, the VNC client stops refreshing the GUI.
I can recover from that state if I either move the mouse oo press some key before 20-30 seconds. If not, the VNC freezes and I need to close and open again the VNC client -tested with TigerVNC and RealVNC.

If I run KStars with the 'paused' option, then no freezing issue is observed. If then I turn on the KStars clock, the issue occurs.

STEPS TO REPRODUCE
1. Connect to the host's hotspot and open an VNC client
2. Run KStars and ensure the clock is running
3. Whait a few seconds

OBSERVED RESULT
If the KStar's clockk is running the VNC GUI freezes after some seconds. Moving the mouse or pressing keys recovers from this state, but only if the inactivity time is less than 30-60 seconds. After this, closing and restarting the VNC client is required.

EXPECTED RESULT
VNC should refresh the GUI

SOFTWARE/OS VERSIONS
KDE Frameworks  Version: 5.116.0
Qt Version: 5.15.17 (built against 5.15.13)
Linux/KDE Plasma: Arch Linux ARM (Xcb)
KDE Plasma Version: plasmashell 6.4.0

ADDITIONAL INFORMATION
If a wired connection is used, everything runs as expected. Also it works fine when connecting to the wireless hotspot using a WiFi repeater.
Both x0vncserver, x11vnc were used with the same result.
WiFi powersave is off.
Comment 1 imahgin 2025-06-28 08:02:47 UTC
Tried with a out of the box AstroArch image with KStars 3.7.1 and everything runs as expected.
No need to stop the clock to keep the VNC session alive.
Comment 2 John 2025-07-01 05:50:48 UTC
That's strange!
Maybe you should also try to see if the same thing happens with the Sunshine+Moonlight pair of tools too.
It might give a few more hints if the problem is in the Kstars program, Kwin compositor or the network.
Comment 3 imahgin 2025-07-01 06:42:12 UTC
Yes more tests needs to be conducted to find the real cause of the problem.
I'll try your suggestions and also check what other components in AstroArch were updated along with the KStars that could cause this.
The real strange thing is that disabling the clock from KStars results in normal operation.
Comment 4 Orestes 2025-09-04 15:13:57 UTC
I had an issue on VNC recently related to the VNC version I was running on a Raspberry Pi.
Updating the VNC version solved the issue. I suggest you try it to update your system and then try to reproduce it again.
https://github.com/any1/neatvnc/issues/153#issuecomment-3148335486
Comment 5 imahgin 2025-09-08 06:23:57 UTC
The problem is not related to KStars, although is noticeable when the clock is running.
It seems that the WiFi power management on the client side is the culprit. Disabling it fixes the issue.
When KStars is running while the clock is running, the screen is updated constantly, so the problem occurs shortly afterward.
When clock is paused, the screen is not updated so frequently, so it takes longer to happen, but it does eventually.
This ticket can be closed.
Thks and sorry for the inconvenience