×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

Can VNC be tuned to improve display time lag

  • Posts: 276
  • Thank you received: 52
Hi David,
The VNC server on the PI supports multiple formats for sending data to you VNC client.
The client can make the request for the format.
Where are you running the VNC viewer/client? On a PC/MAC/ to view the astroberry screen?
On your astroberry, what network config do you have?
Is your PI connected to a router or are you connecting direct from PC/MAC/other to the PI?

Being hardwired network with CAT5 I really would not expect much latency/delay.

I use TightVNC Viewer/client on PC, the image is example of the config items available.


You can also add another VNC server on Astroberry with a different resolution other than the default

Below is what I use on my play astroberry running on a PI ZERO W 2.

Add the file:
<strong>/usr/lib/systemd/system/vncserver-x11-serviced1.service</strong>

Insert the following, changing the resolution to what you want to try
================ CUT HERE ===================
[Unit]
Description=VNC Server in Service Mode daemon
After=network.target

[Service]
ExecStart=su - astroberry -c "vncserver :1 Authentication=VncAuth <strong> -geometry 1280x1024 -randr 1280x1024"</strong>
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
KillMode=process

[Install]
WantedBy=multi-user.target
================== CUT HERE ===========================

You can test fly it without auto starting on boot
sudo systemctl start vncserver-x11-serviced1.service

Then in your VNC client, add the port 5901 for the connection, or just a :1 after the IP, i.e. 192.168.1.172:1 in VNC client.

To make the service start on boot then execute:
sudo systemctl enable vncserver-x11-serviced1.service
1 year 2 months ago #89453
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 181
  • Thank you received: 13
Hi Gene. Some useful info thanks.
My system is a Pi 4 running StellarMate OS. Using it as 'out of the box' at the moment. Pi is wired to my LAN and I am connected to it from my PC (windows) desktop in my study. This is done through Edge browser using address stellarmate/#/vnc. What I see is the stellarmate dashboard on the Pi. I select the VNC icon and that runs Kstars and from there I can set up my profile and connect to my equipment. I should say I am quite familiar with this having done this with Astroberry install on Pi before. With Astroberry you connect to WebManager. With StellarMate its the dashboard.
First of all not sure of terminology and what device is the vnc server and what is the vnc client in this scenario? The response connected this way is quite poor with about 1/2 second delay so I find I have to consciously slow down when typing or dragging with the mouse to wait for screen to update. Would like to know if I can speed up the connection as speed isn't enough to be useable.
1 year 2 months ago #89455

Please Log in or Create an account to join the conversation.

  • Posts: 276
  • Thank you received: 52
Hi David,

Ok, I get it. The server is the PI, the client/viewer is the PC

You may want to try running straight Tight VNC Viewer

Latest version is here:
www.tightvnc.com/download.php

Instruction for install is here (using version from above) for viewer only.

itservices.cas.unt.edu/services/labs/art...tall-tightvnc-viewer

When installed, launch it, put the IP address of your Stellarmate and I -believe- using the password and port given here:
stellarmate.com/support.html?view=kb&kbartid=4

Port 5900 is standard port for VNC client to server communications, no web browser.

With VNC viewer, it will be like have a monitor/mouse/keyboard attached directly to the stellarmate.

Sorry, I do not have Stellarmate so cannot verify.

Gene
1 year 2 months ago #89457

Please Log in or Create an account to join the conversation.

  • Posts: 181
  • Thank you received: 13
I installed tightvnc on my PC client and it works fine. Thanks for that advice. Hostname is simply stellarmate and password smate then I see the Pi display (bypassing the dashboard interface) and a much better response time. This is still not as fast as running kstars installed locally on my PC with a remote profile. You get a much much better display running the windows version of Kstars especially when you have 2 monitors. Anyway I want to try the VNC as this eliminates a possible weak link of communicating across the local LAN although I have used that method for sometime and found it to be very reliable. The main reason to use VNC is to see if guiding works better.

I notice using VNC some of the EKOS dialog TABS are messy with text labels misplaced and too large which is a shame. Tried different screen resolutions but it didn't make a difference. Maybe this is an X11 issue.

I have not fiddled with the Pi VNC server to see if there are settings to improve performance because I haven't found them yet? In fact the dashboard icon to run Kstars is labelled noVNC!
1 year 2 months ago #89460

Please Log in or Create an account to join the conversation.

  • Posts: 969
  • Thank you received: 94
Hi
We use x11vnc but on a mini-PC over 5GHz wifi. The noxdamage switch smooths the rendering considerably.
Worth a try on the Pi?
Cheers and HTH
1 year 2 months ago #89469

Please Log in or Create an account to join the conversation.

  • Posts: 276
  • Thank you received: 52
David,

What SM version are you running? Is it 64bit buster based? If yes, what window manager are you running?
Have you seen the 'mutter' discussion?
indilib.org/forum/stellarmate/11148-high...ter-sm1-7.html#81754

And Alacant's hint on noxdamage switch could help with the server side.
On the viewer side, there is an 'options' dropdown where you can set various connection options that may also help.


Gene
The following user(s) said Thank You: David Bennett
1 year 2 months ago #89473

Please Log in or Create an account to join the conversation.

  • Posts: 181
  • Thank you received: 13
Gene. I am using whatever is included in the latest StellarMate image. The only change I have made was to use the Software Updater function on the Pi desktop. There was one update available which I did but I don't know what the update was or fixed or improved.
/etc/os-release says its "Debian GNU/Linux 11 (bullseye)" I presume it's 32 bit OS as from I can tell its still early days for a fully supported 64 bit version or am I behind the times?
LXDE is the desktop environment .
window_manager=openbox.
On viewer side I am set to level 6 and quality 6. Tried 256 colours but terrible display. Other than changing the local cursor to an arrow I cant see anything else to twiddle.
On server side I am yet to discover what the vnc server is and where it is configured in StellarMate build.
I don't want to swap vnc server installed with x11vnc for support reasons even though it may be a better solution. I have purchased StellarMate on the basis it is supported 'as is'.
I have astroberry on another SD card and that is where I should fiddle with things such as VNC server.

Another reason for running Kstars on Windows, it cured some serious bugs with Astroberry. I spent a couple of months trying to get Astroberry stable running Kstars on Pi but it crashed on a regular basis. One reason reported was viewing fit files when capturing which is a really handy facility but had to be turned off. Monitoring memory consumption, I came to the conclusion that the Pi couldn't cope with running Indi drivers and Kstars at the same time. I have no direct evidence, but the beauty of running Kstars locally some of the processing overhead is moved to the client PC with the Pi managing driver and equipment control. I believe in this mode of operation with a localobservatory over LAN, vnc is not involved (certainly no display graphics, keyboard or mouse interaction) and I found the LAN very reliable and much more reliable than doing everything on the pi. I find I have various windows open when imaging. Kstars planatarium display, EKOS, Indi, fits viewer, File manager ,observatory cam and local weather (Edge). With twin screen and kstars running locally I can position all these windows for convenient display.

Will carry on with Stellarmate in mode of operation with everything running on Pi for a while to try and eliminate the very slight drift I see in RA (egg shapes stars in some frames). As Alacante recommends, for a remote Observatory operated over the Internet Local Kstars wont work and a mini PC has more grunt to cope with workload.
1 year 2 months ago #89476

Please Log in or Create an account to join the conversation.

  • Posts: 255
  • Thank you received: 65
You can use xrdp to use the Microsoft Remote Desktop client by installing the xrdp package. The interesting thing about xrdp is while it is a RDP server, it is also a VNC client. Effectively, it can proxy RDP connections to a VNC server.

sudo apt-get install xrdp

If you get xrdp installed and started, connect to rdp with the wrong credentials and you will be presented with a dialog where you can select "vnc-any" and connect to "localhost" with the vnc password.
1 year 2 months ago #89480

Please Log in or Create an account to join the conversation.

  • Posts: 276
  • Thank you received: 52
Hi David,

The VNC server is launched at startup by systemd.
To find which VNC server is running, would you type
ps -aef | fgrep vnc

And report the output of the above command.

On my astroberry, I see the following
root 548 1 0 12:45 ? 00:00:00 /usr/bin/vncserver-x11-serviced -fg
root 558 548 0 12:45 ? 00:00:00 /usr/bin/vncserver-x11-core -service
root 593 1 0 12:45 ? 00:00:00 /usr/bin/vncagent service 15
astrobe+ 899 1 3 12:45 ? 00:00:02 /usr/bin/python2.7 /usr/bin/websockify --log-file=/var/log/astroberry/novnc.log --web=/var/www/novnc/ 8080 localhost:5900
astrobe+ 996 1 1 12:45 ? 00:00:00 /usr/bin/vncserverui service 16
astrobe+ 1027 996 0 12:45 ? 00:00:00 /usr/bin/vncserverui -statusicon 5

Gene
1 year 2 months ago #89481

Please Log in or Create an account to join the conversation.

  • Posts: 181
  • Thank you received: 13
2 processes listed:

root 703 1 6 18:56 ? 00:00:48 /usr/bin/x11vnc -xkb -noxdamage -verbose -avahi -safer -forever -shared -rfbauth /home/stellarmate/.vnc/passwd -autoport 5900 -auth /var/run/lightdm/root/:0
root 704 1 0 18:56 ? 00:00:00 bash /opt/noVNC/utils/novnc_proxy --vnc localhost:5900
stellar+ 1459 1445 0 19:10 pts/0 00:00:00 grep -F --color=auto vnc

Gene, StellarMate is running x11vnc server and noVNC. I think noVNC must be an interface between a web browser client and the vnc server. This explains I think why I see the Dashboard and the Pi screen in the web browser and using Tightvnc just the pi screen. I see -xnodamage is set but this doesn't prevent the module tabs looking somewhat messy.
1 year 2 months ago #89483

Please Log in or Create an account to join the conversation.

  • Posts: 969
  • Thank you received: 94
OK. So next would be to find which resolution fixes the screen problems you're seeing.

For us on mini-pcs, this is dictated by the dummy adapter plugged into to the display-port socket.

Some resolutions work better than others, some not at all. Our sweet spot is 1600x900 which seems to scale ok to 'phones, tablets or WHY alike.

Sorry, I can't remember how the pi deals with this but therein lies the next bit of the puzzle.

HTH
1 year 2 months ago #89486

Please Log in or Create an account to join the conversation.

  • Posts: 181
  • Thank you received: 13
Hi Aaron. Thanks for your suggestion. Installed remote desktop and connected from my PC. Easilly done and pleased to say the most responsive remote connection I have tested so far.
The display suffers from same issue as connecting with tightVnc or web browser. For comparison:
Running Kstars locally on PC
Running Kstars remotely using remote desktop
1 year 2 months ago #89487
Attachments:

Please Log in or Create an account to join the conversation.

Time to create page: 1.073 seconds