From d39caf368722b164b2e509e1793e800b4d3df4c0 Mon Sep 17 00:00:00 2001 From: James Reilly Date: Sat, 14 Nov 2026 19:24:21 +0000 Subject: [PATCH 1/2] feat(power): use power-profiles-daemon like Dakota, drop TuneD Dakota (projectbluefin/dakota, gnome-build-meta core-deps) backs GNOME's power-mode switch with power-profiles-daemon and ships neither TuneD, tuned-ppd nor intel-lpmd. Utah now does the same: - install power-profiles-daemon (factory import utah-packages#999) and enable it in the preset, configure-services.sh and the desktop contract. Today tuned-ppd arrives unrequested through gnome-control-center's `Recommends: ppd-service` (it was the only provider); PPD provides and conflicts with ppd-service, so requesting it keeps tuned-ppd out - drop intel-lpmd and its enablement; thermald stays, as on Dakota - remove the TuneD workarounds: the utah-bootc-kargs-off post-loaded profile (PPD has no bootloader plugin, so nothing calls bootc on a profile switch), the /var/log/tuned tmpfiles entry and its test - waive tuned and tuned-ppd in baselines/triage.toml Needs a PACKAGE_IMAGE_SHA bump to a factory publish that carries power-profiles-daemon before the image build resolves it. Assisted-by: Claude Opus via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- baselines/triage.toml | 12 +++---- contracts/bluefin-desktop.toml | 2 +- docs/skills/desktop-contract.md | 2 +- .../references/factory-consumption.md | 18 ++++++---- packages/utah.toml | 20 +++++------ scripts/configure-services.sh | 16 ++------- site/data/packages.json | 4 +-- .../system-preset/85-utah-desktop.preset | 8 +++-- .../shared/usr/lib/tmpfiles.d/utah-tuned.conf | 3 -- .../profiles/utah-bootc-kargs-off/tuned.conf | 22 ------------ tests/test_tuned_bootc_kargs_off.py | 35 ------------------- 11 files changed, 36 insertions(+), 106 deletions(-) delete mode 100644 system_files/shared/usr/lib/tmpfiles.d/utah-tuned.conf delete mode 100644 system_files/shared/usr/lib/tuned/profiles/utah-bootc-kargs-off/tuned.conf delete mode 100644 tests/test_tuned_bootc_kargs_off.py diff --git a/baselines/triage.toml b/baselines/triage.toml index 2708e66c4..87b679c23 100644 --- a/baselines/triage.toml +++ b/baselines/triage.toml @@ -40,16 +40,12 @@ area = "printing" issue = "#263" [package.tuned] -status = "planned" -area = "hardware-power" -issue = "#263" -reason = "Published by the factory (#388) but uninstallable: Requires (rpm-ostree if bootc); bootc is in the image and rpm-ostree is waived and published nowhere (sha256:d3b5bac2)" +status = "waived" +reason = "Dakota, the parity target, ships power-profiles-daemon for power profiles; Utah installs it instead of TuneD" [package.tuned-ppd] -status = "planned" -area = "hardware-power" -issue = "#263" -reason = "Published by the factory (#388) but uninstallable: Requires tuned (see tuned). Bluefin runs tuned-ppd instead of power-profiles-daemon, so the latter is not installed as a stand-in" +status = "waived" +reason = "Dakota, the parity target, ships power-profiles-daemon; tuned-ppd claims the same D-Bus name, so the two never ship together" [package.smartmontools] status = "planned" diff --git a/contracts/bluefin-desktop.toml b/contracts/bluefin-desktop.toml index a366f46f6..777a28363 100644 --- a/contracts/bluefin-desktop.toml +++ b/contracts/bluefin-desktop.toml @@ -357,8 +357,8 @@ enabled = [ "gdm.service", "input-remapper.service", "ModemManager.service", + "power-profiles-daemon.service", "thermald.service", - "intel_lpmd.service", "sysstat.service", "sysstat-collect.timer", "sysstat-summary.timer", diff --git a/docs/skills/desktop-contract.md b/docs/skills/desktop-contract.md index 94f411c15..9797163b1 100644 --- a/docs/skills/desktop-contract.md +++ b/docs/skills/desktop-contract.md @@ -77,7 +77,7 @@ The TOML's sections are the contract's table of contents: `avahi-daemon.socket`, `switcheroo-control.service`, `bluetooth.service`, `ublue-system-setup.service`, `flatpak-preinstall.service`, `flatpak-nuke-fedora.service`, `brew-setup.service`, `dconf-update.service`, `bootc-unified-storage.timer`, - `input-remapper.service`, `ModemManager.service`, `thermald.service`, `intel_lpmd.service`, + `input-remapper.service`, `ModemManager.service`, `power-profiles-daemon.service`, `thermald.service`, `sysstat.service`, `sysstat-collect.timer`, `sysstat-summary.timer`, `projectbluefin-countme.timer`, `cups.socket`, `systemd-boot-update.service`, `uupd.timer`, `bluefin-stats-refresh.timer`, `ublue-firstboot-date.service`, `ublue-booted-image.service`. diff --git a/docs/skills/package-contract/references/factory-consumption.md b/docs/skills/package-contract/references/factory-consumption.md index cee3c28da..84d70203f 100644 --- a/docs/skills/package-contract/references/factory-consumption.md +++ b/docs/skills/package-contract/references/factory-consumption.md @@ -38,18 +38,22 @@ Rules applied while choosing names: `rpcbind`, `autofs`, `brltty`, `dnsmasq`, `saned` or `ipp-usb`. Utah wires `sysstat*` and disables `nfs-client.target` (Hummingbird's own preset enables it): it pulls in `gssproxy.service`, which failed to start in the review VM - (`STATE_DIRECTORY`, Permission denied; cause not diagnosed). `tuned` (Requires `rpm-ostree if bootc`, - and rpm-ostree is waived and unpublished) and `smartmontools` are not - installable, so their units stay unwired. Bluefin ships `tuned-ppd` rather - than `power-profiles-daemon`; never install both. + (`STATE_DIRECTORY`, Permission denied; cause not diagnosed). + `smartmontools` is not installable, so its unit stays unwired. +- Power profiles follow Dakota, not Bluefin: Utah installs and enables + `power-profiles-daemon` and ships no TuneD. Never install `tuned-ppd` + beside it: both claim `org.freedesktop.UPower.PowerProfiles`. TuneD also + called `bootc loader-entries` on every profile switch and hung on the + ostree sysroot lock, which needed a post-loaded profile workaround; PPD has + no bootloader plugin, so that workaround is gone. - A `planned` triage entry for a name Utah now installs closes when `just baselines` refreshes the Utah snapshot; do not hand-edit the generated snapshot. Installed is not working. Package presence says nothing about whether a daemon -starts or does its job: thermald and intel_lpmd stand down on unsupported CPUs, -and tuned-ppd's power-profiles API is only observable from GNOME Settings on -hardware. +starts or does its job: thermald stands down on unsupported CPUs, and +power-profiles-daemon's API is only observable from GNOME Settings (or +`powerprofilesctl`) on hardware. ## Closing baseline gaps diff --git a/packages/utah.toml b/packages/utah.toml index 89edb54d9..d947d317e 100644 --- a/packages/utah.toml +++ b/packages/utah.toml @@ -356,12 +356,13 @@ packages = [ # in Bluefin's [excluded] list. Each name was resolved against the pinned # image by CI's package availability step. # - # Power and thermal policy (#388). Fedora's preset (redhat-systemd-presets - # 90-default.preset, which Bluefin inherits) enables thermald and - # intel_lpmd; the matching enablements are in 85-utah-desktop.preset and + # Power and thermal policy (#388), as Dakota ships it: power-profiles-daemon + # (gnome-build-meta core-deps) backs GNOME's power-profile switch, and + # thermald handles thermal limits. Dakota ships neither TuneD/tuned-ppd nor + # intel-lpmd. The matching enablements are in 85-utah-desktop.preset and # configure-services.sh. + "power-profiles-daemon", "thermald", - "intel-lpmd", "powerstat", # Everyday command-line tools (#392). xdg-utils supplies xdg-open, which # nothing else in the image provides. nano-default-editor sets EDITOR. @@ -502,12 +503,9 @@ packages = [ "papers-nautilus", # # Left out (resolved against sha256:d3b5bac2): - # tuned, tuned-ppd (#388) Requires (rpm-ostree if bootc). bootc is in - # the image, rpm-ostree is waived (Utah updates - # with bootc) and published nowhere. Bluefin - # runs tuned-ppd instead of - # power-profiles-daemon, so the latter is not - # installed as a stand-in. + # tuned, tuned-ppd Dakota runs power-profiles-daemon, which is + # installed above; the two claim the same + # D-Bus name, so never install both. # gstreamer1-plugins-good-qt Qt5 (libQt5Qml, libQt5Quick, # libQt5WaylandClient, libQt5X11Extras); # Bluefin also ships the -qt6 split, which is @@ -886,8 +884,8 @@ parity = [ "gstreamer1-plugin-openh264", "openh264", # Bluefin tools consumed from the pinned factory (#263, #388, #392). + "power-profiles-daemon", "thermald", - "intel-lpmd", "powerstat", "xdg-utils", "rsync", diff --git a/scripts/configure-services.sh b/scripts/configure-services.sh index 2867ea840..ba34ae900 100644 --- a/scripts/configure-services.sh +++ b/scripts/configure-services.sh @@ -176,9 +176,10 @@ fi # root credentials on launch. Enable it next to the desktop units; see #99. enable_unit input-remapper.service enable_unit ModemManager.service -# Thermal management, as Fedora's preset enables it for Bluefin (#388). +# Power profiles and thermal management as Dakota ships them (#388): +# power-profiles-daemon, not TuneD, and no intel_lpmd. +enable_unit power-profiles-daemon.service enable_unit thermald.service -enable_unit intel_lpmd.service # sysstat accounting, as Fedora's preset enables it for Bluefin (#263). # nfs-client.target is turned off: see 85-utah-desktop.preset. disable_unit nfs-client.target @@ -222,17 +223,6 @@ grep -qx 'DeployCollectionID=org.flathub.Stable' /etc/flatpak/remotes.d/flathub. disable_unit flatpak-add-fedora-repos.service -# Keep TuneD off the ostree sysroot lock: its bootloader plugin would run -# `bootc loader-entries set-options-for-source` on every power-profile switch -# and hang behind bootc-unified-storage or an upgrade. The profile explains; -# TuneD merges a post-loaded profile into every profile it applies, including -# the ones tuned-ppd switches to. Written here, after the package transaction, -# because the tuned RPM owns this %config(noreplace) file. -if rpm -q --quiet tuned; then - test -f /usr/lib/tuned/profiles/utah-bootc-kargs-off/tuned.conf - printf '%s\n' utah-bootc-kargs-off > /etc/tuned/post_loaded_profile -fi - # Keep image updates under uupd/bootc rather than the legacy rpm-ostree path. # Mask in /usr/lib as well as /etc so the mask survives cross-vendor /etc 3-way merges # when switching from systems that have bootc-fetch-apply-updates enabled (such as Bluefin). diff --git a/site/data/packages.json b/site/data/packages.json index d5066a86b..70a0783ee 100644 --- a/site/data/packages.json +++ b/site/data/packages.json @@ -1,5 +1,5 @@ { - "generated_at": "2026-10-28", + "generated_at": "2026-11-14", "generator": "scripts/generate-site-data.py", "groups": [ { @@ -200,7 +200,6 @@ "htop", "ibus-gtk4", "intel-gmmlib", - "intel-lpmd", "intel-mediasdk", "intel-vpl-gpu-rt", "ipp-usb", @@ -260,6 +259,7 @@ "plymouth-system-theme", "plymouth-theme-spinner", "poppler-utils", + "power-profiles-daemon", "powerstat", "powertop", "printer-driver-brlaser", diff --git a/system_files/shared/usr/lib/systemd/system-preset/85-utah-desktop.preset b/system_files/shared/usr/lib/systemd/system-preset/85-utah-desktop.preset index 2b7923cdd..65b6e25a3 100644 --- a/system_files/shared/usr/lib/systemd/system-preset/85-utah-desktop.preset +++ b/system_files/shared/usr/lib/systemd/system-preset/85-utah-desktop.preset @@ -36,10 +36,12 @@ enable flatpak-preinstall.service enable flatpak-nuke-fedora.service enable input-remapper.service enable ModemManager.service -# Laptop thermal management (#388). Fedora's 90-default.preset enables both for -# desktops; Hummingbird's 99-default-disable would leave them off. +# Power profiles and thermal management as Dakota ships them (#388): +# power-profiles-daemon backs GNOME's power-mode switch and thermald handles +# thermal limits. Utah ships neither TuneD/tuned-ppd nor intel_lpmd. +# Hummingbird's 99-default-disable would leave both off. +enable power-profiles-daemon.service enable thermald.service -enable intel_lpmd.service # System activity accounting, enabled by Fedora's 90-default.preset for Bluefin # (#263). enable sysstat.service diff --git a/system_files/shared/usr/lib/tmpfiles.d/utah-tuned.conf b/system_files/shared/usr/lib/tmpfiles.d/utah-tuned.conf deleted file mode 100644 index 00d3439c8..000000000 --- a/system_files/shared/usr/lib/tmpfiles.d/utah-tuned.conf +++ /dev/null @@ -1,3 +0,0 @@ -# tuned-ppd logs to /var/log/tuned/tuned-ppd.log. clean-stage removes /var -# from the immutable image, so recreate its writable log directory at boot. -d /var/log/tuned 0755 root root - diff --git a/system_files/shared/usr/lib/tuned/profiles/utah-bootc-kargs-off/tuned.conf b/system_files/shared/usr/lib/tuned/profiles/utah-bootc-kargs-off/tuned.conf deleted file mode 100644 index 0bf7405c1..000000000 --- a/system_files/shared/usr/lib/tuned/profiles/utah-bootc-kargs-off/tuned.conf +++ /dev/null @@ -1,22 +0,0 @@ -# Applied on top of every TuneD profile through /etc/tuned/post_loaded_profile -# (scripts/configure-services.sh writes it). -# -# TuneD 2.28 manages kernel arguments on bootc systems by running -# `bootc loader-entries set-options-for-source --source tuned` from its daemon -# thread on every profile apply, even for a profile with no [bootloader] -# section: it injects an empty bootloader unit just to clear stale arguments. -# That call takes the ostree sysroot lock and waits for it with no timeout. -# bootc-unified-storage.service holds that lock for its whole first-boot image -# pull (and `bootc upgrade` holds it during updates), so a power-profile switch -# from tuned-ppd at login hung TuneD behind the pull until both TuneD and its -# bootc child were killed and dumped core. Bluefin smoke's "No critical journal -# errors at boot" failed on those core dumps on nearly every run. -# -# None of the profiles tuned-ppd maps to (balanced, balanced-battery, -# powersave, throughput-performance) sets kernel arguments, so on Utah the -# bootc call only ever declared an empty set. A unit named [bootloader] in the -# merged profile stops TuneD injecting its own, and enabled=false keeps the -# plugin from loading. Kernel arguments come from bootc kargs.d, not TuneD; -# a profile chosen by hand that sets cmdline= will not apply it. -[bootloader] -enabled=false diff --git a/tests/test_tuned_bootc_kargs_off.py b/tests/test_tuned_bootc_kargs_off.py deleted file mode 100644 index ca239c626..000000000 --- a/tests/test_tuned_bootc_kargs_off.py +++ /dev/null @@ -1,35 +0,0 @@ -"""TuneD must not call bootc on every power-profile switch. - -TuneD 2.28 injects a bootloader unit on bootc systems and runs -`bootc loader-entries set-options-for-source` on every profile apply. That -waits, with no timeout, for the ostree sysroot lock, which -bootc-unified-storage.service holds for its whole first-boot pull. TuneD hung -behind it and was killed with its bootc child (core dumps in smoke-b). -""" -import configparser -from pathlib import Path -import unittest - -ROOT = Path(__file__).resolve().parents[1] -PROFILE = ROOT / "system_files/shared/usr/lib/tuned/profiles/utah-bootc-kargs-off/tuned.conf" - - -class TunedBootcKargsOffTests(unittest.TestCase): - def test_profile_disables_the_bootloader_unit(self): - parser = configparser.ConfigParser(interpolation=None) - parser.read_string(PROFILE.read_text()) - # A [bootloader] unit in the merged profile stops TuneD injecting its - # own; enabled=false keeps the plugin from loading at all. - self.assertEqual(parser.sections(), ["bootloader"]) - self.assertEqual(parser["bootloader"]["enabled"], "false") - - def test_profile_is_post_loaded(self): - script = (ROOT / "scripts/configure-services.sh").read_text() - self.assertIn( - "printf '%s\\n' utah-bootc-kargs-off > /etc/tuned/post_loaded_profile", - script, - ) - - -if __name__ == "__main__": - unittest.main() From 4a722149ece8812a7575217e5cf150005df5c545 Mon Sep 17 00:00:00 2001 From: James Reilly Date: Sat, 14 Nov 2026 19:17:40 +0000 Subject: [PATCH 2/2] feat(services): follow Dakota's service presets Dakota (projectbluefin/dakota, testing) is Utah's parity target. Align the system and user presets with what it ships: - sysstat collection is opt-in. Dakota's elements/bluefin/sysstat.bst writes 80-sysstat.preset disabling sysstat.service, sysstat-collect.timer, sysstat-summary.timer and sysstat-rotate.timer. Utah drops the Fedora-derived enables, presets all four off, disables them in configure-services.sh and holds them in the desktop contract's disabled list. The package stays for on-demand sar/iostat. - colord.service and accounts-daemon.service are enabled, as Dakota inherits them from gnome-build-meta's files/systemd-presets/system-preset/80-gnome.preset. - speech-dispatcher.socket and xdg-desktop-portal-rewrite-launchers.service are globally enabled user units, from gnome-build-meta's user-preset 80-speechd.preset and 80-xdg.preset. Preset, configure-services.sh and contracts/bluefin-desktop.toml are wired for every unit, with tests pinning the agreement; the desktop-contract and factory-consumption skill docs follow. Assisted-by: Claude Opus via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- contracts/bluefin-desktop.toml | 16 +++++-- docs/skills/desktop-contract.md | 10 ++--- .../references/dakota-services.md | 25 +++++++++++ .../references/factory-consumption.md | 7 +++- packages/utah.toml | 6 +-- scripts/configure-services.sh | 19 ++++++--- .../system-preset/85-utah-desktop.preset | 19 ++++++--- .../user-preset/85-utah-desktop.preset | 6 +++ tests/test_desktop_contract.py | 42 +++++++++++++++++++ 9 files changed, 127 insertions(+), 23 deletions(-) create mode 100644 docs/skills/desktop-contract/references/dakota-services.md diff --git a/contracts/bluefin-desktop.toml b/contracts/bluefin-desktop.toml index 777a28363..930b6c609 100644 --- a/contracts/bluefin-desktop.toml +++ b/contracts/bluefin-desktop.toml @@ -355,13 +355,14 @@ enabled = [ "flatpak-nuke-fedora.service", "flatpak-preinstall.service", "gdm.service", + # GNOME's system services: gnome-build-meta's 80-gnome.preset, as Dakota + # ships it. + "colord.service", + "accounts-daemon.service", "input-remapper.service", "ModemManager.service", "power-profiles-daemon.service", "thermald.service", - "sysstat.service", - "sysstat-collect.timer", - "sysstat-summary.timer", "projectbluefin-countme.timer", "switcheroo-control.service", "ublue-system-setup.service", @@ -378,6 +379,9 @@ user_enabled = [ "pipewire-pulse.socket", "wireplumber.service", "xdg-user-dirs.service", + # Dakota parity: gnome-build-meta's user presets (80-speechd, 80-xdg). + "speech-dispatcher.socket", + "xdg-desktop-portal-rewrite-launchers.service", ] masked = [ "bootc-fetch-apply-updates.service", @@ -413,4 +417,10 @@ disabled = [ "httpd.socket", "httpd@.service", "htcacheclean.service", + # sysstat collection is opt-in, as in Dakota (elements/bluefin/sysstat.bst + # writes 80-sysstat.preset disabling all four); sar/iostat work on demand. + "sysstat.service", + "sysstat-collect.timer", + "sysstat-summary.timer", + "sysstat-rotate.timer", ] diff --git a/docs/skills/desktop-contract.md b/docs/skills/desktop-contract.md index 9797163b1..3dba53b45 100644 --- a/docs/skills/desktop-contract.md +++ b/docs/skills/desktop-contract.md @@ -73,14 +73,14 @@ The TOML's sections are the contract's table of contents: hook, and the system-flatpaks Brewfile whose app list the contract enumerates. - **`[media]`** — GStreamer decoders that must load, not merely be installed: `openh264dec`. The factory libav is built on `ffmpeg-free` (no H.264), so `avdec_h264` is not asserted (#1116). -- **`[services]`** — systemd units the preset must enable: `gdm.service`, `avahi-daemon.service`, - `avahi-daemon.socket`, `switcheroo-control.service`, `bluetooth.service`, - `ublue-system-setup.service`, `flatpak-preinstall.service`, `flatpak-nuke-fedora.service`, - `brew-setup.service`, `dconf-update.service`, `bootc-unified-storage.timer`, +- **`[services]`** — systemd units the preset must enable: `gdm.service`, `colord.service`, + `accounts-daemon.service`, `avahi-daemon.service`, `avahi-daemon.socket`, `bluetooth.service`, + `switcheroo-control.service`, `ublue-system-setup.service`, `flatpak-preinstall.service`, + `flatpak-nuke-fedora.service`, `brew-setup.service`, `dconf-update.service`, `bootc-unified-storage.timer`, `input-remapper.service`, `ModemManager.service`, `power-profiles-daemon.service`, `thermald.service`, - `sysstat.service`, `sysstat-collect.timer`, `sysstat-summary.timer`, `projectbluefin-countme.timer`, `cups.socket`, `systemd-boot-update.service`, `uupd.timer`, `bluefin-stats-refresh.timer`, `ublue-firstboot-date.service`, `ublue-booted-image.service`. + [Dakota service presets](desktop-contract/references/dakota-services.md): GNOME units, user units, opt-in sysstat. Update policy delegates background updates to `uupd.timer`; `bootc-fetch-apply-updates.timer` and `bootc-fetch-apply-updates.service` are masked in `/etc` and `/usr/lib` (and disabled in `85-utah-desktop.preset`) so cross-vendor `/etc` 3-way merges (e.g. switching from Bluefin) do not diff --git a/docs/skills/desktop-contract/references/dakota-services.md b/docs/skills/desktop-contract/references/dakota-services.md new file mode 100644 index 000000000..e9d60049f --- /dev/null +++ b/docs/skills/desktop-contract/references/dakota-services.md @@ -0,0 +1,25 @@ +## Dakota service presets + +Utah follows projectbluefin/dakota (`testing`) for these units. Each one is +wired in three places that must agree: `85-utah-desktop.preset` (system or +user), `scripts/configure-services.sh`, and `contracts/bluefin-desktop.toml` +`[services]`. + +- `colord.service` and `accounts-daemon.service` are enabled. Dakota inherits + them from gnome-build-meta's `files/systemd-presets/system-preset/80-gnome.preset`. + They are in `[services].enabled`. +- `speech-dispatcher.socket` and `xdg-desktop-portal-rewrite-launchers.service` + are globally enabled user units, from gnome-build-meta's + `user-preset/80-speechd.preset` and `80-xdg.preset`. They are in the + `configure-services.sh` user loop (guarded by `user_unit_exists`) and in + `[services].user_enabled`. +- sysstat collection is opt-in. Dakota's `elements/bluefin/sysstat.bst` + presets `sysstat.service`, `sysstat-collect.timer`, `sysstat-summary.timer` + and `sysstat-rotate.timer` off; Utah's preset disables all four, + `configure-services.sh` runs `disable_unit` on them, and the contract's + `disabled` list holds them off. The package still ships, so `sar` and + `iostat` work on demand; enable collection with + `systemctl enable --now sysstat.service`. + +`ServiceMaskParityTests` in `tests/test_desktop_contract.py` pins the +three-way agreement for each group. diff --git a/docs/skills/package-contract/references/factory-consumption.md b/docs/skills/package-contract/references/factory-consumption.md index 84d70203f..1db1e1aa6 100644 --- a/docs/skills/package-contract/references/factory-consumption.md +++ b/docs/skills/package-contract/references/factory-consumption.md @@ -35,8 +35,11 @@ Rules applied while choosing names: to read whether a unit is enabled. It enables `thermald.service`, `intel_lpmd.service`, `tuned.service`, `tuned-ppd.service`, `smartd.service`, `nfs-client.target`, `sysstat.service` and its two timers, but not - `rpcbind`, `autofs`, `brltty`, `dnsmasq`, `saned` or `ipp-usb`. Utah wires - `sysstat*` and disables `nfs-client.target` (Hummingbird's own preset enables + `rpcbind`, `autofs`, `brltty`, `dnsmasq`, `saned` or `ipp-usb`. Utah follows + Dakota rather than Fedora on `sysstat*`: collection is opt-in + (`elements/bluefin/sysstat.bst` disables `sysstat.service` and its three + timers), so the preset disables them and the contract's `disabled` list holds + them off. Utah also disables `nfs-client.target` (Hummingbird's own preset enables it): it pulls in `gssproxy.service`, which failed to start in the review VM (`STATE_DIRECTORY`, Permission denied; cause not diagnosed). `smartmontools` is not installable, so its unit stays unwired. diff --git a/packages/utah.toml b/packages/utah.toml index d947d317e..5145ba566 100644 --- a/packages/utah.toml +++ b/packages/utah.toml @@ -466,9 +466,9 @@ packages = [ # (libutempter, libhandy, gssproxy, quota, python3-pillow, python3-cups, # usbutils, net-snmp, libtraceevent/libtracefs, libsrtp, gtksourceview5, # djvulibre, liba52, libmpeg2) are published, so the names they gated resolve. - # sysstat's units are the ones Fedora's preset enables and Utah wires - # (85-utah-desktop.preset, configure-services.sh, desktop contract); - # nfs-client.target is disabled, see 85-utah-desktop.preset. + # sysstat ships for on-demand sar/iostat; its collection units are opt-in + # and preset-disabled, as in Dakota (elements/bluefin/sysstat.bst; see + # 85-utah-desktop.preset). nfs-client.target is disabled there too. "tmux", "powertop", "sysstat", diff --git a/scripts/configure-services.sh b/scripts/configure-services.sh index ba34ae900..065b4dedb 100644 --- a/scripts/configure-services.sh +++ b/scripts/configure-services.sh @@ -65,6 +65,10 @@ enable_unit flatpak-preinstall.service # bluez installed. Enable it next to the other desktop units; see #98. enable_unit gdm.service enable_unit bluetooth.service +# GNOME's system services, from gnome-build-meta's 80-gnome.preset as Dakota +# ships it (files/systemd-presets/system-preset/80-gnome.preset). +enable_unit colord.service +enable_unit accounts-daemon.service # Bluefin defaults for mDNS discovery and hybrid-GPU application launching. enable_unit avahi-daemon.service enable_unit avahi-daemon.socket @@ -180,12 +184,14 @@ enable_unit ModemManager.service # power-profiles-daemon, not TuneD, and no intel_lpmd. enable_unit power-profiles-daemon.service enable_unit thermald.service -# sysstat accounting, as Fedora's preset enables it for Bluefin (#263). # nfs-client.target is turned off: see 85-utah-desktop.preset. disable_unit nfs-client.target -enable_unit sysstat.service -enable_unit sysstat-collect.timer -enable_unit sysstat-summary.timer +# sysstat collection is opt-in, as in Dakota (elements/bluefin/sysstat.bst); +# the package stays for on-demand sar/iostat. See 85-utah-desktop.preset. +disable_unit sysstat.service +disable_unit sysstat-collect.timer +disable_unit sysstat-summary.timer +disable_unit sysstat-rotate.timer # Printing on demand, as Fedora's preset enables it for Bluefin; Hummingbird's # 99-default-disable would leave it off. enable_unit cups.socket @@ -278,9 +284,12 @@ fi # asserts the result (services.user_enabled). # grub-boot-success.timer is deliberately absent: /boot is read-only at runtime # so the mark can never be written (see the user preset, #364). +# speech-dispatcher.socket and xdg-desktop-portal-rewrite-launchers.service +# follow Dakota, which inherits them from gnome-build-meta's user presets. for unit in pipewire.socket pipewire-pulse.socket wireplumber.service \ xdg-user-dirs.service \ - obex.service mpris-proxy.service; do + obex.service mpris-proxy.service \ + speech-dispatcher.socket xdg-desktop-portal-rewrite-launchers.service; do if user_unit_exists "${unit}"; then systemctl --global enable "${unit}" else diff --git a/system_files/shared/usr/lib/systemd/system-preset/85-utah-desktop.preset b/system_files/shared/usr/lib/systemd/system-preset/85-utah-desktop.preset index 65b6e25a3..c7f70c2a0 100644 --- a/system_files/shared/usr/lib/systemd/system-preset/85-utah-desktop.preset +++ b/system_files/shared/usr/lib/systemd/system-preset/85-utah-desktop.preset @@ -2,6 +2,11 @@ # Keep these in /usr/lib so bootc's first-boot preset application sees them. enable gdm.service enable bluetooth.service +# GNOME's system services, as Dakota inherits them from gnome-build-meta's +# files/systemd-presets/system-preset/80-gnome.preset: colour management and +# the AccountsService daemon Settings and GDM use to manage users. +enable colord.service +enable accounts-daemon.service # Match Bluefin discovery and hybrid-GPU defaults. enable avahi-daemon.service enable avahi-daemon.socket @@ -42,11 +47,15 @@ enable ModemManager.service # Hummingbird's 99-default-disable would leave both off. enable power-profiles-daemon.service enable thermald.service -# System activity accounting, enabled by Fedora's 90-default.preset for Bluefin -# (#263). -enable sysstat.service -enable sysstat-collect.timer -enable sysstat-summary.timer +# System activity accounting is opt-in, as in Dakota +# (elements/bluefin/sysstat.bst writes 80-sysstat.preset disabling all four): +# sar/iostat/mpstat/pidstat work on demand without the collectors. Enable with +# `systemctl enable --now sysstat.service`. Listed explicitly, as Dakota does, +# rather than left to Hummingbird's 99-default-disable. +disable sysstat.service +disable sysstat-collect.timer +disable sysstat-summary.timer +disable sysstat-rotate.timer # nfs-client.target is enabled by both Fedora's and Hummingbird's 90-default # preset, and is turned off here on purpose. Installing nfs-common-utils (#263) # made it start gssproxy.service (target -> auth-rpcgss-module.service -> diff --git a/system_files/shared/usr/lib/systemd/user-preset/85-utah-desktop.preset b/system_files/shared/usr/lib/systemd/user-preset/85-utah-desktop.preset index 82c112c2d..bb63e1258 100644 --- a/system_files/shared/usr/lib/systemd/user-preset/85-utah-desktop.preset +++ b/system_files/shared/usr/lib/systemd/user-preset/85-utah-desktop.preset @@ -22,6 +22,12 @@ enable wireplumber.service enable xdg-user-dirs.service enable obex.service enable mpris-proxy.service +# Dakota inherits these from gnome-build-meta's user presets +# (files/systemd-presets/user-preset/80-speechd.preset and 80-xdg.preset): +# socket-activated speech for screen readers, and renaming dynamic-launcher +# autostart entries when an app is renamed. +enable speech-dispatcher.socket +enable xdg-desktop-portal-rewrite-launchers.service # Common installs the ChairLift GUI on login; enable globally at build time too. enable brew-preinstall.service diff --git a/tests/test_desktop_contract.py b/tests/test_desktop_contract.py index 448743f34..c198ec82e 100644 --- a/tests/test_desktop_contract.py +++ b/tests/test_desktop_contract.py @@ -450,6 +450,48 @@ def test_dakota_parity_units_enabled_in_contract_preset_and_script(self): self.assertIn(f"enable_unit {unit}", services) self.assertTrue((ROOT / "system_files/shared/usr/lib/systemd/system" / unit).is_file()) + def test_dakota_gnome_system_units_enabled_in_contract_preset_and_script(self): + # Dakota inherits these from gnome-build-meta's 80-gnome.preset. + contract = tomllib.loads((ROOT / "contracts/bluefin-desktop.toml").read_text()) + preset = (ROOT / "system_files/shared/usr/lib/systemd/system-preset/85-utah-desktop.preset").read_text() + services = (ROOT / "scripts/configure-services.sh").read_text() + for unit in ("colord.service", "accounts-daemon.service"): + with self.subTest(unit=unit): + self.assertIn(unit, contract["services"]["enabled"]) + self.assertIn(f"enable {unit}\n", preset) + self.assertIn(f"enable_unit {unit}\n", services) + + def test_dakota_gnome_user_units_enabled_in_contract_preset_and_script(self): + # Dakota inherits these from gnome-build-meta's user presets. + contract = tomllib.loads((ROOT / "contracts/bluefin-desktop.toml").read_text()) + preset = (ROOT / "system_files/shared/usr/lib/systemd/user-preset/85-utah-desktop.preset").read_text() + services = (ROOT / "scripts/configure-services.sh").read_text() + user_loop = services.split("for unit in pipewire.socket", 1)[1].split("; do", 1)[0] + for unit in ("speech-dispatcher.socket", "xdg-desktop-portal-rewrite-launchers.service"): + with self.subTest(unit=unit): + self.assertIn(unit, contract["services"]["user_enabled"]) + self.assertIn(f"enable {unit}\n", preset) + self.assertIn(unit, user_loop) + + def test_sysstat_collection_is_opt_in_like_dakota(self): + # Dakota's elements/bluefin/sysstat.bst presets all four units off. + contract = tomllib.loads((ROOT / "contracts/bluefin-desktop.toml").read_text()) + preset = (ROOT / "system_files/shared/usr/lib/systemd/system-preset/85-utah-desktop.preset").read_text() + services = (ROOT / "scripts/configure-services.sh").read_text() + for unit in ( + "sysstat.service", + "sysstat-collect.timer", + "sysstat-summary.timer", + "sysstat-rotate.timer", + ): + with self.subTest(unit=unit): + self.assertIn(unit, contract["services"]["disabled"]) + self.assertNotIn(unit, contract["services"]["enabled"]) + self.assertIn(f"disable {unit}\n", preset) + self.assertNotIn(f"enable {unit}\n", preset) + self.assertIn(f"disable_unit {unit}\n", services) + self.assertNotIn(f"enable_unit {unit}\n", services) + def test_dakota_parity_patch_targets_are_required_files(self): contract = tomllib.loads((ROOT / "contracts/bluefin-desktop.toml").read_text()) files = contract["configuration"]["files"]