Earth Notes: On Website Technicals (2022-05)Updated 2022-05-21 08:06 GMT.
By Damon Hart-Davis.
2022-05-20: Monterey lowpowermode
Well, part of my plan to reduce grid power demand from laptops at peak times and flatten the duck may finally come to pass!
sudo pmset -c lowpowermode 1
should reduce power consumption of my new MBA when on charger/mains power.
A little root crontab to engage that regularly through peak times (eg from 4pm) and leave
lowpowermode again later (eg randomly after ~8pm) might do the trick.
I have manually engaged
lowpowermode for all battery operation, via the UI.
Here's what the root crontab entries look like:
8-58/10 16-19 * * * pmset -c lowpowermode 1 9-59/10 20 * * * pmset -c lowpowermode 0
Note that I'm NOT enabling/disabling this on the hour or half hour: too many devices switching at exact half-hour boundaries may itself give the grid indigestion!
lowpowermode has become available with macOS Monterey (12.x). My MBA is currently on 12.4.
2022-05-19: Air x2 Off-grid
As of ~3pm, I am running both old and new MBAs off-grid while various backups etc continue!
2022-05-18: Air Arrived
My new M1 MacBook Air arrived at around noon. It left Chengdu in China on the 13th, so will have accrued "Air miles" and an associated extra carbon footprint...
To tranfer my life from my old MBA to the new one, while still leaving a working clone on the old one, I did the following:
- Backed up the old one to Time Machine fully.
- In Internet Accounts turned off all mail connections (I don't want a mess of mail randomnly across the MBAs) but left calendars on so I can use them everywhete.
- Backed up again with Time Machine.
- Used the new MBA's migration assistant to restore from the old MBA's Time Machine backups; that took all night.
- (The new MBA will get a new 4TB Time Machine esternal HDD.)
- In the morning complete the set up of the new MBA, starting with turning back on the mail in all the relevant accounts and all the re-authentication that that implies...
- Trying to run EOU scripts on the new MBA, but clearly some of the binaries are not "fat" since I get
env: node: Bad CPU type in executableand
script/get_img_XxY: line 16: /usr/local/bin/identify: Bad CPU type in executable; items installed by brew are clearly going to have to be discovered and reinstalled (and indeed brew itself):
Firefox picked up where I left off! And ssh is all working as intended.
On opening, mail tells me that it will spend a few minutes importing my (236,093) messages.
On opening Skype I am asked to enable Rosetta to emulate/run Intel (x64) apps. That also lets my brew apps run, it seems! Though I should try to move to native banaries when I can, for speed. (Skype seemed to have forgotten me when it ran: I have reinstalled native.)
Pretty darn smooth so far...
brew upgrade caused me to uninstall a couple of things that it was getting stuck on and that I no longer need (eg rstudio).
Signal reported its database corrupt. Having cleared it, and (re-)linked with my phone all seems fine.
(I note that the new MBA doesn't seem entirely flat: the front LHS rocks down a bit when I rest on it, so I've slipped a few bits of paper under that foot for now.)
I have followed instructions on
How to migrate to native Homebrew on an M1 Mac
to set up the new
/opt/homebrew and gradually populate it.
% /opt/homebrew/bin/brew install zopfli % /opt/homebrew/bin/brew install jpeg-xl ...
I may not need to be in a huge hurry to get the native versions. Running emulated x64 in Rosetta may only have a ~20% speed penalty:
% time /usr/local/bin/zopflipng img/2022/20220218-high-winds-screenshot-BBC.png ... 5.634u 0.022s 0:05.66 99.8% 0+0k 0+0io 0pf+0w % time /usr/local/bin/zopflipng img/2022/20220218-high-winds-screenshot-BBC.png ... 5.635u 0.022s 0:05.66 99.8% 0+0k 0+0io 0pf+0w % time /opt/homebrew/bin/zopflipng img/2022/20220218-high-winds-screenshot-BBC.png ... 4.479u 0.065s 0:04.83 93.7% 0+0k 0+0io 0pf+0w % time /opt/homebrew/bin/zopflipng img/2022/20220218-high-winds-screenshot-BBC.png ... 4.473u 0.017s 0:04.49 99.7% 0+0k 0+0io 0pf+0w
Google Drive just silently failed to do anything when I tried to launch it on the new MBA, so I'm doing a fresh install...
2022-05-16: Async Desktop Again
WebPageTest is now complaining that my share42 JS script is render-blocking, even though it is loaded very late and updating stuff generally out of sight. So for desktop only I have made it async again. This seems to allow it to be discovered faster and loaded in parallel with other objects. I'd still prefer it not complete for bandwidth and CPU, but if WPT says async is better, then it must be right!
2022-05-13: Energy Stats Explosion
I made lots of progress on stats: extracting more of them, consolidating from multiple sources into one CSV/table, displaying them as tables, etc.
Yesterday I decided to auto-insert a selection of energy stats rendered this way into any page spatially marked as at 16WW, tagged microgen, but not marked dataset so as not to pollute other data pages that have their own data to showcase!
2022-05-11: Energy Stats Insert
I'v started a semi-automatic mechanism to insert relevant 16WW energy stats into pages' codas.
Initially the pages will be explicitly selected with a head directive, but that might broaden automatically to TECH pages with 16WW location and a simple temporal coverage for example.
Pages that are inappropiate (eg error or lite) will not get the insert.
This page has been marked up to include such stats as of writing.
To start with this will be placeholder text, and may fall back to that when, say, stats for the specified time are not available.
The intention is for this content to be static tables and/or text, extracted quickly on the fly, and will not force a page update. This will only be updated (eg stylistically) if all pages are, or the particular page is naturally rebuilt for some other reason. It is possible that live graphics and page-type-specific content will be included.
2022-05-08: Tweet (Re)Timing
I have been pushing out automated EOU tweets in the wee hours (for AU/NZ) and noon-ish. The former is nominally good for UK interaction too because there's not much else going on at that time.
There are suggestions that around the start of the business day, and in the early evening, are when many people are dipping into social media.
So I've doubled up on my 'daytime' posting to be two: mid-morning and mid-evening.
Exceeding five (automated) postings on weekdays (three on weekends) is said to be overdoing things, so this won't be. Any excess will be my human wit and charm: what's the worst that could happen?
Oh, and I visited a music festival yesterday and did a field recording.