The Y3506 family (V03/V04/V05 soysauce variants) ships without an
external speaker amplifier on the PCB; the rk817 SPKO line drives
the mono speaker directly. The vendor BSP 4.4 hides this with
hardcoded DAPM widgets and routes in rk817_codec.c, but mainline
ASoC respects the DT strictly, so the speaker stayed muted on every
Y3506 board even though the hardware path exists.
Changes:
config/archr-dts/rk3326-gameconsole-r36s.dts
Adds three pre-defined sound card variants with status=disabled:
rk817-sound-amplified (external amp gated by GPIO)
rk817-sound-simple (external amp on regulator, no GPIO gate)
rk817-sound-spko-direct (no external amp, SPKO straight to speaker)
The default rk817-sound stays active with the historic amp routing,
so any board the overlay generator cannot positively re-classify
keeps working as it did in v2.0-rc3.
config/mipi-generator/archr-dtbo.py
- Picks one of the three variants based on flags + vendor signals:
NAm flag -> spko-direct (Y3506 family)
spk-con-gpio / spk-ctl-gpios detected -> amplified
SRs flag without GPIO -> simple
otherwise -> keep base DTS default (amp routing)
- Accepts simple-audio-card,hp-det-gpio as a fallback to hp-det-gpio
so V05 boards that use the canonical mainline name are no longer
silently skipped by the audio block.
- Tolerates missing /pinctrl/headphone/hp-det in the vendor DTB
(some boards bind via the codec phandle only).
- Short-circuit branch (odroidgo3 + SDORIG) now still toggles the
sound card variant when NAm is set, so the six Soysauce batches
that go through that early return still get spko-direct.
- Fallback branch when the audio block crashes still applies
spko-direct when NAm is set (covers six Y3506 V03/V04 batches
where the vendor DTB omits hp-det-gpio entirely).
config/mipi-generator/generator.sh
- Appends NAm to every overlay generated under soysauce/, in
stable order with the existing SDORIG and variant flags.
Audit of all 44 vendor DTBs after the change:
18 clones -> default (amp routing preserved)
15 original -> default (amp routing preserved)
11 soysauce -> spko-direct (V03/V04/V05 all classes covered)
Reported by gemstoned via Discord: Soysauce V05 speaker would not
play under v2.0-rc3 even with HPi/SRs overlay flags toggled. Root
cause traced to (a) the variant nodes referenced by archr-dtbo.py
only existing in eeclone.dts and not in r36s.dts, and (b) the
vendor BSP rk817_codec.c hardcoded DAPM that mainline ASoC ignores.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The overlay generator now propagates board-specific hardware that the
previous version dropped on the floor:
- Amux selectors and per-button GPIO pin numbers (varies per subdevice:
clone uses 16/15/11, original 11/8/13, soysauce 13/12/17)
- button-adc tunings (deadzone/fuzz/flat) when vendor differs
- rumble-gpio (R36S V20 2025-05-18, GR36 — fixes "rumble stuck on")
- Panel status LEDs red/green/blue1/blue2 (8 soysauce V04+/V05 boards)
Adds an auto-discovery pass that propagates ANY remaining vendor
property not in our whitelist/blacklist, logging each propagation in
applied.txt so future board variants surface their quirks instead of
silently inheriting the original layout.
Blacklist preserves joypad-name/product/revision (ES gamecontrollerdb
match), per-button linux,code (vendor uses F-keys, ArchR uses standard
BTN_*) and PMIC regulator ranges (our base intentionally has expanded
ranges for the 1512MHz CPU OC).
- Introduced portmaster-compat-libs package to aggregate compatibility libraries.
- Added compat-codec2, compat-x264, and compat-x265 packages for multimedia support.
- Updated package.mk files to include new dependencies and improve installation scripts.
- Enhanced start_portmaster.sh to handle mod_ArchR.txt for modular support.
- Adjusted ffmpeg configuration to enable ffmpeg and ffprobe without ffplay.
- 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.
- Enhanced `runemu.sh` to conditionally enable debug logging based on system log level, improving performance and debugging capabilities.
- Introduced functions to pause and resume background services during gameplay to optimize resource usage.
- Updated `retroarch.cfg` to disable frame delay and set video context driver to default, improving compatibility.
- Changed DuckStation's GPU renderer from OpenGL to Software for better performance on RK3326.
- Adjusted Flycast settings to lower resolution and optimize rendering settings for smoother gameplay.
- Modified MelonDS script to correctly handle internal resolution and screen orientation settings.
- Updated PPSSPP configuration to improve frame skipping behavior and adjusted CPU speed settings for better performance.
- Refined GPU driver scripts to handle panfrost availability and ensure proper driver binding, preventing graphical issues.
- Removed obsolete panfrost quirk file and migrated relevant settings to a new profile.d script for better management.
- Added service condition checks for various network daemons to ensure they only start if their configuration files exist.
- Adjusted systemd service configurations for network daemons to improve reliability and resource management.
- Updated sysctl settings to optimize memory management and reduce unnecessary RAM usage.
- Disabled debug shell service by default to enhance security and resource efficiency.
- Created necessary directories for mesa shader cache to ensure persistent shader caching across reboots.
- Added a new squashfs package for weston to support graphical environments.
The ROCKNIX fork includes all 3 patches we maintained separately:
- 000-dark-theme.patch
- 001-default-paths.patch
- 002-build-fix.patch
Switching to the fork removes the maintenance burden of patch rebasing.
Adapted from ROCKNIX dd10d27a84 to projects/ArchR/ path.
DEBUG_FS provides instrumentation needed by TODO items 1 and 6:
- /sys/kernel/debug/dri/*/name — GPU performance counters
- /sys/kernel/debug/cma/* — per-region CMA page accounting
- /sys/kernel/debug/block/* — I/O scheduler stats (BLK_DEBUG_FS)
- Detailed thermal zone introspection
Trade-off acknowledged: small runtime overhead from debugfs mount,
but the instrumentation granularity is essential while we're actively
benchmarking and tuning. Switch to DEBUG_FS=n or DISALLOW_MOUNT
for release-final builds once FASE 1-2 benchmarks are complete.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
With CONFIG_IKCONFIG=n (correct for production), /proc/config.gz is not
available. The script now reads /boot/config-$(uname -r) as primary
source and falls back to /proc/config.gz only if IKCONFIG is enabled.
Also removed FRAME_POINTER check (ARM64 forces it via Kconfig select,
checking if it's disabled always fails) — now shown as informational.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Flycast-SA:
- Restore -Ofast sed (was incorrectly replaced with CMAKE_BUILD_TYPE=Release)
- -Ofast = -O3 + -ffast-math is INTENTIONAL for Flycast: the Dreamcast SH4
FPU doesn't use strict IEEE 754, and the hardware itself flushes denormals
- Validated by JELOS/AmberELEC/ROCKNIX upstream for years without issues
- On weak Cortex-A35, the extra optimization from -ffast-math is meaningful
Sysctl:
- vm.dirty_writeback_centisecs: 500→1500 (match ROCKNIX, reduce I/O wakeups
during gaming — read-heavy workload needs fewer writeback checks)
- vm.vfs_cache_pressure: 50→100 (restore kernel default — during gameplay
the same few files are reread (ROM, save, shader cache), so a large
inode/dentry cache provides no benefit on 1GB RAM. 50 is a desktop tuning
that favors metadata cache for build/compile workloads, not gaming.
Note: 200+ is what aggressively reclaims metadata; 100 is the neutral
kernel default, not an override.)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
FRAME_POINTER:
- ARM64 Kconfig unconditionally selects FRAME_POINTER (arch/arm64/Kconfig:136)
- Cannot be disabled regardless of defconfig value
- Overhead <1-2% on ARM64 (x29 designated as FP by ABI, STP saves FP+LR
in single store queue slot)
- Restored to y to match kernel reality
ZRAM compression lzo-rle (reverted from zstd):
- zstd is 3-4x slower than lzo-rle on in-order Cortex-A35
- Estimated: lzo-rle ~350 MB/s vs zstd ~100 MB/s compress on A35
- Each 4KB page swap: 11us (lzo-rle) vs 40us (zstd)
- Under memory pressure during gaming, zstd causes frame stutters
- ROCKNIX deliberately uses lzo-rle on ALL in-order cores (A35/A53/A55)
and only enables zstd on out-of-order big cores (A73/A76)
- The extra ~500MB virtual capacity from zstd's ratio is not worth the
latency penalty for latency-sensitive gaming workloads
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Kernel:
- BRIDGE_NETFILTER=n (was still =m after BRIDGE was disabled)
- BLK_DEBUG_FS=n (depends on DEBUG_FS which is off, explicit disable)
Flycast:
- Replace sed -Ofast hack with proper CMAKE_BUILD_TYPE=Release
(CMake Release mode applies -O3 with proper LTO support)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- ZRAM compression: lzo-rle → zstd (better 1:3 ratio vs 1:2.5, saves
~50MB more RAM on 512MB ZRAM at cost of slightly more CPU)
- Add zswap.enabled=0 to kernel cmdline (zswap intercepts before ZRAM,
preventing efficient compressed swap)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- ScreenUseGL=0: Skip GPU-accelerated display compositing. On Mali-G31
with Panfrost, the overhead of uploading software-rendered frames to
GPU for display is slower than direct software blit.
- ScreenFilter=0: Disable bilinear filtering (saves GPU cycles)
- JIT remains enabled (critical for Cortex-A35 performance)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
melonDS was crashing with "could not connect to display :0.0" because
QT_QPA_PLATFORM was hardcoded to xcb. On RK3326 with Sway (Wayland),
XWayland may not expose :0.0 for all apps.
Fix: detect WAYLAND_DISPLAY and use wayland platform automatically.
Also set UTF-8 locale (Qt6 requires it, system defaults to "C").
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Previously ROMs lived in /storage/games-internal/roms/ and were
bind-mounted to /storage/roms/ at runtime. When users mounted the
ROMS partition on PC, they had to navigate through games-internal/
to find their ROM folders.
Now /storage/roms/ is the actual ROM directory:
- Single SD: no bind mount needed, roms/ used directly
- Dual SD (merged storage): overlay still works as before
- Migration: if games-internal/roms has content, auto-moves to roms/
- Backwards compat: symlink games-internal/roms → roms
Users now see their 130 system folders directly in the roms/ directory
when they mount the ROMS partition on PC.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ROOT CAUSE: The DTS patch removed ALL GPU OPPs (200/300/400/480 MHz)
and only kept 560/600 MHz. The GPU devfreq governor starts at the
LOWEST available OPP. Without 200 MHz, the GPU couldn't initialize
its clock, causing a black screen on boot.
Fix: Keep original 200/300/400 MHz OPPs, only replace 480 MHz with
560 MHz (overclock) and add 600 MHz. GPU can now initialize at 200 MHz
and scale up to 600 MHz.
Building Panfrost as built-in (=y) changes DRM probe order: GPU driver
initializes before the DSI panel driver completes, breaking the display
pipeline. As module (=m), panfrost loads after the display is already up.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Flasher verification:
- Move read-back SHA256 verification BEFORE boot partition modifications
(DTBO copy, variant write, extlinux switch). Previously verified AFTER
modifications, causing guaranteed hash mismatch (false positive).
- Remove duplicate verification block at end of script.
Kernel:
- Restore DRM_FBDEV_EMULATION=y (disabling it broke display on some setups
that depend on /dev/fb0 for initialization)
Panel overlays:
- Restore early return for odroidgo3-compatible devices in archr-dtbo.py.
R36S base DTS already has reset-gpios/power-supply/backlight - adding
them again in the overlay caused conflicts. Overlay only needs
panel-init-sequence and display timings.
- Regenerate all 32 DTBOs with correct behavior.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Based on RK3399 config, optimized for 640x480:
- Window 640x480 (native R36S resolution)
- JIT enabled (performance critical on Cortex-A35)
- Software 3D renderer (Mali-G31 too weak for GL renderer)
- Threaded 3D enabled
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The base package.mk expands PKG_URL with PKG_VERSION=3.9 before our
override changes it to 3.10. Adding explicit PKG_URL ensures the
correct version is downloaded.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Cherry-pick created it under projects/ROCKNIX/ but build system looks
under projects/ArchR/. Copy to correct location.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The cherry-picked systemd timeout config was in the base package path
but the ArchR project overlay was missing it, causing build failure
(cp: cannot stat system.conf.d/*).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- GameCube: Add dolphin-lr as default core for RK3326 (user decides if
performance is acceptable for their games)
- Wii/WiiWare: Same - dolphin-lr available for all devices
- NDS: Add melonDS standalone for RK3326 (was only available on RK3399+)
- DSiWare: Add melonDS standalone option for RK3326
- RK3326 package list: Add melonds-sa and dolphin-lr to build
All 32 panel overlays regenerated after removing the premature return
in archr-dtbo.py. Panel 4 DTBO now correctly includes reset-gpios,
power-supply, and other hardware properties that were previously missing.
Panel 4 DTBO size: ~800 bytes → 4045 bytes (now includes full hardware config)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Critical fixes:
- archr-dtbo.py: Remove premature return for odroidgo3-compatible devices
that was skipping hardware property generation (reset-gpios, power-supply,
backlight-supply, enable-delay-ms). This is the ROOT CAUSE of Panel 4
wrong image and vibration issues reported by users.
- RetroArch: Switch from glcore to gl (more efficient on Panfrost/Mali-G31),
increase swapchain images from 2 to 3 (better frame pacing on Mali)
- DraStic: Disable hires_3d on ALL RK3326 configs (Mali-G31 lacks power for
high-res 3D rendering, was causing frame drops in NDS games)
- EmulationStation: Bump to latest with performance optimizations
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- mali-bifrost: Bump kbase to 39da994 (latest from ROCKNIX)
- BFQ I/O scheduler: Add udev rule to set BFQ for MMC/SD card devices
- Kernel config: Update RUSTC_VERSION to 109401, add BLK_CGROUP_RWSTAT/BLK_ICQ
for BFQ cgroup support, add GENERIC_IRQ_KEXEC_CLEAR_VM_FORWARD,
rename HAVE_FUNCTION_GRAPH_RETVAL to HAVE_FUNCTION_GRAPH_FREGS
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
On ROCKNIX's read-only squashfs root, network services don't need
graceful shutdown — only persistent storage sync matters. Services
like iwd and systemd-resolved can hang for 90s (the systemd default)
on shutdown/reboot, blocking device access during development and
causing poor user experience on handheld gaming devices.
Changes:
- Add system.conf.d/10-shutdown-timeout.conf with
DefaultTimeoutStopSec=5s and DefaultTimeoutAbortSec=5s
- Add TimeoutStopSec=1s to iwd.service (matches existing pattern
used by avahi, bluez, sshd, samba)
- Add TimeoutStopSec=1s to systemd-resolved override
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Modify joypad compatibility to include "archr-joypad" in the device tree source.
- Adjust internal display settings to use the same reset GPIO and add enable GPIO.
- Remove SDIO card detect GPIO and mark it as non-removable.
- Update the joypad driver in the MIPI generator to use "archr-joypad".
- Fix Vulkan custom dispatchers to restrict header version checks.
- Add system manager timeout overrides for improved shutdown performance.
- Update kernel configuration to version 6.12.79 and enable BFQ I/O scheduler.
- Clean up GPU governor settings in post-update scripts.
- Update PPSSPP emulator to version 1.20.2 and apply necessary patches.
- Adjust SDL2 and Mesa package dependencies and versions.
- Update Vulkan headers and loader to version 1.4.347.
- Add udev rules for BFQ scheduler and systemd configuration for shutdown timeout.
- Implement input sense adjustments for better button mapping.
- Add clock speed settings to EmulationStation configuration.
- Disable rumble motor on boot to prevent unwanted vibrations.
- Created boot.ini files for Panels 0 to 6 with boot arguments and loading instructions.
- Added device tree binaries: rk3326-r35s-linux.dtb, rg351mp-kernel.dtb, and rk3326-rg351mp-linux.dtb for each panel.
- Introduced a new boot.ini for R46H and RGB20S with specific boot arguments.
- Updated generator.sh to prevent script abortion on individual panel failures.
- Introduced tntnet package for web application server in C++.
- Added libuv, a multi-platform support library for asynchronous I/O.
- Included libwebsockets for implementing network protocols.
- Added multiple VDR plugins:
- vdr-plugin-ddci2 for CI support
- vdr-plugin-dummydevice for recording server without output devices
- vdr-plugin-dvbapi for OSCam integration
- vdr-plugin-eepg for parsing Extended EPG data
- vdr-plugin-epgfixer for modifying EPG data
- vdr-plugin-epgsearch for searching EPG data
- vdr-plugin-iptv for IPTV support
- vdr-plugin-live for web interface operation
- vdr-plugin-restfulapi for RESTful API access
- vdr-plugin-robotv for Android TV frontend
- vdr-plugin-satip for SAT>IP support
- vdr-plugin-streamdev for video transfer and HTTP streaming
- vdr-plugin-vnsiserver for Kodi client handling
- vdr-plugin-wirbelscan for channel scanning
- vdr-plugin-wirbelscancontrol for menu entry in VDR
- vdr-plugin-xmltv2vdr for importing XMLTV data
- Added main VDR package for DVB TV server application.
-43 pre-generated MIPI panel overlays (15 original + 18 clone + 10 soysauce variants), one per motherboard revision.
- Separate images for original and clone boards, both with hardware auto-detection.
- Integrated cross-device local and remote network play.
- Fine-grained control for battery life and performance.
@@ -50,7 +50,7 @@ Arch R is a custom Linux distribution for the **R36S** handheld gaming console a
### Display Panels
Arch R ships 20 pre-generated MIPI panel overlays covering all known R36S display variants. Panel selection is done by copying the correct `.dtbo` file to `overlays/mipi-panel.dtbo` on the boot partition.
Arch R ships 43 pre-generated MIPI panel overlays covering all known R36S display variants, named after the exact motherboard revision (e.g. `R36S-V21_2024-12-18_2551.dtbo`, `G80CA-MB_V1.3-20251212_Panel_8.dtbo`). Panel selection is done by copying the correct `.dtbo` file to `overlays/mipi-panel.dtbo` on the boot partition. Sources live under `config/archr-dts/{original,clone,soysauce}/<MB-revision>/`; the build extracts the panel description from each revision's `rk3326-r36s-linux.dtb` via `config/mipi-generator/generator.sh`.
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.