AstroDMx Technical Help for Linux

This page details installation instructions and highlights specific information pertaining using AstroDMx Capture on Linux computers (including Raspberry Pi OS and ChromeOS). If you are having problems then please read the information contained on this page.

The Linux build of AstroDMx Capture requires a relatively modern 64-bit distribution of Linux with a glibc version equal to or greater than 2.17. All cameras with the exception of USB2 Lumenera cameras are supported under Linux.

Feel free to contact the software developer for further help if needed. Please ensure that you are using the latest version of AstroDMx Capture before reporting a potential problem.

The latest version can be downloaded from the downloads section of this website.

Disclaimer

Any procedures suggested on this website should be used carefully and will be at the users risk. Performing these procedures implies acceptance that the responsibility is with the user and the author of this website will not be held responsible for any problems arising from the use of these procedures.

The information and procedures on this page are specific to Linux computers (including Raspberry Pi OS and ChromeOS).

Installing AstroDMx Capture

There are three methods to install AstroDMx Capture on Linux and the method used will be dictated by your specific distribution. The three methods are detailed below.

  • RPM: Redhat based distributions (Example, Fedora);
  • DEB: Debian based Linux (Example Ubuntu);
  • Manual: A scripted install which is distribution agnostic.
Install Procedure: Debian (DEB)

The Debian installer can be installed in one of two ways. The easiest way is to simply double-click on the downloaded file and allow the graphical installer to complete the installation.

It is also possible to install the Debian installer via the terminal. To do this, simply copy and paste the following command into a terminal session and replace “filename.deb” with the name of the downloaded file.

sudo dpkg --install filename.deb

If you wish to uninstall AstroDMx Capture, the easiest way is to use the terminal. The command to do so is as follows.

sudo dpkg --remove astrodmx-capture
Install Procedure – RPM

Due to some incompatibilities with the RPM system, it is best to install AstroDMx Capture via the terminal. The procedure to do so is straightforward and the commands for doing so are as follows. Simply type or copy and paste the commands below into a terminal making sure to replace “filename.rpm” with the name of the RPM downloaded from this website. Don’t forget to enter your root password after typing “su”.

su
yum install filename.rpm

It is equally simple to uninstall AstroDMx Capture. Simply type or copy and paste the following commands into a terminal session making sure to type your root password after “su”. Doing this will completely remove AstroDMx Capture from your system.

su
yum remove AstroDMx_Capture
Install Procedure – Manual Installer

The manual installer includes a script to automate the installation procedure but does not have a script to uninstall the application. It is, however, a simple matter to install or uninstall manually. The procedure is documented below.

To install using the automated script, simply type the following commands into a terminal session but make sure you replace “filename.tar.gz” with the name of the file that was downloaded from this site and at line 2, make sure you replace “directory-name” with the name of the directory extracted from the downloaded tarball.

tar xzvf filename.tar.gz
cd directory-name
sudo ./install.sh

It is also possible to install the application without using the install script. To do so, start a terminal session and type the following commands but make sure to replace “filename.tar.gz” with the name of the downloaded file and, at line 2, replace “directory-name” with the name of the directory extracted from the tarball. The commands will need to be run as root.

tar xzvf filename.tar.gz
cd directory-name
mkdir -p /etc/xdg/menus/applications-merged/
cp etc/xdg/menus/applications-merged/astrodmx.menu /etc/xdg/menus/applications-merged/
cp etc/udev/rules.d/* /etc/udev/rules.d/
cp -r usr/share/* /usr/share/
rm -rf /usr/local/AstroDMx_Capture/*
cp -r usr/local/AstroDMx_Capture /usr/local/
udevadm control --reload-rules
Manual Uninstall Procedure

In order to uninstall a manually installed version of AstroDMx Capture, you will need to type the following commands into a terminal session and the commands will need to be run as root. As usual, you will need to be very careful when entering commands as root because any errors could damage critical system files and render your Linux system unusable.

rm /etc/xdg/menus/applications-merged/astrodmx.menu
rm /usr/share/astrodmx_capture/*
rm /usr/share/applications/astrodmx_capture.desktop
rm /usr/share/desktop-directories/astrodmx.directory
rm -rf /usr/local/AstroDMx_Capture

Runtime Problems

If the software fails to start from the usual graphical launchers it usually means that a required dependency is missing. If this happens then the problem can be debugged by launching AstroDMx from the terminal. Doing so will give you a lot more information that will help you solve the problem. The following instructions should help you debug startup problems.

These commands should NOT be run as root.

cd /usr/local/AstroDMx_Capture/bin
export DMX_LAUNCHER=314
export GDK_BACKEND=x11
./AstroDMx-Capture -D2

The output of the command at line 4 will return lots of information. It is not possible to give specific instructions here because there are so many possibilities. However, it should be obvious if a specific dependency is missing. Once you have discovered the missing dependency, you can install it using your standard package management system.

Please feel free to copy and paste the information produced by line 4 and send it to the software developer for further help in debugging the problem.

USB3 Compatibility for USB2 Cameras

It is generally considered that USB3 is fully backwards compatible with USB2. However, this is not always the case.

Let’s consider a working example. The Imaging Source DFK-21AU04.AS camera operating in YUYV does not work correctly when plugged into a USB3 port. The aforementioned camera streams okay but it is impossible to change any of the camera controls, for example, the exposure and/or gain values.

USB3 compatibility issues can be observed in many other ways. If you experience problems with a USB2 camera plugged into a USB3 port under Linux, then the following workaround might help. This procedure should work on any computer that has both EHCI and a xHCI USB controllers. This procedure may not work on a pure xHCI machine and this is dependent upon the hardware version of your xHCI controller. For such machines, there is no workaround.

The Workaround

Many computers have both an xHCI and an EHCI controller, however, as detailed above, some USB2 cameras do not work correctly when connected to a xHCI controller. The following procedure will cause the xHCI controller to forward USB2 packets to the EHCI controller which solves this problem.

Start a terminal session and execute the following commands as root. This can be done by prefixing the commands with “sudo” or by typing “su” and then entering your root password.

lspci -nn | grep USB

The output will look something like the following, the exact output will be dependent upon your hardware. Do not use the information from this sample because it will most likely not work on your system.

00:14.0 USB controller [0c03]: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller [8086:1e31] (rev 04)
00:1a.0 USB controller [0c03]: Intel Corporation 7 Series/C216 Chipset Family USB Enhanced Host Controller #2 [8086:1e2d] (rev 04)
00:1d.0 USB controller [0c03]: Intel Corporation 7 Series/C216 Chipset Family USB Enhanced Host Controller #1 [8086:1e26] (rev 04

Make a note of the USB information, in the above example, it is 8086:1e31. If you do not see an EHCI controller (sometimes listed as an ‘Enhanced Host Controller’ as in the example above) listed, then means that your computer does not have an EHCI controller and this procedure will not work.

In the same terminal session enter the following command making sure that you replace 8086:1e31 with the correct value obtained from the terminal output above. Again, this command must be executed as root.

setpci -H1 -d 8086:1e31 d0.l=0

This change will only last until the system is rebooted and so the procedure will have to be repeated each time. Once you have obtained the controller information you only need to type the setpci command. For convenience, this command can be entered into a script and then the script can be run to invoke the change when required.

Finally, disconnect and reconnect your camera and retest. Depending upon your BIOS/UEFI, it might be possible to avoid thus procedure by selecting USB compatibility mode in your system’s firmware settings (BIOS Settings etc).

Registax and AVI Files

Registax 5 and 6 running under current versions of Wine can only open the original AVI specification which has a size limit of 1 GiB. Registax under Wine cannot open AVIX (Extended AVI). AVIX is an improved implementation of the AVI format and is capable of arbitrarily size files.

To avoid this limitation, AstroDMx Capture can output a customised AVI which follows the original specification but allows for a maximum size of 2 GiB instead of 1 GiB. This AVI mode can be selected from the Capture Window and should be fully compatible with Registax 5 and 6 running under Wine.

In order to load AVIs into Registax when running under Wine, the user must select “Never” under “Use Extended Mode” which is located at the top of the Registax UI.

Additional Information

Autostakkert! and other stacking programs are not subject to this limitation and so can load AVIX files when running under Wine. It’s important to note that the SER format is a vastly superior container for large numbers of images which should now be used in preference to AVIs.

SVBONY SV205

If your SVBONY SV205 was purchased before August 2019 then it will require a firmware upgrade. Without the firmware upgrade, the SV205 will only work if plugged into a USB2 port. If it is plugged into a USB3 port then the camera will not be seen.

In order to fix this problem, you will have to update your SV205 firmware. The firmware can be downloaded from the SVBONY website. This firmware fixes the connection problems associated with this camera under Linux and allows it to be used when plugged into a USB3 port thus obtaining much better frame-rates.

The firmware flashing tool requires Windows. It is never recommended to flash a camera using Wine or via a virtual machine as this could introduce problems that could cause the flash to fail and so damage the camera.

Additional Information

The SV205 suffers from pixel vignetting so it is vital to use flat fields. Flat fields can be applied in real-time using AstroDMx Capture or applied during post-processing. For more information about using this camera, please see Dr S.J. Wainwright’s blog post.

The SV205 also suffers from frame lag which can cause difficulties when focusing. AstroDMx has a frame lag control function which reduces the frame rate but improves frame lag. The frame lag control can be found under the Options drop-down menu. Setting the lag value to the minimum value will reduce the lag significantly and so assist with focusing. Once you have achieved focus, this control can be set back to the default which increases the frame rate.

ZWO USB2 Camera Issues

ZWO USB2 cameras can be problematic under Linux. This is due to the fact that the camera’s default firmware uses a USB maxPacket size of 1024 bytes instead of the standard 512 bytes. Previously, in order to get these cameras to work, one had to either install the compatible firmware (available from the ZWO website) or patch the Linux Kernel. The compatible firmware fixed this problem by using a maxPacket size of 512 bytes. Patching the Kernel fixed this problem by stopping Linux from blocking USB2 devices which had an invalid maxPacket size.

If your Linux distribution is blocking invalid maxPacket sizes then the camera will be seen by AstroDMx but it will never enter streaming mode. The preview display will permanently say, “Initialising, please wait…

Although the compatibility firmware fixed problems associated with ZWO USB2 cameras, it introduced a new problem which meant that the camera could not be used in 16-bit mode for long exposures. Therefore, it was not a perfect fix for this problem.

Fix Option 1

Current Linux kernel versions no longer block USB2 devices with an invalid maxPacket size and so, these cameras should now work out-of-the-box and with the standard firmware. The author of this website is not sure when this change happened, but it appears to be somewhere between kernel versions 4.14.0 and 4.15.0. Therefore, if you are using a kernel version greater than 4.15 your ZWO USB2 camera should work without any modifications unless the following is true.

Some modern computers do not have a EHCI USB controller. On such computers, the xHCI controller handles all ports, including USB2. Unfortunately, the USB2 ZWO cameras do not seem to be compatible with the xHCI controller unless the compatible firmware is installed. If your computer does not have a EHCI USB controller then your only option will be to use the compatible firmware which is available from the ZWO website.

Fix Option 2 – Patching the Kernel (Historic)

As mentioned above, modern kernels do not require patching. However, if your distribution does not offer a newer kernel version or, for whatever reason, you want to use an older kernel version then you can patch the kernel. Note, patching the kernel will only work if your computer has an EHCI controller. As there are so many different distributions, I will not explain how to actually compile the kernel. For this information, please consult your distribution’s documentation.

The following instructions will show you how to modify the kernel source code to stop it blocking invalid maxPacket sizes. Start by downloading the kernel sources by following your distribution’s kernel compilation instructions. Once you have the kernel sources downloaded, navigate to the root of your kernel source and edit the following file.

drivers/usb/core/config.c

Search the config.c file for the following.

static const unsigned short high_speed_maxpacket_maxes

Once you have found the correct block of code, you should see something similar to the following.

static const unsigned short high_speed_maxpacket_maxes[4]
{
    [USB_ENDPOINT_XFER_CONTROL] = 64,

    [USB_ENDPOINT_XFER_ISOC] = 1024,

    /* Bulk should be 512, but some devices use 1024: we will warn below */

    [USB_ENDPOINT_XFER_BULK] = 512,

    [USB_ENDPOINT_XFER_INT] = 1024,
};

Edit the number, 512 at line 9 and change it to 1024. If it is already 1024 then your kernel is already patched correctly. Once edited, save the source file and continue with building the kernel by using your distribution’s instructions.

Raspberry Pi5 (Official 64-Bit OS)

There appears to be an issue with the official Raspberry PI5 64-Bit operating system that stops AstroDMx Capture from starting correctly. Fortunately, the problem is easy to fix by editing a file and rebooting. If AstroDMx Capture does not start on your computer, then follow this procedure.

  • Start a terminal
  • sudo nano /boot/config.txt

This will start an editor. Once the editor is running, add the following line and then save the file and exit the Nano editor.

kernel=kernel8.img

Once the line above has been added, reboot the computer. After rebooting, AstroDMx Capture should run correctly.

This fix is not needed if you are using a Raspberry Pi4 or any other Linux distributions.