sg

← Writing

The Old Laptop That Runs Our TV

· systems · reliability

Our TV plays movies off a laptop from 2016, a Dell Inspiron 15 7559. Its whole job is to run Plex, which serves a movie library to the Plex app on the TV. It sits on my desk with the lid closed, always on the charger, with the movies on a separate drive.

An old laptop turned out to be fast enough, and two later changes made it easy to live with. It restarts its helper apps when they quietly stop working, and it now backs up the one thing it can't rebuild, the ID that tells Plex which server it is.

Why an old laptop is enough#

The obvious worry is speed. Sometimes the TV can't play a file as it is, so Plex converts it while it plays, and that conversion is the heavy part. Intel's built-in graphics chips happen to be good at exactly this job, so the laptop hands the work to its graphics chip instead of the main processor.

That choice decides where Plex runs. To use the graphics chip, Plex needs a clear line to it, so Plex runs directly on the laptop.

The apps around Plex#

Plex isn't alone on the laptop. A few helper apps run next to it, and each runs in its own container. Plex stays outside the containers so it can reach the graphics chip.

The two kinds of app are reachable in different ways. The helper apps' admin pages only answer over Tailscale, a private network that lets me reach the laptop from anywhere. Plex stays open on the home network, because the TV has to find it without any extra setup.

The app that died quietly#

The trouble came from one of those helper apps. Every so often it stopped doing its job without crashing, so nothing looked wrong from the outside.

The cause was simple. The app looked up internet addresses through the wrong service, a bit like asking the wrong phone book, and those lookups failed. Pointing it at a normal one fixed it.

Fixing that one app wouldn't help with the next app to break, so I also added automatic restarts. Each helper app got a health check: once a minute the system asks it a simple question, and three failed answers in a row mark it unhealthy. A tiny extra app called autoheal looks at those results every 30 seconds and restarts anything marked unhealthy, so nobody has to notice first.

The update that lost the server#

Restarts can't help when the setup itself is gone, and once it was. I updated Plex by hand, and the update lost Plex's setup. Plex knows a server by an ID kept in a small settings file. Lose that file and Plex sees a stranger, a server you have to claim again under your account.

A daily cloud backup already saved the other apps' settings, but not Plex's. Now Plex's settings are in that backup too. The backup is encrypted on the laptop before it goes to Backblaze B2, a cloud storage service. It keeps a week of daily copies, four weekly ones, and six monthly ones. To stay under B2's free 10 GB, it skips posters and thumbnails, which Plex can rebuild on its own, and keeps the settings file, the library database, and the watch history.

With the restarts handling the quiet failures and the backup holding the ID, I haven't had to touch the laptop in months.