# PeOS 0.17.0 Technical Alpha

## What's new since 0.16.0

- **Install next to macOS.** The installer no longer has to erase a whole
  disk: it lists the free spaces and partitions of a disk and puts PeOS in
  the one you choose (8 GB at least), leaving everything else as it was.
  On a Mac you make the room in macOS (Disk Utility), install PeOS in it,
  and choose at every start with Option: macOS or PeOS. The partition
  table is read whole, checked, changed only where needed and read back.
  The installed system takes all the room it was given (its XFS grows to
  fill it), and finds its disk by the partition's id, not by its name.
- **NVMe SSDs**, the disks of every recent PC and of VMware's new virtual
  machines, and **the Apple SSD behind the T2 chip** of the MacBook Pro
  2018-2020 (4096-byte sectors, its own queue rules): read, written,
  installed on and booted from. They work with interrupts (MSI-X), never
  by polling.
- **The MacBook Pro 2019's screen on its Intel GPU**, at its native
  2880x1800, from every ISO (a small EFI program first tells the Mac's
  firmware to keep the Intel GPU on).
- **OpenGL for programs, on a real GPU.** PeOS drives the 3D engine of the
  Intel UHD 630 (Gen9): its own address space for every program, work
  queues, interrupts, a reset when the GPU hangs. Mesa's iris driver runs
  on it, with **OpenGL up to 4.5** (compute shaders included). A program
  needs the new "gpu" capability. The 3DTest app (a textured cube at 60
  frames a second) and the port are in the tree, not in the images yet.
- **OpenGL in a virtual machine.** The virtio-gpu's 3D mode (virgl) works:
  in QEMU the host's GPU draws for PeOS. With UTM's QEMU on a Mac and
  macOS's own OpenGL ("Apple Core OpenGL") programs get **OpenGL 4.1**;
  through ANGLE (UTM's default) 2.1.
- **Date and time**: a new tab in Settings (the network's time, the time
  zone, or by hand). A new service, `timed`, sets the clock from the
  network as soon as there is one, then every 6 hours. Calendar, the top
  bar and Settings follow the time zone.
- **Laptops**: the screen's brightness in Settings (and its keys) on the
  MacBook; the **battery** in Starlight's top bar, read from the Mac's SMC
  or ACPI; **Esc** on the MacBooks with a Touch Bar: Fn + the key left of 1.
- **Wi-Fi on an installed MacBook**: the installed system finds the Wi-Fi
  firmware too (in a build of your own that has it: it is still not in the
  published images, see below).
- **Starlight and the apps**: a changed `app.ini` counts at the next start
  of the app, not only after a reboot; the app manager scrolls when there
  are more apps than fit; Voyager opens long files quickly and scrolls
  sideways; the day and night themes have their own backgrounds; the
  segmented controls show the choice at once.
- **Disks**: a FAT32 file rewritten survives the power going off half way;
  exFAT on 4096-byte sectors (what Disk Utility makes on a Mac's SSD); a
  USB stick's data can no longer be overwritten under heavy use; XFS
  writes big files in runs.
- **Wi-Fi on the MacBook** downloads at 62-66 MB/s (11 MB/s before): its
  interrupts, bigger rings, a 5 GHz network preferred, and a bigger TCP
  window in netd.
- **For developers**: the [Starlight App Kit](../starlight-app-kit) 0.17.0
  (SDK 1.16.0, SLUI SDK 1.0.16) has the GPU calls (`peos/gpu.h`: devices,
  buffers, address spaces, queues, virgl resources and command streams),
  the wall clock and time zones (`peos/tz.h`), the screen's light and the
  battery. The C library for ports gained BSD sockets (over netd) and much
  more: OpenSSL 3, FreeType, ENet, Lua, GLFW and Mesa now build for PeOS
  (`userland/ports`). The Rift Ascend client (a MOBA engine that reads the
  game files you own) runs on the installed MacBook; its port is public in
  `peos-rift`.

## About this release

The PeOS meant to be tried by someone who did not build it: boot the ISO in
a virtual machine and you are on the desktop. It is an alpha: the point is
to show what PeOS looks like and how fast it feels, and to let developers
write simple apps for it. Since 0.17.0 it can also live next to macOS on a
MacBook Pro 2019.

## What is in it

- **Starlight**, the desktop (0.21.0, the "Soft UI"): pearl grey surfaces and
  night/neon cards, a dock on the left and an app manager, a top bar with the
  network, volume, battery, clock and what plays, widgets on the desktop
  (clock, calendar, volume, CPU, network), notifications, a day and a night
  theme with four accents and your own colours, resizable windows.
- **Apps**: Pegasus (the browser), Orion (pictures), Orfeus (music),
  Calendar (events and reminders), Monitor (CPU, memory, disk, network,
  processes), Settings, Curiosity (files and disks), Voyager (text editor),
  Calculator, Orbit (terminal), Consigli (tips), Abisso (a game), PeStore
  (apps), the installer and two developer demos.
- **Languages**: English (the default) and Italian, for the system and its
  apps, chosen in Settings > General > Language and applied at once.
- **Live session**: the ISO boots with BIOS and UEFI; everything runs from
  RAM and can be written to while it runs.
- **Network**: DHCP, DNS, TCP and UDP in a userland service (netd), on
  virtio-net, Intel e1000/e1000e and Realtek RTL8169 cards; Wi-Fi on the
  RTL8723BE and the MacBook Pro 2019's BCM4364; TLS and HTTP in libpeos; the
  time from the network (timed).
- **Disks**: AHCI (SATA), NVMe (also Apple's behind the T2), ATA and USB
  storage; XFS (the system), exFAT and FAT32 (sticks and other disks), read
  and written; USB sticks mounted by themselves.
- **Graphics**: the firmware's framebuffer, virtio-gpu in QEMU (also 3D,
  virgl), the Intel GPU of the MacBook Pro 2019 for the screen and for
  OpenGL.
- **Sound**: Intel HD Audio, and the T2 chip's on a MacBook Pro 2019; several
  programs at once; the music service.
- **Pointer**: USB mice and absolute tablets (the pointer follows the host's
  without capture), PS/2 mice, virtio tablets; the trackpad of a MacBook Pro
  with the T2 chip.
- **For developers**: the Starlight App Kit 0.17.0 builds apps on macOS,
  Linux or WSL, and `make serve` + `appget` installs them in a running VM, no
  rebuild of PeOS needed. The API reference is in
  [starlight-app-kit/docs/api-reference.md](../starlight-app-kit/docs/api-reference.md).

## Known limits

- **Pegasus**: Google's search stops on its "unusual traffic" page, and the
  reCAPTCHA check does not open its challenge. No video and no audio on
  pages, no printing; some CSS is not drawn yet (`@container`, `@layer`,
  filters, animations). Big pages with many scripts take seconds under
  emulation. What Pegasus still lacks is listed in
  [docs/pegasus-gaps.md](pegasus-gaps.md).
- **Orfeus**: its library is the `/music` folder, read again at every start
  (a song elsewhere plays when opened from Curiosity); FLAC, MP3
  and WAV (no Ogg Vorbis or AAC yet). Most USB keyboards send the media keys
  as "consumer" controls, which PeOS does not read yet: use Super + ←/→.
- **PeStore**: in the live session apps installed from it are lost at
  shutdown like everything else.
- **Updates**: only an installed PeOS updates (in the live session
  Settings says to download the new ISO). XFS folders with more than about
  500 names (the "node" format) are still read-only for PeOS.
- **Disks**: the Disk manager does not format or partition yet; PeOS does
  not resize partitions (on a Mac, make the room with Disk Utility); NTFS
  and APFS are not read; no virtio-blk.
- **OpenGL**: on the Intel UHD 630 (Gen9) of the MacBook Pro 2019, and in a
  VM with virgl (QEMU or UTM). Other GPUs draw nothing in 3D yet. The
  libraries for OpenGL are not in the images and not in the App Kit yet:
  programs that use it are built in the PeOS tree.
- **The MacBook Pro 2019**: the Touch Bar stays dark (Esc is Fn + the key
  left of 1); without a network the clock starts in 1970 at every boot
  (the T2 resets it; timed corrects it once there is a network); the AMD
  GPU is not used. On other T2 Macs it may work, not tested.
- **Wi-Fi firmware**: the MacBook's BCM4364 firmware is Apple's and is not
  in the published images: it is copied from macOS with
  `tools/fetch_mac_wifi_fw.sh` into a build of your own.
- **Tested in QEMU** (macOS, UEFI and BIOS), in UTM, and on a MacBook Pro
  2019 (live and installed next to macOS). VirtualBox and VMware are not
  tested yet: please report what you find.
- **x86-64 only**, with a CPU that has XSAVE (any Intel Core or AMD Ryzen).
  512 MB of RAM is the minimum, 1 GB is comfortable (more for big pages).
- **The live session is in RAM**: what you change (settings, calendar
  events, files, bookmarks, downloads, installed apps, saved Wi-Fi networks,
  the music queue) is lost when the VM is switched off. The About panel says
  "live session".
- **Network cards**: virtio-net, e1000 (82540EM), e1000e (82574), RTL8169.
  VMware's vmxnet3 is not supported (choose "e1000" or "e1000e"). Wi-Fi on
  the RTL8723BE and on the MacBook Pro 2019 (BCM4364), WPA2 and open
  networks (no WPA3 yet).
- **USB**: xHCI (USB 3) for keyboards, mice, tablets and sticks; USB 2
  (EHCI) only for storage, no USB 1 controllers. In a VM choose a USB 3.0
  controller, or a PS/2 mouse.
- **Audio**: Intel HD Audio, and the T2 chip of the MacBook Pro 2019 (its
  speakers and jack; the volume starts at 10% at every boot, on purpose).
- **Keyboard layouts**: US and Italian.
- **Slow under emulation**: UTM on Apple Silicon emulates the whole x86 CPU;
  PeOS works but frames are slow there.
- **Recovery**: if netd, musicd, diskd, wifid or timed stops, init starts it
  again; Starlight is started again the same way, but the apps that were
  open do not come back on screen.
- **Installing**: the installed disk boots with **UEFI only**. On real
  hardware other than the MacBook Pro 2019 it is possible but not
  guaranteed: keep a backup of the disk you install on.
- Messages of the kernel (in the boot log) and of the terminal are in
  English only.

## Files

| File | |
|---|---|
| `peos-0.17.0.iso` | The live ISO: boot it as a CD in any VM (BIOS or UEFI), or write it to a USB stick. |
| `peos-0.17.0-hdd.img.xz` | A disk image with PeOS installed, for QEMU (UEFI, AHCI). |
| `peos-0.17.0-update.tar.gz` | The update package, signed: what an installed PeOS downloads to update itself. |
| `latest.json`, `latest.json.sig` | What the newest version is, signed: what an installed PeOS reads to know. |
| `SHA256SUMS-0.17.0` | The checksums. |

## Versions

PeOS 0.17.0, Starlight 0.21.0, Starlight App Kit 0.17.0 (SDK 1.16.0, SLUI SDK
1.0.16), Limine 12.9.6. Built from the commit the About panel shows.

## Credits

Pegasus draws text with Outfit, Source Serif 4 and JetBrains Mono (SIL Open
Font License), images with stb_image and NanoSVG, and makes secure
connections with mbedTLS (Apache License 2.0); the list is in Pegasus, at
`pegasus:credits`. Orion decodes pictures with stb_image and NanoSVG. The
MP3 decoder is ours; its Huffman tables and synthesis window are those of
the standard (ISO/IEC 11172-3), taken from minimp3 (public domain, CC0).
PeOS boots with Limine (BSD-2-Clause; its licence and third-party notes are
in `licenses/limine/`). The music that comes with the system was made for
PeOS.
