ME AND MY XCELLENT IDEAS

Well I've neglected my Gopher hole a little lately, haven't even
added any new history snippets (if anyone actually looks at those),
it's interesting that the same thing happened at this time last
year. Then I thought that the novelty was probably wearing off and
that it wouldn't be worth putting this online after all, but then I
got interested again around the end of the year. I think it's this
time that I always find hardest. I've always got a long list of
business-related projects that MUST be done by the end of the year.
Why? Because they MUST have been done by the middle of this year,
and before that they simply HAD to be done before the start of this
year, and... ah shit. Anyway, at some point in December I start to
accept that they probably won't be, and that years are fairly
arbitrary deadlines anyway (besides that ordering things from other
businesses becomes downright impossible after Christmas), then
settle down again. At least we've somehow officially eradicated
Coronavirus here is Victoria, Australia (even while bizarrely the
state government insisted that its strict policies were NOT aimed
at eradication). Not that it does anything for the international
postage situation which is still hurting much of the stuff I used
to sell overseas, but with a bit of luck I'll turn on the TV news
tonight and _finally_ hear that the requirement for wearing face
masks indoors has been lifted. Sorry to international readers if
this reads like rubbing your nose in it.

Anyway, onto personal projects and my Internet Client (see my
previous Xcellent posts - I promise to stop milking that pun
eventually) is now set up for the core task of running up-to-date
web browsers, email, and PDF viewers for access on other computers
on my LAN. It's also now running on the Atomic Pi, which eventually
arrived after well over a month (though I'm not sure if the
tracking info ever acknowleged the fact - don't know why I bothered
watching that so closely). There seem to be quite a few Raspberry
Pi enthusiasts around Gopher, so as they might be interested I'll
branch off breifly into a short review:

The Atomic Pi:

Somehow this board always looked bigger in pictures than it does in
real life - something to do with the big heatsink maybe, or the
greater number of individual components onboard compared to the
Raspberry Pis (though besides the Pi Zeros I've only ever seen them
in pics as well), even though I had checked the dimensions, the
cute little box that it came in still surprised me a little bit.
There's a "getting started" page that was apparantly included with
the ones sold directly by Digital Loggers, but as I had to buy from
another seller this wasn't included. It's available for download at
the DIL website ( https://digital-loggers.com/api.html ) and most
importantly describes the pins for connecting power if you don't
have one of the "breakout boards". It took a bit of digging (most
5v plugpacks aren't rates for much current), but I eventually
pulled out a couple of suitable ones from my plugpacks pile to use
beyond the domain of my workbench and its old 70s-era bench PSU. I
soldered a regular DC socket on for mounting in the case that I
made out of a flowery-looking card box for some expensive soap
(bought for $0.20 at the Op Shop). It's a little flammable, but
otherwise worked out well for hanging on the wall next to the
fridge, and was quicker to modify than 3D printing a case, which
would have needed to be customised anyway.

It comes with a Linux distro (Lubuntu, I think) installed on its
16GB onboard flash which works quite well, though I'd change the
window manager and default programs for things more lightweight if
I were going to use it. My plan is to boot from the Micro SD card
and be able to swap that card over to my laptop and boot the same
environment on that on the rare occasions when I compute away from
home (really it is pretty rare). This raised the issue of UEFI
booting, which I haven't touched before, because the Atomic Pi
doesn't support "legacy" booting at all. My "new" laptop (an
upgrade for me, but it's 14 years old) doesn't support UEFI, so I
had to figure out how to get it to work for both. Actually I made
this more complicated than it really was because I got the idea
that UEFI only worked with GPT partitioned disks, so even though
the Micro SD card I'm using is only 2GB, I had to partition it GPT.
But the laptop doesn't support GPT so I had to make a "hybrid"
GPT/MBR partition. That was a bit of mucking about, but it worked
and I was very happy, until I then ran "fdisk -l" on the Atomic
Pi's onboard flash and realised that its pre-installed Linux is
actually booted from a standard MBR partition, so I didn't need to
bother with all that GPT nonsense after all. Oh well.

Another note on the topic of booting, the BIOS seems to use the
same option to select both Micro SD card booting and booting from
the onboard flash. The Micro SD gets priority, but this means that
you can't boot from the onboard flash while the bootable Micro SD
card is inserted by changing the BIOS settings. Not a problem for
me, but one of the quirks compared to a conventional PC where you'd
be able to select between a HDD and a removable drive for booting.
It does also support network booting, in fact if you reset the BIOS
then it will spend ages trying to boot over the LAN before finally
giving in and trying local drives - that'll be annoying when your
BIOS battery goes flat (it's easily replacable at least).

Performance-wise it's about a match for my laptop (Intel Core 2 Duo
T5500, dual 1.66GHz) in a quick CPU benchmark, and as noted in one
of my earlier posts other people have benchmarked it just a little
slower than a Raspberry Pi 4. Of course in my case the convenience
of having it x86_64-based instead of ARM made it a an overall
winner compared to the Raspberries, just because it's the same
architecture as my laptop. Its CPU is an Intel Atom x5-Z8350, quad
core which DLI highlight as being "up to 1.92GHz", but that's in
"boost" mode and more honest specs quote its normal clock frequency
of 1.44GHz. It does have DDR3 RAM, compared to DDR2 in the laptop
(which I was using in place of the APi before it arrived, so I got
a good idea of the comparative performance), and I'd say this does
make for a slight improvement in Firefox. I've got 3GBs in the
laptop (actually 4GB, but that last GB is out of its addressing
range), and the APi comes with 2GB. Running on an SD card, swap
would be murder (actually because of that it's set up to swap in
compressed RAM instead of a swap partition), but 2GB seems to be
plenty. I think Firefox somehow expands to fill most of the
available RAM however much of it there is.

WiFi and Bluetooth aren't part of my plan so I haven't really tried
them (you also need to add your own antennas for them). I thought
about setting up the built-in audio amplifier with some small
speakers so that I could use the thing on it's own for playing
internet radio in the house, but doing that chews up about 60MB of
internet data in an hour! Much cheaper (free) to just listen to the
real radio, so I didn't bother with that either. All I really want
is ABC Jazz, and that's actually broadcast with Digital TV (they
must have some spare capacity or something) so maybe one day I'll
set up a USB TV tuner to do that, though switching out the audio
output from the TV's set-top box to some old PC speakers would
probably be simpler. Is anyone following this?  Meh, probably not
but who cares. HDMI works into a $5 HDMI-VGA adapter, which is good
because my backup method of accessing the BIOS was to use the 3.3v
serial port and that doesn't seem to be working (though I'll have
to check again, I probably got Rx and Tx mixed up as usual). USB
works fine in Linux - in fact this is my first USB3 computer (until
all of those laptops I bought to resell, but I haven't started on
them to be honest)! Though the only USB3 peripheral that I've
picked up so far (restricted to local second-hand finds as usual)
is a 4-port hub, which you-know isn't all that exciting on its
own... Like HDMI, I haven't really used USB since originally
setting it up. There's also a USB2 port on a bare header that I
might use to connect with my printer eventually.

The one peripheral that my application does rely on is the Gigabit
Ethernet port, so of course this turned out to have troubles. Like
with the Pi4 the NIC is connected with PCIe, here a Realtek
RTL8111G. Unfortunately the standard Linux driver "r8169" didn't
work at all for me - it detected the card and added and eth0
device, but I couldn't get any data through it at all. It turns out
this driver has been causing people problems for years - usually
slow speeds and drop-outs rather that outright failure - but
strangely there's pretty much nothing out these problems with the
Atomic Pi specifically. I guess it must be something that's only
happened with recent Linux kernels, and there was I thinking that
such problems would be well documented since the boards have been
around for years now... Anyway Realtek do provide an official
"r8168" driver (available as a non-free package for Debian, but I
had to compile it from source) and that works a treat. Not sure how
it can be GPL licensed, yet still not able to be endorsed as
"free", but I'm sure there's an old mailing list thread out there
somewhere that sort-of explains it.

Power consumption is very good, better than my little router
actually. Measured at the mains (so including power drawn by my
second-hand switch-mode plugpack) it peaks at 9.2W during start-up,
then settled down to 6.44W at idle, very nice. There's an
unpopulated header for a power button, suiting a standard push-on
(AKA "push to make") button, and I added a big meaty red one
sticking out the side of the case. Like a normal modern PC power
button, this can trigger an ACPI event, so it works to trigger a
normal shutdown. In its post-shutdown stand-by mode the APi+PSU
draws 2.3W (I still turn it off at the wall later). As for heat,
the big heatsink really works, and I from what I hear this is a
real advantage compared to the Raspberry Pi 4. It generally hovers
around the high 40s (degC), so even in hot weather there's not much
risk of it rising high enough to be a problem. I've got it sticking
most of the way through a big hole in the case, so it gets good
passive airflow. There is a header on the board marked "FAN",
though apparantly the switching transistors for this weren't
installed. Still some people have got the fan output working, in my
case I'm convinced it's not needed.

Oh and by the way, here's another one-liner that seems not to have
made it into that U1FFF thing. It shows Linux system temperature
sensor readings formatted correctly in degC (requires Bash or
similar):

for i in /sys/class/thermal/thermal_zone*/temp ; do T=`cat $i`; echo "$i: ${T:0:$(( ${#T} - 3 ))}.${T:(-3)} degC"; done

Overall the Atomic Pi works very well. It was made by AEON, who are
actually a division of ASUS, so I guess it was designed by people
who know what they're doing. As surplus stock from some failed
robot product (oh yeah, unsurprisingly I haven't done anything with
the inertial axis sensor thing either), it really is a remarkably
versatile and powerful little board. If only I could have got it
for $35 here in Aus instead of $90, it would have been even better.

Oh and there's a great diagram that an Atomic Pi owner posted in
the forum showing the pin-outs much more clearly than the official
docs. It was a Google Docs link, and that was a pain in the neck to
access for me, so I've taken the liberty of adding it to the
"Collected Files" section of my Gopher hole.

Ahem, yes that's my short review. Trust me, it could have been
longer... a little bit longer anyway.

So back on my Internet Client, as usual I've only done the minimum
that I _really_ needed to do and left the rest 'till "later". So
I've got graphical programs running reliably over TCP, and set up
Rexec and Telnet fairly nicely, even on my old Windows XP PC using
Xming (though Window's Rexec client doesn't allow you to specify a
password as a parameter, so I still have to type that manually for
each program start, still I don't use that PC very much for
internet stuff so that's good enough). Launching thisngs with Rexec
doesn't run .profile etc. first, so you have to include environment
variables like PATH and DISPLAY before the command that you want to
run, but that's simple enough (so long as I don't need to add
anything to PATH in the future at least). I still haven't set up
NFS because FTP is almost good enough with it integrated into most
file managers that I like. I'm not sure whether to cheat with Email
and access the mail directory over NFS, or do it properly and set
up an IMAP server. Either way I'm still being lazy and just access
a mail client running directly on the Internet Client when I can't
connect to servers the old ones running on my PCs. I really should
have a central archive fetched regularly instead of slow IMAP
connections to distant servers and manually-copied archives
duplicated over two PCs. One day, one day...

Most of my trouble is with Firefox and, as noted in my last post on
the subject, how it sends rendered images of the page view instead
of the elements themselves. As such Dillo works great everywhere,
but if I'm on WiFi and need to bring up Firefox, it's a pain in the
neck. I was already in the habit of navigating using the
PgUP/PgDOWN, Home, and End keys, without smooth scrolling of course
(that absolutely destroys it), but it's still a pain. Worst are
these fancy pages with complicated loading effects such as fading
in and out the whole page view, you can imagine that completely
saturates the connection. In fact when that's bad even a Ethernet
connection to the 100Mbit Ethernet ports on my router aren't enough
- it saturates the network so much that the page can't actually
load, so it just goes on eternally until I open a blank tab or
something. So that's annoying.

As and aside, for viewing PDFs Xpdf does have similar problems to
Firefox, but gv works great. It seems to somehow send the full page
bitmap over the network even when you're just viewing a zoomed-in
part of it, so you can scroll around without doing the round-trip
back to the other computer.

I measured the network performance using iperf3 and got 95Mbit/s on
Ethernet which is alright, but only 22Mbit/s on my 802.11g WiFi
(tested on two PCs). I've never had to care much about WiFi speed
before, just so long as it's faster than my internet (I don't move
big files around my LAN very often), but clearly it's not great.
The problem is likely the Router. It's actually 802.11n but I've
got OpenWRT installed on it and the open-source driver can only
enable 802.11g, and now it looks like it's not very efficient even
with that.

I don't mean to say that I regret installing OpenWRT, it has been
very useful for assigning static IPs and hostnames for everything,
and making that reliable. In paricular things like getting the
laptops to receive the same IP address whether connected on
Etherenet or Wifi, so I can unplug the Ethernet cable without
losing the connection to the Internet Client, but do so using DHCP
so that I can still plug the laptop into Ethernet in another
network and not have it try to to use an IP address that's out of
range there. But the old routers (I had a few spares) aren't the
best match for it in this new application.

Actually these days they're not a good match for any application
because OpenWRT no longer supports devices with 32MB of RAM. It
still works, but the OPKG package manager does now run out of RAM
if you try to get info about a package, which is a pain (at least
is still lists/installs/removes them for now). I've picked up about
ten second-hand routers over the last few year, many quite recent
models with much better specs, but none are bloody supported in
OpenWRT! Probably because they're mainly the ones given out by ISPs
in Australia, and hence are probably far more common here than in
America where the developers presumably are. I did pull one open
and found a serial header (four pins, with two marked 3.3v and
GND), but couldn't get anything out of it in spite of much trying
at differnet baud rates (and I'm sure I tried every Rx-Tx
combination possible with that one). Adding OpenWRT support for a
new router model would be a pretty major project anyway, and I
don't really have time/inclination for that.

My original idea was to use a Raspberry Pi Zero W as a replacement
router - guaranteed to have enough RAM (512MB) for generations of
OpenWrt releases. But now that I have to get enough data through to
stream Firefox to me, going WiFi-only like I was planning is out,
and this test shows that even a USB Ethernet adapter (which I could
use with an external network switch, I've got a few small ones
spare) won't be near fast enough:
https://notenoughtech.com/raspberry-pi/raspberry-pi-internet-speed/

So I'm kind-of stuck for that. Of course the Atomic Pi itself,
along with a network switch, would make a good router. But I like
OpenWrt, which is not at all suitable for running things like
Firefox on, and I also prefer the security of having the only
computer that connects directly to the internet (and runs the
firewall) untainted by that sort of software. I could buy another
one I suppose, but they're a lot pricier than a RPi Zero W. As with
the Internet Client configuration TODOs, I'm probably going to
stick it out with the current almost-good-enough system until
OpenWRT becomes completely unusable with the old router.

Speaking of software pains, I finish all this and then hear about
Xorg's impending abandonment by developers in preference to
Wayland. Accessing windows over TCP seems to be a complete
afterthought with Wayland (probably deliberate, in contrast to X),
and if it works at all it seems that it will have to be like
Firefox - streaming high-res images over the network, for
everything! Argh!

Is it just me or is my attempt to tame the
internet-software-upgrade beast by isolating everything on one
system just set to anger new upgrade monsters from other corners of
of the Linux universe? Sigh... Me and my Xcellent ideas.

- The Free Thinker