diff --git a/projects/ArchR/packages/archr/autostart/096-powerled b/projects/ArchR/packages/archr/autostart/096-powerled new file mode 100755 index 0000000000..7beecffd19 --- /dev/null +++ b/projects/ArchR/packages/archr/autostart/096-powerled @@ -0,0 +1,11 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0 +# Copyright (C) 2026-present ArchR (https://github.com/archr-linux/Arch-R) + +# Re-apply the user's POWER LED COLOR choice at boot. ES persists it as +# option_powerled but nothing replayed it, so the LED reverted to the DTS +# default on every boot. +. /etc/profile.d/001-functions + +PWRLED=$(get_setting option_powerled) +[ -n "${PWRLED}" ] && /usr/bin/batocera-gameforce powerLed "${PWRLED}" & diff --git a/projects/ArchR/packages/archr/sources/scripts/archr-resolution b/projects/ArchR/packages/archr/sources/scripts/archr-resolution new file mode 100755 index 0000000000..4a065f1f32 --- /dev/null +++ b/projects/ArchR/packages/archr/sources/scripts/archr-resolution @@ -0,0 +1,17 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0 +# Copyright (C) 2026-present ArchR (https://github.com/archr-linux/Arch-R) +# +# Minimal display-output helper. Only listOutputs is consumed today +# (archr-config lsoutputs); it was missing and logged "command not found" +# on every ES start. Lists connected DRM connectors (DSI-1 on the panels). + +case "$1" in + listOutputs) + for st in /sys/class/drm/card*-*/status; do + [ -f "${st}" ] || continue + [ "$(cat "${st}" 2>/dev/null)" = "connected" ] && basename "$(dirname "${st}")" | sed 's/^card[0-9]*-//' + done + ;; +esac +exit 0 diff --git a/projects/ArchR/packages/archr/sources/scripts/batocera-gameforce b/projects/ArchR/packages/archr/sources/scripts/batocera-gameforce new file mode 100755 index 0000000000..f03b49faac --- /dev/null +++ b/projects/ArchR/packages/archr/sources/scripts/batocera-gameforce @@ -0,0 +1,40 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0 +# Copyright (C) 2026-present ArchR (https://github.com/archr-linux/Arch-R) +# +# Compat backend for the ES "POWER LED COLOR" menu: ApiSystem hardcodes +# `batocera-gameforce powerLed ` (and buttonColorLed for +# the GameForce RGB buttons, which these boards do not have). The script +# did not exist, so the menu silently did nothing on RK3326. +# +# Drives the plain gpio-led power indicator: blue by default; the red LED +# stays owned by powerstate/ledcontrol as the charging indicator. Devices +# can override the LED name via DEVICE_POWER_LED in their quirk profile. + +if [ -z "${DEVICE_POWER_LED}" ] && [ -f /storage/.config/profile.d/001-device_config ]; then + . /storage/.config/profile.d/001-device_config 2>/dev/null +fi + +LEDPATH="/sys/class/leds/${DEVICE_POWER_LED:-blue}" + +case "$1" in + powerLed) + [ -d "${LEDPATH}" ] || exit 0 + case "$2" in + off) + echo none > "${LEDPATH}/trigger" + echo 0 > "${LEDPATH}/brightness" + ;; + on) + echo none > "${LEDPATH}/trigger" + cat "${LEDPATH}/max_brightness" > "${LEDPATH}/brightness" + ;; + heartbeat) + echo heartbeat > "${LEDPATH}/trigger" + ;; + esac + ;; + buttonColorLed) + exit 0 + ;; +esac diff --git a/projects/ArchR/packages/archr/sources/scripts/set-audio b/projects/ArchR/packages/archr/sources/scripts/set-audio new file mode 100755 index 0000000000..aa725eca58 --- /dev/null +++ b/projects/ArchR/packages/archr/sources/scripts/set-audio @@ -0,0 +1,34 @@ +#!/bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (C) 2026-present ArchR (https://github.com/archr-linux/Arch-R) +# +# Backend for the EmulationStation AUDIO OUTPUT menu. ApiSystem hardcodes +# these calls: list, get, set , list-profiles, get-profile, +# set-profile . The script was missing entirely, so the menu was dead +# and every ES start logged "set-audio: command not found". +# +# PipeWire/WirePlumber via wpctl. Card profiles are not exposed on these +# boards: the profile subcommands return nothing and ES hides that row. + +sinks() { + wpctl status 2>/dev/null | sed -n '/Sinks:/,/Sources:/p' +} + +case "$1" in + list) + sinks | grep -oE '[0-9]+\. .*\[vol' | sed -E 's/^[0-9]+\. //; s/ *\[vol$//' | sort -u + ;; + get) + sinks | grep '\*' | grep -oE '[0-9]+\. .*\[vol' | sed -E 's/^[0-9]+\. //; s/ *\[vol$//' | head -1 + ;; + set) + ID=$(sinks | grep -F "$2" | grep -oE '[0-9]+\.' | tr -d '.' | head -1) + [ -n "${ID}" ] && wpctl set-default "${ID}" + ;; + list-profiles|get-profile) + : + ;; + set-profile) + exit 0 + ;; +esac diff --git a/projects/ArchR/packages/ui/emulationstation/package.mk b/projects/ArchR/packages/ui/emulationstation/package.mk index 461c02e8c5..ff13bff6f2 100644 --- a/projects/ArchR/packages/ui/emulationstation/package.mk +++ b/projects/ArchR/packages/ui/emulationstation/package.mk @@ -2,7 +2,7 @@ # Copyright (C) 2026 ArchR (https://github.com/archr-linux/Arch-R) PKG_NAME="emulationstation" -PKG_VERSION="9cdb455f3b1449f3ca49571520e152adefaf6ac3" +PKG_VERSION="ca9587731a81191dd8391b842eb5f38c96515624" PKG_GIT_CLONE_BRANCH="master" PKG_LICENSE="GPL" PKG_SITE="https://github.com/archr-linux/emulationstation-next"