My gaming PC spent most of this year switched off under my desk. A Ryzen 5, a GTX 1660, 8 GB of RAM. When I did turn it on, it drew about 70 watts just to sit there.
Now it’s a server. I can open it from my phone anywhere, it sleeps at 3 watts when there’s nothing to do, and it wakes itself up when there is.
Most of that took an afternoon. One tiny part, stopping an old phone from charging past 80%, took me a whole day, five failed hacks and one fake success that nearly fooled me. That story comes at the end, and it’s the best part.
The short version
- Hardware: an old gaming PC I already owned. ₹0 spent.
- Reach it: from anywhere, with nothing open to the internet.
- Power: ~70 W idle → ~3 W asleep. About ₹40 a month.
- Speed: makes AI voice-overs 3–4× faster than my MacBook.
- Waking it: an old phone at home, kept at 80% battery.
(I had a sidekick for this: Claude, running in my terminal. I made the calls. It typed the commands, read the logs, and never once complained about PowerShell quoting. I complained enough for both of us.)
Why I needed a server
I make short videos for a few Instagram pages with an AI pipeline: a script, an AI voice, then code that animates and renders the video. It all ran on my laptop, so every render made my laptop hot and slow.
I wanted a machine that does it on its own: take a request, make the video, send it to my phone, go back to sleep. A cloud GPU server could do that for a few thousand rupees a month. But the pages are new, and the PC was right there.
So I set three goals:
- Fast enough to make videos.
- Reachable from anywhere, without opening my home network to the internet.
- Almost free to run when it’s doing nothing.
Goal 1: is a 2019 PC fast enough?
I ran the same job on both machines: one 50-second video with 10 lines of voice-over.
I didn’t expect that. The voice model (Chatterbox, open source) loves an NVIDIA card. The old PC finished in about a minute. My new MacBook took four and a half.
Rendering went the other way, and the first PC render was awful: 157 seconds. The reason: the renderer saw “8 GB of RAM” and quietly picked its safest, slowest mode. I switched that off and gave it more workers:
Four workers: 89 seconds. Encoding on the graphics card made it slower, oddly. The MacBook still renders faster, but the PC doesn’t need to win. It just needs to finish while I’m asleep.
Lesson: default settings are guesses about your machine. Test, then change them.
Goal 2: reach it from anywhere, safely
The old way to reach a home PC from outside is to open a port on your router. That puts a Windows machine on the open internet. No thanks.
I used Tailscale instead. It makes a private network out of your own devices (PC, phone, laptop), and they can reach each other from anywhere. Nothing is open to the public, and there are no router settings. Setup took five minutes.
Then two ways in:
- SSH for commands. Windows has an OpenSSH server built in. I set it to key-only, so there are no passwords to guess. Now
ssh pcworks from my laptop anywhere. - Remote Desktop for the full screen. Windows 10 Pro has it built in, and Microsoft’s free Windows App runs it on iPhone and Mac.
Remote Desktop has a bad reputation, for good reason: port 3389 open to the internet gets attacked all day. So I didn’t use Windows’ built-in firewall rule, which accepts connections from anywhere. I added one of my own: port 3389, Tailscale addresses only (100.64.0.0/10). On my home Wi-Fi the port is closed. On my phone, with Tailscale on, the whole desktop is one tap away.
One thing to set on day one: Tailscale device keys expire after about six months. Turn that off for the server in the Tailscale admin page, or one day it just disappears from your network.
Goal 3: stop paying for 70 watts of nothing
First the easy win: I unplugged the monitor. A screen left on all day uses 20 to 25 watts for nothing.
I expected the graphics card to drop to almost zero without a screen. It didn’t:
17 watts at 0% use, in its lowest power state. That’s just how low this card goes. And here’s the whole PC on a quiet afternoon, from its own power log:
Around 70 watts to do nothing. That’s about 50 units of electricity a month, or ₹400. I could afford ₹400. But a machine that burns power all day while doing nothing bugged me.
Then I found the silliest setting of the day. Windows’ power plan had the minimum processor state at 99%, so the CPU was never allowed to slow down. I set it to 5% and ran the benchmark again: 93 seconds before, 92 after. Same speed under load, less power at idle.
But tuning only saves a few watts. To save 67, the PC has to sleep.
Teaching it to sleep, and wake itself up
Asleep, the PC uses about 3 watts. Windows can wake itself from sleep with no extra hardware: a scheduled task with “Wake the computer to run this task” works like an alarm clock.
So before each sleep, my small scheduler sets one alarm:
- During my hours (9 am to 11:30 pm) it checks for work. If there’s nothing, it waits longer each time: 15 minutes, then 30, 60, 120.
- Right after any activity it checks every 10 minutes.
- At night it only wakes once, for a batch of videos at 2 am.
On a normal day it’s awake for under 4 hours, and two of those are me gaming. Simple idea. Getting it to work took three surprises.
Surprise 1: the Wi-Fi dongle can’t wake anything. When the PC sleeps, the USB Wi-Fi dongle sleeps too. I switched to an Ethernet cable, which supports Wake-on-LAN: a special “magic packet” wakes the PC in about 7 seconds. Then the PC started waking up at random. The network card had “Wake on pattern match” on, so normal network traffic woke it. I turned that off. Only the magic packet wakes it now.
Surprise 2: Windows thinks someone is always at the keyboard. The scheduler must never sleep while I’m using the PC. But on a PC with no screen, the usual check (query user) says the user is active, right now, all the time. So a tiny helper runs inside my login, reads the real keyboard and mouse idle time, and tells the scheduler. Now it knows when nobody’s there.
Surprise 3: a sound card that won’t let it sleep. Windows has its own “sleep when idle” timer. It never fired. This command shows why:
The Realtek audio driver keeps an audio stream open, with no speakers and nobody listening. Windows sees that and stays awake forever. So my scheduler doesn’t wait for Windows. When it’s safe, it puts the PC to sleep itself.
The result:
From ~50 units a month to about 5, roughly ₹40. This is an estimate from measured idle and sleep power. A plug-in power meter would make it exact, and it’s on my list.
A control panel, so future me isn’t lost
Six months from now I won’t remember half of these changes. So the PC serves a small web page I can open on my phone:
It shows live CPU, memory, GPU and power, the sleep schedule, and an electricity estimate. Gaming mode pauses everything with one tap, so the PC is mine again. The most useful part is Setup notes: every change I made, why I made it, and a button to undo it.
I also stopped Steam, Discord and the Riot Client from starting with Windows (8 GB of RAM needs every bit), and disabled an old AnyDesk install I’d forgotten about.
The hard part: who wakes the PC?
Everything worked. Then I spotted the hole.
A sleeping PC can’t hear you. If I’m out and want the PC now, I have to wait for its next check, which can be up to two hours away. The magic packet only works inside my home network, so something at home has to be awake all the time to send it.
I had the perfect thing in a drawer: my old Realme X2 Pro. It’s always on, uses very little power and has Wi-Fi. Its whole job: when I tap “Wake PC” on my iPhone, it sends the magic packet.
One problem. An always-on phone is a phone plugged in 24/7. A battery that sits at 100% for months swells up and dies, and I didn’t want a puffy phone sitting on my PC.
So the goal:
Keep the battery around 80%. No root, no wiping the phone, no buying anything.
Remember realme UI 2.0, Android 11. It matters later.
How I measured
The charging icon lies, as you’ll see. So I read the battery directly over Wi-Fi with adb, Android’s developer tool, every 20 to 30 seconds. The number that matters is the battery current: it shows whether power is going into the battery or out of it.
Attempt 1: the PC switches the phone off
The phone is plugged into the PC, so the PC could just turn that USB device off at 80%. Windows was happy to:
“Device disabled successfully.” And here’s what the battery did:
Nothing changed. Disabling a USB device only cuts the data. Power keeps flowing. I even put the PC to sleep with the device disabled, and the phone still went from 59% to 60%.
Attempts 2 and 3: turn off the whole USB controller
You can see that in the same window: “Cannot disable critical system device.” Both controllers also run the keyboard, so Windows refuses.
Attempt 4: the phone refuses the power
USB-C lets two devices agree on who gives power and who takes it. Android has a hidden command to change that:
$ adb shell dumpsys usb set-port-roles default sink deviceNo such USB port: default$ adb shell dumpsys usb set-port-roles port0 no-power no-dataNo such USB port: port0This phone doesn’t support it.
Stop guessing, ask the hardware
Four failures in, I finally asked the PC directly: can anything cut power to a single USB port?
”GANGED”: all the ports share one power switch. There’s no switch for a single port. That closed the PC side for good. The fix had to happen on the phone.
Attempt 5: the command that looked like magic
Android has a command that tells the phone it’s unplugged, even when it isn’t. I ran it, and the charging icon disappeared. Done, in one line!
Then I looked at the numbers instead of the icon:
Look at UPDATES STOPPED. Android stopped reading the battery and was showing a frozen snapshot. After 15 minutes I reset it, and the real level appeared: 73% → 76%. It had been charging the whole time.
The command only changes what the screen shows. If I had trusted the icon, I’d have called it solved and slowly cooked the battery.
Don’t trust the indicator. Measure the thing.
The switch exists, and it’s locked
Digging through the phone’s system, we found the real charging switch. Realme’s factory tools use it:
$ adb shell cat /sys/class/power_supply/battery/input_suspendcat: /sys/class/power_supply/battery/input_suspend: Permission denied$ adb shell cat /proc/charging_limit_currentcat: /proc/charging_limit_current: Permission deniedinput_suspend literally means “stop taking power from the charger”. Only root or Realme’s own apps can touch it. The usual workarounds don’t help either:
- Charge-limit apps only work on newer software with a built-in limit. realme UI 2.0 is too old.
- Shizuku gives the same access that’s already blocked.
- Rooting wipes the phone. No.
The trick: if you can’t close the tap, open a bigger drain
I’d been trying to stop the power coming in. What if I let it come in, and made the phone use more than it gets?
The phone’s battery report had the clue: max charging current 500 mA. The PC’s USB port is a slow trickle. A Snapdragon 855+ with work to do can easily use more than that.
So the plan: above 80%, give the processor busy work, and the battery level drops even while it’s plugged in. Below 78%, stop, and let it charge back up.
I tried it at 82%, plugged in, with all eight cores busy:
The current flipped: about 200 mA flowing out of the battery with the cable still in. 82% → 79% in 16 minutes. It warmed up to 37 °C, but that was all eight cores flat out with the screen on. The real version uses only as much load as it needs.
The script
It runs in Termux (a Linux terminal for Android), with the Termux:API add-on for battery readings and Termux:Boot to start it after a reboot. Run pkg install termux-api jq once.
#!/data/data/com.termux/files/usr/bin/sh# Keep the battery between 78% and 80% while it's always plugged in.# Needs: pkg install termux-api jq (+ the Termux:API app)# Logs "time,pct,temp,workers" to ~/burnoff.csv every loop.HIGH=80; LOW=78; HOT=38; MAX=8CSV="$HOME/burnoff.csv"LOCK="$HOME/.burnoff.lock"PIDS=""
# one copy only (boot script + manual run must not double up)if ! mkdir "$LOCK" 2>/dev/null; then old=$(cat "$LOCK/pid" 2>/dev/null) if [ -n "$old" ] && kill -0 "$old" 2>/dev/null; then echo "already running ($old)"; exit 0 fi rm -rf "$LOCK"; mkdir "$LOCK" || exit 1fiecho $$ > "$LOCK/pid"
start_one() { (while :; do :; done) & PIDS="$PIDS $!"; }workers() { set -- $PIDS; echo $#; }stop_all() { for p in $PIDS; do kill "$p" 2>/dev/null; done PIDS=""}nap() { sleep "$1" & wait $!; } # lets the trap fire during the waitcleanup() { stop_all; rm -rf "$LOCK"; }trap 'cleanup; exit 0' INT TERM HUPtrap cleanup EXIT
[ -f "$CSV" ] || echo "time,pct,temp,workers" > "$CSV"
while :; do b=$(termux-battery-status 2>/dev/null) pct=$(echo "$b" | jq -r '.percentage // empty' 2>/dev/null) temp=$(echo "$b" | jq -r '(.temperature // 0) | floor' 2>/dev/null) plug=$(echo "$b" | jq -r '.plugged // "UNPLUGGED"' 2>/dev/null) case "$pct" in ''|*[!0-9]*) nap 30; continue ;; esac # API not ready: retry case "$temp" in ''|*[!0-9-]*) temp=0 ;; esac
if [ "$plug" = "UNPLUGGED" ]; then stop_all # on battery: never burn elif [ "$temp" -ge "$HOT" ]; then stop_all echo "$(date +%Y-%m-%dT%H:%M:%S),$pct,$temp,0" >> "$CSV" nap 300; continue # too warm: rest for 5 minutes elif [ "$pct" -gt "$HIGH" ] && [ "$(workers)" -lt "$MAX" ]; then start_one # still too full: add one busy core elif [ "$pct" -le "$LOW" ]; then stop_all # low enough: let it charge fi echo "$(date +%Y-%m-%dT%H:%M:%S),$pct,$temp,$(workers)" >> "$CSV" nap 60doneAbove 80% it adds one busy core a minute. At 78% it stops them all. It rests if the phone reaches 38 °C, never burns when unplugged, and only one copy can run at a time. Every minute it writes a line to burnoff.csv, so I can see it working. Use a slow charger, never the 50 W fast one, and keep the screen off.
Is it a bit silly? Yes. In a post about saving power, I’m burning 1 to 3 watts on purpose to protect a battery. An ESP32 board with a relay (about ₹500) would cut the power properly. But this cost nothing and taught me more.
Does the button actually work?
The real test: I put the PC to sleep and tapped Wake PC on my iPhone. The iPhone tells the old phone over Tailscale, the phone shouts the magic packet across my Wi-Fi, and the PC was back on the network a few seconds later. Windows even names the culprit: powercfg /lastwake shows the Realtek network card as the thing that woke it. One tap, from anywhere.
One realme quirk I didn’t see coming: after a phone reboot, realme quietly blocks the app that’s supposed to start everything on boot. So after a restart I open Termux once and it starts itself again. Phones rarely reboot when they sit on a charger, so I can live with it.
If you’re doing this yourself
- Measure before you tune. The RAM default, the 99% CPU setting and the audio driver were all invisible until I checked.
- Use Tailscale and never open ports. SSH and Remote Desktop only over the private network.
- Use Ethernet if you want Wake-on-LAN. Wi-Fi dongles can’t wake a PC.
- Turn off Tailscale key expiry for the server, and for the phone.
- Know your power-cut plan. I didn’t change the BIOS, so after a power cut the PC stays off until someone presses the button.
- On the phone: measure current, not the icon. And
dumpsys battery unplugis a trap. - Write down every change, with an undo. Future you will thank you.
Next: what this server actually does
All of this was groundwork. The PC exists to make videos for my pages: an idea, a script, a voice, animation, a render, and a preview on my phone, while I sleep.
That’s Part 2.