fix(desktop): enlarge Settings and align QEMU pointer
Some checks are pending
ci / test (push) Waiting to run

This commit is contained in:
Phoebus 2026-10-01 17:39:22 -07:00
parent 37d4f84601
commit c5b1c34cbc
8 changed files with 75 additions and 25 deletions

View file

@ -5,6 +5,14 @@ this file is the curated, human-readable summary.
## Unreleased — Fast defaults with user-controlled source builds ## Unreleased — Fast defaults with user-controlled source builds
- **Settings size and VM pointer alignment (2026-10-01).** DMS Settings now
opens at 900×700 on new Mango profiles. The interactive QEMU launcher uses
unscaled 2D VirtIO output and an absolute USB tablet by default after both
GTK and SDL VirGL viewers on the host showed image scaling with offset
clicks. VirGL remains available through `--graphics gl`. The existing
disposable VM confirmed the larger Settings window and an aligned click on
its close control; a fresh install is still pending the host space gate.
- **Desktop wallpapers (2026-10-01).** Four original, offline 16:9 wallpapers - **Desktop wallpapers (2026-10-01).** Four original, offline 16:9 wallpapers
now ship with the installer and live desktop: desert dusk, aurora lagoon, now ship with the installer and live desktop: desert dusk, aurora lagoon,
carved stone and misty lake. Installation seeds the current user's carved stone and misty lake. Installation seeds the current user's
@ -16,11 +24,12 @@ this file is the curated, human-readable summary.
and Mesa video targets, and enables their applicable services. Mango gains and Mesa video targets, and enables their applicable services. Mango gains
`wlr-randr`, a corrected low-resolution check, a preferred-mode change `wlr-randr`, a corrected low-resolution check, a preferred-mode change
watcher and the session agents for SPICE/VirtualBox channels. The watcher and the session agents for SPICE/VirtualBox channels. The
interactive QEMU launcher selects VirGL when the host can run it and interactive QEMU launcher can select VirGL when requested and
provides a guest-agent port. The visible playground was restarted with provides a guest-agent port. The visible playground was restarted with
VirGL (`+virgl`) and displayed the desktop. GTK window zoom works; native VirGL (`+virgl`) and displayed the desktop. GTK GL window scaling later
guest resolution change on GTK resize and VMware/VirtualBox sessions remain proved to offset clicks on this host; native guest resolution change on GTK
unverified. A concurrent assistant handshake test now uses the same resize and VMware/VirtualBox sessions remain unverified. A concurrent
assistant handshake test now uses the same
personal-storage environment lock as the state-writing tests, eliminating a personal-storage environment lock as the state-writing tests, eliminating a
full-suite race found during verification. See `docs/VIRTUAL-MACHINES.md`. full-suite race found during verification. See `docs/VIRTUAL-MACHINES.md`.

View file

@ -74,9 +74,10 @@ DISK=/tmp/phoebus/target.qcow2 OVMF_CODE=... OVMF_VARS=... \
python3 installer/tests/vm/serial-driver.py boot python3 installer/tests/vm/serial-driver.py boot
``` ```
`installer/tests/vm/run-vm.sh` launches an interactive VM instead. It selects `installer/tests/vm/run-vm.sh` launches an interactive VM instead. Its default
VirGL automatically when a writable host render node is available; use VirtIO display uses an absolute USB tablet and unscaled GTK output so visible
`--graphics 2d` for compatibility or `--graphics gl` to require acceleration. controls line up with clicks. Use `--graphics gl` to request VirGL acceleration;
some QEMU GL viewers have a cursor offset, so use `--graphics 2d` if that occurs.
Guest package selection and the limits of window resize are described in Guest package selection and the limits of window resize are described in
`docs/VIRTUAL-MACHINES.md`. `docs/VIRTUAL-MACHINES.md`.

View file

@ -3,6 +3,20 @@
Rolling note between work sessions. **Update this file before you finish**, then Rolling note between work sessions. **Update this file before you finish**, then
commit it. It should be short and current; use `git log` for detail. commit it. It should be short and current; use `git log` for detail.
- **Settings and pointer (2026-10-01):** The DMS Settings window was only
about 500×400 because Mango floated it at its minimum size. A specific
900×700 Settings rule was added to the packaged Mango config and checked in
the existing disposable QEMU VM. On this host, both GTK and SDL VirGL viewers
displayed a 1680×1050 guest frame smaller than the viewport while clicks
followed full-size coordinates. The VM was relaunched with 2D VirtIO, GTK
zoom off and a USB tablet; the image filled the window and clicking the
visible Settings close icon closed it. `run-vm.sh` now chooses this reliable
input path by default; `--graphics gl` remains opt-in. The VM is left running
on the existing disposable qcow2 for the user. Rust format, warning-free
Clippy, workspace tests, release and static builds, VM safety tests,
ShellCheck and Python syntax checks pass. A fresh ISO/install could not
be exercised because `make doctor` found 10 GiB free against its 20 GiB gate.
- **Wallpaper defaults (2026-10-01):** Four generated 1672 × 941 JPEGs live - **Wallpaper defaults (2026-10-01):** Four generated 1672 × 941 JPEGs live
in `installer-rs/assets/wallpapers`. The installer embeds and seeds them for in `installer-rs/assets/wallpapers`. The installer embeds and seeds them for
the installation user and future accounts without replacing custom files; the installation user and future accounts without replacing custom files;
@ -23,10 +37,11 @@ commit it. It should be short and current; use `git log` for detail.
relevant units. Gentoo's QEMU agent starts by udev when its port appears, relevant units. Gentoo's QEMU agent starts by udev when its port appears,
so it is not enabled as a static unit. Mango installs `wlr-randr`, fixes its so it is not enabled as a static unit. Mango installs `wlr-randr`, fixes its
low-resolution check, watches changed preferred modes, and starts available low-resolution check, watches changed preferred modes, and starts available
SPICE/VirtualBox session agents. The disposable QEMU launcher selects VirGL SPICE/VirtualBox session agents. The disposable QEMU launcher can select
when the host has a render node and exposes a QEMU guest-agent port. VirGL when explicitly requested and exposes a QEMU guest-agent port.
Portage dependency previews resolved all three package stacks. The current Portage dependency previews resolved all three package stacks. The current
QEMU GTK window zooms on resize without changing the guest preferred mode; QEMU GTK GL window scaled on resize without changing the guest preferred mode
and later showed pointer drift;
VMware/VirtualBox runtime behavior, SPICE window resize and a fresh VMware/VirtualBox runtime behavior, SPICE window resize and a fresh
installed ISO are unverified. Rust format, warning-free Clippy, workspace installed ISO are unverified. Rust format, warning-free Clippy, workspace
tests, release and static builds, VM safety tests, and ShellCheck pass. tests, release and static builds, VM safety tests, and ShellCheck pass.

View file

@ -60,11 +60,20 @@ Virtual-machine integration: QEMU/KVM, VMware and VirtualBox detection,
hypervisor-specific guest packages, Mesa video targets, system services and hypervisor-specific guest packages, Mesa video targets, system services and
Mango display helpers are implemented and unit-tested. The current visible Mango display helpers are implemented and unit-tested. The current visible
QEMU VM booted with `virtio-vga-gl`, logged in, and reported `+virgl`; the QEMU VM booted with `virtio-vga-gl`, logged in, and reported `+virgl`; the
`wlr-randr` package was installed and inspected there. GTK scales the guest `wlr-randr` package was installed and inspected there. On this host the GL
view on host window resize, but guest resolution did not follow that resize. viewer scaled the guest image incorrectly and offset clicks; the 2D VM path
aligned the visible image and pointer. Guest resolution did not follow GTK
window resize in the VirGL run.
VMware and VirtualBox integration is Portage-previewed but **not VM verified**. VMware and VirtualBox integration is Portage-previewed but **not VM verified**.
See `docs/VIRTUAL-MACHINES.md`. See `docs/VIRTUAL-MACHINES.md`.
Desktop usability (2026-10-01): Mango's default DMS Settings rule now opens a
900×700 window; a 2D QEMU playground verified this size and a correctly aligned
click on its close icon. The GTK and SDL VirGL viewers on this host shrank the
rendered image and offset pointer clicks, so the interactive VM launcher now
defaults to unscaled 2D plus a USB tablet. VirGL remains an explicit option.
A fresh install with these defaults is not yet verified.
| Area | Implemented | Unit tested | VM verified | Hardware verified | | Area | Implemented | Unit tested | VM verified | Hardware verified |
|------|-------------|-------------|-------------|-------------------| |------|-------------|-------------|-------------|-------------------|
| Config (TOML + legacy), validation | yes | yes | yes | n/a | | Config (TOML + legacy), validation | yes | yes | yes | n/a |

View file

@ -9,7 +9,7 @@ the host disables it.
| Host | Phoebus install selection | Host graphics setting | Resize path | | Host | Phoebus install selection | Host graphics setting | Resize path |
|---|---|---|---| |---|---|---|---|
| QEMU/KVM | `qemu-guest-agent`, `spice-vdagent`, Mesa `virgl`, `wlr-randr` | VirtIO GPU with VirGL and a GL-capable display; the Phoebus `run-vm.sh` chooses `virtio-vga-gl` automatically when the host has a usable render node | GTK scales the visible guest image to the window. For guest resolution changes, provide a SPICE vdagent channel and a client that sends display configuration (for example virt-viewer). | | QEMU/KVM | `qemu-guest-agent`, `spice-vdagent`, Mesa `virgl`, `wlr-randr` | VirtIO GPU; the interactive launcher defaults to 2D with aligned pointer input and offers VirGL through `--graphics gl` | For guest resolution changes, provide a SPICE vdagent channel and a client that sends display configuration (for example virt-viewer). |
| VMware | `open-vm-tools` with `resolutionkms`, Mesa `vmware`, `wlr-randr` | Enable the VMware accelerated graphics adapter in VM settings | `vmtoolsd` plus the virtual DRM driver's preferred-mode events; Phoebus applies a newly advertised preferred mode in Mango. | | VMware | `open-vm-tools` with `resolutionkms`, Mesa `vmware`, `wlr-randr` | Enable the VMware accelerated graphics adapter in VM settings | `vmtoolsd` plus the virtual DRM driver's preferred-mode events; Phoebus applies a newly advertised preferred mode in Mango. |
| VirtualBox | Guest Additions with `gui`, Mesa `vmware` for the VMSVGA adapter, `wlr-randr` | Select VMSVGA and enable 3D acceleration if the host supports it | Guest Additions service and `VBoxClient-all` in the Mango session; Phoebus also applies a newly advertised preferred mode. | | VirtualBox | Guest Additions with `gui`, Mesa `vmware` for the VMSVGA adapter, `wlr-randr` | Select VMSVGA and enable 3D acceleration if the host supports it | Guest Additions service and `VBoxClient-all` in the Mango session; Phoebus also applies a newly advertised preferred mode. |
@ -19,19 +19,25 @@ If DMS has written an output configuration, Phoebus leaves it alone. The
existing low-VGA boot promotion now checks the `wlr-randr` output correctly. existing low-VGA boot promotion now checks the `wlr-randr` output correctly.
`run-vm.sh --graphics auto` is the default for the disposable interactive `run-vm.sh --graphics auto` is the default for the disposable interactive
QEMU launcher. `--graphics gl` requires VirGL; `--graphics 2d` is an explicit QEMU launcher and chooses the aligned 2D path. `--graphics gl` requires VirGL;
compatibility choice. The launcher uses `virtio-vga` variants so the UEFI and the GL viewers tested here scaled the picture without scaling pointer input,
LUKS prompt remain visible. It also provides a QEMU guest-agent virtio port; causing clicks to drift farther from the cursor toward the lower right. Similar
problems are tracked in QEMU's [GTK](https://gitlab.com/qemu-project/qemu/-/issues/761)
and [SDL](https://gitlab.com/qemu-project/qemu/-/issues/2447) issue reports. The
launcher uses `virtio-vga` variants so the UEFI and LUKS prompt remain visible,
and attaches an absolute USB tablet. It also provides a QEMU guest-agent virtio port;
Gentoo's udev rule starts the otherwise static guest-agent unit when that port Gentoo's udev rule starts the otherwise static guest-agent unit when that port
appears. appears.
## Verification boundary ## Verification boundary
The visible QEMU playground booted and reached Mango + DarkMaterialShell with The visible QEMU playground booted and reached Mango + DarkMaterialShell with
`virtio-vga-gl`; the guest kernel reported `+virgl`. In this VM, GTK window `virtio-vga-gl`; the guest kernel reported `+virgl`. The host's GTK and SDL GL
resizing scaled the guest image, but did not change the guest's advertised viewers both shrank a 1680×1050 guest image and offset clicks. Relaunching the
preferred mode. The QEMU resize watcher therefore cannot claim guest same qcow2 with 2D VirtIO, GTK zoom disabled and an absolute tablet filled the
resolution changes through this GTK setup. The new `wlr-randr` package was window; a click on the visible Settings close icon closed that window. The QEMU
resize watcher cannot claim guest resolution changes through the tested GTK
setup. The new `wlr-randr` package was
installed and its output inspected in this disposable VM. Portage dependency installed and its output inspected in this disposable VM. Portage dependency
previews resolved the QEMU, VMware and VirtualBox package atoms. VMware and previews resolved the QEMU, VMware and VirtualBox package atoms. VMware and
VirtualBox guest sessions, 3D rendering and resize events still require tests VirtualBox guest sessions, 3D rendering and resize events still require tests

View file

@ -1637,6 +1637,7 @@ tagrule=id:9,layout_name:tile
layerrule=noanim:1,layer_name:^dms layerrule=noanim:1,layer_name:^dms
windowrule=isfloating:1,appid:^com.danklinux.dms$ windowrule=isfloating:1,appid:^com.danklinux.dms$
windowrule=width:900,height:700,appid:^com.danklinux.dms$,title:^Settings$
windowrule=isfullscreen:1,title:^Install Phoebus OS$ windowrule=isfullscreen:1,title:^Install Phoebus OS$
# =========================================================================== # ===========================================================================
@ -2984,6 +2985,9 @@ mod tests {
assert!(config.contains("tag,1,0")); assert!(config.contains("tag,1,0"));
assert!(config.contains("setlayout,tile")); assert!(config.contains("setlayout,tile"));
assert!(config.contains("togglefloating,")); assert!(config.contains("togglefloating,"));
assert!(config.contains(
"windowrule=width:900,height:700,appid:^com.danklinux.dms$,title:^Settings$"
));
let (name, entry) = wayland_session_entry(DesktopProfile::Mango).unwrap(); let (name, entry) = wayland_session_entry(DesktopProfile::Mango).unwrap();
assert_eq!(name, "phoebus-mango.desktop"); assert_eq!(name, "phoebus-mango.desktop");

View file

@ -45,7 +45,9 @@ cmd = [
"-drive", f"file={ISO},media=cdrom,readonly=on", "-drive", f"file={ISO},media=cdrom,readonly=on",
"-boot", "order=d", "-boot", "order=d",
"-device", "virtio-vga", "-device", "virtio-vga",
"-display", "gtk,zoom-to-fit=on", "-device", "qemu-xhci",
"-device", "usb-tablet",
"-display", "gtk,zoom-to-fit=off",
"-netdev", "user,id=n0", "-netdev", "user,id=n0",
"-device", "virtio-net-pci,netdev=n0", "-device", "virtio-net-pci,netdev=n0",
"-device", "virtio-rng-pci", "-device", "virtio-rng-pci",

View file

@ -35,7 +35,7 @@ Options:
--mem MiB RAM in MiB (default 4096) --mem MiB RAM in MiB (default 4096)
--cpus N vCPUs (default 4) --cpus N vCPUs (default 4)
--display OPT QEMU display (default gtk; use none for headless) --display OPT QEMU display (default gtk; use none for headless)
--graphics MODE auto (default), gl, or 2d; GTK auto uses VirGL when available --graphics MODE auto (default), gl, or 2d; auto uses aligned 2D input
--disk-boot Boot from the scratch disk instead of the ISO --disk-boot Boot from the scratch disk instead of the ISO
--help Show this help --help Show this help
@ -97,7 +97,10 @@ if [[ ! -f "$DISK" ]]; then
fi fi
VIDEO_DEVICE="virtio-vga" VIDEO_DEVICE="virtio-vga"
if [[ "$DISPLAY_OPT" == gtk* && "$GRAPHICS" != 2d ]]; then if [[ "$DISPLAY_OPT" == gtk* && "$DISPLAY_OPT" != *zoom-to-fit=* ]]; then
DISPLAY_OPT="${DISPLAY_OPT},zoom-to-fit=off"
fi
if [[ "$GRAPHICS" == gl && "$DISPLAY_OPT" == gtk* ]]; then
render_node=false render_node=false
for node in /dev/dri/renderD*; do for node in /dev/dri/renderD*; do
if [[ -r "$node" && -w "$node" ]]; then render_node=true; break; fi if [[ -r "$node" && -w "$node" ]]; then render_node=true; break; fi
@ -113,8 +116,8 @@ if [[ "$DISPLAY_OPT" == gtk* && "$GRAPHICS" != 2d ]]; then
if [[ "$render_node" == true && "$gl_probe" == true ]] \ if [[ "$render_node" == true && "$gl_probe" == true ]] \
&& qemu-system-x86_64 -device help | grep 'name "virtio-vga-gl"' >/dev/null; then && qemu-system-x86_64 -device help | grep 'name "virtio-vga-gl"' >/dev/null; then
VIDEO_DEVICE="virtio-vga-gl" VIDEO_DEVICE="virtio-vga-gl"
DISPLAY_OPT="${DISPLAY_OPT},gl=on,zoom-to-fit=on" DISPLAY_OPT="${DISPLAY_OPT},gl=on"
elif [[ "$GRAPHICS" == gl ]]; then else
echo "error: VirGL requires a writable DRM render node and working host EGL/VirGL" >&2 echo "error: VirGL requires a writable DRM render node and working host EGL/VirGL" >&2
exit 1 exit 1
fi fi
@ -161,6 +164,7 @@ QEMU=(qemu-system-x86_64
-drive file="$DISK",if=virtio,format=qcow2 -drive file="$DISK",if=virtio,format=qcow2
-netdev user,id=n0 -device virtio-net-pci,netdev=n0 -netdev user,id=n0 -device virtio-net-pci,netdev=n0
-device "$VIDEO_DEVICE" -device "$VIDEO_DEVICE"
-device qemu-xhci -device usb-tablet
-chardev socket,id=qga,path="$WORKDIR/qga.sock",server=on,wait=off -chardev socket,id=qga,path="$WORKDIR/qga.sock",server=on,wait=off
-device virtio-serial-pci -device virtio-serial-pci
-device virtserialport,chardev=qga,name=org.qemu.guest_agent.0 -device virtserialport,chardev=qga,name=org.qemu.guest_agent.0