mirror of
https://github.com/archr-linux/Arch-R.git
synced 2026-07-12 18:19:42 -07:00
Update Mesa to version 26.0.5 and adjust related dependencies
- Bump Mesa version from 26.0.3 to 26.0.5 with updated SHA256 checksum. - Modify RK3326 device tree to increase regulator max voltage for ARM. - Update OPP settings in RK3326 DTS patch for improved performance. - Add Python3 and xz to PortMaster dependencies. - Enhance PortMaster startup script for better directory handling and cleanup. - Implement HDMI resolution check with timeout in autostart script. - Add turbo mode configuration to system settings. - Refactor CPU frequency functions to utilize available frequencies more effectively. - Update Dolphin emulator scripts to improve gptokeyb process handling. - Introduce new systemd configuration for timesyncd to optimize polling intervals. - Set uinput permissions in udev rules for better controller input handling. - Adjust emulator package.mk to optimize performance for RK3326. - Modify mkimage script to ensure proper FAT32 formatting and filesystem checks. - Enhance benchmark script to auto-detect device-specific paths and improve logging.
This commit is contained in:
@@ -261,7 +261,7 @@
|
||||
vdd_arm: DCDC_REG2 {
|
||||
regulator-name = "vdd_arm";
|
||||
regulator-min-microvolt = <950000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
regulator-max-microvolt = <1450000>;
|
||||
regulator-ramp-delay = <6001>;
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
|
||||
@@ -35,9 +35,10 @@
|
||||
};
|
||||
- opp-1296000000 {
|
||||
- opp-hz = /bits/ 64 <1296000000>;
|
||||
- opp-microvolt = <1350000 1350000 1350000>;
|
||||
+ opp-1512000000 {
|
||||
+ opp-hz = /bits/ 64 <1512000000>;
|
||||
opp-microvolt = <1350000 1350000 1350000>;
|
||||
+ opp-microvolt = <1400000 1400000 1400000>;
|
||||
clock-latency-ns = <40000>;
|
||||
+ turbo-mode;
|
||||
};
|
||||
|
||||
@@ -7,7 +7,7 @@ PKG_ARCH="arm aarch64"
|
||||
PKG_LICENSE="MIT"
|
||||
PKG_SITE="https://github.com/PortsMaster/PortMaster-GUI"
|
||||
PKG_URL="https://github.com/PortsMaster/PortMaster-GUI/releases/download/${PKG_VERSION}/PortMaster.zip"
|
||||
PKG_DEPENDS_TARGET="toolchain archr-hotkey gamecontrollerdb oga_controls control-gen xmlstarlet list-guid gst-plugins-base"
|
||||
PKG_DEPENDS_TARGET="toolchain archr-hotkey gamecontrollerdb oga_controls control-gen xmlstarlet list-guid gst-plugins-base Python3 xz"
|
||||
PKG_LONGDESC="Portmaster - a simple tool that allows you to download various game ports"
|
||||
PKG_TOOLCHAIN="manual"
|
||||
|
||||
|
||||
@@ -23,12 +23,12 @@ chmod +x /storage/.config/PortMaster/mapper.txt
|
||||
|
||||
|
||||
#Use our gamecontrollerdb.txt
|
||||
rm -r gamecontrollerdb.txt
|
||||
rm -rf gamecontrollerdb.txt
|
||||
ln -sf /usr/config/SDL-GameControllerDB/gamecontrollerdb.txt gamecontrollerdb.txt
|
||||
|
||||
#Delete old PortMaster fold first (we can probably remove this later)
|
||||
if [ ! -f "/storage/roms/ports/PortMaster/pugwash" ]; then
|
||||
rm -r /storage/roms/ports/PortMaster
|
||||
if [ -d "/storage/roms/ports/PortMaster" ] && [ ! -f "/storage/roms/ports/PortMaster/pugwash" ]; then
|
||||
rm -rf /storage/roms/ports/PortMaster
|
||||
fi
|
||||
|
||||
#Make sure roms/ports/PortMaster folder exists
|
||||
@@ -38,13 +38,11 @@ if [ ! -d "/storage/roms/ports/PortMaster" ]; then
|
||||
fi
|
||||
|
||||
#We dont use tasksetter, delete it
|
||||
if [ -f /storage/roms/ports/PortMaster/tasksetter ]; then
|
||||
rm -r /storage/roms/ports/PortMaster/tasksetter
|
||||
fi
|
||||
rm -rf /storage/roms/ports/PortMaster/tasksetter
|
||||
|
||||
#Use PortMasters gptokeyb
|
||||
rm gptokeyb
|
||||
cp /storage/roms/ports/PortMaster/gptokeyb gptokeyb
|
||||
rm -f gptokeyb
|
||||
[ -x /storage/roms/ports/PortMaster/gptokeyb ] && cp /storage/roms/ports/PortMaster/gptokeyb gptokeyb
|
||||
|
||||
#Copy over required files for ports
|
||||
cp /storage/.config/PortMaster/control.txt /storage/roms/ports/PortMaster/control.txt
|
||||
|
||||
@@ -7,12 +7,19 @@
|
||||
# The purpose of this script is to permanently set the resolution
|
||||
# output for hdmi when connected.
|
||||
|
||||
xres="$(cat /sys/class/graphics/fb0/modes | grep -o -P '(?<=:).*(?=p-)' | cut -dx -f1)"
|
||||
# /sys/class/graphics/fb0/modes may not be populated yet if DRM is still
|
||||
# probing. Default to 0 so the comparison below falls through cleanly
|
||||
# instead of breaking arithmetic.
|
||||
xres="$(cat /sys/class/graphics/fb0/modes 2>/dev/null | grep -o -P '(?<=:).*(?=p-)' | cut -dx -f1)"
|
||||
[ -z "${xres}" ] && xres=0
|
||||
|
||||
# drm_tool source available at https://github.com/christianhaitian/drm_tool.git
|
||||
|
||||
mode="$(/usr/bin/drm_tool list | awk '/1280x720.*60/ {print substr($2,1,length($2)-1); exit}')"
|
||||
mode2="$(/usr/bin/drm_tool list | awk '/1920x1080.*60/ {print substr($2,1,length($2)-1); exit}')"
|
||||
# Wrap with a timeout: drm_tool can block on the DRM master if
|
||||
# rockchipdrm is still binding, which on a slow microSD has been
|
||||
# observed to hang this autostart script and (via Before=emustation)
|
||||
# the entire boot.
|
||||
mode="$(timeout 10 /usr/bin/drm_tool list 2>/dev/null | awk '/1280x720.*60/ {print substr($2,1,length($2)-1); exit}')"
|
||||
mode2="$(timeout 10 /usr/bin/drm_tool list 2>/dev/null | awk '/1920x1080.*60/ {print substr($2,1,length($2)-1); exit}')"
|
||||
|
||||
# Now we tell drm what the hdmi mode is by writing to /var/run/drmMode
|
||||
# This will get picked up by SDL2 as long as it's been patched with the batocera
|
||||
|
||||
@@ -181,6 +181,7 @@ system.battery.warning=0
|
||||
system.battery.warning_threshold=25
|
||||
system.hostname=@DEVICENAME@
|
||||
system.language=en_US
|
||||
enable.turbo-mode=0
|
||||
system.cpugovernor=ondemand
|
||||
system.loglevel=none
|
||||
system.merged.storage=0
|
||||
|
||||
@@ -66,20 +66,24 @@ set_cpu_boost() {
|
||||
esac
|
||||
}
|
||||
|
||||
# Pin CPU max_freq across all policies to the highest available OPP
|
||||
# (boost included if cpufreq/boost=1 was already toggled). Mirrors the
|
||||
# GPU helper above. ROCKNIX achieves the same effect by trimming the DT
|
||||
# ladder; we keep the full ladder for idle and force the ceiling up at
|
||||
# runtime.
|
||||
# Pin CPU max_freq across all policies to the highest available OPP.
|
||||
# Turbo OPPs (DT `turbo-mode`) live in scaling_boost_frequencies, NOT in
|
||||
# scaling_available_frequencies, even after cpufreq/boost=1. Combine
|
||||
# both so "highest" really hits 1512 MHz on RK3326 when the user's
|
||||
# turbo switch is on, and naturally falls back to 1416 when off (boost
|
||||
# file then reports an empty list).
|
||||
set_cpu_max_freq() {
|
||||
for POLICY in /sys/devices/system/cpu/cpufreq/policy[0-9]*; do
|
||||
[ -e "${POLICY}/scaling_max_freq" ] || continue
|
||||
[ -e "${POLICY}/cpuinfo_max_freq" ] || continue
|
||||
[ -e "${POLICY}/scaling_available_frequencies" ] || continue
|
||||
|
||||
local target=""
|
||||
case ${1} in
|
||||
highest)
|
||||
target=$(cat "${POLICY}/cpuinfo_max_freq")
|
||||
target=$( {
|
||||
cat "${POLICY}/scaling_available_frequencies" 2>/dev/null
|
||||
cat "${POLICY}/scaling_boost_frequencies" 2>/dev/null
|
||||
} | tr ' ' '\n' | grep -E '^[0-9]+$' | sort -n | tail -n1)
|
||||
;;
|
||||
*)
|
||||
target=${1}
|
||||
@@ -93,15 +97,18 @@ set_cpu_max_freq() {
|
||||
set_cpu_min_freq() {
|
||||
for POLICY in /sys/devices/system/cpu/cpufreq/policy[0-9]*; do
|
||||
[ -e "${POLICY}/scaling_min_freq" ] || continue
|
||||
[ -e "${POLICY}/cpuinfo_min_freq" ] || continue
|
||||
[ -e "${POLICY}/scaling_available_frequencies" ] || continue
|
||||
|
||||
local target=""
|
||||
case ${1} in
|
||||
highest)
|
||||
target=$(cat "${POLICY}/cpuinfo_max_freq")
|
||||
target=$( {
|
||||
cat "${POLICY}/scaling_available_frequencies" 2>/dev/null
|
||||
cat "${POLICY}/scaling_boost_frequencies" 2>/dev/null
|
||||
} | tr ' ' '\n' | grep -E '^[0-9]+$' | sort -n | tail -n1)
|
||||
;;
|
||||
lowest)
|
||||
target=$(cat "${POLICY}/cpuinfo_min_freq")
|
||||
target=$(tr ' ' '\n' <"${POLICY}/scaling_available_frequencies" | grep -E '^[0-9]+$' | sort -n | head -n1)
|
||||
;;
|
||||
*)
|
||||
target=${1}
|
||||
@@ -176,11 +183,13 @@ restore_cpu_boost() {
|
||||
}
|
||||
|
||||
performance() {
|
||||
# Force boost ON regardless of the user setting during gameplay so the
|
||||
# 1512 MHz OPP is reachable. RK3326's BSP-marked turbo OPP is otherwise
|
||||
# locked behind cpufreq/boost. ondemand/schedutil paths restore the
|
||||
# user preference.
|
||||
set_cpu_boost on
|
||||
# Honor the user's "Enable CPU Overclock" switch from ES even during
|
||||
# gameplay: gameplay shouldn't silently enable turbo behind the user's
|
||||
# back. If they want the 1512 MHz OPP, they toggle it on; if they
|
||||
# prefer to stay at 1416 MHz for thermals/battery, gameplay respects
|
||||
# that. set_cpu_max_freq highest then pins to the highest currently
|
||||
# available frequency (1512 if boost on, 1416 if off).
|
||||
restore_cpu_boost
|
||||
set_cpu_gov performance
|
||||
set_cpu_max_freq highest
|
||||
set_dmc_gov performance
|
||||
|
||||
@@ -426,4 +426,5 @@ fi
|
||||
# Run Dolphin emulator
|
||||
${GPTOKEYB} ${DOLPHIN_CORE} xbox360 &
|
||||
${EMUPERF} /usr/bin/${DOLPHIN_CORE} ${CMD} -e "${1}"
|
||||
kill -9 "$(pidof gptokeyb)"
|
||||
_gptokeyb_pid="$(pidof gptokeyb 2>/dev/null)"
|
||||
[ -n "${_gptokeyb_pid}" ] && kill -9 ${_gptokeyb_pid}
|
||||
|
||||
+2
-1
@@ -396,4 +396,5 @@ fi
|
||||
# Run Dolphin emulator
|
||||
${GPTOKEYB} ${DOLPHIN_CORE} xbox360 &
|
||||
${EMUPERF} /usr/bin/${DOLPHIN_CORE} ${CMD} -e "${1}"
|
||||
kill -9 "$(pidof gptokeyb)"
|
||||
_gptokeyb_pid="$(pidof gptokeyb 2>/dev/null)"
|
||||
[ -n "${_gptokeyb_pid}" ] && kill -9 ${_gptokeyb_pid}
|
||||
|
||||
@@ -98,4 +98,5 @@ export LD_PRELOAD="/usr/lib/libdrastouch.so"
|
||||
export SDL_TOUCH_MOUSE_EVENTS="0"
|
||||
export DSHOOK_MIC_THRESH="${MICTHRESH}"
|
||||
./drastic "$1"
|
||||
kill -9 $(pidof gptokeyb)
|
||||
_gptokeyb_pid="$(pidof gptokeyb 2>/dev/null)"
|
||||
[ -n "${_gptokeyb_pid}" ] && kill -9 ${_gptokeyb_pid}
|
||||
|
||||
@@ -146,8 +146,14 @@ fi
|
||||
# Panfrost optimization for Mali-G31
|
||||
export PAN_MESA_DEBUG=forcepack
|
||||
export MESA_NO_ERROR=1
|
||||
# Mesa GL command thread: Flycast already runs GL in a worker thread
|
||||
# (rend.ThreadedRendering=1) and is GPU-bound on RK3326. Marshalling GL
|
||||
# calls into Mesa's own thread amortises the per-call dispatch cost on a
|
||||
# single-issue Cortex-A35. See docs/mesa-glthread-matrix.md.
|
||||
export MESA_GLTHREAD=true
|
||||
|
||||
#Run flycast emulator
|
||||
$GPTOKEYB "flycast" -c "${CONF_DIR}/flycast.gptk" &
|
||||
${EMUPERF} /usr/bin/flycast "${1}"
|
||||
kill -9 "$(pidof gptokeyb)"
|
||||
_gptokeyb_pid="$(pidof gptokeyb 2>/dev/null)"
|
||||
[ -n "${_gptokeyb_pid}" ] && kill -9 ${_gptokeyb_pid}
|
||||
|
||||
@@ -205,4 +205,5 @@ fi
|
||||
|
||||
$GPTOKEYB "melonDS" -c "${CONF_DIR}/melonDS.gptk" &
|
||||
${EMUPERF} /usr/bin/melonDS -f "${ROM}"
|
||||
kill -9 "$(pidof gptokeyb)"
|
||||
_gptokeyb_pid="$(pidof gptokeyb 2>/dev/null)"
|
||||
[ -n "${_gptokeyb_pid}" ] && kill -9 ${_gptokeyb_pid}
|
||||
|
||||
@@ -123,5 +123,11 @@ ARG=${1//[\\]/}
|
||||
# Panfrost optimization: forcepack reduces draw call overhead on Mali-G31
|
||||
export PAN_MESA_DEBUG=forcepack
|
||||
export MESA_NO_ERROR=1
|
||||
# Mesa GL command thread: PPSSPP issues many small GL calls per frame
|
||||
# (sprite/draw bursts) and the standalone build keeps render and CPU on
|
||||
# separate threads internally. Letting Mesa marshal GL on its own
|
||||
# thread cuts per-call dispatch latency on Cortex-A35. See
|
||||
# docs/mesa-glthread-matrix.md.
|
||||
export MESA_GLTHREAD=true
|
||||
|
||||
${EMUPERF} ppsspp --pause-menu-exit "${ARG}"
|
||||
|
||||
@@ -6,27 +6,12 @@
|
||||
|
||||
GPU_DRIVER_SETTING_KEY="gpu.driver"
|
||||
|
||||
# When the device ships no panfrost DTB overlay, panfrost selection is a
|
||||
# brick: even with the runtime fallback, sway/UI starts before the
|
||||
# fallback finishes, leaves a half-initialized GPU, and the next boot
|
||||
# ends in a black screen. Detect the empty placeholder substituted by
|
||||
# package.mk and refuse panfrost in that case.
|
||||
DTB_OVERLAY_LOAD_CMD="@DTB_OVERLAY_LOAD@"
|
||||
PANFROST_AVAILABLE=true
|
||||
[ -z "${DTB_OVERLAY_LOAD_CMD}" ] && PANFROST_AVAILABLE=false
|
||||
|
||||
get_current_driver() {
|
||||
CONFDRIVER=$(get_setting ${GPU_DRIVER_SETTING_KEY})
|
||||
if [ -z ${CONFDRIVER} ]; then
|
||||
CONFDRIVER="libmali" # DEFAULT
|
||||
set_setting ${GPU_DRIVER_SETTING_KEY} ${CONFDRIVER}
|
||||
fi
|
||||
# Self-heal: stale "panfrost" setting on a device that can't run it.
|
||||
if [ "${CONFDRIVER}" = "panfrost" ] && [ "${PANFROST_AVAILABLE}" = "false" ]; then
|
||||
logger -t gpudriver "panfrost not supported on this device (no DTB overlay); reverting to libmali"
|
||||
CONFDRIVER="libmali"
|
||||
set_setting ${GPU_DRIVER_SETTING_KEY} ${CONFDRIVER}
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@@ -89,11 +74,7 @@ load_driver() {
|
||||
|
||||
case "$1" in
|
||||
"--options")
|
||||
if [ "${PANFROST_AVAILABLE}" = "true" ]; then
|
||||
echo "panfrost libmali"
|
||||
else
|
||||
echo "libmali"
|
||||
fi
|
||||
echo "panfrost libmali"
|
||||
;;
|
||||
"--start")
|
||||
get_current_driver
|
||||
@@ -117,10 +98,6 @@ case "$1" in
|
||||
@DTB_OVERLAY_UNLOAD@
|
||||
;;
|
||||
"panfrost")
|
||||
if [ "${PANFROST_AVAILABLE}" = "false" ]; then
|
||||
echo "panfrost is not supported on this device" >&2
|
||||
exit 2
|
||||
fi
|
||||
set_setting ${GPU_DRIVER_SETTING_KEY} $1
|
||||
@DTB_OVERLAY_LOAD@
|
||||
;;
|
||||
|
||||
@@ -5,11 +5,38 @@
|
||||
. /etc/os-release
|
||||
|
||||
BOOTLOG="/var/log/boot.log"
|
||||
# Persistent boot trace lives on /storage so that an interrupted boot
|
||||
# (hung autostart, kernel crash, manual reset) survives across the
|
||||
# reboot. The current script being run is written to .boot_last_step
|
||||
# *before* execution, then erased on success. If the file still exists
|
||||
# at the start of the next boot, the previous run hung on that script
|
||||
# — copy it to .boot_last_hang so it survives even after a clean boot
|
||||
# overwrites the marker.
|
||||
BOOT_LAST_STEP="/storage/.boot_last_step"
|
||||
|
||||
log() {
|
||||
echo "$(date): Autostart: $*" >>${BOOTLOG} 2>&1
|
||||
}
|
||||
|
||||
trace_step() {
|
||||
# Only attempt to write once /storage is mountable; quirks that run
|
||||
# before automount don't touch this and that's fine — the kernel
|
||||
# boot stage prior to /storage is already covered by dmesg.
|
||||
echo "$1" >${BOOT_LAST_STEP} 2>/dev/null
|
||||
}
|
||||
|
||||
trace_done() {
|
||||
rm -f ${BOOT_LAST_STEP} 2>/dev/null
|
||||
}
|
||||
|
||||
# If the previous boot hung, preserve a copy before we overwrite the
|
||||
# marker on this boot. Read it back later with:
|
||||
# cat /storage/.boot_last_hang
|
||||
if [ -f "${BOOT_LAST_STEP}" ]; then
|
||||
cp -f "${BOOT_LAST_STEP}" /storage/.boot_last_hang 2>/dev/null
|
||||
log "Previous boot hung at: $(cat ${BOOT_LAST_STEP} 2>/dev/null)"
|
||||
fi
|
||||
|
||||
performance 2>/dev/null
|
||||
|
||||
### Fix permissions for non-root brightness and CPU boost control
|
||||
@@ -31,6 +58,7 @@ then
|
||||
for script in "/usr/lib/autostart/quirks/platforms/${HW_DEVICE}"/*
|
||||
do
|
||||
log "Run ${script}"
|
||||
trace_step "platform-quirk:${script}"
|
||||
if [ -f "${script}" ]
|
||||
then
|
||||
"${script}" 2>&1 >>${BOOTLOG}
|
||||
@@ -46,6 +74,7 @@ then
|
||||
for script in "/usr/lib/autostart/quirks/devices/${QUIRK_DEVICE}"/*
|
||||
do
|
||||
log "Run ${script}"
|
||||
trace_step "device-quirk:${script}"
|
||||
if [ -f "${script}" ]
|
||||
then
|
||||
"${script}" 2>&1 >>${BOOTLOG}
|
||||
@@ -54,6 +83,7 @@ then
|
||||
fi
|
||||
|
||||
### Start the automount service
|
||||
trace_step "archr-automount"
|
||||
tocon "Starting storage services..."
|
||||
systemctl start archr-automount
|
||||
|
||||
@@ -61,6 +91,7 @@ systemctl start archr-automount
|
||||
for script in /usr/lib/autostart/common/*
|
||||
do
|
||||
log "Run ${script}"
|
||||
trace_step "common:${script}"
|
||||
${script} 2>&1 >>${BOOTLOG}
|
||||
done
|
||||
wait
|
||||
@@ -71,6 +102,7 @@ then
|
||||
for script in "/usr/lib/autostart/${HW_DEVICE}"/*
|
||||
do
|
||||
log "Run ${script}"
|
||||
trace_step "device:${script}"
|
||||
if [ -f "${script}" ]
|
||||
then
|
||||
"${script}" 2>&1 >>${BOOTLOG}
|
||||
@@ -84,6 +116,7 @@ then
|
||||
for script in /storage/.config/autostart/*
|
||||
do
|
||||
log "Run ${script}"
|
||||
trace_step "custom:${script}"
|
||||
${script} 2>&1 >>${BOOTLOG}
|
||||
done
|
||||
fi
|
||||
@@ -105,4 +138,8 @@ DEVICE_CPU_GOVERNOR=$(get_setting system.cpugovernor)
|
||||
${DEVICE_CPU_GOVERNOR} 2>&1 >>${BOOTLOG}
|
||||
log "Autostart complete..."
|
||||
|
||||
# Boot reached the end without hanging — clear the marker so the next
|
||||
# boot doesn't think the previous one failed.
|
||||
trace_done
|
||||
|
||||
clear >/dev/console
|
||||
|
||||
@@ -8,6 +8,11 @@ Type=oneshot
|
||||
Environment=HOME=/storage
|
||||
ExecStart=/bin/bash -a -c 'source /etc/profile && exec /usr/bin/autostart'
|
||||
RemainAfterExit=yes
|
||||
# Cap the autostart at 60s so that a misbehaving script (drm_tool with
|
||||
# DRM not ready, a daemon source hanging, etc.) doesn't lock the boot
|
||||
# indefinitely — emustation will still come up. Without this the
|
||||
# Before=emustation.service ordering blocks the UI forever.
|
||||
TimeoutStartSec=60s
|
||||
|
||||
[Install]
|
||||
WantedBy=archr.target
|
||||
|
||||
@@ -3,25 +3,35 @@
|
||||
# Copyright (C) 2024 JELOS (https://github.com/JustEnoughLinuxOS)
|
||||
# Copyright (C) 2026 ArchR (https://github.com/archr-linux/Arch-R)
|
||||
|
||||
BOOST_FILE="/sys/devices/system/cpu/cpufreq/boost"
|
||||
POLICY="/sys/devices/system/cpu/cpufreq/policy0"
|
||||
# Toggle the kernel cpufreq turbo flag globally and pin scaling_max_freq
|
||||
# accordingly. Called by the ES "Enable CPU Overclock" switch and by the
|
||||
# 095-turbo-mode autostart at boot from the persisted setting.
|
||||
#
|
||||
# When OFF: cpufreq/boost=0 → turbo OPP (1512 MHz) is hidden from the
|
||||
# freq table; governors top out at 1416 MHz.
|
||||
# When ON: cpufreq/boost=1 → turbo OPP becomes available; max freq is
|
||||
# pinned to it via scaling_available_frequencies (NOT
|
||||
# cpuinfo_max_freq, which on ARM cpufreq-dt doesn't reflect
|
||||
# boost OPPs even after boost=1).
|
||||
#
|
||||
# Governor is intentionally left alone — runemu.sh switches to
|
||||
# performance during gameplay, idle/menu stays on ondemand. Forcing
|
||||
# performance here would drain battery in the menu.
|
||||
|
||||
# Get the actual max frequency supported by hardware
|
||||
MAX_FREQ=$(cat "${POLICY}/cpuinfo_max_freq" 2>/dev/null)
|
||||
. /etc/profile.d/001-functions
|
||||
. /etc/profile.d/099-freqfunctions
|
||||
|
||||
BOOST_FILE="/sys/devices/system/cpu/cpufreq/boost"
|
||||
|
||||
case $1 in
|
||||
disable)
|
||||
echo "0" > "${BOOST_FILE}" 2>/dev/null
|
||||
echo "performance" > "${POLICY}/scaling_governor" 2>/dev/null
|
||||
[ -e "${BOOST_FILE}" ] && echo 0 > "${BOOST_FILE}" 2>/dev/null
|
||||
set_cpu_max_freq highest
|
||||
set_setting enable.turbo-mode 0
|
||||
;;
|
||||
;;
|
||||
enable)
|
||||
echo "1" > "${BOOST_FILE}" 2>/dev/null
|
||||
# Set governor to performance and max freq to hardware maximum
|
||||
echo "performance" > "${POLICY}/scaling_governor" 2>/dev/null
|
||||
if [ -n "${MAX_FREQ}" ]; then
|
||||
echo "${MAX_FREQ}" > "${POLICY}/scaling_max_freq" 2>/dev/null
|
||||
fi
|
||||
[ -e "${BOOST_FILE}" ] && echo 1 > "${BOOST_FILE}" 2>/dev/null
|
||||
set_cpu_max_freq highest
|
||||
set_setting enable.turbo-mode 1
|
||||
;;
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# ArchR drop-in for handheld idle profile.
|
||||
#
|
||||
# systemd-timesyncd defaults (PollMin 32 s, PollMax 2048 s ≈ 34 min)
|
||||
# assume a server that needs frequent corrections. On a handheld that
|
||||
# spends most of its time in the menu or off, polling every 34 min is
|
||||
# pointless wakeup traffic and keeps the daemon's working set warm in
|
||||
# RAM. Stretching PollIntervalMaxSec to 86400 s (24 h) lets timesyncd
|
||||
# fall idle for the rest of the day after the first successful sync,
|
||||
# which the kernel happily pages out — cutting the daemon's residual
|
||||
# RSS to near zero.
|
||||
#
|
||||
# PollIntervalMinSec stays at 64 s so that bad samples (just after
|
||||
# resume / new connection) re-poll quickly until trust is established.
|
||||
|
||||
[Time]
|
||||
PollIntervalMinSec=64
|
||||
PollIntervalMaxSec=86400
|
||||
ConnectionRetrySec=30
|
||||
@@ -0,0 +1,6 @@
|
||||
# PortMaster ports use gptokeyb to remap controller input to keyboard
|
||||
# events; gptokeyb writes to /dev/uinput. Some ports also chmod 0666
|
||||
# the device themselves, but they only succeed when invoked as root.
|
||||
# ArchR runs ports under the "archr" user, so set the permission
|
||||
# globally at hotplug time.
|
||||
KERNEL=="uinput", MODE="0666", OPTIONS+="static_node=uinput"
|
||||
@@ -454,13 +454,24 @@ makeinstall_target() {
|
||||
add_es_system gbh
|
||||
|
||||
### Nintendo GameBoy Advance
|
||||
add_emu_core gba retroarch mgba true
|
||||
# Cortex-A35 (RK3326) doesn't sustain mGBA full-speed; use the
|
||||
# lighter-weight gpsp as the performance default and keep mGBA as an
|
||||
# accuracy alternative.
|
||||
case ${DEVICE} in
|
||||
RK3326)
|
||||
add_emu_core gba retroarch gpsp true
|
||||
add_emu_core gba retroarch mgba false
|
||||
;;
|
||||
*)
|
||||
add_emu_core gba retroarch mgba true
|
||||
;;
|
||||
esac
|
||||
add_emu_core gba retroarch vbam false
|
||||
add_emu_core gba retroarch vba_next false
|
||||
add_emu_core gba retroarch beetle_gba false
|
||||
add_emu_core gba retroarch skyemu false
|
||||
case ${DEVICE} in
|
||||
H700|RK3326|RK3566|S922X)
|
||||
H700|RK3566|S922X)
|
||||
add_emu_core gba retroarch gpsp false
|
||||
;;
|
||||
RK3399|RK3588|SM8250|SM8550|SDM845)
|
||||
@@ -570,22 +581,28 @@ makeinstall_target() {
|
||||
add_es_system gbch
|
||||
|
||||
### Nintendo GameCube
|
||||
# GameCube on Cortex-A35 (RK3326) does not run at usable framerates;
|
||||
# do not list the system in ES so the user isn't lured into trying.
|
||||
case ${DEVICE} in
|
||||
RK3399|SDM845|SM8250|SM8550|SM8650)
|
||||
add_emu_core gamecube dolphin dolphin-qt-gc true
|
||||
add_emu_core gamecube dolphin dolphin-sa-gc false
|
||||
add_emu_core gamecube retroarch dolphin false
|
||||
install_script "Start Dolphin.sh"
|
||||
add_es_system gamecube
|
||||
;;
|
||||
RK3566|RK3588|S922X)
|
||||
add_emu_core gamecube dolphin dolphin-sa-gc true
|
||||
add_emu_core gamecube retroarch dolphin false
|
||||
add_es_system gamecube
|
||||
;;
|
||||
H700|RK3326)
|
||||
;;
|
||||
*)
|
||||
add_emu_core gamecube retroarch dolphin true
|
||||
add_es_system gamecube
|
||||
;;
|
||||
esac
|
||||
add_es_system gamecube
|
||||
|
||||
### Nintendo Triforce
|
||||
case ${DEVICE} in
|
||||
@@ -597,6 +614,7 @@ makeinstall_target() {
|
||||
esac
|
||||
|
||||
### Nintendo Wii/ware
|
||||
# Same rationale as GameCube: not viable on Cortex-A35.
|
||||
case ${DEVICE} in
|
||||
RK3399|SDM845|SM8250|SM8550|SM8650)
|
||||
add_emu_core wii dolphin dolphin-qt-wii true
|
||||
@@ -605,20 +623,26 @@ makeinstall_target() {
|
||||
add_emu_core wiiware dolphin dolphin-sa-wii false
|
||||
add_emu_core wii retroarch dolphin false
|
||||
add_emu_core wiiware retroarch dolphin false
|
||||
add_es_system wii
|
||||
add_es_system wiiware
|
||||
;;
|
||||
RK3566|RK3588|S922X)
|
||||
add_emu_core wii dolphin dolphin-sa-wii true
|
||||
add_emu_core wiiware dolphin dolphin-sa-wii true
|
||||
add_emu_core wii retroarch dolphin false
|
||||
add_emu_core wiiware retroarch dolphin false
|
||||
add_es_system wii
|
||||
add_es_system wiiware
|
||||
;;
|
||||
H700|RK3326)
|
||||
;;
|
||||
*)
|
||||
add_emu_core wii retroarch dolphin true
|
||||
add_emu_core wiiware retroarch dolphin true
|
||||
add_es_system wii
|
||||
add_es_system wiiware
|
||||
;;
|
||||
esac
|
||||
add_es_system wii
|
||||
add_es_system wiiware
|
||||
|
||||
### Nintendo Wii U
|
||||
case ${DEVICE} in
|
||||
|
||||
Reference in New Issue
Block a user