Pooya Parsa
fd204d3130
web: add a Steam app to the Games folder: Valve's native aarch64 client (the Steam Frame's, unsupported elsewhere) as windows of the page through xwl.sh; steam.sh takes the client binary out of the package Valve's linuxarm64 manifest names (SHA-256 checked), makes the ~/.steam links, starts the client again after it updated itself or gave up on its first update, and runs the UI unpinned on fewer than three CPUs; the packages are what the client's binaries need; for games (x86) it puts a script in place of the FEX tool's emulator that leaves them to box64, and adds a compatibility tool that does the same (neither has run a game: box64 0.3.4's 32-bit mode lacks libc functions Steam's library needs)
2026-11-26 00:44:09 +00:00
Pooya Parsa
39cf306b5b
guest, web: show X apps' windows as windows of the page through xwayland-satellite: the Debian image carries Fedora 43's aarch64 build (glibc 2.34 at most; pinned from Koji, taken out of the RPM by tools/rpmfile.py) with libxcb-cursor0 and libfontconfig1 (4.3 MiB more erofs, the same 4 MiB boot prefetch), and wland 0.1.0-261125-0023837 on both sides, whose relay holds X display :1 (:0 is the KMS Xorg's) and starts satellite for the first X client on its scale-1 socket, so X apps that know no DPI come out the right size on HiDPI; Wayland shells get DISPLAY from the relay where Xwayland is installed, and the relay runs with the distro's PATH; the Xwayland wrapper adds -shm without libEGL (rootless Xwayland's glamor aborted in libepoxy); the launcher's xwl.sh runs satellite by default (the image's, else Fedora's RPM fetched once), on the scale-1 socket where there is one, so X11, XPaint and the D3D12 demos are rootless and Xfce alone stays rootful (XWL_ROOTFUL)
2026-11-26 00:16:39 +00:00
Pooya Parsa
235955c313
web: fetch VLC through the page's mirror: the daily build's index and packages from /ppa and the libraries from /ports first, then the upstreams over plain http (Launchpad's https answers half of the requests with 503), with the index checked against the PPA's pinned signing key (sqv); a bundle's file can name a CORS mirror, which getFiles() tries before Wisp
2026-11-25 15:30:46 +00:00
Pooya Parsa
46eb0c8314
web: pin only Terminal and Settings in the Dock by default, on desktops and phones (the launcher's groups, glmark2 and Galculator are no longer pinned); the static first paint's Dock has the two in that order
2026-11-25 15:03:29 +00:00
Pooya Parsa
3f7bb3849b
web: free the Mac's select all and Ctrl-A: on Apple devices the shortcut prefix is ⌘J (it was Ctrl-A and ⌘A), so ⌘A selects all and Ctrl-A always reaches the guest; Ctrl-C in a terminal there sends ^C also with text selected, and keys pressed with ⌘ in the Display window are released when ⌘ comes up (browsers send no keyup for them); elsewhere Ctrl-A in a text field of the page with text in it is select all
2026-11-25 14:28:57 +00:00
Pooya Parsa
9b4b9d0878
web: add Zed to the Tools folder: its own aarch64 build (1.29.3, 82 MiB, SHA-256 checked) fetched in the guest on first run and unpacked as zed.dev/install.sh does (GitHub sends no CORS headers; the page's mirror is asked first), started with --foreground on guest Vulkan, with Zed's own Open and Save As pickers in a new settings file (the guest has no desktop portal)
2026-11-25 14:11:34 +00:00
Pooya Parsa
c78039944a
web: add VLC and mpv to the Media folder: VLC 4 (VideoLAN's daily build with its libraries from Ubuntu, unpacked under ~/.apps/vlc; the page fetches the libraries as an app's bundle, many files at once, pushed in batches) and mpv set up for guest VA-API (--vo=dmabuf-wayland, video-sync=desync, the builtin scripts off)
2026-11-25 13:09:11 +00:00
Pooya Parsa
1f0648d812
va: guest VA-API on the browser's WebCodecs (kwva): a libva driver in the base's kw layer sends each picture over vsock to a VideoDecoder or VideoEncoder on the page (createKernel({ va }), on by default on Debian, ?va=0); it decodes VP9, H.264, AV1 and HEVC (HEVC not yet run in a browser), encodes VP9, reads pictures back as exact NV12, exports surfaces as dmabufs of virtio-gpu resources and draws a decoded VideoFrame into a BGRX surface on the GPU (mpv --hwdec=vaapi --vo=dmabuf-wayland: 1080p H.264 at 30 fps on an M4 Pro)
2026-11-25 13:09:05 +00:00
Pooya Parsa
f6d7a4ee18
web: fx (local model) runs fx with FX_PERMISSION_MODE=full-access (no questions before tool calls; the caller's mode stays) and leaves a thinking model's reasoning on (THINK=0 turns it off)
2026-11-24 22:08:35 +00:00
Pooya Parsa
48f4732df5
web: Ollama and fx (local model) offer the registry's quantized tags (Qwen3 0.6B and 1.7B the defaults, no fp16 entries) and the llama.cpp, Ollama and fx apps drop the hints that quantized models abort
2026-11-24 21:21:48 +00:00
Pooya Parsa
5a4ba76d79
js: export the page's Web Audio sink as createAudioOut() from unkernel/web ( #17 )
...
web/src/audio.ts becomes js/web/audio.ts. It creates no AudioContext
before the page has had a gesture, holds the latest 10 s of what plays
until then (a clip that has ended plays whole, a stream joins live), and
has state, onChange, muted, resume() and close() for a page's control.
test/audio.test.ts runs the worklet and the sink without a browser.
Closes #17
2026-11-24 20:41:32 +00:00
Pooya Parsa
0f4029e7ae
web: hide the Dock and darken the top bar while a window is maximized, and make the Dock a lower full-width bar in compact mode
2026-11-24 19:30:45 +00:00
Pooya Parsa
560dec5336
web: add a resource widget to the desktop, drop the meters' hover popover, and move the photo credit to the page's corner
2026-11-24 18:38:23 +00:00
Pooya Parsa
0da40f0a35
gl: let a WebGL error drop one call instead of putting the guest's context in error ( #27 )
...
virglrenderer builds with -Dcheck-gl-errors=false and patch 0019: a host GL error is logged and counted (stats.glErrors) and the context goes on; GL_OUT_OF_MEMORY stays fatal.
2026-11-24 18:12:50 +00:00
Pooya Parsa
b7479ee19b
web: give apt's status lines their own descriptor in install.sh, so that package scripts keep their stdout ( #26 )
2026-11-24 17:19:49 +00:00
Pooya Parsa
951bb8e5dd
kernel: let kwsnd periods go down to 2 ms, in a buffer of 10 ms or more ( #22 )
...
The shortest period and tick drop from 5 ms to 2 ms for programs that
ask for low latency. A buffer is 10 ms or more as before (two 5 ms
periods), and a late tick still hands over up to 15 ms' worth when ticks
are shorter than 5 ms, so a short period tolerates the same host stall.
Programs that leave the period to alsa-lib, plain aplay, OSS without
SETFRAGMENT and requests of 256 frames or more negotiate what they did;
snd_pcm_set_params() with a latency under 20 ms now gets four periods of
2.5 to 3.75 ms (measured on Node, 2026-11-24).
Co-authored-by: Adam Meghji <566793+adammeghji@users.noreply.github.com >
2026-11-24 16:25:03 +00:00
Pooya Parsa
e615c1a0bf
vk: flush only the mapped ranges a submit can touch and signal fences at submit when nothing is read back (Qwen2.5 0.5B decode overhead 1588 to 41 ms per token without GPU work), a 4 GiB device-only heap apart from the host-visible one (KWVK_HEAP_MB) and maxMemoryAllocationSize from WebGPU's limits, uniform and push-constant blocks WGSL cannot lay out repacked as vec4<u32> words so Firefox and Safari take ggml's rope shaders, division by a constant zero rewritten, validation with WebGPU's capabilities only, the adapter in the device name with the words Ollama reads as Metal, CUDA or ROCm spelled apart (KWVK_DEVICE_NAME); web: Ollama and fx (local model) ask which model (SmolLM2 with a tool template, Qwen2.5 1.5B, Llama 3.2 1B, Qwen3.5 0.8B added), TEMP and THINK options (fx at temperature 0, thinking off), a free-space check before a model download, the server restarted when GPU discovery times out
2026-11-24 14:09:09 +00:00
Pooya Parsa
096c5c559b
web: drop and paste from the host into the guest: files dropped on a Wayland app (wland's drag and drop bridge, its container answering for the WM's windows), on a terminal (into the shell's directory at its prompt, else their paths) or on the page go into the guest, HTML, images and files paste into Wayland apps, and files copied in an app can be downloaded (their paths stay off the host clipboard)
2026-11-24 12:14:34 +00:00
Pooya Parsa
b8952460a7
web: open the dock's group stacks on hover (after the pointer rests on a tile for 500 ms; a click opens and pins at once), as a glass panel with a notch at the tile
2026-11-24 11:38:50 +00:00
Pooya Parsa
4f932073de
web: Ollama and fx (local model) apps on guest Vulkan (Qwen2.5-Coder 0.5B by default, models fetched by curl into Ollama's store), llama.cpp writing without end, downloads from the page's mirror first (llama.cpp, Ollama, its registry, Ubuntu, Ladybird's apt, and claude, node, uv and opencode in the install shim), the Browsers, AI, Desktop, Graphics and Games folders in the default dock, Ladybird's Vulkan hint
2026-11-24 11:34:43 +00:00
Pooya Parsa
17781fa30a
vk: present Wayland windows without copying (wland 0.1.0-261124-3c987e5 external buffers: the ICD names each swapchain image to the compositor and the page resolves it from the WebGPU texture; readback stays the fallback and for X11), track descriptor writes that spill over bindings and read back only the ranges the GPU wrote (device-local and host-visible memory types only), take a read-only marking from a buffer's members in the translator; web: Vulkan in the resource monitor, no guest Vulkan where WebGPU has no adapter, llama.cpp and D3D12 (vkd3d) gears and triangle apps, the Agents folder renamed AI
2026-11-24 10:45:38 +00:00
Pooya Parsa
3538073b0f
Add guest Vulkan on the page's WebGPU (kwvk): a Vulkan 1.2 ICD in the base (vk/icd, libvulkan_kw.so under the stock loader) sends commands over vsock port 1018 to a renderer in the SDK (createKernel({ vk }), js/core/vk*.ts) that implements them on a GPUDevice, with SPIR-V translated to WGSL by naga as wasm (vk/naga); Wayland, X11 and headless presentation by readback; the page's Guest Vulkan option, Environment row and vkcube, vkmark and GTK tiles; checks in test/vk
2026-11-24 07:23:03 +00:00
Pooya Parsa
c08e97791c
Update wland to 0.1.0-261124-100fbf2 on both sides (the npm package and the Debian image's relay): wl_pointer.enter only after a leave, and wl_touch
2026-11-24 01:08:27 +00:00
Pooya Parsa
5ccec07252
web: add a Browsers folder to the launcher with Chromium (moved from Desktop), Firefox (Debian's firefox-esr) and Ladybird (alpha, from its own apt repository)
2026-11-24 00:11:25 +00:00
Pooya Parsa
ae6b37c655
web: improvements
2026-11-23 11:26:46 +00:00
Pooya Parsa
fda0adc839
Credit the GL renderer's and the page's upstreams, and ship their notices in THIRD-PARTY.md: in the npm package, the release assets and the page's /licenses.md
2026-11-23 11:06:46 +00:00
Pooya Parsa
7c5e67d479
web: suggest CPUs in Safari as in Chrome, and two on phones: with the code epoch polled by a plain load Safari runs parallel work 3.3-3.5x on 4 CPUs
2026-11-23 10:57:56 +00:00
Pooya Parsa
8f039c5b05
web: add /smp-probe.html, the SMP probes for an engine (threads, waits, atomics, compiles, GC, the kernel on 1 to 8 CPUs), and build it and /profile.html as pages
2026-11-23 09:01:43 +00:00
Pooya Parsa
b347874391
web: rewrite the page as a desktop
2026-11-22 23:19:14 +00:00
Pooya Parsa
47a0202a64
guest, js: one program for the guest tools, and a Debian boot read from the image's front: kwbox (/usr/bin/kwbox, guest/src/kwbox.c) links kwtty, kw9p, kwvsock, kwshm, kwwasi, kwcmd and vtest-bridge into one static binary, called as kwbox tty|9p|vsock|shm|wasi|cmd|vtest (the per-tool paths are gone but binfmt's interpreter /usr/lib/kw/kwwasi; any other name it is called by is a host command, and kwbox is a reserved command name); /init sends an image or upper whose init still runs /usr/bin/kwtty to the base shell or safe mode; the traced boot that lays out an image is the page's (kwshm, kw.gl=1 kw.wayland=1), so wlandr is in Debian's boot set; HttpBase's background tier waits for the first read of the image before its quiet second (an image opened while its kernel loads fetched it during the boot)
2026-11-22 16:11:20 +00:00
Pooya Parsa
827dfa04d8
web: WebSockets in the guest preview: the service worker puts the shim /vm-ws.js into the HTML documents it relays, whose WebSocket reaches the guest (ws://localhost:<port>, /vm/<id>/<port>/, root-relative paths) through the page over a BroadcastChannel, where websocketOver() (js/core/ws.ts, RFC 6455 over vm.connect()) runs it, with credits, a socket cap and Web Locks for teardown; a preview document's root-relative requests are relayed to its port, so a Vite dev server's client and HMR work
2026-11-22 15:22:51 +00:00
Pooya Parsa
2abdc598e2
guest, kernel: boot faster and carry less in the base: /init looks for the data disk and the distro image on kwblk's disks only (wd*) and the kernel has no RAM disks (CONFIG_BLK_DEV_RAM off: probing brd's 16 took about 130 ms a boot); /init and rc read files with the shell instead of head; DHCP runs in the background (net background, net wait: the console's shell starts before the lease, kwtty serve and Debian's services with start links wait for it); the bundle stores the initrd uncompressed; wlandr moves from the base to the Debian image (wland says so where there is none); the checkout's CLI turns on Node's compile cache before it loads the SDK
2026-11-22 14:46:21 +00:00
Pooya Parsa
ef3486551a
gl: a new renderer after a lost WebGL context, and no renderer for 2D clients: after a loss the guest's next new GL context (or vtest client) builds a fresh renderer, so GL programs started after it work without a page reload (those running at the loss fail every command until restarted; vm.gl.status lost, losses, renewals); a dumb-buffer KMS client's context commands are held and answered without loading the renderer, and reach it before the first command that needs GL; checks for display resize, multisampling, context loss and Chromium's GPU path
2026-11-22 12:17:33 +00:00
Pooya Parsa
c04c59b67b
js, web: a display size change reaches the guest's DRM mode: updateDisplaySize() on a running machine (inline and worker mode) raises virtio-gpu's display event when the fitted size differs from what the driver read, so the guest gets a hotplug with the new preferred mode (64 to 4095 a side, the EDID's pixel clock kept); the page calls it 300 ms after the stage's size last changed; X has no udev to hear the hotplug, so the X demo follows it with xrandr
2026-11-22 12:17:33 +00:00
Pooya Parsa
0c1a561c15
web: the Wayland launcher tiles run their apps plainly (foot, es2gears_wayland): the relay runs from boot and every shell has the session
2026-11-22 11:08:04 +00:00
Pooya Parsa
659ed2685f
web, guest: wland 0.1.0-261122-632f589 (the page's package and the base's relay): its relay has --link-on-demand, so the page's guests start it at boot and GUI apps need no wland prefix, and its core sends seat events to every pointer and keyboard of a client, so Firefox takes input; wland is exempt from pnpm's minimum release age
2026-11-22 10:58:32 +00:00
Pooya Parsa
349572cfaa
web: build the page against a local wland package (KW_WLAND_PKG, into web/.wland-local/output; page-check --output runs against it) without touching node_modules, and an opt-in Firefox case for the Wayland check (page-check --firefox, debian-disk --firefox): firefox-esr takes pointer and keyboard input once wland sends seat events to every pointer and keyboard a client created
2026-11-22 10:16:55 +00:00
Pooya Parsa
d4c9b459f7
js, web: default memory 2 GiB on desktops and Node and 512 MiB on phones, fallback sizes from 1024, 2 and 4 GiB on the page's slider, and a sparse copy of a snapshot on its way to a worker
2026-11-22 09:48:43 +00:00
Pooya Parsa
bcaa48d1d4
web: a Wayland desktop: unmodified Wayland apps in the guest show as windows in the page through wland (npm wland, its relay /usr/lib/kw/wlandr pinned in the base): the page listens on vsock port 1023 and loads wland on the relay's first connection, client buffers are read in place through kwshm, GL clients' dmabufs are shown by virtio-gpu resource without readback (--dmabuf virtgpu, vm.gl.gpu.image()), and the clipboard is bridged; the guest's wland CMD starts the relay and sets the Wayland session (XDG_SESSION_TYPE and the toolkit variables, /etc/profile.d/kw-wayland.sh; Debian's chromium through /etc/chromium.d), and with a relay that has --link-on-demand the page's kw.wayland=1 starts it at boot, so GUI apps need no prefix; launcher tiles foot and GL windows, test/wland/page-check.mjs
2026-11-22 09:39:13 +00:00
Pooya Parsa
40ca8f287d
web: launcher demos for guest GL on Debian: kmscube, glmark2 (glmark2-es2-drm) and X with glamor (start.sh: Xorg on /dev/dri with kw-kms.conf, then glxgears or another client)
2026-11-21 23:32:28 +00:00
Pooya Parsa
c391ff6140
Merge branch 'main' into webgl
2026-11-21 22:58:24 +00:00
Pooya Parsa
84d70b9b83
gl: load the renderer on the guest's first GL use (the device advertises virgl's capsets from fixed sizes; gl.eager, ?glload=eager load before boot) and turn guest GL on by default for Debian in the page, with the virtio-gpu device (?gpu=0: the vtest link only); the kw layer ships /etc/X11/kw-kms.conf (modesetting with glamor on /dev/dri/card0) and sets the vtest variables only without the device; virtio-gpu waits up to 30 s, killably, for a capset; a suspend while a program uses the GPU is refused at once with a message
2026-11-21 22:57:45 +00:00
Pooya Parsa
4d20370925
Give the guest /dev/dri: kwvirtio, a virtio transport over host imports, with the stock virtio_gpu driver (createKernel({ gpu }), --gpu); the SDK's device model shows dumb-buffer scanouts on the host display and, with gl, runs virgl 3D on the page's renderer through virglrenderer's API (patch 13), presents a KMS scanout from the renderer's texture without readback and gives host code a resource's texture (vm.gl.gpu.texture); the kernel leaves out I2C, the HDMI infoframe library, the panel bridge and NET_DEVMEM (four generic switches) and backports the virtio-gpu damage-clip fix
2026-11-21 20:27:49 +00:00
Pooya Parsa
199211ae8f
gl: answer Mesa's busy waits ahead of the GPU (at most one per client, never after a readback of the same resource), mark a query's result pending when the guest asks for it (virglrenderer patch 12), and count parks, readbacks, GL and upload time per frame (vm.gl.stats.renderer, the page's Guest GL row); ?glwait=strict or gl.strictWaits restores vtest's waits
2026-11-21 18:43:31 +00:00
Pooya Parsa
ea9ddc296f
web: offer guest GL (?gl=1, Options, Debian only): the page serves the renderer, passes kw.gl=1 so that the guest's shells use virgl (profile.d/kw-gl.sh), and names the WebGL2 renderer in the Environment tab, warning of a software one; release.yml attaches virgl.mjs and virgl.wasm
2026-11-21 18:12:27 +00:00
Pooya Parsa
fa255306ec
Fetch a distro image's warm set in the background and read ahead for sequential readers: the Debian image lays out what apt and dpkg read after the prompt (guest/distro/debian/warm-files, traced like boot-files, no fragments) right after the boot set, and its distro header (now 136 bytes) names that range, which HttpBase fetches in 4 MiB pieces once the boot is quiet (not with Save-Data); HttpBase streams every range per chunk and, after a miss next to chunks it has, fetches 1 MiB ahead, doubling to 4 MiB while the reader keeps up (readAhead). With 100 ms of added latency apt-cache show bash takes 1.0 s after a quiet prompt (3.3 s typed at once) instead of 8.1 s
2026-11-21 14:32:21 +00:00
Pooya Parsa
8282a0665c
kwemu: a 128K-op tenured ring beside the 320K-op nursery (KW_CPU_SIZE 9 MiB, ABI 3), which holds the compiled code of one run of a Bun-based program so that the next run reuses it; record the 2026-11-20 profiling findings in the agent docs and drop what they contradict
2026-11-21 10:21:45 +00:00
Pooya Parsa
a00216cb23
js: answer chosen plain-http hosts with the host's fetch (fetchRoutes, a NetBackend wrapper with a small HTTP/1.1 server, and routes in the wisp spec); web: route deb.debian.org to a CORS mirror (?routes=0 turns it off)
2026-11-20 21:47:49 +00:00
Pooya Parsa
d68d1ee181
web: save the session and pause the machine when the tab is hidden, and go on in place if the page lived; offer Pause after a cancelled close; suspend and resume without questions, quietly, with terminal windows reattached, a centred card and the state in the tab title
2026-11-20 12:04:45 +00:00
Pooya Parsa
a30598df0c
Park, snapshot and resume the SMP kernel: a rendezvous of every CPU at the consistent point, a restore that starts the other CPUs again and restarts each idle task, the CPU count in the snapshot, and Suspend on the page with several CPUs
2026-11-20 08:27:54 +00:00