Hi everyone,
I've been working on **WayPlank**, a modernized Wayland fork of the old Plank dock (GPLv3, GTK3/Cairo/Vala + C). With `v0.7.4` I added a native FreeBSD kernel backend (`hal/BSD/`) instead of relying on `linprocfs` or `/proc`, and tested it live on FreeBSD 15.1 across Labwc, KDE Plasma 6 (Wayland), and GNOME 47 (Wayland).
I'd appreciate feedback from actual FreeBSD desktop users—especially around real hardware edge cases (backlight, Wi-Fi/network, OSS, ZFS ARC reporting) and eventual ports packaging.
### What's native to FreeBSD (`hal/BSD/bsd-kernel-bridge.c`)
All platform-specific code sits behind a small set of OS-agnostic interfaces (`hal/Interfaces/`), sharing the Wayland/Freedesktop layer (`gtk-layer-shell`, KWin/Mutter/wlroots) while replacing the Linux kernel layer completely—zero `/proc` and zero `/sys`:
- **Process & window matching:** `libprocstat(3)` + `sysctl(3)` (`KERN_PROC_ARGS`, `KERN_PROC_PATHNAME`, `KERN_PROC_ENV`, `KERN_PROC_FILEDESC`, child-PID traversal) and `setproctitle(3)`.
- **System monitor docklet:** `kern.cp_time` CPU, **OpenZFS ARC-aware RAM** (`kstat.zfs.misc.arcstats` reclaimable accounting so ZFS cache doesn't make RAM look permanently pegged at 95%), and `libdevstat(3)` disk I/O.
- **Audio:** `wpctl`/`pactl` when PipeWire or PulseAudio is running, with native FreeBSD OSS (`/dev/mixer*` `<sys/soundcard.h>`) fallback.
- **Backlight & power:** `<sys/backlight.h>` + `hw.acpi.video.*`, ACPI battery (`hw.acpi.battery.*`, `hw.acpi.acline`), and `ConsoleKit2` + `acpiconf`/`shutdown` session fallbacks (no systemd required).
- **Network:** `getifaddrs(3)` (`AF_LINK` 64-bit byte counters for live RX/TX), `SIOCGIFMEDIA`, `IEEE80211_IOC_SSID`, and `PF_ROUTE` default gateway lookup.
- **Packaging:** Single standalone ELF binary (`~13 MB`, no `libplank.so`, themes/icons/translations embedded via `GResource`) packaged natively into `/usr/local` via `pkg create` (`./builders/bsd/BuildPkg.sh`).
### Tested compositors on FreeBSD 15.1 (`amd64`)
- **Labwc (wlroots):** native `gtk-layer-shell` + `zwlr_foreign_toplevel_management_v1` C bridge.
- **KDE Plasma 6 (KWin Wayland):** `gtk-layer-shell` + KWin scripting bridge (including live window preview cards).
- **GNOME 47 (Mutter Wayland):** companion Shell extension (testing on FreeBSD 15.1 actually caught a Mutter 47 `xdg_popup` `MetaStack` crash that is now fixed on both FreeBSD and Linux).
### Installing or building locally
- **Repo:** https://github.com/sergiomelas/WayPlank
- **Release `V0.7.4` (includes FreeBSD 15.1 `amd64` `.pkg`):** https://github.com/sergiomelas/WayPlank/releases/tag/V0.7.4
- **FreeBSD backend architecture notes:** https://github.com/sergiomelas/WayPlank/blob/main/Documentation/Architecture/HAL_BSD_BACKEND.md
If you're on FreeBSD 14.x, `aarch64`, or a custom ports tree, building a native local package takes ~2 minutes:
```sh
git clone https://github.com/sergiomelas/WayPlank.git
cd WayPlank
./builders/bsd/BuildPkg.sh
sudo pkg add -f build/bsd/wayplank-0.7.4.pkg
```
Also worth noting: the same codebase builds natively for Linux Wayland and Windows (`7`–`11+`) from the same OS-agnostic core, so if you're curious about the architecture split it's all documented in the repo.
Happy to hear bug reports, hardware quirks on real FreeBSD laptops, or suggestions if anyone wants to help get a proper FreeBSD port (`x11/wayplank`) in shape.
I've been working on **WayPlank**, a modernized Wayland fork of the old Plank dock (GPLv3, GTK3/Cairo/Vala + C). With `v0.7.4` I added a native FreeBSD kernel backend (`hal/BSD/`) instead of relying on `linprocfs` or `/proc`, and tested it live on FreeBSD 15.1 across Labwc, KDE Plasma 6 (Wayland), and GNOME 47 (Wayland).
I'd appreciate feedback from actual FreeBSD desktop users—especially around real hardware edge cases (backlight, Wi-Fi/network, OSS, ZFS ARC reporting) and eventual ports packaging.
### What's native to FreeBSD (`hal/BSD/bsd-kernel-bridge.c`)
All platform-specific code sits behind a small set of OS-agnostic interfaces (`hal/Interfaces/`), sharing the Wayland/Freedesktop layer (`gtk-layer-shell`, KWin/Mutter/wlroots) while replacing the Linux kernel layer completely—zero `/proc` and zero `/sys`:
- **Process & window matching:** `libprocstat(3)` + `sysctl(3)` (`KERN_PROC_ARGS`, `KERN_PROC_PATHNAME`, `KERN_PROC_ENV`, `KERN_PROC_FILEDESC`, child-PID traversal) and `setproctitle(3)`.
- **System monitor docklet:** `kern.cp_time` CPU, **OpenZFS ARC-aware RAM** (`kstat.zfs.misc.arcstats` reclaimable accounting so ZFS cache doesn't make RAM look permanently pegged at 95%), and `libdevstat(3)` disk I/O.
- **Audio:** `wpctl`/`pactl` when PipeWire or PulseAudio is running, with native FreeBSD OSS (`/dev/mixer*` `<sys/soundcard.h>`) fallback.
- **Backlight & power:** `<sys/backlight.h>` + `hw.acpi.video.*`, ACPI battery (`hw.acpi.battery.*`, `hw.acpi.acline`), and `ConsoleKit2` + `acpiconf`/`shutdown` session fallbacks (no systemd required).
- **Network:** `getifaddrs(3)` (`AF_LINK` 64-bit byte counters for live RX/TX), `SIOCGIFMEDIA`, `IEEE80211_IOC_SSID`, and `PF_ROUTE` default gateway lookup.
- **Packaging:** Single standalone ELF binary (`~13 MB`, no `libplank.so`, themes/icons/translations embedded via `GResource`) packaged natively into `/usr/local` via `pkg create` (`./builders/bsd/BuildPkg.sh`).
### Tested compositors on FreeBSD 15.1 (`amd64`)
- **Labwc (wlroots):** native `gtk-layer-shell` + `zwlr_foreign_toplevel_management_v1` C bridge.
- **KDE Plasma 6 (KWin Wayland):** `gtk-layer-shell` + KWin scripting bridge (including live window preview cards).
- **GNOME 47 (Mutter Wayland):** companion Shell extension (testing on FreeBSD 15.1 actually caught a Mutter 47 `xdg_popup` `MetaStack` crash that is now fixed on both FreeBSD and Linux).
### Installing or building locally
- **Repo:** https://github.com/sergiomelas/WayPlank
- **Release `V0.7.4` (includes FreeBSD 15.1 `amd64` `.pkg`):** https://github.com/sergiomelas/WayPlank/releases/tag/V0.7.4
- **FreeBSD backend architecture notes:** https://github.com/sergiomelas/WayPlank/blob/main/Documentation/Architecture/HAL_BSD_BACKEND.md
If you're on FreeBSD 14.x, `aarch64`, or a custom ports tree, building a native local package takes ~2 minutes:
```sh
git clone https://github.com/sergiomelas/WayPlank.git
cd WayPlank
./builders/bsd/BuildPkg.sh
sudo pkg add -f build/bsd/wayplank-0.7.4.pkg
```
Also worth noting: the same codebase builds natively for Linux Wayland and Windows (`7`–`11+`) from the same OS-agnostic core, so if you're curious about the architecture split it's all documented in the repo.
Happy to hear bug reports, hardware quirks on real FreeBSD laptops, or suggestions if anyone wants to help get a proper FreeBSD port (`x11/wayplank`) in shape.