Getting Lubuntu 20.04 to Run on an AtomicPi

 

I've already written a few posts/blogs about my AtomicPi, and how I managed tasks like getting the USB 2.0 port to work. I also wrote about how I fixed up software issues with the copy of Lubuntu 18.04 that Digital Loggers wrote to work with the AtomicPi harware. This blog is about how I got Lubuntu 20.04 to work with my new AtomicPi.

I actually had a fairly good reason for buying another AtomicPi. First I want to talk about some upgrades I made to my original AtomicPi. Since my last AtomicPi blog, I saw a ShakaWorld breakout board on sale for half off; saw it on Amazon. I removed the USB 2.0 port I had already added, because the breakout board already had one. I also had to rip off the connectors on the speakers I had hooked up to the 3.3 V Mayfield amplifier built into the AtomicPi, because the breakout board accepted wires inserted into it, not connectors. ...and shortly after all of this brief work, tragedy struck.

My Siamese cat, Sox jumped up on the furniture where my AtomicPi was, knocking it on the floor. The antennas I had soldered to the ipx connectors were ripped off, but other then that everything looked OK. I put my AtomicPi back together, and stuck a Panda wifi adapter into its USB hub (to make up for the lack of wifi antennas). Everything seemed to work, but the AtomicPi started crashing after a while, and eventually wouldn't reboot. Rather then trying to figure out what I needed to fix (which is how I would've approached this in the past, so I've either changed in my old age, or I just wanted to get a new AtomicPi) I looked at the AtomicPis still available on Amazon, and I found one that came with a breakout board (I think this was the one made by DLI), power supply and a camera; irresistable at just $39.

I had been running Lubuntu 18.04 on my old AtomicPi, and after a lot of software tweaks, it did a great job supporting my computer. The DLI Download page had several other OSs on it, the latest one was Lubuntu 20.04. I downloaded the OS and dd'd it to a USB drive, which I tried to boot the new AtomicPi from; wouldn't boot. I was using the same power supply that I was using on my old AtomicPi, so I tried another power supply and it booted right up. Unfortunately, I had a bunch of issues after booting up.

I tried running a YouTube video, and crashed immediately. A common remedy to this is stopping hardware acceleration. I was using Firefox as my browser,so I clicked on the drop down menu and went to settings->general->performance and unchecked "Use hardware acceleration when available". I rebooted Firefox for good measure, went to the YouTube website and ran a video; it didn't crash. I've run a bunch of YouTube videos since then without crashing. I also have Chromium on my AtomicPi, so I disabled hardware acceleration on it too.

I actually tried something else before disabling harware acceleration. I ran dmesg too get a listing of the boot messages, in hopes of finding some glaring error that would clue me on what to do. I got a message

	   uvesafb: failed to execute /sbin/v86d
	
	   uvesafb: make sure that the v86d helper is installed and executable
	
.

I looked for v86d on my system, but it was nowhere to be found. So I tried installing v86d

	   sudo aptitude install v86d
	

I then rebooted and ran dmesg again; got the same error message about v86d. v86d is described on the Deban website:

v86d provides a backend for kernel drivers that need to execute x86 BIOS code. The code is executed in a controlled environment and the results are passed back to the kernel via the netlink interface. v86d should NOT be run by the user, the kernel will call it, when it is needed.

When I first saw that v86d message, I thought v might stand for video, and this might be important for running video on an x86 processor. Based on the Debian website description, v probably stands for virtual. The Atomic Pi uses an Intel Atom cpu, an x86 processor. There isn't an obvious reason as to why x86 emulation would be needed on an x86 processor, so I decided to remove it from the boot files.

	   sudo apt --purge remove v86d
	   edit /etc/initramfs-tools/modules and comment out uvesafb
	   update-initramsfs - all -u
   

When you remove a package with the --purge flag, you also remove all of the configuration files; e.g., uvesafb.conf. The boot files will still have a reference to uvesafb, so you get rid of the uvesafb reference in modules and rebuild the boot file.

When I still had problems with my Atomic Pi crashing, I decided to see if anybody else already fixed the problems with Lubuntu 20.04 on an Atomic Pi. The DLI download page had some bare bones OSs from ELECTROHAXZ, so I took a look at the site and found a desktop version of Lubuntu 20.04, and downloaded it. Unfortunately it had all the same problems as the DLI version, so all of my code changes I've shown (and the ones to follow) will probably fix up the DLI version of Lubuntu 20.04, too (but I can't promise that).

Crashing isn't the correct term. Crashing implies the system was running, and then stopped ungracefully. The screen would go blank and then became unresponsive to the mouse and keyboard. In other words, the system couldn't wake up after going to sleep. I took a look at the BIOS, and there are only two sleep modes on the Atomic Pi; S0 and S5. S0 isn't really a sleep state, it denotes a system that is up and running. S5 denotes a system that is powered up, but everything is turned off; a tough state to wake up from. I looked up how to disable sleeping, and it is:

sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target

My Atomic Pi ran for hours after this, so everything seemed fixed. The xscreensaver was playing different screens and finally hit one that put the system into a sleep state; I couldn't wake up the system. I went into xscreensaver, and changed the setting from random images to a specific screensaver, webcollage. Webcollage played for hours, and I was able to click the screen with my mouse and get the desktop back.

I made some more changes in BIOS to stop sleeping. I changed LPE Audio Support from ACPI to PCI. I would've liked to change SCC eMMC Support and SCC SDIO Support to PCI also, but I tried that and I couldn't boot; left them as ACPI. However, after going back into BIOS and disabling Intel SpeedStep, Turbo mode, and Virtualization, I was able to change everything to PCI and I was still able to boot. More changes I made in BIOS were disabling IPV6, set PXE boot time as 5 seconds, and set DVMT Pre-Allocated to 512M. I also set a password for accessing BIOS, but that wasn't something I did to make Lubuntu 20.04 usable.

Before making the changes in the above paragraph, I found that it was very difficult to reboot after the system froze; took 4 or 5 reboot tries before displaying a login screen. I did the following:

	   edit /etc/modprobe.d/blacklist-dw_dmac.conf and add the following lines
	   
	   blacklist dw_mac_core
	   install dw_dmac/bin/true
	   install dw_dmac_core/bin/true
	   
	   then run the following
	   sudo update-initramsfs-u
   

...and now I have an Atomic Pi that runs perfectly with Lubuntu 20.04

 

 

Return To My Blog Page Return To My Programming Page