Name: pocketds-userspace Version: 20260507 Release: 20260508092235%{?dist} Summary: AYANEO Pocket DS userspace integration (udev hwdb, InputPlumber, ALSA, /etc/skel) License: GPL-2.0-or-later URL: https://github.com/ROCKNIX/distribution # ── upstream ROCKNIX-derived bits ── Source0: 10-ayaneo.hwdb Source1: 01-ayaneo-controller.yaml Source2: 01-ayaneo-controller-japanese.yaml Source3: ayaneo_mcu_xbox.yaml Source4: ayaneo_mcu_japanese.yaml Source5: 99-namehints.conf # ── pocketds extras (toggle scripts, profiles, helpers) ── Source11: pocketds-toggle-joymouse Source12: pocketds-mode-listener Source13: pocketds-mode-listener.service Source14: pocketds-joymouse.yaml Source18: pocketds-gamepad.yaml Source15: pocketds-touchscreen-map Source16: pocketds-touchscreen-map.desktop # ── system drop-ins / configs ── Source20: 61-pocketds-touchscreens.rules Source21: 50-pocketds-printk.conf Source22: 10-wheel-nopasswd Source23: 10-pocketds-manage-all-devices.conf Source24: 10-pocketds-autologin.conf # ── ALSA UCM (SM8550-APS) ── Source30: SM8550-APS.conf Source31: SM8550-APS-HiFi.conf # ── /etc/skel ── Source40: kwinoutputconfig.json Source41: khotkeysrc # ── /etc/systemd ── Source42: zram-generator.conf # ── /etc/fstab ── # Pocket DS expects FAT LABEL=ROCKNIX mounted at /boot (so dnf kernel # updates land where the ABL reads from) and PARTLABEL=STORAGE listed # for fsck's benefit. See fstab Source for the rationale. Source50: fstab # ── /usr/lib/systemd/system-preset/95-pocketds.preset ── # Replaces the `systemctl enable inputplumber.service` calls in # pocketds.spec %post base, which silently no-op under mkosi's chroot. # See preset file header for the full rationale. Source51: 95-pocketds.preset # ── /etc/skel/.config/monitors.xml + /var/lib/gdm/.config/monitors.xml ── # Mutter equivalent of the KDE kwinoutputconfig.json shipped above # (Source40): vertically-stacked DSI-1 (upper, primary, scale 1.5, # rotated right) + DSI-2 (lower, scale 1.25, rotated right). Without it # mutter auto-arranges the two outputs side-by-side and the user # perceives it as "the touchscreens are inversed" (because the udev # LIBINPUT_OUTPUT_NAME rule routes touch correctly to the logical # output, but the logical output is positioned where the OTHER physical # panel lives). KWin reads JSON so the same file is harmless on KDE # images; we ship it everywhere. Source52: monitors.xml # ── /usr/bin/pocketds-brightness ── # Helper called from pocketds-mode-listener when InputPlumber fires # ui_brightness_{up,down} (BTN_2 / BTN_MODE on the AYANEO MCU). Walks # /sys/class/backlight/* and steps each by ±5%. v1: both Pocket DS # panels move together; focused-screen-only is a v2 (needs KWin # session-bus access from this root-owned helper). Source60: pocketds-brightness # ── /usr/sbin/pocketds-fs-resize + .service ── # First-boot expand of PARTLABEL=STORAGE (the rootfs partition) to fill # the SD/eMMC, then online resize2fs. Triggered on every install via the # /storage/.please_resize_me marker pocketds.spec %post writes; the # service ExecStartPost wipes the marker so subsequent boots are no-ops. Source61: pocketds-fs-resize Source62: pocketds-fs-resize.service # ── KWin script: pin the on-screen keyboard fullscreen to DSI-2 ── # Plasma 6 + qt6-qtvirtualkeyboard renders the OSK on the active output # above the focused text field; on the vertically-stacked Pocket DS # that's wrong when the user is typing on the upper screen and wants # the keyboard below. The script listens on workspace.windowAdded, # matches the OSK by resourceClass / caption, and snaps it to DSI-2 # fullscreen (with re-pinning on geometry changes since KWin's input- # method backend may reposition on each show). Source63: pocketds-osk-bottom.metadata.json Source64: pocketds-osk-bottom.main.js # Auto-enables the script via [Plugins] pocketds-osk-bottomEnabled=true. Source65: etc-xdg-kwinrc # ── Pocket DS fan controller (daemon + AppIndicator) ── # qcs8550-ayaneo-pocket-common.dtsi drops the kernel cooling-maps # that used to bind every cpuss/gpuss trip-point to <&pwm_fan>; # without them the fan sits idle. /usr/sbin/pocketds-fancontrol owns # the PWM in userspace (averages all real thermal zones, applies the # selected profile's curve), and a GTK AyatanaAppIndicator sits in # the system tray for profile selection. Source70: pocketds-fancontrol Source71: pocketds-fancontrol.service Source72: pocketds-fancontrol-indicator Source73: pocketds-fancontrol-indicator.desktop Source74: pocketds-fancontrol-set-profile Source75: org.pocketds.fancontrol.policy Source76: pocketds-fancontrol.profile Source77: pocketds-fancontrol.custom.conf BuildArch: noarch # `%%{_udevhwdbdir}` lives in systemd-rpm-macros; the COPR minimal aarch64 # buildroot doesn't pull it in implicitly, so we ask for it explicitly. BuildRequires: systemd-rpm-macros Requires: systemd-udev Recommends: inputplumber # /usr/sbin/pocketds-fs-resize and pocketds-fs-resize.service used to # live in copr/pocketds-initramfs (the dracut-module RPM). That package # isn't maintained anymore (we boot via the kernel-builtin busybox # initramfs from copr/pocketds-initramfs-busybox now, no dracut module # in play) but the old RPM is still installed on existing rootfs and # claims those file paths. Obsolete it so dnf upgrade does the right # thing in a single transaction. Obsoletes: pocketds-initramfs < 20260507 Provides: pocketds-initramfs = %{version}-%{release} # Python deps for pocketds-mode-listener. Requires: python3-dbus Requires: python3-gobject-base # zram-generator reads /etc/systemd/zram-generator.conf at boot. Requires: zram-generator-defaults # pocketds-fs-resize tools: parted + sgdisk for partition resize, # e2fsprogs (resize2fs) ships with util-linux baseline. Requires: parted Requires: gdisk Requires: e2fsprogs # Fan-control AppIndicator: GTK 3 + AyatanaAppIndicator binding for # the StatusNotifierItem, polkit for the privileged profile setter. # python3-gobject is already pulled in for pocketds-mode-listener. Requires: libayatana-appindicator-gtk3 Requires: gtk3 Requires: polkit %description Device-specific userspace integration for the AYANEO Pocket DS: * /usr/lib/udev/hwdb.d/10-ayaneo.hwdb — volume rocker keysyms * /usr/share/inputplumber/devices/*.yaml — composite gamepad (incl. AYANEO Controller vendor 4001/0428) * /usr/share/inputplumber/capability_maps/*.yaml — MCU button remapping * /usr/share/inputplumber/profiles/pocketds-joymouse.yaml — switchroot-style joymouse * /etc/alsa/conf.d/99-namehints.conf — extended PCM namehints * /usr/share/alsa/ucm2/Qualcomm/sm8550/APS/ — SM8550-APS UCM profile * /etc/skel/.config/{kwinoutputconfig,khotkeysrc} — first-login KWin layout + Meta+G/Meta+M shortcuts * /usr/bin/pocketds-{toggle-joymouse,touchscreen-map,mode-listener} * /etc/systemd/system/inputplumber.service.d/ — ManageAllDevices=true * /usr/lib/systemd/system/pocketds-mode-listener.service * /etc/sysctl.d, /etc/sudoers.d — printk + wheel nopasswd * /etc/fstab — STORAGE / + ROCKNIX /boot %prep # nothing — sources are dropped in directly %build # nothing to build %install # ── udev hwdb + InputPlumber composite + capability_maps ── install -D -m 0644 %{SOURCE0} %{buildroot}%{_udevhwdbdir}/10-ayaneo.hwdb install -d %{buildroot}%{_datadir}/inputplumber/devices install -d %{buildroot}%{_datadir}/inputplumber/capability_maps install -m 0644 %{SOURCE1} %{buildroot}%{_datadir}/inputplumber/devices/01-ayaneo-controller.yaml install -m 0644 %{SOURCE2} %{buildroot}%{_datadir}/inputplumber/devices/01-ayaneo-controller-japanese.yaml install -m 0644 %{SOURCE3} %{buildroot}%{_datadir}/inputplumber/capability_maps/ayaneo_mcu_xbox.yaml install -m 0644 %{SOURCE4} %{buildroot}%{_datadir}/inputplumber/capability_maps/ayaneo_mcu_japanese.yaml install -D -m 0644 %{SOURCE5} %{buildroot}%{_sysconfdir}/alsa/conf.d/99-namehints.conf # ── pocketds toggle scripts + helpers + custom InputPlumber profile ── install -D -m 0755 %{SOURCE11} %{buildroot}%{_bindir}/pocketds-toggle-joymouse install -D -m 0755 %{SOURCE12} %{buildroot}%{_bindir}/pocketds-mode-listener install -D -m 0644 %{SOURCE13} %{buildroot}%{_unitdir}/pocketds-mode-listener.service install -D -m 0644 %{SOURCE14} %{buildroot}%{_datadir}/inputplumber/profiles/pocketds-joymouse.yaml install -D -m 0644 %{SOURCE18} %{buildroot}%{_datadir}/inputplumber/profiles/pocketds-gamepad.yaml install -D -m 0755 %{SOURCE15} %{buildroot}%{_bindir}/pocketds-touchscreen-map install -D -m 0644 %{SOURCE16} %{buildroot}%{_sysconfdir}/xdg/autostart/pocketds-touchscreen-map.desktop # ── system drop-ins ── install -D -m 0644 %{SOURCE20} %{buildroot}%{_sysconfdir}/udev/rules.d/61-pocketds-touchscreens.rules install -D -m 0644 %{SOURCE21} %{buildroot}%{_sysconfdir}/sysctl.d/50-pocketds-printk.conf install -D -m 0440 %{SOURCE22} %{buildroot}%{_sysconfdir}/sudoers.d/10-wheel-nopasswd install -D -m 0644 %{SOURCE23} %{buildroot}%{_sysconfdir}/systemd/system/inputplumber.service.d/10-pocketds-manage-all-devices.conf install -D -m 0644 %{SOURCE24} %{buildroot}%{_sysconfdir}/plasmalogin.conf.d/10-pocketds-autologin.conf # ── ALSA UCM profile for SM8550-APS ── # Pocket DS hardware reports its sound card as 'SM8550-APS'; the # upstream alsa-ucm-conf only ships SM8550-HDK and HDK's mixer-control # layout doesn't match this card (RX_CODEC_DMA_RX_0 absent, # MultiMedia3 routes via VA_CODEC_DMA_TX_0 not TX_3). Ship a # minimal HiFi.conf that uses only controls present on this card # (WSA → MultiMedia2 speaker path with wsa-macro routing) and a # conf.d entry pointing into the new Qualcomm/sm8550/APS dir. install -D -m 0644 %{SOURCE30} %{buildroot}%{_datadir}/alsa/ucm2/Qualcomm/sm8550/APS/SM8550-APS.conf install -D -m 0644 %{SOURCE31} %{buildroot}%{_datadir}/alsa/ucm2/Qualcomm/sm8550/APS/HiFi.conf install -d %{buildroot}%{_datadir}/alsa/ucm2/conf.d/sm8550 ln -sf ../../Qualcomm/sm8550/APS/SM8550-APS.conf \ %{buildroot}%{_datadir}/alsa/ucm2/conf.d/sm8550/SM8550-APS.conf # ── /etc/skel — defaults for every new user ── install -d %{buildroot}%{_sysconfdir}/skel/.config install -m 0644 %{SOURCE40} %{buildroot}%{_sysconfdir}/skel/.config/kwinoutputconfig.json install -m 0644 %{SOURCE41} %{buildroot}%{_sysconfdir}/skel/.config/khotkeysrc # ── /etc/systemd/zram-generator.conf ── # Picked up by zram-generator (zram-generator-defaults rpm) at # boot to allocate /dev/zram0 sized RAM/2. install -D -m 0644 %{SOURCE42} %{buildroot}%{_sysconfdir}/systemd/zram-generator.conf # ── /etc/fstab ── install -D -m 0644 %{SOURCE50} %{buildroot}%{_sysconfdir}/fstab # ── /usr/lib/systemd/system-preset/95-pocketds.preset ── install -D -m 0644 %{SOURCE51} %{buildroot}%{_prefix}/lib/systemd/system-preset/95-pocketds.preset # ── /etc/skel/.config/monitors.xml ── install -D -m 0644 %{SOURCE52} %{buildroot}%{_sysconfdir}/skel/.config/monitors.xml # ── /usr/bin/pocketds-brightness + /usr/sbin/pocketds-fs-resize + unit ── install -D -m 0755 %{SOURCE60} %{buildroot}%{_bindir}/pocketds-brightness install -D -m 0755 %{SOURCE61} %{buildroot}%{_sbindir}/pocketds-fs-resize install -D -m 0644 %{SOURCE62} %{buildroot}%{_unitdir}/pocketds-fs-resize.service # ── KWin OSK-on-bottom script ── install -D -m 0644 %{SOURCE63} %{buildroot}%{_datadir}/kwin/scripts/pocketds-osk-bottom/metadata.json install -D -m 0644 %{SOURCE64} %{buildroot}%{_datadir}/kwin/scripts/pocketds-osk-bottom/contents/code/main.js install -D -m 0644 %{SOURCE65} %{buildroot}%{_sysconfdir}/xdg/kwinrc # ── Pocket DS fan controller (daemon, indicator, polkit, configs) ── install -D -m 0755 %{SOURCE70} %{buildroot}%{_sbindir}/pocketds-fancontrol install -D -m 0644 %{SOURCE71} %{buildroot}%{_unitdir}/pocketds-fancontrol.service install -D -m 0755 %{SOURCE72} %{buildroot}%{_bindir}/pocketds-fancontrol-indicator install -D -m 0644 %{SOURCE73} %{buildroot}%{_sysconfdir}/xdg/autostart/pocketds-fancontrol-indicator.desktop install -D -m 0755 %{SOURCE74} %{buildroot}%{_libexecdir}/pocketds-fancontrol-set-profile install -D -m 0644 %{SOURCE75} %{buildroot}%{_datadir}/polkit-1/actions/org.pocketds.fancontrol.policy # Default profile + sample custom curve land in /etc/pocketds-fancontrol. # Both are %config(noreplace) so user edits survive package upgrades. install -D -m 0644 %{SOURCE76} %{buildroot}%{_sysconfdir}/pocketds-fancontrol/profile install -D -m 0644 %{SOURCE77} %{buildroot}%{_sysconfdir}/pocketds-fancontrol/custom.conf %files # upstream-derived bits %{_udevhwdbdir}/10-ayaneo.hwdb %{_datadir}/inputplumber/devices/01-ayaneo-controller.yaml %{_datadir}/inputplumber/devices/01-ayaneo-controller-japanese.yaml %{_datadir}/inputplumber/capability_maps/ayaneo_mcu_xbox.yaml %{_datadir}/inputplumber/capability_maps/ayaneo_mcu_japanese.yaml %config(noreplace) %{_sysconfdir}/alsa/conf.d/99-namehints.conf # pocketds toggle scripts + helpers + custom InputPlumber profile + doc %{_bindir}/pocketds-toggle-joymouse %{_bindir}/pocketds-mode-listener %{_unitdir}/pocketds-mode-listener.service %{_datadir}/inputplumber/profiles/pocketds-joymouse.yaml %{_datadir}/inputplumber/profiles/pocketds-gamepad.yaml %{_bindir}/pocketds-touchscreen-map %{_sysconfdir}/xdg/autostart/pocketds-touchscreen-map.desktop # system drop-ins %{_sysconfdir}/udev/rules.d/61-pocketds-touchscreens.rules %{_sysconfdir}/sysctl.d/50-pocketds-printk.conf %{_sysconfdir}/sudoers.d/10-wheel-nopasswd %{_sysconfdir}/systemd/system/inputplumber.service.d/10-pocketds-manage-all-devices.conf %config(noreplace) %{_sysconfdir}/plasmalogin.conf.d/10-pocketds-autologin.conf # ALSA UCM profile %{_datadir}/alsa/ucm2/Qualcomm/sm8550/APS/SM8550-APS.conf %{_datadir}/alsa/ucm2/Qualcomm/sm8550/APS/HiFi.conf %{_datadir}/alsa/ucm2/conf.d/sm8550/SM8550-APS.conf # /etc/skel %{_sysconfdir}/skel/.config/kwinoutputconfig.json %{_sysconfdir}/skel/.config/khotkeysrc # /etc/systemd/zram-generator.conf — see install comment %config(noreplace) %{_sysconfdir}/systemd/zram-generator.conf # /etc/fstab %config(noreplace) %{_sysconfdir}/fstab # systemd preset %{_prefix}/lib/systemd/system-preset/95-pocketds.preset # /etc/skel monitors.xml %{_sysconfdir}/skel/.config/monitors.xml # brightness helper + fs-resize helpers %{_bindir}/pocketds-brightness %{_sbindir}/pocketds-fs-resize %{_unitdir}/pocketds-fs-resize.service # KWin OSK-on-bottom script + system kwinrc to enable it %dir %{_datadir}/kwin/scripts/pocketds-osk-bottom %dir %{_datadir}/kwin/scripts/pocketds-osk-bottom/contents %dir %{_datadir}/kwin/scripts/pocketds-osk-bottom/contents/code %{_datadir}/kwin/scripts/pocketds-osk-bottom/metadata.json %{_datadir}/kwin/scripts/pocketds-osk-bottom/contents/code/main.js %config(noreplace) %{_sysconfdir}/xdg/kwinrc # Fan controller (daemon + AppIndicator + polkit + configs) %{_sbindir}/pocketds-fancontrol %{_unitdir}/pocketds-fancontrol.service %{_bindir}/pocketds-fancontrol-indicator %{_sysconfdir}/xdg/autostart/pocketds-fancontrol-indicator.desktop %{_libexecdir}/pocketds-fancontrol-set-profile %{_datadir}/polkit-1/actions/org.pocketds.fancontrol.policy %dir %{_sysconfdir}/pocketds-fancontrol %config(noreplace) %{_sysconfdir}/pocketds-fancontrol/profile %config(noreplace) %{_sysconfdir}/pocketds-fancontrol/custom.conf %post # pocketds-mode-listener.service is shipped by this package; preset # apply for it goes through %%systemd_post. (The bare `%%{?systemd_post}` # no-arg form errors on f44+: "%%systemd_post macro requires some # arguments".) inputplumber.service is owned by inputplumber.rpm; its # own %%systemd_post handles preset for it. %systemd_post pocketds-mode-listener.service pocketds-fancontrol.service /usr/bin/systemd-hwdb update >/dev/null 2>&1 || : # Direct multi-user.target.wants/ symlink for InputPlumber + the mode # listener. We already ship 95-pocketds.preset that should enable both, # but mkosi's chroot install order has inputplumber.spec %%systemd_post # running BEFORE our preset file lands -- so the preset apply at install # time sees the default (disable) policy and the wants/ symlinks never # get written. Doing the symlink directly here is idempotent (-sf), works # regardless of whether systemd PID 1 is running, and survives upgrades # (won't recreate the symlink if it's already there). mkdir -p /etc/systemd/system/multi-user.target.wants for unit in inputplumber.service pocketds-mode-listener.service \ pocketds-fs-resize.service pocketds-fancontrol.service; do if [ -f "/usr/lib/systemd/system/$unit" ] && \ [ ! -L "/etc/systemd/system/multi-user.target.wants/$unit" ]; then /usr/bin/ln -sf "/usr/lib/systemd/system/$unit" \ "/etc/systemd/system/multi-user.target.wants/$unit" fi done # Mutter: drop monitors.xml under the GDM greeter's $HOME so the greeter # uses the same vertically-stacked DSI-1/DSI-2 layout as user sessions. # Conditional on /var/lib/gdm existing (provided by gdm rpm; absent on # KDE-only images, where this is a no-op). if [ -d /var/lib/gdm ]; then /usr/bin/install -d -m 0700 -o gdm -g gdm /var/lib/gdm/.config 2>/dev/null || \ /usr/bin/install -d -m 0755 /var/lib/gdm/.config /usr/bin/install -m 0644 \ /etc/skel/.config/monitors.xml \ /var/lib/gdm/.config/monitors.xml 2>/dev/null || : /usr/bin/chown -R gdm:gdm /var/lib/gdm/.config 2>/dev/null || : fi %preun %systemd_preun pocketds-mode-listener.service pocketds-fancontrol.service %postun %systemd_postun_with_restart pocketds-mode-listener.service pocketds-fancontrol.service if [ $1 -eq 0 ]; then /usr/bin/systemd-hwdb update >/dev/null 2>&1 || : fi %changelog * Wed May 06 2026 Pocket DS Maintainers - %{version}-%{release} - Release auto-stamped from build_timestamp; full history in git log