×

INDI Library v1.9.4 Released (17 Jan 2022)

Bimonthly Stable INDI Library release introduces new drivers and fixes for existing ones. Some highlights:

Re:Re:Re:Re:Running Kstars/EKOS on Windows Subsstem for Linux (WSL)

  • Posts: 255
  • Thank you received: 47
Has anyone tried this or interested in giving it a try and sharing experiences?

Why bother? Well I have been having issues with intermittent crashing of Kstars/EKOS on Windows. Unfortunately there is currently no debug facility for EKOS under windows.
So I thought I would see if I could get it to run under WSL either for reliability or to enable debugging with ekos debugger. This approach may also work on low powered Linux devices which would not need to run the overhead of a full GUI desktop environment. The setup and operation would be slightly different then.

You need to enable WSL in Windows. I suggest using WSL1 for now as WSL2 works a bit differently. I installed Ubuntu 18.04 a while back and upgraded to Ubuntu 20.04 but you install Ubuntu 20.04 directly now I believe.

You need an X-server in Windows. I found vcXsrv seems to work best. sourceforge.net/projects/vcxsrv/
Some good instructions at seanthegeek.net/234/graphical-linux-appl...-bash-ubuntu-windows
Run xlaunch.exe to set up the X11 serve. Save the configuration file to %appdata%\Microsoft\Windows\Start Menu\Programs\Startup
so that vcXsrv runs automatically. When vcXsrv is running there is an X icon in the system tray

Open up a WSL session and install x11-apps. x11-apps installs some small graphical apps which are useful while getting X11 forwarding to work e.g. xeyes, xclock
<code>sudo apt install x11-apps
</code>
Edit the sshd configuration
<code>sudo nano /etc/ssh/sshd_config</code>
Make sure the following parameters are uncommented and have the values shown. For AllowUsers set it to the username you set up for WSL
Port 2200 is needed instead for the usual ssh port 22 because that is already used by Windows ssh

<code>PermitRootLogin no
AllowUsers <yourusername>
PasswordAuthentication yes
UsePrivilegeSeparation no
ListenAddress 0.0.0.0
Port 2200</code>

Restart the SSH service with the new parameters
<code>sudo service ssh --full-restart
</code>
Set the display for X11 for just this session
<code>export DISPLAY=localhost:0.0
</code>
or for all sessions
<code>echo "export DISPLAY=localhost:0.0" >> ~/.bashrc
. ~/.bashrc
</code>
Check that it is set with
<code>echo $DISPLAY
</code>
Test with xclock. You should see a clock window show up
<code>xclock</code>

Install Kstars: indilib.org/download.html
<code>sudo apt-add-repository ppa:mutlaqja/ppa
sudo apt-get update
sudo apt-get install indi-full kstars-bleeding ekos-debugger
</code>
When you run kstars you may get an error to do with libQt5Core.so. This is fixed by
<code>sudo strip --remove-section=.note.ABI-tag /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
</code>
You may also see errors to do with fbConfigs and driver swrast. These are fixed by:
<code>sudo apt-get install -y mesa-utils libgl1-mesa-glx
echo "export LIBGL_ALWAYS_INDIRECT=1" >> ~/.bashrc
. ~/.bashrc</code>

My experience so far has been promising. Before applying some of the fixes above I had Kstars running successfully, moving the mount, focussing, plate solving and previewing. It crashed with a seg fault when the first capture completed but I have not yet reproduced that. Subsequent captures have worked. The mount popup does not display properly. It seems to show whatever was underneath it when it was created. Also, on one install kstars did not create the profile database so I copied an existing one. But on a subsequent install it started up with the profile wizard and everything worked as expected.
-- Ken
RPi3 Ubuntu Server 20.04, Windows 10 AMD64, AAEON UP Core Ubuntu Desktop 20.04
Avalon M-Uno, EQ6 Pro, Atik420, ASI1600MM-C, ASI120MM-S, DBK21AU04, ZWO EFW, Optec TCFSi
Vixen R150S, GSO RC8, ST80
The following user(s) said Thank You: Eric
Last edit: 1 year 1 week ago by Ken Self. Reason: typo in code
1 year 1 week ago #65670

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

  • Posts: 255
  • Thank you received: 47
An update on this even if I'm just talking to myself - a sign of madness according to my wife i.e. not the talking to myself but talking to me in general :)

I can run ekosdebugger on WSL and the only issue is that the button graphics don't display. I havent yet induced any crashes. That will only happen if I'm doing real imaging of course.

I also tried X11 forwarding with kstars on my RPi3. This also works and is arguably simpler as the error workarounds are not needed. Still needs vcXsrv on Windows and it also needs PUTTY on windows to perform the X11 forwarding. Apparently the update to Openssh on Windows to enable this was not in the latest release otherwise it would be possible with Powershell or cmd.exe

With the Rpi3 the Mount control box displays correctly unlike on WSL.


ekosdebugger on RPi3 also does not show the button graphics. I'd ike to work out why this is so.


I tried launching kstars from within ekosdebugger but I killed it after >1 hour at close to 100% CPU for process kstars. I'm guessing the debug version is too big for a RPi3. Or is there an ekosdebuggerdebugger I can use :)
-- Ken
RPi3 Ubuntu Server 20.04, Windows 10 AMD64, AAEON UP Core Ubuntu Desktop 20.04
Avalon M-Uno, EQ6 Pro, Atik420, ASI1600MM-C, ASI120MM-S, DBK21AU04, ZWO EFW, Optec TCFSi
Vixen R150S, GSO RC8, ST80
1 year 1 week ago #65726
Attachments:

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

  • Posts: 255
  • Thank you received: 47
I've now got the Mount Control and What's Interesting windows displaying correctly.
Soution was to not use Windows Native OpenGL
and in WSL
export LIBGL_ALWAYS_INDIRECT=
Also, WSL has no sound driver so turn off sound notifications in Kstars to avoid getting an ALSA error message everytime one is issued

A few days back I ran the whole evening using kstars in WSL (without the above fixes) and still got through the evening without a crash. That has never happened when I've used the Windows version.
So next clear night I'll be trying again with the latest setup to see how it goes
-- Ken
RPi3 Ubuntu Server 20.04, Windows 10 AMD64, AAEON UP Core Ubuntu Desktop 20.04
Avalon M-Uno, EQ6 Pro, Atik420, ASI1600MM-C, ASI120MM-S, DBK21AU04, ZWO EFW, Optec TCFSi
Vixen R150S, GSO RC8, ST80
The following user(s) said Thank You: jiberjaber
1 year 2 days ago #65994

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

  • Posts: 1017
  • Thank you received: 298
Cool experience indeed, thanks for talking to yourself! I got a lattepanda board and I was wondering if I should keep the Windows 10 install or reset it to an Ubuntu 20. Your attempt gives me a new track, although I doubt there will be enough memory. Readyboost perhaps, with a spare USB key.

-Eric
HEQ5-Pro - Atik 314E - Orion ED80T - DMK21 on Orion 50mm
DIY 3D-printed Moonlite and FWheel RGB/LPR
KStars and indiserver on two Atom 1.6GHz 1GB RAM Linux, VPN remote access
1 year 2 days ago #66001

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

  • Posts: 255
  • Thank you received: 47
Hi Eric
I've managed to get Kstars running on a Pi3 with only 1Gb of memory running Ubuntu server 20.04 - so no desktop. You can X11 forward to any other machine (Win, Mac, Linux) with an X11 server.
With only 1Gb is doesn't run the ekosdebugger - it's just too big.
Running headless this way should help reduce the memory load.
PHD2 can also run the same way but I'm getting a few errors complaining about display size - but they don't appear to affect its operation.
-- Ken
RPi3 Ubuntu Server 20.04, Windows 10 AMD64, AAEON UP Core Ubuntu Desktop 20.04
Avalon M-Uno, EQ6 Pro, Atik420, ASI1600MM-C, ASI120MM-S, DBK21AU04, ZWO EFW, Optec TCFSi
Vixen R150S, GSO RC8, ST80
1 year 1 day ago #66022

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

  • Posts: 1017
  • Thank you received: 298
I do run kstars on a 1GB atom system with lxde on Ubuntu 18 and z-ram tuned. I need to have the full setup executing remotely because I can't trust network stability. So that means no x11 forwarding. But while that works pretty well and stable thanks to all the great stuff implemented in 2020, this system is 32-bits, and Ubuntu 20 now doesn't have all packages built for that arch. Plus, it is restricted to usb2, which severely limits frame bandwidth. Plus, two 800MHz hyperthreads make HFR computations veeeery long... So time to explore a new SBC environment.

-Eric
HEQ5-Pro - Atik 314E - Orion ED80T - DMK21 on Orion 50mm
DIY 3D-printed Moonlite and FWheel RGB/LPR
KStars and indiserver on two Atom 1.6GHz 1GB RAM Linux, VPN remote access
1 year 1 day ago #66035

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

  • Posts: 255
  • Thank you received: 47
We're spolied for choice these days with SBCs. My Aaeon-Up Core uses the Atom X5-Z8350 x64 with 4 cores. It is now looking dated.
-- Ken
RPi3 Ubuntu Server 20.04, Windows 10 AMD64, AAEON UP Core Ubuntu Desktop 20.04
Avalon M-Uno, EQ6 Pro, Atik420, ASI1600MM-C, ASI120MM-S, DBK21AU04, ZWO EFW, Optec TCFSi
Vixen R150S, GSO RC8, ST80
1 year 1 day ago #66038

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

  • Posts: 1017
  • Thank you received: 298
It's exactly the same chipset on the lattepanda v1 I just retrieved :) it will be faster than my old 32-bit atom in any case. You installed Ubuntu 20 on that platform? Any issues except for the usual WiFi or Bluetooth driver rebuilding?

-Eric
HEQ5-Pro - Atik 314E - Orion ED80T - DMK21 on Orion 50mm
DIY 3D-printed Moonlite and FWheel RGB/LPR
KStars and indiserver on two Atom 1.6GHz 1GB RAM Linux, VPN remote access
11 months 4 weeks ago #66197

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

  • Posts: 255
  • Thank you received: 47
Aaeon supply a kernel supporting their built in Ampak Wifi/BT chip. It was many months later than 20.04 release so I had to stick with 18.04 until last month. But no problems. I'm very happy with it and it has alway been more reliable than a Pi (although I only have a Pi2 and a Pi3). I noticed when I was experimenting witha new install of Ubuntu 20 desktop on the Pi that the network management menu did not work properly. I think you need to install Network Manager as the renderer. On the Aaeon, Ubuntu 18 already had Network Manager installed so when it upgraded to 20 it was fine. On the Pi I ended up just installing Ubuntu server but still installed Network manager so I could set up a hotspot. That's what led me to start looking at X11 forwarding.
-- Ken
RPi3 Ubuntu Server 20.04, Windows 10 AMD64, AAEON UP Core Ubuntu Desktop 20.04
Avalon M-Uno, EQ6 Pro, Atik420, ASI1600MM-C, ASI120MM-S, DBK21AU04, ZWO EFW, Optec TCFSi
Vixen R150S, GSO RC8, ST80
The following user(s) said Thank You: Eric
11 months 4 weeks ago #66211

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

  • Posts: 1017
  • Thank you received: 298
The qt wayland compositor is also able to render KStars with any resolution through ssh (and only its application windows). It does not work very well yet because we have qml windows in the code that conflict with the exclusive opengl rendering, but that solution can be interesting for its network performance when it is stabilised.

-Eric
HEQ5-Pro - Atik 314E - Orion ED80T - DMK21 on Orion 50mm
DIY 3D-printed Moonlite and FWheel RGB/LPR
KStars and indiserver on two Atom 1.6GHz 1GB RAM Linux, VPN remote access
11 months 4 weeks ago #66223

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

  • Posts: 255
  • Thank you received: 47
That looks good and it seems Wayland is being incorporated into WSL2
-- Ken
RPi3 Ubuntu Server 20.04, Windows 10 AMD64, AAEON UP Core Ubuntu Desktop 20.04
Avalon M-Uno, EQ6 Pro, Atik420, ASI1600MM-C, ASI120MM-S, DBK21AU04, ZWO EFW, Optec TCFSi
Vixen R150S, GSO RC8, ST80
11 months 4 weeks ago #66246

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

Time to create page: 2.880 seconds