Retiring the Shuttle

I started a little project a couple of years ago to replace my x86 home machine with a little Raspberry Pi 4. It wasn’t without it’s challenges. It turns out most of the problems with the Pi 4 revolve around power issues with the USB ports. Plug in anything besides a flash drive and all bets are off. This made it hard to do some things, particularly make backups. I kept my old Shuttle running Ubuntu around mostly as an occasional NAS, to rsync a copy of my media and home directory files for backup. The Shuttle is at least a decade old and takes up lots of space and I started thinking about replacing it. I came across a bunch of these Mini PCs on Amazon and decided to spring for this one.

They all seem to come with Windows 10 installed, but no matter I will just install Ubuntu over it. Well, it seems these little machines all use the dreaded UEFI secure BIOS. But the world has come a long way since I first wrestled with UEFI. The install went well, and after a few tweaks of the BIOS (always scary) I am able to boot either Windows or Ubuntu. I guess I’ll harvest the disks in the old Shuttle and use them for backups, store them in the closet, and eventually throw them out, like I have done with so many hard drives in the past.

Raspberry Pi OS vs Ubuntu

A while back I decided to have a go at using a Raspberry Pi 4 as my primary desktop machine. I went with Ubuntu for the OS which was a bit of a slog at first, but these days it is pretty well supported, mostly. I currently have three other Raspberry Pis in the house, two Raspberry Pi Zeros being used for network monitoring and as a lawn sprinkler controller and a Raspberry Pi 4 on the downstairs TV for streaming.

I didn’t have much choice and stuck with the Raspberry Pi OS for the Zeroes, since I Ubntu wasn’t available. It was only 32-bit bit for the simple embedded applications it was enough. I also had a Zero side project to display images on a TV, a bit like those LCD photo frames. A Zero was good enough for that sort of thing and I used Raspberry Pi OS again.

Ubuntu on the TV became a bit of a problem. The GPU support is lacking and you really need to GPU to watch video. Every time Ubuntu would update, it would silently clobber my GPU support. Last night I decided to dump Ubuntu and go with Raspberry Pi OS. It took no time at all to install and configure and the resulting video was so clean my wife even commented on it.

I suppose for now I will stick with Ubuntu on the desktop and deal with the spotty support, but I think all of my future Pi projects will be using Raspberry Pi OS.

Sorting Out My Backups

I am a strong believer in backing up my files. Unfortunately I’m not as organized about it as I would like. It doesn’t help that my main desktop machine is a Raspberry Pi 4 running Ubuntu and my wife’s is a Windows 10 PC that has been in constant operation for literally decades. I also found some old backups of my kids files on an old USB drive.

i decided to spin up my old Shuttle Linux box as a NAS, or really just a place for my backups. It has an old 2 TB HDD that is perfect for the job. I started by rsyncing my home directory from the Pi over to the Shuttle. Then I could use one of my old USB HDD drives for backing up the NAS. I have a couple of 1 TB USB HDDs I was using for backups and then there is the 4 TB HDD I was using for the Pi before I went to SSD.

My plan is to put everything on the NAS, with rsync scripts to automate the backup of home directories. Then another rsync script to save the NAS to the USB HDD, just to be safe.

Only hitch was the Windows PC. I just cleaned it up with a new install. There are a few 3rd party rsync applications, but wasn’t crazy about them. I used to use Cygwin. Is that still around? Maybe. Then I read about this Ubuntu on Windows, in a sort of VM, I suppose. Gave it a try and was quicker and easier than just about anything I have ever tried to do on windows. Now I have rsync, and everything else. Pops up a nice little bash shell window like a native Windows app. No more need to mess around with PowerShell either.

Raspberry Pi 4 Fail

Recently I moved all my media files from my old USB HDD, which was probably always a bad idea, onto a new 1TB USB SSD. I decided to use the old HDD for backups. Unfortunately during the first real backup, everything failed. It took a while to get to the bottom of it, but it seems Plex filled up my 128GB flash card. I had assumed that would be enough for my files and Ubuntu, but I guess not. It seems lots of temporary files ended up in /var.

When I started this experiment in desktop Raspberry Pi there wasn’t much of a choice. You had to boot from the flash card but you could mount a USB drive. So that is what I stuck with, with my media (photos, videos, etc) on the external USB drive and Linux and home directories in the flash card. Well a year on it seems you can boot from a USB drive, so I bit the bullet and decided to move everything to the USB SSD and boot from it.

After a few false starts (you can’t use Ubuntu 20.04, only 20.10) and lots of time copying files around I got it all to work. Advice for anyone doing this today: go straight to a USB SSD and ignore the flash card. There is a nice utility to load up any OS of your choice from any popular platform (Windows, Mac, Linux). You can be done in a few minutes. The instructions on line require some updating of the Raspberry Pi 4 firmware but I found that wasn’t necessary in my case (maybe I had already updated it). Pretty impressive.

More Hot Raspberry Pi

My desktop Raspberry Pi 4 used a USB HDD disk. Old fashioned spinning platters. It was 4TB and much cheaper than SSDs. Turns out this was probably a mistake. Even with a nice metal heatsink case the Pi was always hot to the touch. I recall about 140F. I sprung for a new 1 TB Samsung USB SSD and (after the usual hassles) got it all set up yesterday. The Pi was noticeably cooler, just over 100F. I suspect the power drawn by the USB HDD drive was enough to heat things up, but probably not enough to cause failures.

Now I wonder if some of the early problems I had getting things like WiFi and Bluetooth to work were heat / power related. Anyway, now I have a proper backup drive (the old HDD). Will be able to organize my files now (really :^)

Hot Raspberry Pi

My downstairs TV Raspberry Pi 4 started showing a little thermometer icon in the upper right corner while I was streaming some hi-def video. Turns out it was overheating, or close to it. I didn’t put the fan in since I put heatsinks on the processor and two other chips and didn’t think it was necessary. But I suppose under heavy use, especially streaming video, heat gets to be a problem. I snapped the fan in, plugged it in to the 5V on the header and the temperature quickly dropped 40F. Now I wonder if my WiFi problems on my desktop were heat related. Both my Raspberry Pi 4s are now on ethernet, so I’ve stopped fighting the wifi battle.

Raspberry Pi 4 Video

I decided to put a Raspberry Pi 4 on the downstairs TV, with the vague idea of watching streaming media. We already have an Apple TV and a Chromecast, but their mirroring is always more complicated and lower quality than advertised.

Getting set up was easy. Bought an 8GB CanaKit on Amazon and it arrived in one day. I used the default install of 32-bit Raspberian OS as a test, then installed 64-bit Ubuntu. The only hiccup was using 20.04 LTS, which didn’t come with an included user interface. No problem, I can install Gnome. Except modern Ubuntu servers seem to secretly do a security update in the background by default, which blocks any other updates or installs. Once I figured this out it was off to the races.

I went to YouTube for a video test and the results were disappointing. Slow, pixelated and choppy. I know the processor in the Raspberry Pi 4 has a pretty decent Graphics Processor (GPU) so performance should be better. A bit more Googling showed it needed to be enabled at the kernel level.

Some earlier postings showed how to rebuild libraries and the kernel, but that seemed like too much work. It did look like later postings using more recent kernels could enable the GPU with a single line in a configuration file and a reboot. I gave it a try, adding the lines below to the /boot/firmware/usercfg.txt file.


The first line just fixes the annoying black borders around the display and allows the full screen to be used at full resolution. I’m not sure why this isn’t the default. The second line enables the GPU. After a reboot you can tell if it works by looking at the Graphics field in the About page in Settings as below. The default (slow) software graphics interface is called llvmpipe. It should now say V3D, the 3D “Vulcan” graphics driver.

After this change video was smooth and fast, even in a browser. I was impressed. It also seems to help with regular desktop rendering. You may also need to do special enabling in applications such as Chrome and VLC.

Raspberry Pi Ubuntu and Evolution

I have been using a Raspberry Pi 4 running Ubuntu as my desktop for almost a year now. I don’t use it for anything too heavy and it has been adequate. But just adequate. I started doing a bit of coding and became more and more frustrated with performance and instability. At first I blamed the Google Chrome browser, a known memory hog. I was seeing 80% of my memory used (I have 4 GB) and that seemed to be at the root of the problem. But I noticed lots of cycles and memory were being taken up by some built in calendar application. It seems this is part of the Ubuntu Evolution email / calendar default application. it also seems like it is difficult to remove (come on, Ubuntu). I did finally find a good way to remove Evolution and since then, memory use is half of what it was and performance is noticeably better.

Raspberry Pi 4 with 8 GB RAM

I was wondering if this was in the works.  A new Raspberry Pi 4 board with 8 GB of RAM.  I bought one of the 4 GB models, which is my new desktop machine.  In the old days I would have upgraded the RAM in my PC, with the Raspberry Pi I’ll just get a whole new board.  For $75, why not?  No real hurry.  4 GB seems to be more than enough right now.

The most powerful Raspberry Pi now has 8GB of RAM

My Raspberry Pi 4 WiFi Hell

I think I may have finally gotten to the bottom of my Raspberry Pi 4 WiFi problems.  I installed Ubuntu 18 and the WiFi networking never worked properly.  It would work sometimes, then drop off randomly.  I thought it might be a hardware problem and returned the unit for a new one.  Still the same.  Thought it could be a power supply issue, so I offloaded everything on the USB to a powered USB hub.  It ran a bit cooler but that wasn’t it either.  There were lots of reports of signal issues when using certain hi-def HDMI modes on the monitor.  Nope that wasn’t it either.  I had a fancy metal heatsink case which was rumored to cause WiFi problems.  Nope.

Gave up an bought a USB dongle which appeared to work at first, then it didn’t.  Later I put the WiFi dongle on the end of a short USB cable, thinking that moving the WiFi away from the actual Raspberry Pi 4 unit might do something,  It seemed to work for a while. Then I upgraded to Ubuntu 20 (because I accidentally trashed my SD card).  Well, it was time to upgrade anyway.

After the upgrade there was no WiFi at all.  Found out that it had to be enabled in /etc/network-config.  Things were looking up.  Now I could boot up and see a reasonable WiFi.  But soon it deteriorated again.  More googling lead to all sorts of people with similar problems, including people using different versions of the Cypress firmware.  I didn’t want to go there. I would use a wired ethernet and wait for a fix if I had to.

Yesterday I read something that sounded worth pursuing.  Some people had WiFi set to the wrong country (UK for instance).  That would be a problem. I also noticed my 5 GHz WiFi wasn’t showing up.  Probably a warning sign I had ignored too long.

I’m not a networking or WiFi guy (and I don’t really want to be one) but a quick look turned up my WiFi country set to “country 00: DFS-UNSET“.  Probably not what I want.  Manually set it with “sudo iw reg set US” and immediately I saw my 5 GHz WiFi!  Seems more stable, and it should be.  Now I just have to figure out where to set this in the file system so I don’t have to remember to type this command after every reboot.