I once owned a Nvidia Shield that I used for running Kodi, for playing back media files across the local network. That device was a beast. It handled 4k media without breaking a sweat, nice upscaling features, worked with all the Dolby tech that I still don’t know what they’re for.

Recently, my house was hit by a lightning that fried the Shield, and all of a sudden I had no way of streaming my stuff.

At some point I may buy a new box, or try some new thing for the same purpose, but I don’t want to spend money right now, especially because these boxes are very expensive here in Brazil due to high shipping costs and taxes.

As many of you, I also have a few Raspberry Pi boards sitting idle in my junk drawer. The last one I bought, many many years ago, is a Raspberry Pi 3 Model B, that I once used as a cron job runner (i.e. for running Ansible playbooks), and I decided to use that for replacing the Shield. It isn’t capable of streaming 4k media, can’t hardware decode HEVC or other more modern media formats, but it’s better than nothing.

Was it Still Working?

After plugging it in, it booted, but it was running an old Raspbian version (based on Buster). So I manually upgraded the system to Bullseye and then to Trixie.

I should have installed a clean version, but I lost my SD card adapter, so I wasn’t able to plug the SD card to my computer for a clean install.

Everything went seemingly okay, but after booting into Trixie, I got an error regarding a missing signing key. For the most part, everything seemed to work despite of the error, but when I tried to install Kodi with sudo apt install kodi, the installation failed due to unmet dependencies, so I had to fix it if I wanted to watch my stuff.

I tried Googling about it but the fix didn’t emerge too easily (which key is missing? Where to find it? How to configure it?), so I decided to fire up Claude Code and let it fix it for me. I provided it with my SSH key, the SSH command for it to sign into the Raspberry Pi, and asked it to fix my shit.

The Experiment

First, I asked Claude Code to resolve the signing key issue in apt and install Kodi, which it managed to do in a single shot in a couple of minutes:

I have a raspberry pi hosted in my local network, at the address pi.local. You can ssh into it with the following command:

ssh pi@pi.local

This pi was updated from Debian 11 to 12, and then from 12 to 13, but I think something went wrong with the the last upgrade, as commands such as sudo apt update show missing key errors. Not sure how to fix those.

What I ultimately want is to install Kodi, but the command sudo apt install kodi fails due to unmet dependencies.

I want you to fix this installation so we could install kodi.

Then, I asked it to auto-start Kodi when the Pi was booted, which it, again, implemented correctly in the first try. It even rebooted the Pi to ensure that the service was started after the boot, by checking the Systemd service status. Neat.

Now update the pi installation so that kodi starts up automatically once the system is powered up.

After Kodi started, the resolution was all messed up, instead of the expected Full HD resolution. Again, it made a few changes to /boot/config.txt, and after a few retries, the issue was resolved.

The next issue is that I cannot seem to configure kodi to run at full HD resolution (1920x1080); the maximum I could get was to 1024x768. How can I configure kodi to run at the maximum output resolution?

This is what it added (don’t ask what those mean, after all I was just vibin’):

1
2
3
4
5
6
7
# Force HDMI output at 1080p
hdmi_force_hotplug=1
hdmi_group=1
hdmi_mode=31
hdmi_drive=2
disable_overscan=1
config_hdmi_boost=4

Then I noticed that the dphys-swapfile.service was failing, and asked it to fix it, and it gladly reconfigured the swapfile, restarted the service, and everything was good.

Okay, got image back. Let’s leave it like this for now.

Now I found one of the systemd services to report as failed during boot, the dphys-swapfile.service. Can you fix it as well?

Now, the time zone is incorrect. How to configure this anyway? I don’t remember, but apparently he did; checked the NTP daemon was running, asked for the correct time zone to set, and configured it once I provided the information it needed.

The clock is incorrect on my raspberry pi. Configure it to fetch correct date and time from the internet.

What Didn’t Work

I could not use the TV remote control for navigating through the Kodi menus. I remember that it worked at some point, so I asked Claude Code to fix this as well.

Man, this is where things got crazy. It went in a reboot loop, changing random stuff in /boot/config.txt to see if it would work, and eventually messed up all the things it fixed previously. Sometimes it booted to a black screen, sometimes with the wrong resolution, sometimes the sound stopped working.

Then I eventually asked it to stop and revert to the previously working configuration, which to my surprise it did, so I didn’t have to start from scratch again.

For now, I ended up using an iPhone app as the remote control. I may try to fix this at some point.

Wrapping Up

I wouldn’t recommend vibe-patching servers like this without a proper backup first, unless you are just doing it for fun like me.

Or if you just don’t care.