Finally Passing Wii Hacking 101

Good Morning from my Robotics Lab! This is Shadow_8472 and today I am actually hacking my Wii. Let’s get started!

!!ALERT!!

THIS BLOG POST ABOUT WII HACKING IS UNMAINTAINED!! While unmaintained documentation can be entertaining or contain useful hints not found anywhere else, it often lacks nuance and is best treated as unauthoritative. Be careful with it. Be responsible with it. This applies to all media forms – especially YouTube.

As of writing in August, 2024, the authoritative site is https://wii.hacks.guide/ [1].

Seriously. As with installing Linux or any activity that disregards OEM walled gardens, you take a risk by hacking your Wii. Many generous people have put years of effort into minimizing these risks, but at the end of the day, the only one to blame for bricking your device is you. The community may back you up on a volunteer basis with no obligations. You own your hardware. Have fun!

With that out of the way…

Recap

A video game console must be built like a castle to protect company profits. Security must stop pirates while being as invisible as possible to legitimate customers. The Homebrew community doesn’t cleanly fit into either category; it climbs the castle walls for fun, but in ways that aim to complement the original product.

I bought a Wii from someone in my area a couple years back with the intention of hacking it. I’ve researched it sporadically since then, building confidence, then backing out each time. Last time, I made it so far as to install the Homebrew Channel on Dolphin Emulator. This time, I make it all the way.

The Homebrew Channel

All video game consoles are just specialized computers. The Wii just didn’t hide this fact as much as most previous consoles. Its operating system boots to a menu with sever channels I mostly ignored, but nonetheless shaped the system’s identity. Perhaps the most [in]famous channel is The Homebrew Channel, a menu for 3rd party software and the primary objective for this week.

There is no direct way to install the Homebrew Channel, so an exploit must be used. The Wii has a rich history of exploits that rely on specially corrupted saves of specific games, but the three in use today only require an SD card formatted to FAT32 (LetterBomb and Wilbrand) or an Internet connection (str4hax). The idea is to load HackMii and install The Homebrew Channel from there.

Glossary of Terms

The Wii uses a lot of abbreviations. Refer to this section if you see any.

  • Brick v. – to mess up software so bad, the system won’t start. It may as well be a clay brick.
  • CIOS – Custom IOS
  • IOS – Acronym unknown. Pertains to files in Wii’s firmware (Has nothing to do with Apple’s iPhones)
  • NAND – System memory
  • NUS – Nintendo Update Server
  • NUSD – NUS Downloader
  • WAD – Wii Application Distribution
  • YAWMM – Yet Another Wad Manager ModMii Edition

Groundhog Exploits

First of all, what kind of Wii am I hacking?

  1. White with GameCube adapters
  2. US Serial number
  3. Firmware upgraded to 3.3U to play Animal Crossing: City Folk (U for US region)
  4. Bought 2nd hand, but presumably stock (unmodded)

As part of my setup, I joined the r/Wiihacks Discord server. The community was friendly enough, but I let myself be pressured into updating to firmware version 4.3U, but only once I’d confirmed my serial number matched US region. Updating to or past 4.2 carries a slight chance of bricking in exchange for simplified research. I was OK, but I strongly advise you to research how to update to 4.1 and hack from there.

I started with str4hax, which aims the Wii’s DNS at a special server that replaces the User Agreement with Dashie (Rainbow Dash from My Little Pony: Friendship is Magic) and takes one to two minutes to glitch the system into loading a script that boots the Wii into BootMii. I saw the exploit performed on a YouTube video, so I knew to expect rainbow static with green flashes. BootMii hung (got stuck) on its anti-scam warning, so I tried it around a dozen times in total.

What I didn’t understand at the time was the difference between exploit and payload. This difference was more apparent after running Wilbrand, a Wii Message Board based exploit named after the inventor of TNT. Using a bunch of special information including a Wii’s MAC address, it generates a special letter stored on a properly formatted SD card. When this letter is opened, the Wii crashes and loads boot.elf from the SD card. It took several tries to format my SD card, but once I had Wilbrand working, it was a much faster turn around. When it works correctly, HackMii should load quickly.

Neither of these were perfectly consistent:

  • str2hax hung on Dashie for me once and a few times the script to load HackMii failed trying to change Internet settings.
  • Wilbrand sometimes gave me a black screen and a blinking blue disk drive (.5 sec. on/.5 sec. off). I also had it drop TV signal in a different fail state.

HackMii Being Stubborn

Whichever exploit you use, when HackMii loads correctly, it puts a scam warning on screen, and after 30 seconds (or until HackMii finishes loading) it should tell you to press 1 to continue on to installing The Homebrew Channel and BootMii.

In my experience though, HackMii hung on this screen with no visual feedback besides the remote being stuck on (working correctly, HackMii does disconnect the remote). I was stuck here for over a day. Wisdom gleaned from community documentation and forum posts say this error is caused by one or more cIOS (or custom IOS) present on the Wii, which can be an indicator of piracy. The accepted diagnostic tool is SysCheck, but its documentation says to load it from The Homebrew Channel I haven’t installed yet!

Under advisement, I was directed to try using ModMii, a tool intended exclusively for Windows. Running under WINE, the CLI edition of version 7.0.2 wants to update to the latest version: 7.0.2. It also failed to set up its download list. The GUI edition was slightly less buggy in that it recognized it was up to date. I tried a few versions of WINE/Proton using Lutris to switch between them, but nothing worked. I was not desperate enough to explore trying .net to see if that made ModMii run. WINE rating: Garbage

Exploring on my own, I felt silly when I found a file called installer.log:

HackMii v1.2 installer starting up
PVR = 00087200
running under IOS 38 rev 0xe19
52 titles are installed
Found IOS 16: revision: 0x200.
Found IOS 10: revision: 0x300.
Found IOS 80: revision: 0x1b20.
Found IOS 38: revision: 0xe19.
Found IOS 37: revision: 0x161f.
Found IOS 36: revision: 0xe18.
Found IOS 35: revision: 0xe18.
Found IOS 34: revision: 0xe18.
Found IOS 33: revision: 0xe18.
Found IOS 31: revision: 0xe18.
Found IOS 30: revision: 0xb00.
Found IOS 28: revision: 0x70f.
Found IOS 22: revision: 0x50e.
Found IOS 20: revision: 0x100.
Found IOS 17: revision: 0x408.
Found IOS 15: revision: 0x408.
Found IOS 14: revision: 0x408.
Found IOS 13: revision: 0x408.
Found IOS 12: revision: 0x20e.
Found IOS 11: revision: 0x100.
Found IOS 21: revision: 0x40f.
Found IOS 2: revision: 0x201.
Found IOS 9: revision: 0x40a.
Found IOS 4: revision: 0xff00.
launching IOS 38 for the installer…

IOS launched…

IOS versions: Installer: 38, HBC: 0
starting preparations

Acting under the assumption I might have a bad cIOS hiding in that list, I converted the revision hexadecimal numbers into decimal looked up each one up on wiibrew.org [2]. All I found was that IOS2 was a false positive and actually part of the system menu. After bringing this back to r/WiiHacks’ Discord, I was advised about an odd line:

IOS versions: Installer: 38, HBC: 0

HackMii usually works better exploiting another IOS, like IOS58, which was either absent or incorrectly loaded during the 4.3 update (I never was properly convinced either way). Discounting ModMii or technical piracy, my last chance at obtaining IOS58 was NUSD. While it is a Windows tool, I found NUSD runs perfectly in WINE on Linux. Platinum rating.

From there, I loaded a WAD file for IOS58 on my SD card alongside a WAD manager called YAWMM, and copied/renamed its boot file to <SD_card>/boot.elf as the payload in place of HackMii. Installation was straightforward from there, and HackMii was repaired.

A blow for blow description of the solution that worked for me can be found here: https://www.rwiihacks.com/tutorials/hackmiiscamstuckfix/index.html#method-3 [3]

“Press (1) to continue” appeared, and I used it to install both The Homebrew Channel and BootMii as an IOS.

BootMii and Priiloader

The Wii has three boot stages: boot0, boot1, and boot2. boot2 can be written to, but only early hardware revisions will brick if boot2 is homebrewed. HackMii detected a patched motherboard and didn’t let me install BootMii to boot2.

BootMii can backing up and restoring the Wii’s internal NAND memory. If you can install it to boot2, it gives you a low-level option to recover from a brick. I don’t get that though.

My next obstacle is SD card size. A stock Wii can only use a 2GB or 32GB SD card depending on if it is running firmware version 4.0 or later. It is recommended to have something a bit bigger than 256MB, as I have been using so far. I sacrificed my Manjaro ARM 32GB microSD for the cause, but I got a NAND backup through BootMii.

Priiloader loads after boot2 and before the System Menu and thereby is a powerful tool from recovering from a brick (though it is second to BootMii boot2 edition). It also offers a bunch of customization options to research another day, but following the wii.hacks.guide tutorial, I disabled disk/online updates and disabled an anti-flicker feature intended for tube TV’s.

D2x and cIOS

As a general rule, wisdom gleaned from the community says cIOS should be avoided, as they’ve learned how to do most things they want to do without changing firmware. However, the wii.hacks.guide checklist does install four cIOS files. Published details are vague, but I gather they do things like allow loading games off USB instead of the DVD drive and using unofficial online services. Wiibrew.org wasn’t particularly helpful when I looked each base IOS up, but then again this is my first time customizing firmware.

Diving deeper, D2x patches official IOS files during installation. This process went smoothly even if it was nerveracking. I double or triple checked each of the four ISO’s to be installed. But even if something did go wrong, that’s what doing a NAND backup early is for.

Loading Homebrew Apps

One more touch, and I can consider my Wii fully hacked for now: the Homebrew Browser. If The Homebrew Channel doesn’t find apps on the SD card (or optionally a USB drive), it shows nothing but bubbles your pointer can pop on contact. The Homebrew Browser can load and update apps to SD (or USB), but itself must be loaded manually. I installed a few recommended utilities, but further tinkering will have to wait for another topic.

Takeaway

Unfortunately, the channel I was working in/using for notes was deleted once I had gotten to The Homebrew Channel. I am mad because by then I had only written my disclaimer and half the recap by then. By God’s grace, I forgive the one[s] responsible, but my hope is that our shared lesson be the value of the footprints we leave behind when working in niche community support topics.

Final Question

Have you ever tried hacking/soft modding a Wii or any other game console? I look forward to hearing from you in the comments below or on my Socials!

Works Cited

[1] Nintendo Homebrew, “Wii Hacks Guide,” wii.hacks.guide, 2024. [Online].Available: https://wii.hacks.guide/ [Accessed Aug. 12, 2024].

[2] wiibrew.org,Nov. 18, 2021. Available: [Online]. https://www.wiibrew.org [Accessed Aug. 12, 2024].

[3] u/WiiExpertise, “HackMii Scamstuck Fix,”rwiihacks.com, 2023. [Online]. Available: https://www.rwiihacks.com/tutorials/hackmiiscamstuckfix/index.html#method-3 [Accessed Aug. 12, 2024].

MotionEye: One Step Closer to a Critter Cam

Good Morning from my Robotics Lab! This is Shadow_8472, and today I am revisiting my naughty critter cam again. Let’s get started!

Project Recap

Earlier this year, I spent a week learning about DietPi, a lightweight OS for “System On a Chip” computers — notably Raspberry Pi, and Motion, an open source home surveillance platform. These fit great into my Raspberry Pi 3B+. I burned out after getting it to stream video to a webpage.

Version numbers have marched on since, and updates were in order. Long story short, it was simpler to reinstall and relive the week in the span of one day. I set the standard “new install” settings, and installed motion from within DietPi’s “hedged garden.” I copied a default config file at /etc/motion/motion.conf to /root (I am approaching this as a short-term/low security project) and struggled against the documentation. It led me to mess with mmalcam_params when all I needed was:

rotate 180
webcontrol_localhost false
stream_localhost false

These lines rotate the image and unlock Motion’s webUI.

MotionEyeOS

The final deciding factor to reinstall started when I came across a new command for listing ports Linux will respond on:

ss -list

I found port 8765 with a login I couldn’t get in. Only after a total reinstall did I look up motionEye and find the default login is “admin” with an empty password. It’s a nice webUI, but it won’t share the camera with motion proper, and it took me a while to cycle through the different options to find the feed. My favorite feature is that it passed the “Oops, it lost power” test.

Push Notifications

MotionEye can run a commands when it sees something move, which can be anything from object detection to filter false positives to an automated squirt gun when it recognizes naughty behavior. My next major milestone though should be push notifications. On Linux, I can use notify-send over ssh, but I’d need to research an equivalent way for it to show up on Windows, Mac, and Android for other family members. In the long run, it will be simpler to dust off my Discord bot skills and give a LAN address.

So, that’s what I did. I made a bot that sends a hard coded message to a hard coded channel and closes itself as part of its startup function.

#!/usr/bin/python3

import os
import discord

intents = discord.Intents.default()
client = discord.Client(intents=intents)

#On startup: send message to and close program
@client.event
async def on_ready():
channel = client.get_channel(<channel_ID>)
await channel.send(f"Motion Detected!\nhttp://192.168.0.50:8765")
exit()

client.run('<Bot_Login_Token>')

MotionEye could run the bot once I placed it in /mnt/dietpi_userdata/, gave it permission to execute, and ensured it belonged to the dietpi user. Before too long, I had notifications through Discord to check Motion, and the hardest part of deployment was turning on the Pi’s power switch. For my “Show & Tell,” my father and I rigged up a cat tower and an LED work light on a stand to watch the stairs.

Takeaway

This temporary setup remains incomplete. For starters, the Discord bot wastes around four seconds logging in. I will eliminate this delay once I can get a signal from MotionEye into a running bot. Also of concern is that I want the bot ignoring humans – which means object detection, a field I’m not far into yet.

Final Question

Am I missing anything obvious on my road map? Let me know in the comments below or on my Socials!

My Best Computer Comeback Ever

Good Morning from my Robotics Lab! This is Shadow_8472 and today I have the story about how I almost lost my main computer. Let’s get started.

The Fall

Thankfully, I rarely need my reset button. Most of the time it gets hit by accident. EndeavourOS has been a good daily driver, but my system recently bombed hard – a crash I have never seen before and hope to never see again. Resetting wasn’t enough.

My main workstation uses systemd-boot, GRUB’s little cousin among boot loaders. Its job is to load an operating system when called, and it wasn’t responding. I poked around. My old, unupdated installation of Manjaro managed to load, but it wasn’t consistent. For some reason, EndeavourOS only appeared bootable in Legacy BIOS mode – even though it would hang at systemd-boot because it is UEFI only. I eventually ran out of combinations to try and loaded an alternate BIOS ROM. You know it’s a bad day when BIOS beeps thrice over a minute and hangs.

Clearing CMOS

At this point, I was outside my repair experience, but when I asked my father for help, he recalled a trick an IT guy pulled at his work to clear an unapproved BIOS lockout password. The motherboard has a jumper for clearing CMOS. Think of it like a factory reset. We found the user’s manual and followed its instructions, restoring the original ROM.

Failed boots eat a ton of time, but at one point I loaded Windows when Manjaro’s GRUB installation apparently failed completely. I searched for my GRUB disk and had to make a new one. When I did, it could only boot Manjaro in any configuration. I tried swapping SATA cables around, but that only made Windows vanish. Last I looked, its drive was zero bits in size.

Repairing my Boot Loaders

Even a jank boot method is better than nothing. Trouble is that Manjaro was horribly out of date, and needed a manual intervention. I installed EndeavourOS to avoid this very mess. A number of package names had changed, and there were a couple sets of mutually dependent packages. I think I had to mark around five to seven for removal before it went through. The longest part was sitting through package verification every time. GRUB was then a standard and easy re-install.

I found a line-by-line systemd-boot reinstall tutorial for my EndeavourOS drive. I sadly don’t have a link because I wasn’t yet planning on this being my topic for the week and I was kind of in panic mode. What I do remember is that I expected to need chroot, but I looked at the documentation (man page / <program> -h / <program> –help) and the command was flexible enough to point it at my broken installation. It was also a pain to find because so many search results were either about GRUB and/or Windows.

The Importance of Cable Management

While I had my computer apart diagnosing SATA cables, I took the opportunity to mount my third solid state drive. Previously, I only had access to cables with L shaped connectors on one end, but I have a package with a bunch of double-straight ones now. I had two free motherboard connections, and the straight ends let me stack my Linux drives in my compatible bracket while my [defunct?] Windows drive now gets a single-SSD bracket.

Alarmingly, my computer started making a bit of noise once I had it all back together in its place and I had started up a game. Turns out a ribbon cable going between the motherboard and front panel was pushed into the fan blades on my GPU, which was simple to fix.

Takeaway

Surprise topics are rarely fun. But solving these problems as they come up is how you learn Linux.

Final Question

What I could not find an answer to was if systemd-boot systems can be booted from a GRUB disk at all. I’m guessing no because systemd-boot is more integral to Linux than GRUB. Do you know how close or far I am? I look forward to hearing from you in the comments below or on my Socials!

Joystick Server Reinstall

Good Morning from my Robotics Lab! This is Shadow8472, and today I am rebuilding Joystick, Button Mash’s twin Rocky Linux server. Let’s get started!

Project Goals

This is a revival of my photo scanning project, first and foremost. I need to get it working, and while I will afford myself some time to experiment with doing it right, it’s more important I get it done. Once I have it working better than Button Mash, I can move my production flag over to Joystick and remodel Button Mash “properly.”

And by “properly,” I mean rootless Podman access to a network attached storage. I have explored NFS (Network File System) extensively, but Podman does things with userspace that NFS doesn’t support. I may need to be open to an alternative or using root. SSHFS lays a file system over SSH, but

Installation

I did my usual stuff when installing Linux. I remembered ahead of time that Joystick doesn’t work with Ventoy, so I flashed a USB (Balena Etcher) large enough for the full 10 GB image I downloaded. I did a clean install over its previous Rocky Linux installation. I also adjusted Joystick’s boot order so Rocky 9.4 loads by default. The system is dual booted with Linux Mint, where I did an apt update/upgrade.

Booted to Rocky, I enabled Cockpit web interface for remote management, a feature I selected for installation with the system. I created a limited user for running Podman, enabled lingering on it, got Cockpit logged into it as a “remote host,” and disabled normal password interactions. I pulled Podman containers for Caddy, Nextcloud, MariaDB, Redis, BusyBox, and Vaultwarden, and gave each a directory with a start.sh and a mountpoint. I excluded Pi-Hole and Unbound from my planned lineup because those functions are now handled by our router and would have required messing with special ports.

Troubleshooting

NFS fought me hard though. It didn’t help that Cockpit’s terminal kept glitching out on me. I noticed this behavior on ButtonMash’s Cockpit as well. Rebooting and refreshing didn’t do anything, but I found a control by navigating my browser away and back. I eventually got to thinking about what other parts it might be, and I came up with a bad version of Firefox, or Wayland. I ran Firefox over SSH on a machine still running Xorg server; it was Wayland.

And at this point, my workstation had a record bad meltdown, which ate my remaining blog time. Be sure to read about it next week!

Takeaway

Projects get interrupted. Something comes up and grand plans wait in the background. I’m tired of server doing just that, but it’s happened again.

Final Question

My longest enemy remains: Rootless Podman vs. Network Storage. How do I do it? I look forward to hearing from you in the comments below or on my Socials!

KDE Wayland: My Second Impressions

Good Morning from my Robotics Lab! This is Shadow_8472 with a side project for the week. Let’s get started!

Riding the bleeding edge with EndeavourOS, my upgrade from KDE 5 to 6 when the default implementation was moved from Xorg to Wayland. The deal breaker for me was Discord not displaying messages properly as I type. I retreated to KDE 6 Xorg.

That was almost a couple months ago. Xorg has worked since then, but it was a little love starved having to share developer time with KDE Wayland. But I understand; there are only so many developers, and their main focus is getting Wayland working. On an update/reboot cycle, I decided to check out their progress. I have to say it’s not bad. The bug from earlier is resolved, at least.

Not all my settings transferred over. In particular, my mouse pointer got stuck when crossing a boundary on my multi-screen display. This setting was found in System Settings/Mouse & Touchpad/Screen Edges/Edge barrier. I set it to 0 pixels, disabling the feature.


OBS (Open Broadcast Software) had trouble seeing the screen due to windows in Wayland not being able to see outside themselves. It now needs some kind of screen caster that shows up in my system tray.

The obvious difference I can’t help is spotty performance from my taskbar window previews. Oftentimes, they don’t even load when I mouseover them. Other than that, there are new interface sounds I’ve already been living with, but haven’t found the way to turn them off.

Takeaway

Technology marches on. Legacy software becomes obsolete. There are bumps along the way, but the KDE Wayland’s are smoothed enough that I can jump over now. In another couple months, I expect the experience will be virtually unnoticeable.

Final Question

Have you ever rode the bleeding edge and had to come back later? I look forward to hearing from you in the comments below or on my Socials!

I’m Sold On StableSwarmUI

Good Morning from my Robotics Lab! This is Shadow_8472 and I’ve made up my mind on StableSwarmUI as a replacement to A1111. Let’s get started!

Generative AI (Artificial Intelligence) is the technology buzz word of the decade so far thanks to open sourced models. Automatic1111 has an extensive community library, but ComfyUI’s flexibility may yet challenge it as the next favorite. While not yet polished to A1111’s visual aesthetic, a total AI noob should find StableSwarmUI navigable while letting him/her peek at Comfy beneath.

Learning ComfyUI Basics

I’m taking that peek… ComfyUI looks like boxes and spaghetti. The correct term is “workflow.” Each node represents some unit of work similar to any other UI. The power of Comfy is the ability to arbitrarily link and re-arrange nodes. Once my first impression –intimidation– wore off, I found grouping familiar options by node and color coding their connections made the basic workflow more intuitive while highlighting my gaps in understanding of the Stable Diffusion process.

Let’s define some terms before continuing. Be warned: I’m still working on my intuition, so don’t quote me on this.

  • Latent Space: data structure for concepts trained by [counter]examples. Related concepts are stored close to each other for interpolation between them.
  • Latent Image: a graphical point in a latent space.
  • Model/Checkpoint: save files for a latent space. From what I can tell: checkpoints can be trained further, but finished models are more flexible.
  • CLIP: (Contrastive Language-Image Pretraining) a part of the model that turns text into concepts.
  • Sampler: explores the model’s latent space for a given number of “steps” with respect to concepts specified in the CLIP conditioning as well as additional sliders.
  • VAE: (Variable AutoEncoder) a model that translates images to and from latent space.

The basic Stable Diffusion workflow starts with an empty Latent Image node defining height, width, and batch size. Alongside this, a model or checkpoint is loaded. CLIP Text Encode nodes are used to enter prompts (typically both positive and negative). A KSampler node does the heavy lifting, combining everything into a low-resolution preview based off the latent image (if enabled). Finally, a VAE decoder node turns your latent image into a normal picture.

While I’m still developing an intuition for how a latent space works, I’m imagining a tent held up by a number of poles defining its shape. You are free to interpolate between these points, but quirks can arise when concepts bleed into each other: like how you’d tend to imagine bald people as male.

ControlNet

The next process I wish to demystify to myself is ControlNet. A second model is loaded to extract information from an existing image. This information is then applied to your positive prompt. (Let me know if you get any interesting results conditioning negative prompts.) Add in a second or more ControlNets, and combining them presents its own artistic opportunity.

For this exercise, I used a picture I made during my first attempt at Stable Diffusion: a buff angel with a glowing sword. As a challenge to myself, I redid it with SDXL (Stable Diffusion eXtra Large). I used matching ControlNet models for Canny and OpenPose. Some attempts came up with details I liked and tried to keep. I added the SDXL refiner model to try fix his sword hand. It didn’t work, but in the end, I had made a generation I liked with a few golden armor pieces and a red, white, and blue “(kilt:1.4).” Happy 4th of July!

Practical Application

A recent event has inspired me to try making a landscape picture with a pair of mason jars –one full of gold coins, and the other empty– both on a wooden table in front of a recognizable background. It’s a bit complex to generate straight out of text, but it shouldn’t be too hard with regional conditioning, right?

Impossible. Even if my background came out true, I’d still want the mason jars to match, which didn’t happen. This would have been end of the line of the if I were limiting myself to A1111 without researching additional plugins for my already confusing-to-manage cocktail. With Comfy, My basic idea is to generate a jar and generate another filled jar based off it, then generate them together in front of my background.

Again: easier said than done. Generating the initial mason jar was simple. I even arranged it into a tidy group. From there, I made a node group for ControlNet Canny and learned about Latent Composite – both of which allowed me to consistently put the same jar into a scene twice (once I figured out my dimensions and offsets), but filling/emptying one jar’s gold proved tricky. “Filling” it only ever gave me a quarter jar of coins (limited by the table visible through the glass), and emptying it left the glass surface horribly deformed. What’s more is that the coins I did get would often morph into something else –such as maple syrup– with too high of a denoise in the KSampler. On the other hand, too low a value, and the halves of the image don’t fuse. I even had coins wind up in the wrong jar with an otherwise clean workflow.

Even though I got a head start on this project, I must lay it down here, incomplete. I have seen backgrounds removed properly with masking, so I’ll be exploring that when I come back.

Takeaway

ComfyUI looks scary, but a clean workflow is its own work of art. Comfy’s path to mastery is clearer than A1111. Even if you stick to basics, StableSwarmUI has simpler interfaces – a simple prompt and an “unpolished A1111-esk” front panel for loaded pre-made workflows.

Final Question

I’m probably being too hard on myself compositing glass in-workflow. Let me know what you think. What tips and tricks might you know for advanced AI composition? I look forward to hearing from you in the comments below or on my Socials!

Can Linux See a GameCube Controller?

Good Morning from my Robotics Lab! This is Shadow_8472 with a side project for the week. Let’s get started!

I’ve had a Nintendo GameCube controller on my desk ever since I got a USB adapter some months ago. I poke at it every so often, trying to confirm it working in Linux, but in late June of this year, things came together.

Computer: Derpy Chips
Distribution: PopOS 22.04
Desktop Environment: KDE Plasma 5.24.7 (Qt 5.15.3)
Product: DragonRise Inc. Controller Adapter

In my research, I read about this product working with Dolphin Emulator on Linux, if not elsewhere. Dolphin sounded like a good first stop, and one day I sat down with enough patience to compile it. It needed a few tries before I read a guide on Dolphin’s GitHub explaining how the project has dropped qt5 support [1]. However, my qt version can use backports.

I installed my compiled Dolphin package. Now for a ROM. Commercial games are illegal to download, but I can either dump my own games (not in my skill set yet) or find a homebrew game. GameCube only has one such title I found worth mentioning: Toy Wars. It’s not even an exclusive – probably because it’s basically a baby Wii/Wii U on the inside.

Long story short: Toy Wars gave me a black screen. I happen to know the Wii has tons of Homebrew, so I found another guide [2] that walked me through performing a system update, netting me the Wii menu, the Homebrew channel, and then a content browser layered on top of that. While significantly hampered navigating this browser using the emulated Wii remote, I found and downloaded a free homebrew game about dogging space junk.

And still nothing from the GameCube controller. It showed up with the command “lsusb,” but Dolphin’s configuration options said it didn’t have permission. There was the missing link. By default, Linux is a lot more locked down to strange USB peripherals than Windows. I had to make a file under “/etc/udev/rules.d” describing my controller adapter and granting these missing permissions.

$ cat /etc/udev/rules.d/51-gcadapter.rules
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="0337", MODE="0666"

The 51 in the name has to do with what order this and similar rules overwrite each other. There are a ton of possible parameters for the file contents, but idVender and idProduct can be found with the “lsusb” command where it says ID vvvv:pppp. Mode is the same as file permissions ([user, group, everybody]x[read*4+write*2+execute*1]).

Takeaway

From further observation, I concluded these changes let Dolphin reach out to find the state of my controller[s]; no events are triggered in Xorg, as happen for the mouse and keyboard. Long term, I have a gag goal of writing a custom driver so I can use my GameCube controller however I like, but I didn’t get that this go-around. Oh well.

Final Question

I couldn’t find out what the leading 0 is supposed to represent. If you know, I look forward to hearing from you in the comments below or on my Socials!

Works Cited

[1] Dolphin Emulator, “Building for Linux,” github.com, May 31, 2024. [Online]. Available: https://github.com/dolphin-emu/dolphin/wiki/Building-for-Linux. [Accessed: June 25, 2024].

[2] Nintendo Homebrew, “Installing Homebrew Channel on Dolphin Emulator,” 2024. [Online] Available: https://wii.hacks.guide/homebrew-dolphin.html. [Accessed: June 25, 2024].

Which Stable Diffusion UI is Right for Me?

Good Morning from my Robotics Lab! This is Shadow_8472 and today I am exploring Automatic1111 alternatives. Let’s get started!

A1111 is a nice baseline StableDiffusion interface. A determined beginner should find it approachable, it provides easy access to a large toolbox for an intermediate audience, and the community library of extensions and video/text tutorials is large enough to keep experts honing their skills.

Stable Diffusion Forge vs. StableSwarmUI

But A1111 it’s hardly the only one around. Forge has had my attention as a direct improvement for A1111, for –if nothing else– bugfixes when switching models. I’ve bumped into this limitation while experimenting with ControlNet, and it gets in the way.

But another UI (User Interface) has caught my attention recently: StableSwarmUI. From around one hour of research, it appears to be a beginner friendly package built off ComfyUI, an interface I’d previously written off as well above my skill level. Installation threw an extra challenge when it assumed browser access and I was working over SSH. I recently learned graphical SSH though:

ssh -CY <user@host>

Otherwise, StableSwarmUI was very easy to install.

Out of the box, my installation of StableSwarmUI was set up to run SDXL models. When I tried SonicDiffusion (Stable Diffusion 1.5 base) from my A1111 installation, I kept getting 50% gray outputs. I took a peek at the ComfyUI backend. Yeah… I have no business making the all-out switch until I’ve properly introduced myself to ComfyUI. Time to research until I can make a basic workflow.

…

OK, don’t ask me about the gray boxes. Refreshing Firefox did nothing. Some people fixed similar issues by reinstalling or deleting one file or another. I left it over a weekend, then restarted StableSwarmUI server while installing the Custom Node Manager for ComfyUI.

ComfyUI Workflows

ComfyUI all about the workflow: a program you make by linking various nodes into a flowchart. I looked up consistent character workflows to get a better idea of how they work. There are a couple options, but YouTuber NerdyRodent’s Reposer Plus caught my attention first [1]. Custom Node Manager found most of its custom nodes, but NerdyRodent used a now outdated plugin called IPAdapter. I had to study IPAdapter v2 (programmer video [2]), but it wasn’t too difficult to swap out the relevant nodes once I’d taken my time.

Reposer Plus needed additional models – some of which I already had in A1111. I made a shared models directory and moved StableSwarmUI’s entire models directory over. I found a setting in StableSwarmUI at “Server/Server Configuration/Paths/ModelRoot” to point the UI at my models directory. A1111 would have me edit a .yaml file directly, but symbolic links are easier.

I set the workflow in motion with “Queue Prompt,” but the IPAdapter Advanced node I installed threw an error on me. It took an extra session, but experimentation identified model mismatch (I tried loading a “Big G” CLIP Vision model when it needed the normal one). The workflow then ran normally, but the final upscale turned sepia. I tried a photorealistic upscale model (as opposed to one for anime), but it turned out this was another server restart issue.

Takeaway

I played around with StableSwarmUI a bit more after a line of mediocre results with the Nerdy Rodent’s workflow. Like with many tech projects, I’m interacting with a large and evolving ecosystem. Being on local hardware, I have both the liberty and burden of being my own admin while still learning the user’s point of view. And until I know both, I cannot tell if StableSwarmUI is there yet or not. I was all primed to complain about how I can’t readily draw into the beginner interface for a ControlNet input, but on closer inspection I was mistaken about how this UI works. I still haven’t found the feature, but that doesn’t mean it’s not there.

If you are a first-day beginner, I would still recommend EasyDiffusion for its easy installation, image history, and inpainting. If you want anything more, A1111 will let you explore further (Forge appears abandoned) at the cost of image history. If you want to try a cool ComfyUI workflow, StableSwarmUI may be right for you.

Final Question

What is your favorite ComfyUI workflow? I look forward to hearing your answers in the comments below or on my Socials!

Works Cited

[1] N. Rodent, “Stable Diffusion – Face + Pose + Clothing – NO training required!,” youtube.com, Oct. 14, 2023. [Online]. Available:https://youtu.be/ZcCfwTkYSz8. [Accessed June 20, 2024].

[2] L. Vision, “IPAdapter v2: all the new features!,” youtube.com, Mar. 25, 2024. [Online]. Available:https://youtu.be/_JzDcgKgghY. [Accessed June 20, 2024].

Linux Phone Milestone: Moving In

Good Morning from my Robotics Lab! This is Shadow_8472 and today I am moving into my PinePhone. Let’s get started!

Previously

After around four years of ownership, my PinePhone UBports Edition has PostmarketOS/Phosh and is working on a network. Now that the big solar storm is over, it actually gets signal.

Password Adjustment

Before I properly move into my phone, I have a couple more topics to explore first. One: I need a relatively short user password to unlock from sleep. At the same time, I also want to require a longer password for admin functions. Two: I set up Full Disk Encryption (FDE) while installing PostmarketOS, with testing in mind. I need something a bit less guessable.

The root password can be required in a number of ways from a special admin account to not having sudo. I tried the later, and dependencies insisted it stay. Online search results were frequently more into removing admin privileges entirely, but I did pick up on the history and intended context of sudo as being programmed to easily revoke root access when no longer needed – as well as log commands used so IT knows who did what and hopefully how to fix it. One detail of note was the wheel group (as in a car’s steering wheel). Early Unix required wheel to su (Substitute User) into root, but it’s not a universal standard.

Or I can configure sudo by editing /etc/sudoers. Using visudo is recommended to check syntax, but it dropped me into vi/vim, which I’m having none of. I installed nano, then tried/failed to set it as system default text editor. Otherwise, I might have tried a configuration where sudo just asks for the root password. Instead, I commented out the line giving users with the wheel group sudo privileges. (NOTE: While finalizing this post, I found this may break app stores. Next post about PinePhone, I will try requiring the root password instead.)

With sudo hobbled, I learned more about FDE. As it just so happens, PostmarketOS was built for it. I got the name LUKS (Linux Unified Key Setup) and a hint that the boot partition might need to be left unencrypted by the time a community member on the Pine64 community gave me the exact command to change my key:

$ sudo cryptsetup luksChangeKey /dev/mmcblk2p2 -S 0

In my case, I double checked the partition name before performing it with su instead of sudo.

Update on August 8, 2024: I disabled SSH password login, requiring key login instead.

Moving In

Confident I had secured it to my skill level, I did some more “normal” new phone/computer behaviors, such as finding the dark theme, using AM/PM, and adjusting automatic sleep times. My background image had to be moved over with scp (Secure CoPy) and it took a reboot before it showed up. I also moved my ringtone and notification sound over from my previous phone in the same way, installed them, and rebooted again. While it would have made things a little easier, I’m forgoing on NFS access until my homelab servers are moved away from common LAN subnet addresses.

Moving my old contacts list wasn’t too hard either, though I did get help from an automaton app on the Android side to export to .vcf format (Variant Call File). I then used an SD card to move them over. Phosh’s default contacts app by The GNOME Project accepted it no problem. The longest part was weeding out stale contacts going back to high school.

The luck ended with WayDroid. One goal for this phone is demoing Android apps in on Linux. Waydroid looks like the best option. I installed it no problem, but initialization took a few attempts when the 2 minute sleep kept corrupting a large download. From there, I tried installing an F-Droid client, but I got an error in-terminal about the WayDroid session stopping.

Takeaway

My Linux phone is not completely stable by any stretch of the imagination. It keeps crashing, the battery feels like a joke – and overall, the thing feels slow no matter what I do. But remember that I have an early prototype aimed at developers and enthusiasts. Pine64 has production models released, and they aren’t the only ones making phones to run Linux. I am just thankful they didn’t make the screen so big they had to mutilate it to accommodate the camera.

Final Question

Blunder! I just noticed the local app store hangs when trying to install… maybe? Probably because of my sudo configuration, but I will need more time with it as I build up a to-do list for another follow-up post. What all should that to-do list contain?

Self-Hosted AI Consistent Characters: Part 2

Good Morning from my Robotics Lab! This is Shadow_8472 and today I am continuing work towards a consistent character using Stable Diffusion AI image generation software. Let’s get started!

Previously

Last time I talked about making a consistent character on local hardware, I went over using Automatic 1111 (A1111) web interface (running on my father’s computer), installing the ControlNet extension for Stable Diffusion and equipping it with models for OpenPose, and then using OpenPose to generate eight skeletons based of screenshots from Sonic Forces. All common enough stuff, but for context, I am following a tutorial on YouTube by Not4Talent “Create consistent characters with Stable diffusion!!” [1].

Character Switch

While I had previously been working on a Sonic fan character for my sister whom I am calling Ms. T, I switched over to working on my own character in the same setting, whom I’m calling Smokey Fox. He’s just spent several years studying in a foreign culture with a human sense of modesty, so I generated an orange Mobian fox with blue eyes and wearing red sneakers, blue jeans, and a red trench coat while applying a bunch of little things I picked up along the way, such as quality prompts and negative prompts.

Along the way, the AI came up with details I liked, such as a white shirt, black gloves, black tipped ears, and some of the time, he even generated with a red thing on a glove I decided was some kind of accessory crystal. Quality was spotty. It took me a few attempts before I cleaned up the hair in his profile shots by prompting for a bald head. Only four poses consistently gave him a tail, but one was almost never usable. It also tried giving him a black tail tip a few times, but I didn’t like that.

Along the way, I grabbed pictures with poses I liked and stacked them in GIMP. Because I was using a fixed seed, I was able to assemble more poses until I had eight portraits I’d touched up. Notably: I had to extend his coat on his behind shot, his shoes needed a lot of help, and I had to draw one of his tails from scratch. The crystal thing on his glove also got interesting to transfer around, and I did have to draw it myself a few times. During this process, I took screenshots of my work in progress and shared them on Discord.

No Auto Save

Disaster!! At some point, my computer randomly crashed. I don’t remember the details, but it was several days later when I returned to work on Smokey that I learned that GIMP doesn’t auto-save, like LibreOffice just as I mentioned it. Thankfully, I had the screenshots to work with. I also lost my original prompts through a side project where I helped my mother troll a friend from elementary regarding a Noah’s Ark baby quilt she made for her. In total, I made an island chain, a forest scene, and just as it was about to arrive, I made up a beach scene with the Taco Bell logo embedded using a ControlNet model for making fancy QR codes.

Back to Smokey Fox, the next step in the tutorial was upscaling. Pain followed. The Not4Talent tutorial [1] didn’t make sense to me, so I spent a day or two unenthusiastically bumbling around trying to learn enough to feel ready to post. I played around with several ControlNet models. Most are variations on making white-on-black detail maps. One late night session landed me an upscale tutorial by Olivio Sarikas [2] that clicked with me. Similarly to other tutorials, A1111 has [re?]moved stuff around between updates in the 6 months to a year since it was popular to introduce ControlNet – not to mention various plugins which may differ between our setups. Olivio’s tutorial rescued my project, and I got back to having fun cleaning up details with GIMP.

Takeaway

I may need to take a closer look at Forge instead of A1111. A1111 has a known bug where it has trouble unloading models, but while I was playing with various ControlNet models, I managed to defeat the vRAM capacity on the GPU.

Final Question

Forge will require a virtual environment, which I don’t know how to do properly yet. What tutorial would you recommend? I look forward to hearing your answers in the comments below or on my Socials!

Work Cited

[1] Not4Talent, “Create consistent characters with Stable diffusion!!,”youtube.com, Jun. 2, 2023. [Online]. Available:https://youtu.be/aBiGYIwoN_k [Accessed Jun. 7, 2024].

[2] O. Sarikas, “ULTIMATE Upscale for SLOW GPUs – Fast Workflow, High Quality, A1111.”youtube.com, May 6, 2023 [Online]. Available:https://youtu.be/3z4MKUqFEUk. [Accessed Jun. 7, 2024].