Compare commits

...

3 Commits

Author SHA1 Message Date
Shadowfacts 09d8f19fe6 Add Asahi Linux 2022-03-20 14:33:52 -04:00
Shadowfacts d9441104da Remove unused node-sass package 2022-03-20 14:29:00 -04:00
Shadowfacts fc7d6d3642 Fix running w/o AP keys setup 2022-03-20 14:28:38 -04:00
4 changed files with 39 additions and 2289 deletions

View File

@ -2,9 +2,13 @@ import express, { Router } from "express";
import { promises as fs } from "fs"; import { promises as fs } from "fs";
const domain = process.env.DOMAIN; const domain = process.env.DOMAIN;
const pubKeyPemPath = process.env.PUB_KEY_PEM;
export default async function actor(router: Router) { export default async function actor(router: Router) {
const pubKeyPem = (await fs.readFile(process.env.PUB_KEY_PEM!)).toString(); if (!pubKeyPemPath) {
return;
}
const pubKeyPem = (await fs.readFile(pubKeyPemPath)).toString();
const actorObj = { const actorObj = {
"@context": [ "@context": [
"https://www.w3.org/ns/activitystreams", "https://www.w3.org/ns/activitystreams",

2287
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -14,7 +14,6 @@
"@types/markdown-it": "0.0.7", "@types/markdown-it": "0.0.7",
"@types/morgan": "^1.7.35", "@types/morgan": "^1.7.35",
"@types/node": "^14.14.41", "@types/node": "^14.14.41",
"@types/node-sass": "^4.11.1",
"@types/request": "^2.48.1", "@types/request": "^2.48.1",
"@types/sanitize-html": "^1.18.2", "@types/sanitize-html": "^1.18.2",
"@types/sass": "^1.16.0", "@types/sass": "^1.16.0",
@ -30,7 +29,6 @@
"markdown-it": "^8.4.2", "markdown-it": "^8.4.2",
"markdown-it-footnote": "^3.0.2", "markdown-it-footnote": "^3.0.2",
"morgan": "^1.9.1", "morgan": "^1.9.1",
"node-sass": "^5.0.0",
"pg": "^8.5.1", "pg": "^8.5.1",
"reflect-metadata": "^0.1.13", "reflect-metadata": "^0.1.13",
"request": "^2.88.0", "request": "^2.88.0",

View File

@ -0,0 +1,33 @@
```
metadata.title = "Asahi Linux"
metadata.tags = ["computers"]
metadata.date = "2022-03-20 10:49:42 -0400"
metadata.shortDesc = "A brief but pleasant experiment in running Linux on Apple Silicon."
metadata.slug = "asahi-linux"
```
The [alpha release](https://asahilinux.org/2022/03/asahi-linux-alpha-release/) of Asahi Linux, a project to run Linux on Apple Silicon computers, came out a couple days ago. And out of a combination of boredom and curiosity, I thought I'd give it a shot.
<!-- excerpt-end -->
## Installation
The installation process went very smoothly. The installer utility the Asahi team built functioned perfectly. The one pain point, however, was when shrinking the default partition to make room for the new Linux one, my whole machine locked up for about three minutes. No input was registered and the entire screen stopped updating. The installer does warn you about this beforehand, but it was kind of nerve-wracking nonetheless. After that, the installation went perfectly smoothly, and I'm now running the Asahi Linux Desktop (a modified version of Arch Linux) on my [M1 Max MacBook Pro](/2022/m1-max/).
## State of Linux
Overall, Linux runs quite well natively on the M1 Max. Despite the alpha state, I haven't (yet) run into any issues the Asahi team didn't warn about.
So far, almost all of the software I'e tried to install has worked. The sole exception was Rust, as the prebuilt version in the Arch repo uses jemalloc, which does not support the 16K page size of the M1 family. But, building Rust from source[^1] got it working fine.
[^1]: While building Rust from source, the laptop got the hottest I've ever felt it outside of playing graphically intensive games. The fan also became audible, though still nowhere near the jet-enigne levels of previous Intel laptops.
The biggest gap in Asahi right now is the lack of drivers for the chip's GPU. This means the machine uses software rendering (llvmpipe), which is a great deal slower than proper GPU rendering would be. However, the M1 Max is fast enough for software rendering to be usable for most tasks. Even watching 1080p youtube in Firefox was fine, and glxgears runs at about 700 FPS. Although moving the cursor seems to be a smooth 60 FPS[^2], everything else appears to be capped at 30. This could be a configuration issue, but I don't know enough to figure it out (and cursory googling doesn't reveal anything helpful).
[^2]: The internal display on the MBP is only detected as supporting 60Hz, rather than the full 120 it supports.
Another as-of-yet unsupported feature on Linux is CPU scaling, meaning all the CPU cores run at their full clock speed continuously, consuming all that extra power. I haven't had very much time to use it on battery, but in spite of this, the battery life seems usable (probably no worse than my old Intel MBP).
This has been a fairly pleasant experience. Though, after I finish writing this post, I'll be returning to macOS. A good deal of what I do is macOS-specific, not to mention that I enjoy having audio output.
The work of the Asahi team so far is incredibly impressive. What's more, some of their efforts, such as the m1n1 bootloader, are going towards supporting other operating systems as well as Linux. Maybe I should try [OpenBSD](https://marc.info/?l=openbsd-arm&m=164768992119719&w=2) next...