Raspberry Pi

    Overclocking A Raspberry Pi 4

    I am using a Raspberry Pi 4 (daenerys) as my desktop personal computer during the work day, which I access from my work provided computer using VNC. By using this Pi 4 I can access the Internet from my desk without going through the corporate Internet proxy.

    I built daenerys in a Flirc case, which looks really nice and provides passive cooling, and it boots from a SSD in an Inateck case. The SSD gets power from the Pi and so under normal load I would see temperatures hover around 55 degrees celcius, which is well below the 85 degree threshold that causes the CPU to throttle down.

    Over the holiday I built another Raspberry Pi 4 (arya) in a MazerPi case that has a fan. The fan draws power from the GPIO pins and has two modes, high speed if plugged in to the 5v pin (PIN 2) and low speed if plugged in to the 3.3v pin (PIN1). To complete the picture, ground is plugged in th PIN 6.

    The MazerPi fan just stays on all the time, I am not aware of a way to control the fan so that it only comes on when a certain temperature threshold is past. I first plugged the fan in to one of the 5v pins and found it loud enough to be heard, although not terribly loud. When using high speed mode the CPU temperatures were in the mid to high 30 degree range under normal load. When I ran Octane 2 it then crossed 40 degrees.

    I decided to try the low speed mode, which is quiet enough to not hear unless one concentrates. Temperatures where in the 40 to 45 degree range, which is plenty good.

    At this point the thought occurred to me that it probably makes sense to use the case with the fan for the Pi that I am going to use every day rather than in one I am going to use as an accessory and thus I removed the SD card from arya and plugged in the SSD from daenerys and it booted right up. (BTW, note that in reality a computer host name is associated with the boot drive and not the actual computer, so daenerys is really the 250 GB SSD drive while arya is a 256 GB SD card.)

    Finally, I decided I wanted to try overclocking daenerys, which given the fan should be safe. Normal speed for this Pi4 board is 1.5 GHz, so I decided to overclock it to 2 GHz. Performance is noticably faster. At 1.5 Ghz daenery’s Octane 2 score is 8098 and at 2.0 Ghz the score is 9777. Neither score is fantastic, but good enough for the type of web browsing that I do.

    When you overclock a CPU it will run hotter and that can cause failures. In the MazerPi, with the fan in low speed mode, and the Pi 4 booting from a SSD and overclocked to a max frequency of 2 GHz and a minimum frequency of 1 GHz I am seeing temperatures ranging from 46 degrees to 55 degress, which is about the same as well using the Pi in the Flirc case but not overclocked.

    The net result is that have “upgraded” daenerys to a faster processing speed that provides better performance while maintaining a good CPU temperature and so far after one full working day it has been stable. The MazerPi case cost only $8 and is easy to assemble with help from a video I found on YouTube.

    The official images of the Raspberry Pi OS are still 32-bit but there is a beta 64-bit version that I have been using on an SSD connected to a Raspberry Pi 4. When the 64-bit version was first released RealVNC Server was not available so I have been using x11vnc to remote connect to the Pi. Today I learned that RealVNC Server is now available for the beta but has to be enabled via the terminal using raspi-config, so I switched. I don’t know whether anyone else will find this useful, but it feels like RealVNC is faster than x11vnc.

    I like to do little projects during my week long Christmas holiday so this year I did a redo of a project from last year and built a new Raspberry Pi 4 and configured it to attach to my iPad Air via a USB-C cable. I don’t intend this particular Pi to serve a role on our home network, so I will also use it for other projects. I had have created an outline for my tech experiments in which you can view my project notes.

    Vivaldi Day 2

    Today is the second day of using Vivaldi on the Raspberry Pi 4 desktop, and it continues to perform better for me than Chromium. I decided to run Octane 2 and Speedometer 2 to see how Vivaldi benchmarks against Chromium and I am surprised to find that it benchmarks slightly slower in both even though my practical use finds it faster. For example, Speedometer 2 scores 7.93 in Chromium and 7.614 in Vivaldi. For comparison, the Speedometer 2 score on the iPad Air is 201, fastest in the house.

    Trying Vivaldi

    I use a Raspberry Pi 4 as a personal remote computer that I access using VNC during the work day, which enables me to keep my personal web access from going through my employer’s Internet proxy. It’s also an excuse of me to fiddle with the Raspberry Pi.

    I have been using Chromium for browing the web but grown frustrated with its performance on the Pi so this morning I decided to give Vivaldi a try. Vivaldi uses the same rendering engine as Chrome and I’ve found it uses the same extensions as Chrome, which is important because I need access to Lastpass.

    Installation was a little tricky because I am running a beta 64-bit version of the Raspberry Pi OS and so I needed to find the arm64 version of the installation package.

    So far I am finding that Vivaldi does run faster on the Pi4 than Chromium. One thing I did to speed things up is to turn off the drop-down, URL completion of the address bar so that I can quickly enter URLs. However, one function that I use to forage for new updates in the Federated Wiki verse does not work, for some reason, so for now I will need to use Chromium for that part of my daily flow.

    Relive a part of Xerox PARC’s history: Smalltalk-80 on a Raspberry Pi

    Instructions for running Smalltalk on a Raspberry Pi. I may have to try this out.

    The Raspberry Pi org has released a SD card imager app that is available for Windows, Mac OS, and Ubuntu. I use balenaEtcher on my Macbook Air to create boot SD cards for my Pis, but the new app from the Raspberry Pi org has the benefit of automatically downloading the appropriate source files rather than my having to manually seek them out. These days I pretty much only drag out the Macbook, which is more than seven years old, when I need to flash a new card. I would rather be able to use of my newest computers to flash images, which is why I decided to try to install it on my Pixellbook. Unforutnately, the install failed, which has me wondering whether I should create a new Ubuntu container and try again.

    The Pinebook Pro is an ARM-based laptop that you can buy for $200. You get a 14-inch IPS 1080p screen, 4 GB of RAM and 64 GB of storage, and you can use SD cards for additional storage. Is it the Raspberry Pi of laptops?

    If you want to host a web application or service on a home network, make it accessible from the Internet, but not create a DMZ or enable port forwarding on your home router, you can use GitHub - inlets/inlets: Reverse proxy and service tunnel written in Go. Instructions for how to use a Raspberry Pi as the Internet gateway are in Build a 10 USD Raspberry Pi Tunnel Gateway.

    Configuring A Raspberry Pi as a WiFi Hotspot and WiFi client

    In episode 308 of the MobileViews podcast Jon Westfall talked about a blog post describing how to configure a Raspberry Pi 4 as a USB-C accessory for the iPad Pro. The instructions configure the Pi so that you connect an iPad to the Pi using a USB-C cable. A video is also available that provides step-by-step instructions, and you can also watch another video in which the author answers questions that were left in the comments of the original video.

    While I found the concept intriguing there is no way I could implement it because it only works if you have the latest iPad Pro that has a USB-C port, which I do not have.

    Later I found another video done by the author of the original one showing how to install an application called RaspAP and configure it to be a WiFi hotspot AND a WiFi client at the same time. With this configuration you can connect any iPad, or any other device that has WiFi and then you can SSH in to the Pi from the iPad to have access to a Linux command prompt, from which you could run a number of different applications, programming environments, and utilities.

    It’s actually not too difficult to configure a Raspberry Pi as a WiFi hotspot (access point) and I actually had done so to a small Raspberry Pi Zero W that I have been using as a portable backup for a wiki I maintain of home information. The problem with how I have been using the Pi Zero is that it can only be either a WiFi access point OR a WiFi client, so when configured as an access point the Pi Zero can’t connect to my home network or the Internet.

    What makes RaspAP better is that it configures a Raspberry Pi so that it can be an access point AND WiFi client at the same time using the same wlan port! I am not sure how this is done because as you may know a “normal” WiFi access point must have a second wired Ethernet connection to connect to a cable modem and provide Internet access, in such instances the access point routes (or bridges) network traffic between two networks (different IP addressing), one being the WiFi network and the other being the wired network, each requiring one port.

    The installation of RaspAP does require connecting the Raspberry Pi to a wired network connection because there is a step that requires resetting the wlan0 interface that will hang if the port is in use. However, after installation, the Pi will connect to your home network and act as an access point for another network at the same time.

    Along the way I also found out that I can power the Raspberry Pi 3b+ using the Ravpower (Model RP-PB043) portable battery that I own, which means that I have a portable, wireless network between an iPad and and a Linux computer that will work anywhere.

    How might I use this set up?

    Let’s say I am working on a Nodejs program. I can have Nodejs installed on the Raspberry Pi and I can have all my code also on that Pi, perhaps cloned from a git repo. Let’s say I plan to be on a long flight and I want to carry a minimal amount of gear. I can pack my iPad Pro, Raspberry Pi, and the Ravpower in my carry on and when I am able, power up the Pi, leave it in the carry on, and connect to it via WiFi from the iPad. At this point I can then SSH into the Pi and use a text editor (emacs, nano, etc..) to work on my code and test it using nodejs. Of course, you can do this for any other programming environments or compilers that install on the Raspberry Pi and run via the command prompt. (Actually.. one should also be able to VNC into the graphical Raspbarian environment if you need to.)

    While I could do the above via the airplane WiFi, doing so costs money and service can be spotty, this network connectivity once configured is available nearly the same way all the time. The “remote programmer” scenario is just one idea off the top of my head, I am sure there are other uses cases for a configuration such as this. The developer of RaspAP is working to include OpenVPN to make the Pi a VPN endpoint that will provide all secured network communication for all devices that connect to it. You can find more examples for using RaspAP in this Github repo.

← Newer Posts Older Posts →