×

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

Bi-monthly release with minor bug fixes and improvements

KStars on Raspberry Pi4 and Ubuntu MATE 20.04

  • Posts: 1119
  • Thank you received: 182
Ubuntu 20.04 is available now on raspberrypi.org as a Server version. It can easily be adapted to run the GNOME or MATE Desktops running under a headless VNC connection.

For those who want to try it, here are the general steps. I can fill in details if you run into problems and if there is demand.

1. Download the desired Ubuntu 20.04 Server image (32 bit or 64 bit) onto your computer and use Etcher to flash it onto a fast microSD card. You need at least 16 GB for the system, Kstars and Indi installation, but if you want to install astrometry.net files you need at least a 32 GB card, 128 GB recommended if you want to capture images to the SD card.

2. Put the card into your Pi4, attach mouse, keyboard, monitor and Ethernet cable, log in , username and password are 'ubuntu'. You will be prompted to change the password immediately.

3. Update the system: sudo apt update && sudo apt upgrade

4. Install GNOME and/or MATE desktops: sudo apt install ubuntu-gnome-desktop && sudo apt install ubuntu-mate-desktop (this will take a while)

5. Install Synaptic and X11VNC: sudo apt install synaptic && sudo apt install x11vnc

6. Set up VNC server: x11vnc -storepasswd

7. poweroff

8. Put the microSD card into your laptop or desktop computer and edit the usercfg.txt file in the system-boot partition by adding the lines (assuming you are using a 1920x1080 monitor and you want the virtual desktop to have that same size):

framebuffer_width=1920
framebuffer_height=1080

hdmi_force_hotplug=1

hdmi_group=2
hdmi_mode=82

9. Restart the Pi. It should now boot to the Desktop login screen.

10. Change the config file in the /etc/gdm3 or /etc/lightdm folders (depending on the version you have chosen during install - I use lightdm) to allow autologin of user 'ubuntu' (obviously, you can add different users and change that to your preferred username)

11. Install KStars and Indi from the PPA on indilib.org. That worked without a hitch.


I did run into a problem when installing the latest Kstars from Github. Compilation would fail, because the wcshdr.h header file was missing. Turns out, it was not missing, but the compiler looked for it in the /usr/include/wcslib folder. Apparently, under Ubuntu 20.04 that file is in the wcslib-7.1 folder. I "solved" the problem by opening a terminal in the /usr/include folder and renaming the wcslib and wcslib-7.1 folders: sudo mv wcslib wcslibold && sudo cp wcslib-7.1 wcslib

After that, Kstars compiled and installed error-free.


I have not yet tried this out in the field, but the system seems to be running fine and normally. I did, however, encounter a problem with KStars frequently crashing on my former 64-bit Ubuntu 18.04 installation. Those crashes stopped when I used Alex Varakin's 32-bit installation of Ubuntu 19.04.
If I encounter these crashes again, I would have to conclude that Kstars does not like 64-bit Ubuntu on the Pi4 and I will use the same procedure to install the 32-bit version.

If anyone else is going to install this system, please report back with any bugs you may encounter.

Best

Jo

PS: Thanks to Hy for pointing me towards the location of the wcshdr.h file. That was crucial only for installing from Github, though. Installation from the regular PPA was not affected by it.

PPS: Renaming the wcslib-7.1 folder may not be the best way to do it. A symlink pointing from wcslib to wcslib-7.1 may be a better way to do it.
Last edit: 3 years 10 months ago by Jose Corazon.
3 years 10 months ago #53293

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

  • Posts: 459
  • Thank you received: 69
I can't comment on 20.04 on the RPi4, but I just in the last few days have what was a basically non-working kstars on an Odroid-N2 on 18.04 now running reasonably well (I think) on 20.04 with Ubuntu-Mate. I have both the bleeding-edge download version running and have successfully separately compiled using QtCreator to get the latest version running from source code as well. I did have teething problems getting the OS from 18.04 -> 19.10 -> 20.04. The system is fast, probably due in part to the 6 cores, EEMC memory boot disk and 1T SSD for data.
3 years 10 months ago #53303

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

  • Posts: 1119
  • Thank you received: 182
I have now tested it in the field and the 64-bit UbuntuMATE version and Kstars have been stable for an entire night with almost 800 frames acquired in one session. Scheduler, autofocus, guiding all worked great.

Now trying to get it started from an SSD, haven't figured out all those steps yet, but that is less urgent as Kstars runs quite fast from the SSD. Offline solver typically completes within ~ 10 seconds using astrometry.net, that's a speed I can live with. I am saving all acquired images directly to an SSD, which is very fast, takes less than the blink of an eye to save a 32MB image file and start the next capture.

Definitely a huge improvement over Ubuntu MATE 18.04.

Jo
3 years 10 months ago #53627

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

  • Posts: 1309
  • Thank you received: 226
I will probably try this. Sounds like a good way to spend a day of lockdown.
Are the performance gains truly that impressive? Why do you suppose that is?
3 years 10 months ago #53651

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

  • Posts: 1119
  • Thank you received: 182
I am not sure.

Maybe it is because I am using a smaller 32GB SD card and save the images to a separate fast SSD. In my previous implementations on Ubuntu MATE 16, 18 and 19 I used a 128GB card and saved the images directly to the card. Worked fine on Ubuntu 19, but I was positively astonished two nights ago when I ran 600 x 10s Luminance exposures on M51 and I was thinking there was something wrong with saving the images, because the download, save and capture initiation of the next image happened so fast I had to pay close attention or I would have missed it.
When I started out with my D3300 DSLR it would take 5 seconds for an image to download and render and I thought that was fast. This is 10x faster now.
I also had a problem with the 5GHz WiFi on Ubuntu 18 and that has now largely disappeared. I still have the Pi4 set up to recognize the 2.4 GHz network first, but as soon as I am on VNC I just switch it over to the 5 GHz network and from then on there is almost no lag.
The only issue I had with installing from the git was the location of the wsclib directory. But that was easy to fix. One other thing when installing from the git is to use only 2 threads for compiling, i.e. make -j2. I had the memory max out and freeze on me twice when I used 8 or even 4 threads.
None of this applies to installing from the stable or nightly repositories, though.
I had initially intended to run the system off an SSD again, but I have had trouble getting that going. I got the SSD booting, but it takes much longer than booting from the SD card. I am sure I am doing something wrong there, but with the system running so fast from the SD card, the urgency of sorting out the SSD boot has slipped into the background. I will still set up a swap partition on the SSD, though, just to prevent avoidable memory issues.

Try it out, Andrew. It only takes a couple of hours. I would be very much interested whether your experience matches mine.

Best,

Jo

PS: This is the server image I started out with: ubuntu.com/download/raspberry-pi/thank-y...itecture=arm64+raspi
3 years 10 months ago #53653

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

  • Posts: 78
  • Thank you received: 3
How did you get the Pi to boot from the ssd at all? The ability to boot from an external drive was, I thought left out of the Pi 4? It was in earlier Pi's, buhas been widely reported that you can't do it with a Pi 4? My Pi 4 lost it's microsd card reader (seemingly a not uncommon occurrence . If I could boot from an ssd I could salvage it.....

cheers
Gary
3 years 10 months ago #53657

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

  • Posts: 1067
  • Thank you received: 140

Yes it can be done with an rpi4 but you still need an SD card in the rpi with the boot partition, then everything else runs from the SSD

www.stewright.me/2019/10/run-raspbian-fr...on-a-raspberry-pi-4/
3 years 10 months ago #53660

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

  • Posts: 1119
  • Thank you received: 182
Set up swap now on an SSD while running the OS from the SD card. Works great and no more crashes when building Kstars from sources.
3 years 10 months ago #53796

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

  • Posts: 108
  • Thank you received: 20
Hi,
i installed 20.04 server (x64)on my RPi4 whith kstars, astrometry, indiwebmanager

The only thing that doesn't install is sextractor :
librairy files are there when i seach with find command. But the binary in usr/bin isn't there
I tried both from ppa and astropi3 script...And sextractor binary is still missing
I thought that i will be installed with kstars...
Is there an another way to install it without cloning kstars Git ?

Clear skies
3 years 10 months ago #54167

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

  • Posts: 1957
  • Thank you received: 420
On Ubuntu 20.04 the command has been renamed to source-extractor. The full path is
/usr/bin/source-extractor

EDIT: the software package also has been renamed to source-extractor:
$> dpkg -l \*sextractor\*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================
un  sextractor     <none>       <none>       (no description available)
 
$> dpkg -l \*source-extractor\*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name             Version      Architecture Description
+++-================-============-============-========================================
ii  source-extractor 2.25.0+ds-2  amd64        Source extractor for astronomical images


HTH, Wouter
The following user(s) said Thank You: ouioui01
Last edit: 3 years 10 months ago by Wouter van Reeven.
3 years 10 months ago #54168

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

  • Posts: 108
  • Thank you received: 20
Thanks Wouter!
I used the find command and only gives me library files.

I'll check again

Clear skies
3 years 10 months ago #54176

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

  • Posts: 1957
  • Thank you received: 420
I am not a big fan of MATE being such a complete Desktop. Basically I want a minimalistic desktop without open/libre office, thunderbird etc. So I usually install ubuntu-mate-core instead of ubuntu-mate-desktop. Saves a lot of files to download and saves on disk space as well which then can be used to fill with images :silly:

EDIT Ubuntu automatically installs a daemon called snapd which is completely useless and only consumes system resources. Remove it with "sudo apt purge snapd squashfs-tools" and then do "sudo apt-mark hold snapd" to make sure that it cannot be installed again.

Wouter
Last edit: 3 years 9 months ago by Wouter van Reeven.
3 years 9 months ago #55179

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

Time to create page: 0.472 seconds