Who says the iPad isn’t a laptop replacement?

Imagine you’re sitting in a coffee shop, and you suddenly feel the need to do some coding. Your iPad has some decent code editors, but you’d like to execute what you wrote. How about connecting a Raspberry Pi and running it there?

The above is my new fave home-away setup:

  • 11″ iPad Pro
  • Brydge keyboard
  • Magic Mouse
  • Raspberry Pi 4 / 4Gig

What makes this work is that the Pi is both powered and gets a network connection over the USB-C port. To enable that, all you have to do on recent versions of Raspian is:

  • Add dtoverlay=dwc2 to /boot/config.txt
  • Add modules-load=dwc2,g_ether to /boot/cmdline.txt
  • Reboot

Assuming you’ve got SSH on your RPi, at this point you should be able to connect it directly to the iPad with a USB-C to USB-C cable, then use your favourite iOS SSH client to do the equivalent of ssh pi@hostname-of-pi.local, with “hostname-of-pi” being whatever you chose (“raspberrypi” by default). Usually, I use Remoter VNC for SSH but that’s mostly because I’ve owned the full version of it forever.

If you’re astute, you’ll have noticed that it’s not ssh running on the screen above. 🙂 There are many ways to get an actual GUI desktop attached to the RPi, but the one I’ve found works the best for me is (believe it or not) using Windows Remote Desktop. To enable this, on the RPi, you can sudo apt-get install xrdp, and on the iPad install Microsoft Remote Desktop or whatever RDP client you like best. When you create the connection, use hostname-of-pi.local just like you would have for SSH.

There are a couple of downsides to this setup.

  1. The microsoft remote desktop client, at least, is tuned for using a finger on the screen, rather than a mouse. In fact, support for mice on iPad OS is still in its infancy, though I expect it will improve over time.
  2. The RPi is being powered from the iPad, so you can expect the battery life to be reduced — it’s not impossibly bad, but it’s visible. (Btw, if anyone knows of a good USB-C hub that will power multiple devices with a data passthrough, let me know.)

Anyway, if you’re looking to try this, there are lots of good tutorials out there on YouTube and elsewhere, by people who have invested more effort than me. Regardless, I’m happy to try and help if you get stuck, so leave a comment.

Overclocking

In my post about the new home of GCW, I had a picture of the Raspberry Pi based version of the server. What probably stood out the most in that picture was the cool (sic!) ICE Tower active cooling system. That Pi has been rock solid since I turned it on, so given the insane cooler, I thought I’d try playing around with a bit o’ the old overclocking.

The stock CPU and graphics clock speeds on a RPi 4 are 1.5 GHz and 400 MHz respectively. In order to get the CPU clock past 1.75 GHz, you need to install firmware that is in advance of what comes with the standard Raspbian distro, so I figured I’d start with 1.75 GHz. For the graphics clock, I tried 600 MHz, which I’ve seen in a couple of how-to videos.

With those speeds, the Pi booted just fine, but after some heavy use (i.e. 3 simultaneous video playbacks) the graphics became unstable. I backed the graphics clock off to 550 MHz and the performance stablized.

With the ICE Tower running, the core temp never went above 40 degrees Celcius even under the heaviest load — compare that to the Pi thermal throttling at 80 degrees showing a single video with no cooling.

Overall, I’m quite pleased with the result. The combined boosts in clock speeds have made an immediately noticeable improvement in performance. It’s entirely possible that this has reduced the lifespan of the board, but honestly at the price I paid for it, I can live with that.