#3013·niri

v25.11 在 FreeBSD 上无法作为独立程序运行

作者: jbeich创建于 2025年12月9日更新于 2026年9月20日
标签area:output

$ rm -rf ~/.config/niri $ niri INFO niri: starting version 25.11 (v25.11-5-g83a733e0) DEBUG niri_config: loaded config from "/home/foo/.config/niri/config.kdl" INFO niri::backend::tty: using as the render node: "/dev/dri/card0" DEBUG niri::backend::tty: adding device: 156 "/dev/dri/card0" DEBUG niri::backend::tty: this is the primary node DEBUG niri::backend::tty: not a primary node, skipping INFO niri: listening on Wayland socket: wayland-2 INFO niri: IPC listening on: /var/run/user/1234/niri.wayland-2.81008.sock WARN niri::utils::xwayland::satellite: error spawning xwayland-satellite at "xwayland-satellite", disabling integration: No such file or directory (os error 2) WARN niri::utils::spawning: error spawning "waybar": Os {code: 2, kind: NotFound, message: "No such file or directory"}

FreeBSD devfs(4) 是动态的,所以 major/minor 数字是随机的

$ ls -lL /dev/dri/ total 0 crw-rw---- 1 root video 0x9c 6 Nov 20:28 card0 crw-rw---- 1 root video 0x130 6 Nov 20:28 renderD128

来自 <sys/types.h> 即 https://GitHub.com/freebsd/freebsd-src/blob/releng/15.0/sys/sys/types.h

$ major() { _d=$1; echo $(( (((_d >> 32) & 0xffffff00) | ((_d >> 8) & 0xff)) )); } $ minor() { _d=$1; echo $(( (((_d >> 24) & 0xff00) | (_d & 0xffff00ff)) )); } $ major 0x9c 0 $ minor 0x9c 156 $ major 0x130 1 $ minor 0x130 48