Tuesday, August 27, 2024

Xubuntu: great but too many deliberate nuisances

I previously recommended Xubuntu 22.04 as a good distro for playing music, at least until Pipewire gets fixed and I can go back to using MX-Linux as my Swiss-army-knife installation. But after using Xubuntu 22.04 for a while, I've decided to drop it because of all the deliberate nuisances built into it, such as pop-ups which are the only indication of a supposed system problem, whose real purpose is to freak out newbies. (It's like a diagnosis of a disease with no symptoms.) It also performs frequent "unattended upgrades" even on my air-gap PC which obviously could not have downloaded any upgrades. They bog down my CPU, and when I try to shut down the PC, they prevent it from happening, although I press the start button until it shuts down. If those were the only ones, I'd put up with them, but there are others.

So, I've been using Ubuntu Mate 20.04 for playing music. It too has the two aforementioned nuisances, and perhaps others, but so far within tolerable limits. (Windows also has such nuisances, or at least it did when I stopped using it over a decade ago, when an update killed my laptop.) Ubuntu Mate was my favorite before finding MX-Linux (I also like Kubuntu), but now that I've stumbled onto using µSD cards combined with fast µSD-to-USB adapters for encrypted full installations, it's easier to use UM as a secure installation for an air-gap PC because of the relative speed of creating µSD-card installations, and their energy efficiency, vs. these same aspects of USB3 installations. (Putting installations on removable drives makes it easier to secure them when not in use, although if they're nonpersistent live installations, there's no need to secure them since they contain no sensitive data when they're shut down, and they can be easily replaced if stolen.)

If UM live installations booted quickly, like MX-Linux live installations, I'd use Cubic to create custom UM ISOs, and use them to create nonpersistent live installations. But by editing the installation to eliminate the need for user-input during the booting process [1], and by using a faster PC, live custom installations of UM would be a viable alternative to MX-Linux live installations for secure PCs.

Notes

[1] With nonpersistent live installations, which don't store any data upon shutdown except what's baked into the ISO (which presumably wouldn't be sensitive), there is no need to log-in when starting the system, although you would want a password so that you could perform superuser-functions, and lock the system during a session, and resume.

Sunday, August 18, 2024

Cubic: Barely accessible to average Linux users

8/21/24b

I was hoping to use Cubic to make the equivalent of MX-Linux Snapshots for Ubuntu Mate, but I eventually realized that I probably wouldn't be able to make live installations from them and use them like I do with live installations made from MX-Linux Snapshots, because live installations of Ubuntu take a long time to boot. I'd end up making encrypted full installations from the Cubic-ISOs, and there's no point in going through the hassle of creating a custom ISO to create a full installation and perhaps a backup made with the same software-download used for the primary and settings transferred from the primary.

Besides, it turns out that Cubic doesn't automatically create the ISO from the running installation, as the MX-Linux Snapshot tool does, but requires the user to specify the changes to an already-existing ISO, which Cubic extracts so that the changes can be made to it. Being adept at using Cubic requires more knowledge than what the typical user has, but if all you want to do is to add apps, change settings, and change the desktop background, it's apparently fairly simple. There are some instructions written down to the user-level, such as How to Create a Custom Ubuntu ISO With Cubic, by David Rutland , but they don't cover everything, such as transferring settings. But I gather that user-made settings are contained in the .config file in the user's home directory, and that transferring settings would just be a matter of replacing the original .config file in the ISO being modified with the .config file from the configured full installation.

Full installations on µ-SD cards

Being able to create full installations on µ-SD cards plugged into an Orlian µ-SD-to-USB adapter is a game-changer. Until recently, I was under the impression that installations couldn't be created on SD cards, and I was afraid that µ-SD cards would get lost or broken easily and were intended to be inserted in devices such as phones and left in place. But after getting some cards and an adapter, I realized that my fears were unfounded, and decided to experiment with creating an installation on one, and wished that I had tried it sooner.

To distinguish µ-SD cards from each other, I use cards with a white space on the label, and mark each one with two stripes from a set of eight colored Sharpies, although I don't use the yellow one because it's not very visible. So, this provides 49 combinations, which should be adequate for most people, and each card could be named with a name such as Xub22-blu-g for an installation of Xubuntu 22.04 on a µ-SD card with a blue and green stripe from left to right. So, if you have multiple cards connected to a PC, you'd know which physical card corresponds to each µ-SD card in the file manager's device list.

The cards and adapter are blazingly fast, allowing installations to be created very quickly, and they run cool. It can be difficult to plug them into or pull them out of tight spaces, but putting silicone lube on the USB connector reduces the amount of force required. USB3 flash drives are much slower and run very warm, indicating relatively high power consumption. The Orlian adapter gets quite warm when transferring something like an ISO (typically about 2.5GB) at high speed, but otherwise it remains cool. µ-SD cards are also easy to store, such as in a Kiorafoto KHD-MSD10 credit-card sized µ-SD-card holder which holds 10 cards, does a good job of protecting them, and is easy to use.

So, creating new encrypted installations for my air-gap PC isn't the ordeal it once was: just update the package index, install a list of apps, and change settings in the normal course of using the installation. You could make a backup installation in case the primary fails when you don't have time to make another. To use the same downloaded software-packages for both installations, save them in /var/cache/apt/archives by entering "echo 'Binary::apt::APT::Keep-Downloaded-Packages "1";' | sudo tee /etc/apt/apt.conf.d/10apt-keep-downloads" before installing any software (copy the command without the double-quotes and paste it into the command-line by pressing Ctrl-Shift-V). Then install the software and copy the packages in the archives directory (except the Partial folder and Lock file, which can't be copied) to a backup drive. After updating the backup installation, copy the backed-up packages to the archives directory in the backup installation, and perform an installation for each of the apps (enter "sudo apt install <app's special name w/o caps or spaces>").

This is another situation where having APT-offline installed by default would come in handy. Instead of having to download the package index twice - once to update the primary, and once to update the backup - APT-offline could be used to download the package index and store it in a form in which it could be installed (which cannot otherwise be done), and it could be installed on both installations. There are also other situations where it would be nice to be able to download the package index once and use it a few times, before it expires and can no longer be installed.  

Once you're finished or almost finished with the settings on the primary, I assume that you could copy the .config directory from the primary to the backup to get the same settings on the backup. Getting the settings perfect on MX-Linux Snapshots typically requires several cycles of creating Snapshots and installations from them, so this approach is quicker, assuming that it works.

If you don't have a fast direct internet connection, the easiest solution to setting-up a PC is probably to temporarily install its wireless card (in the case of an air-gap PC, which should have its wireless card removed to ensure that it can't be surreptitiously activated, such as in wi-fi burst mode, which exists and is hard to detect) take it to a wi-fi hotspot or tether it to a 5G phone and take it to a 5G hotspot. The set-up should include the addition of any PPAs you might need, and APT-offline, which would allow any changes (other than adding PPAs or updating repository-keys) to be downloaded via your phone from then on. Adding PPAs and updating the keys require a direct connection, although a slow one would suffice, and key-updates aren't strictly necessary if you use a major server with many users constantly connecting to it directly, so that any problems would be quickly discovered. For details on using APT-offline, see AnAptOfflineBlog.blogspot.com.

You might need to provide your own AC power at the access-point, using an 12VDC-110VAC inverter or an uninterruptible power supply. You might also need a cardboard hood (black on the inside) to shield the monitor from sunlight so you can see it.

PCLinuxOS: Excellent, when it's not freezing and rebooting

After reading that there's a program (MyLiveCD) for turning installations of PCLinuxOS (including all settings and added software) into ISOs (which the MX-Linux Snapshot tool does for MX-Linux installations), I decided to try PCLinux OS 2024.04 KDE, and found that it's a great distro, other than the fact that it randomly freezes and reboots. So, I investigated, and found that this has been a problem with PCLOS for years, although it obviously should never have been released with it. It's also the only distro I've seen that doesn't have an option to create an encrypted installation.

But in case you want to try it for yourself, be forewarned that if you create a live installation of PCLinuxOS on some drive, you will never be able to use that drive for anything else. The drive apparently becomes formatted with an uncrackable read-only NTFS format, supposedly to prevent anyone from tampering with the installation (as if anyone could make it any worse). This seems to imply that drives have some read-only flag in an area of memory which only special software, apparently including NTFS, can access, and that NTFS probably requires passwords to use that feature. So, if you plan on putting PCLOS on a USB drive, use a cheap disposable USB2 drive (which I fortunately always use for live installations), and don't plan on using it for anything else ever again.

Tuesday, August 6, 2024

Lessons learned from escaping Pipewire's audio-cutting-out issue

8/19/24

At one point in my quest to find a way to avoid Pipewire's years-long problem of audio randomly cutting out, I concluded that the solution would be to get an Android tablet to use as a music server. However, after using the Celluloid and Parole media players on my full installations of Ubuntu Mate 22.04 and Xubuntu 22.04 (which have PulseAudio, not Pipewire), each on a separate µ-SD card and each plugged into an Orlian µ-SD-to-USB adapter when in use, I've concluded that both are solid general-purpose distros, and that either would be a good temporary music server until Pipewire is fixed and I can go back to MX-Linux, or until I get a new Android tablet. A live installation of either would probably work, but Ubuntu live installations take forever to boot. Oddly, they both have the same couple of weird irritants [1] that would probably torment newbies, but I've found that they can be dismissed or shut down without causing any problems. After using the Xubuntu installation for a few hours, it interrupted the music-playback to notify me that software-updates were available, even though it was running on an air-gap PC and could not have known about any such updates. Notifications can be disabled, but something that can't be disabled might take their place. So, ultimately, it might be necessary to use an Android device to get away from all of these bogus impediments.

I tried Strawberry (from the Strawberry site, since it's not in the Ubuntu repository) on UM2204, but it had a "buffering" problem, as if the LUKS-encrypted SD-card I use as a source is a slow internet connection. The version that comes with MX-Linux 23 doesn't have this problem, but Pipewire, at least for now, has the audio-cutting-out problem. Version 1.2.2, which is in the testing-phase, supposedly addresses this issue.

Now that I've gotten away from the Clementine player and resampling [2], I've realized that CD-grade digital has the potential to sound downright juicy when played through a good digital playback device. The best budget DACs use TI/Burr-Brown Advanced Segment DAC-chips (ASDs), which I explained in my Zen DAC V2 review. ASDs might be the ultimate DAC-chip for audio playback, due to their unique design which gives them low jitter-sensitivity (output noise vs. clock jitter) and unusually tight control over low-level detail. However, ASDs are apparently incompatible with the requirements of ADCs, because there are no ADCs which use ASDs. But the recordings which sound so good through ASDs are made with regular sigma-delta converters, which clearly can be made to sound amazing, for a price. Still, Audio Research and Bel Canto use ASDs in their DACs, which are among the best.

From the music industry's perspective, CD-grade digital is a threat to their bottom line, because it lasts forever and can be distributed forever without paying them. So, they like to put their best versions on LPs, which are impossible to copy perfectly. Furthermore, most people are reluctant to buy used LPs because they might be worn out and/or otherwise damaged, so if they want the best version of classic albums from the 60's and 70's,they'll probably end up getting new LPs, which are made from great digital recordings made early in the digital era, but which will never be released in a good digital form. Streaming might be based on the best recordings, because it's watermarked and can't be pirated with impunity, but watermarking apparently degrades the audio at least subtly (since it has to be woven into the music to be effective), which can make all the difference to those who care about sound quality.

Notes

[1] I've noticed a "system program problem detected" pop-up, which is the only indication of a supposed problem, and a supposed "unattended upgrade" that loads down the CPU and prevents the PC from shutting down normally. I'm supposed to believe that an actual unattended upgrade could be occurring even though the installation is running on an air-gap PC. In the first case, I click on the button that just gets rid of the pop-up, and in the other I use the task manager to kill the process, or if I'm trying to shut the PC down and the "upgrade" is preventing it, I just push the power button until the PC shuts down.

[2] Resampling is a mathematical process which introduces audible errors or consumes large amounts of system-resources. Pro-grade gear such as mixing consoles typically uses sample-rate-converter chips, which are very transparent. Resampling to a higher frequency can't IMPROVE sound quality, because resampling cannot add information, such as high-end or low-level detail. High sampling rates are used when converting to and from digital to allow the use of simple, clean, and cheap analog anti-aliasing filters, but when the high-frequency "DSD" used in ADC-chips for sampling the analog input is internally converted to high-res PCM (such as for use by recording engineers, who process it down to CD-grade digital for distribution), very little if any of the musical information is lost.

Although high-res makes it easier for recording engineers to do their job, CD-grade digital is plenty for consumers. Those who disagree probably have never heard a good CD-grade digital recording played back on a good system. I use a Zen DAC V2, which I reviewed in AudioCleanAndCheap.blogspot.com, although when I reviewed it I was unwittingly listening to poorly resampled data.