Linux, Bluetooth, and sound

Linux can provide a fast, secure, and modern desktop computing experience. However, Bluetooth audio on Linux sucks.

Bluetooth audio cuts out intermittently

If you experience 1 second gaps of silence approximately every 300 seconds of Bluetooth audio playback, this post may help you.

Try adding this line to the /etc/modprobe.d/alsa-base.conf file

sudo su
cd /etc/modprobe.d
nano alsa-base.conf

add this line:

options snd-hda-intel model=generic

save and exit
reboot

Can you use a wire instead?

A dear friend, of the same generation that refers to “Walkman jacks,” first helped solve this problem for audio at work from my personal laptop: by gifting a sound bar that can plug into an actual 1/8″ analog audio headphone jack.

(My friend also sent a USB-C plug to 1/8″ analog audio jack adapter, which I do not yet need, but have packed into my accessories bag, for use in the near future, when my next laptop will have even fewer ports.)

J&D USB C to 3.5mm Audio Adapter, USB Type C to 3.5mm Headphone, and Widely Compatible for Google, Samsung, Huawei, Moto, ...

No Bluetooth microphone support for Linux

There are technical and historical reasons for why there is no Linux driver support for Bluetooth microphones. My suggestion is to invest in a wired USB headset. Logitech is a safe choice.

Experimenting with Linux as a desktop operating system

There are several ways to experiment with Linux as a desktop operating system without making a full commitment to re-formatting your laptop, or giving up access to Windows. This post aims to provide ideas and a roadmap for a current Windows consumer considering a switch to desktop Linux, but unsure how or where to start.

Links for Ubuntu and Fedora distributions

https://releases.ubuntu.com/20.10/

https://getfedora.org/en/workstation/download/

There are many distributions of desktop Linux. I suggest you start with Ubuntu or Fedora.

Running Linux as a live desktop boot on a USB stick

The live version of Linux on a USB stick is useful to test the hardware on your laptop, and to get an idea of how a Linux distribution feels hands-on. The interface on Mint, for example, is quite different from the Gnome 3 desktop experience on Fedora and Ubuntu.

An example: the boot screen of a “live” distribution of Ubuntu. If you click “Try Ubuntu” the operating system will run using the USB stick as its storage.

The live version of Linux on a USB stick is impractical for day-to-day use.

(If your laptop’s SATA controller is configured for RAID mode, you will still be able to boot the live operating system from the Linux installer on a USB stick. However, you will not be able to read files on the Windows hard drive, or install Linux to the hard drive. See below for more details regarding SATA drive controllers, RAID mode, and AHCI mode.)

Running Linux as a virtual machine (VM) guest under VMware Workstation Player Free for Windows

VMware Workstation Player Free for Windows is proprietary software, but is available free of charge for personal, non-commercial use. This software offers good performance and a smooth experience.

https://www.vmware.com/ca/products/workstation-player/workstation-player-evaluation.html

Running Linux on an older, secondary machine

On average, people upgrade their personal laptop every 5 years. If you buy a new laptop, consider backing up your old laptop, then reformatting the old laptop with Linux. The old machine will get a new lease on life: Linux will run faster than Windows on the same hardware. This approach allows you to experiment with Linux without committing yourself.

Checking the SATA drive controller mode in BIOS: RAID vs AHCI

(Warning: Windows partition will be unusable after changing SATA mode to AHCI, do your backup first!)

If you intend to format a computer with Linux, you need to go into the BIOS and change the SATA drive controller from RAID mode to AHCI mode.

Go into the BIOS of the laptop by pressing F2 during bootup, and change the SATA controller mode from RAID to AHCI.

Many howtos on creating multiple-boot between Windows and Linux are now obsolete

Many of the existing howtos describing how to create a multiple-boot between Windows and Linux are now obsolete. In the past 3 years, laptop motherboards have been shipping with the SATA hard drive controller set by default to RAID instead of AHCI. Changing the SATA controller mode from RAID to AHCI renders an existing Windows installation unusable. These howtos rely on resizing an existing Windows partition to create unallocated space for a Linux install. There is, however, little point in preserving a broken Windows installation.

Formatting a computer with Windows and Linux in dual-boot mode

It is possible to install Windows and Linux in a multiple-boot configuration. However this requires backing up the unique data (documents and other unique files) from the existing Windows installation, changing the SATA controller mode, doing a fresh baremetal Windows install on part of the drive space, and doing a fresh baremetal install of Linux on another part of the drive space.

Checking whether a system is set for UEFI or Legacy/BIOS mode

Check the laptop’s BIOS to determine whether the system is set for UEFI or Legacy/BIOS mode. If the system is in Legacy/BIOS mode, change the setting to UEFI mode. This will be needed later, when the Linux installer creates a multiple-boot menu using grub2.

Installing the Windows baremetal partition

Rufus ISO utility

Rufus is an ISO burning utility:

[rufus screenshot]

https://rufus.ie/

Downloading a fresh ISO of Windows 10 from Microsoft

https://www.microsoft.com/en-ca/software-download/windows10ISO

Use Rufus, and specify partition type GPT and target system UEFI-CSM. Burn the USB stick.

Run the Windows installer. Destroy all existing partitions. Then, install Windows in a 200GB partition, but leave the rest of the drive space as “unallocated space.”

Downloading a fresh ISO of Ubuntu 20.04LTS Linux

https://releases.ubuntu.com/20.04/

Use Rufus, and specify partition type GPT and target system UEFI-CSM. Burn the USB stick.

Run the Ubuntu Linux installer. Let the installer use the remaining “unallocated space” on the hard drive.

Linux will install with a multiple-boot menu

Linux will also install a multiple-boot menu that appears when you start the computer. By default, Ubuntu Linux will boot first, but you can choose Windows as the boot within 10 seconds.

Consider Running Windows as a virtual machine (VM) guest under KVM/qemu on a Linux desktop

see my presentation on this subject:

Fedora 33: Fedora version upgrade breaks a production web server, and Fedora’s reputation for smooth version upgrades

My brother hosts his personal website and blog malak.ca on a baremetal DSL server. My brother uses Fedora on his laptop and server.

A perfectly good pre-fork mod_php MPM-ITK PHP handler was in place, and serving web pages.

Upon reboot after the major version upgrade, the web server was showing error 503 for PHP requests on the blog. The config files were a mismatched mess, so we ended up having to do a baremetal format. My brother keeps his data on a separate drive so the baremetal evac only involved a mysql dump file and a few config files, but still.

Note this post about Fedora 33: “Several relatively controversial changes are currently under discussion on the project’s mailing lists…”

https://lwn.net/Articles/824620/

“The default doesn’t matter, there’s absolutely no reason to take away the sysadmin’s choice here. There are at least 40 servers I personally am responsible for where I see no reason to move from mod_php to php-fpm, for example.” John M. Harris Jr.

I was a CentOS web server admin for many years, and used Fedora on my personal laptop until last year. My brother ran CentOS in the past, but towards the end of the Long Term Support (LTS) cycle, CentOS had absurdly outdated but security-patched versions of libraries. My brother started using Fedora on his web server, and we have been able to do several major version upgrades without incident. The reliability of this upgrade process is what made Fedora suitable for a web server.

Ubuntu has trouble with major version upgrades. On some Ubuntu version upgrades, the installer freezes, requiring that a rescue kernel be entered, apt-get update –fix-missing, dpkg –repair, and other exotic interventions take place before the upgrade process can be resumed and completed.

By comparison, Fedora version upgrading has a better track record, and is usually smooth. A technical error or unforeseen incompatibility would be understandable. A deliberate policy choice to break production web servers to enforce a policy opinion: not cool.

Fortunately, Remi RPM has come to the rescue:

https://rpms.remirepo.net/

https://rpmfind.net/linux/rpm2html/search.php?query=mod_php

Read my brother’s post on this: