Stabilizing Derpy Chips at Last

Good Morning from my Robotics Lab! This is Shadow_8472, and today, I’m addressing an annoying trio of issues I’ve had with Derpy Chips since I installed PopOS on it. Let’s get started!

The Problems

I have a number for gripes to myself about Derpy. I frequently have to stare at an ugly, gray login screen for to a minute and a half before I can select a user account. Tabs sometimes crash in FireFox, but only while I’m using it. Discord sometimes blinks, and I lose any posts in progress – possibly representing minutes of work.

Additionally, my mother uses a separate account to play Among Us on Derpy, and I have my account set up with a left-handed mouse she can’t use easily. Unfortunately, Derpy tends to crash whenever I try switching users, so I’ve been using a full power cycle. And that means we need another long, featureless login screen before the actual login. Some day, I really want to figure out how to change a login screen. Aside from how long this one takes, I’d much rather use the KDE one over GNOME 3.

The Plan

Of the three issues I’m setting out to address, long login is the most reproducible. Fickle FireFox and Ditzy Discord happen often enough to make Derpy frustrating to use as a daily driver, but sporadically enough to resist debugging on-demand. So I am planning on spending up to the full week on Derpy ready to catch the errors when they happen.

Going off what I have to start with, I’m assuming my FireFox and Discord issues are related. Both use the Internet for their every function, and the glitching tends to happen at times when a packet is logically being received: for FireFox, when a page is either loading or reloading, and Discord when someone is typing or has sent a post. If I had to hazard a guess, I would have to say Lengthy Login is directly caused by my NFS being mounted in /etc/fstab, and I’m not sure if there’s anything to be done about it except working the surrounding issues.

For this week, I an reaching out to the the Engineer Man Discord and a Mattermost community I found for PopOS. I don’t know much about the latter, but I heard the PopOS dev team frequents that forum.

The Research

I started by posting about my issues. Help was super-slow, and I often got buried. I don’t remember any self research making any sense. Anyone helping me in the PopOS support chat seemed obsessed with getting me to address Blank Login first, even though it was the least annoying of my three chosen issues, if only other stuff didn’t bug out on me.

Someone gave me a journalctl command to check my logs, and I did so shortly after a target glitch. It came back with a segfault error of some kind. I added this to my help thread and humored them about disabling my NFS fstab lines.

RAM or Motherboard?

When researching further for myself, I came across a number of topics I didn’t understand. I didn’t make any progress until someone told me to try memtest86+. What a headache! I installed the package, but had to dip into GRUB settings so I could boot into the tool. Even then, it kept crashing whenever I tried to run it with more than one stick of RAM at a time, as in the whole thing froze within 8 seconds save for a blinking + sign as part of the title card.

I was hoping at this point it was just a matter of reseating RAM. Best case: something was in there and just needed to be cleaned off. Worst case: a slot on the motherboard might have gone bad, meaning repair might be one of tedious, expensive, or impossible.

I tried finding the manual of Derpy’s motherboard, but the closest was the one for my personal motherboard, a similar model. Both come with 4 slots of RAM: two blue, two black. I used the first blue slot to make sure each stick of RAM passed one minute of testing, followed by a full pass of testing, which typically took between 20 and 30 minutes. I wasn’t careful with keeping my RAM modules straight, in part because I helped clean my church while leaving a test running.

I identified the fourth stick from a previously tested one I’d mixed it up with by how it lit up the error counter, starting just past one minute in. I tried reseating it several times, with similar results: the same few bits would sometimes fail when either reading of writing. If I had more time, I would have a program note the failing addresses and see if they were the same each pass as they kept adding up.

Further testing on the motherboard involved putting a good stick of RAM into each slot. Three worked, but one of the black slots refused to boot, as did filling the other three slots. I landed with leaving one blue slot empty for a total of 12 out of 16 gigs of RAM.

NFS Automount with Systemd

I still want relatively easy access to the NAS from a cold boot. “Hard mount in fstab has quite a few downsides…” cocopop of the PopOS help thread advised me. Using the right options helps, but ‘autofs’ was preferred historically and systemd now has a feature called automounts. I thought I might as well give the latter a try. cocopop also linked a blog post On-Demand NFS and Samba Connections in Linux with Systemd Automount.

I won’t go into the details here, but I highly recommend the above linked blog. It didn’t make sense at first, but after leaving it for a day, my earlier experiences with fstab translated to this new method within the span of about an hour total. I missed an instruction where I was supposed to enable automounting once configured, but it felt almost trivial.

Results

I haven’t had any problems with Discord or FireFox since setting the defective RAM aside in the anti-static bag it came in. As a bonus, switching users works correctly now as well.

NFS mounting is now much more streamlined with systemd. While I cannot say which method would have been more challenging to learn first, the tutorial I was following made this new method feel way more intuitive, even if file locations were less obvious. I didn’t even need any funny business with escape characters or special codes denoting a space in a file share name.

Takeaway

It really should go without mention that people will only help each other with what they know. I find myself answering rookie questions all the time when I’m after help with a more difficult one. Working side by side this week on a future topic, I had such a hard question, people kept coming in with easier questions, and I ended up asking mine enough times someone commented about the cyclic experience. The same thing kept happening with the easy part of my question about login.

Final Question

Do you ever find yourself asking a multi-part question, only to have everyone helping you with just the easiest parts you’ve almost figured out?

Virtual Machines: a Preliminary Exploration

Good Morning from my Robotics Lab! This is Shadow_8472, and today, I’m teaching myself a long-overdue skill for Linux: Virtual Machines. Let’s get started!

Overview

Virtual machines are like a computer within a computer; a host operating system allocates some of its resources to a less powerful computer, often with an entirely different operating system. Applications vary from getting a feel for a new Linux distribution before/without installing it on baremetal to giving scammers a sandbox to waste their time destroying without risking your actual system.

Failing other methods with less overhead, virtual machines are a more brute force way to run old or incompatible software on your machine. One personal example from my past was a 16 bit Bible program I liked the interface for. Windows 7 wasn’t happy running it, but there was a special XP mode I could boot into and run my program. I found the solution slow and clunky, and I didn’t use it but twice. Furthermore: the license didn’t extend for Windows 10, so I refused to use it on principle when I downgraded.

Choosing a VM

Wikipedia is a great place for finding software comparisons. Their list of VM’s is quite lengthy, but I wanted a general purpose VM solution I could use anywhere and run anything, as I had an idea I wanted to try on a Windows machine, but my main focus would be running one Linux from another. I was also trying and failing to keep an eye on weather a VM was using a type 1 hypervisor (better performing) or a type 2 hypervisor (more portable/debugable – I think) to run a guest OS.

Looking into individual results, Oracle Virtualbox came out as having a reputation for being easy, even for beginners, though it does lock away some features for a premium version. Free and Open Source KVM (Kernel Virtual Machine) also came up as a better performing, but harsher on the barrier to entry. Further research from LinuxConfig article “Virtualization solutions on Linux systems – KVM and VirtualBox” warned me that KVM may not be as enthusiastic as advertised when it comes to running outside Linux on Linux VM’s, and that I’ll probably want to learn both at some time when I revisit this topic to straighten things out with QEMU and other elements I’ve glossed over while reading about.

Installation: First Attempt

While my goal when starting research was putting a VM on my father’s Mint machine for unrelated –and soon outdated– reasons, I started on my older, but more capable Manjaro machine. I found VMM, a package in a community repository for monitoring VM’s, so I installed it, though poking about only yielded error messages.

It took a while, but it looks like my CPU doesn’t support everything I need for running VM’s. None of my personal computers do. During my initial investigation, I looked up my CPU model on Intel’s site. From what I saw, it supported Intel Virtualization Technology (VT-x), but not Intel Virtualization Technology for Directed I/O (VT-d). One guide only mentioned the former as a requirement, but no package for KVM proper showed up when I searched for it. Furthermore: any commands that look through my CPU’s info properly don’t see the required component.

Takeaway

So, no. I’m not doing a VM today, but when I looked at my father’s Mint box, the newer CPU did support virtualization, and by extension, ButtonMash should too, though their other resources may limit useful applications.

This week’s research has also given me insight as to why XP Mode was so clunky those years ago. I was sending my hardware in directions it wasn’t designed to go. It can still pretend like it’s up to the task, and for old enough applications it doesn’t matter. But hosting a modern OS on top of a modern OS is not for me at present.

Final Question

Have you ever gotten closure to an old project years after laying it to rest?

Family Photo Chest Part 12: Early Prototype Workflow

Good Morning from my Robotics Lab! This is Shadow_8472, and today, I’m recounting the tale of my first working prototype, and how I ruined it before getting it to actually work. Let’s get started!

Pi4 8GB and Cards

I am now the owner of a Pi4 with 8GB of memory, the highest end Pi available at the present time. When I unboxed it, I put it directly into a case with a fan powered by GPIO pins. Some day, I’ll want to benchmark its cooling against my Pi 4 with the huge heatsink case and passive airflow.

The cards I had on order never came in, and their listing vanished in the meantime. I ended up with some 64GB cards from Gigastone that are supposed to be better on paper, but I’m not in a position to benchmark the Raspberry Pi use case. While these new cards only have one SD adapter between them –I’ve been using SD adapters for labels– they did include a USB adapter. It’s only 2.0, though.

Manjaro ARM

I have not fully settled on what distro to go with for this project. TinyCore is great for starting projects, but I have a hard time finishing it there. For the time being, I’ll be prototyping from my Manjaro ARM card. Whenever I need to reset, I can boot a Pi to Raspberry OS and arrange for a direct dd from my master Manjaro card to the newer, larger card.

Side note: While performing my first wipe, I noticed dd did NOT automatically expand the partition like I thought it did. Once I have things working better, that may be a possible improvement to look at for a new master Manjaro card.

Prototype GIMP Configuration

First order of business was installing GIMP and XSANE plugin for GIMP. They worked first try, but XSANE only recognized a shared network printer all in one with a scanner built in, ignoring the local USB scanner I cannot seem to arrange access permissions for correctly. I think I spent half my time this week on this problem exploring dead ends.

The most important missing piece to the puzzle has been a script called Divide Scanned Images. With it, I can feed it scans containing multiple pictures, and it can separate and crop them automatically with the option to deskew (rotate to vertical) if an appropriate utility is found. Link to blog about script: how-to-batch-separate-crop-multiple-scanned-photos. Linked on that page in a comment by user Jan is a Linux-compatible version of Deskew (I have yet to get it to work).

Eager to test what I did have working, I went ahead with using the scanner on the network. I had someone put some picture stand-ins on; I got two seed packs. To my annoyance, the separation script appears to only work with pictures on file and not freshly scanned in, making it a completely separate process. As mentioned above, Deskew refused to work. I suspect I either didn’t put it in the right place or I was working with a copy compiled for an x86 processor while on an ARM based system, though it could be as simple as shadows from the seed packs.

Struggling With the Scanner

I find SANE to be an ironic acronym: Scanner Access Now Easy. I still don’t have Linux scanners figured out. I know there’s an easy way with security implications I’ve stumbled my way through before. I also have learned that differences between distros make the Ubuntu page I keep getting thrown to for help useless in parts. Whenever I post for help on Discord, someone else comes along with another question and mine gets buried.

Along my journeys, I’ve learned about a scanner group. I tried adding it to my profile, and somehow managed to get what appears to be a fake group. After a long time trying to figure out how to safely remove it so I could add the real one, I managed to remove myself from all my default groups including my ability to use sudo, and I don’t believe a root account is set up on this card. It even said the incident would be reported. Any such black mark never had a chance to be transmitted over the Internet –WiFi was down for USB scanner diagnostics– before I dd‘ed the master copy back over it.

Another attempt had me searching through the local files for answers. sane-find-scanner and anything looking at the USB port directly can see the scanner right away, but scanimage -L to list devices SANE sees comes up with nothing when off the network. I can’t reproduce my exact path on the laptop I’m working from, but I found a tip to check /etc/sane.d/ for appropriate config files. If I understand epson.conf there correctly, my problem is either elsewhere, or I need both a product ID and a device ID, the later of which I still have no idea how to locate.

Revised Workflow Proposition

In the light of GIMP seemingly not wanting to split pictures live in memory, it may be a good idea to offload that task to a more powerful computer that can handle two Pi’s operating scanners and saving to a network share hosted on an SSD before saving the pictures to GoldenOakLibry. Touch up can then happen in-place.

Takeaway

While I’m glad to have gotten a subpar prototype operational, it’s only about 60% of the process demonstrated at once. Still, it was the missing pieces demonstrated, and the toughest spot was exactly where I expected from past experience. This is already Part 12 of this ongoing series, and I want to finish before another 12 parts go by. Any month may be the month, and no matter how down I feel at the end of work on it, I still made a major goal this week.

Final Question

What was the biggest mistake you’ve ever made but still had a minimal effort fix for?

Space Engineers: Gravity is Stronger Than Thrust

Good Morning from my Robotics Lab! This is Shadow_8472, and today, I’m changing my goalposts and slapping a finished sticker on last week’s project. Let’s get started!

The Design

Where to start now that I’ve “finished” this project? The hull is defined by ship’s systems, but ship’s systems have to fit inside the hull. The whole point of this craft was to make a craft that could bore in its own silhouette without as much overhead, and the simplest way to do that is some take on the cylinder.

In the interest of added visual appeal, I played around with different angles all along the length of my design. The cockpit is as close to a sphere as I can get and still have major flat regions. I added a skinny neck just because, then a larger habitation section with two decks: a multipurpose room and fuel storage/airlock. My cargo hold also houses most of the ship’s batteries, and engineering has a bunch of engines I’m basically lugging around and a tiny secondary cockpit in the very back. Each section listed above — aside from engineering and auxiliary control — is individually pressurized using doors.

When I went to start adding thrusters, I found all my fancy angled hull sections lacked adequate mount points. I adjusted my spreadsheet to find I could boost my effective thruster power by adding nine small thrusters to each big one, at the cost of an extra couple blocks footprint. I sent my new number through my spreadsheet again, and found I’d only need about ten “super thrusters” to hover.

Oversight

I totally forgot about the weight of the ship. In fact, I couldn’t figure it in because of the way the game reported my mass including the ground-based station I was attached to, as well as any ships docked to it. As a result, when I went for my first nose down test, I wasn’t able to back out of my hole, even though it was a third full, tops.

And with the power of extra thrusters comes greater draw on the power grid. I totally neglected to run the numbers before taking off, and found my batteries maxing out while accelerating upwards. I can probably hover under max load, but I’m also looking at the overall battery life. There’s also the fact that I’d like to relocate my base to a nearby mountain top for a bit more light. The air up there is thin enough to where the thrusters I’m using are not as effective.

Game Boundaries

Many games hint at their boundaries before you run into them. They may take the form of an invisible wall marking the edge of a level or a second stack of objects denoting a limited size inventory.

Space engineers has a feature that lists every intractable part of a ship or base your interfacing with. User-defined groups let you manage several parts at once so you can do turn on all the drills or toggle the lights. Maybe all the batteries need to recharge. What this feature lacks is a means to select a range of parts. (Edit in post: Feature does exist, it’s just my right shift key closes the window.) When I found myself with 300+ small engines, I had to click on every last one of them, and it wasn’t fun.

Another lacking feature as I’m finding is the inability to manually move items around. After a marginal amount of research on the official Discord server, someone introduced me to sorter blocks’ unadvertised function of pumping ships’ inventories dry of all matching items.

Takeaway

Game developers will generally have an idea of the scope of the stuff their target audience of players will be doing. Wandering off the intended set of use cases can lead to frustration, but every so often, it can lead to art.

My ship isn’t the easiest thing to look at. It’s covered in way too many engines for its own good, and it still accomplish its mission of hovering while pointed straight down under full load. It’s still more capable than my first ship, which I’m thinking will make for a nice shuttle pod later on.

Final Question

Have you ever set expectations high for a project, only to settle with something that’s still better than you presently need?