Files
Arch-R/scripts/current_brightness
Douglas Teles 6e0e085eb8 gl4es GPU pipeline, ES display fixes, runtime hardening
GPU rendering:
- Panfrost driver working (6 root causes fixed)
- gl4es cross-compiled for aarch64 (GOA_CLONE=ON)
- ES switched to Desktop GL renderer (-DGL=ON, Renderer_GL21.cpp)
- Pipeline: ES (GL 2.1) → gl4es → GLES 2.0 → Panfrost (Mali-G31)

ES display (5 root causes fixed):
- SDL3 KMSDRM rebuild (ALARM ships without it)
- Autologin approach (systemd service can't get DRM master)
- MAJOR/MINOR version bug fix
- GL context restore after setIcon()
- Null safety for glGetString

New files:
- rebuild-es-sdcard.sh (quick SD card rebuild)
- config/PanCho.ini (18-panel selection)
- config/es_input.cfg (gpio-keys + adc-joystick)
- config/gamecontrollerdb.txt (SDL controller mappings)
- scripts/archr-hotkeys.py (volume, brightness, headphone)
- scripts/test-kmsdrm.py (KMSDRM diagnostic)
- bootloader/u-boot-r36s-working/ (fixed U-Boot)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 21:42:50 -03:00

14 lines
420 B
Bash

#!/bin/bash
# Arch R - Current brightness level for ES info bar
# Returns brightness percentage
curbright=$(cat /sys/class/backlight/backlight/brightness 2>/dev/null)
maxbright=$(cat /sys/class/backlight/backlight/max_brightness 2>/dev/null)
if [ -z "$curbright" ] || [ -z "$maxbright" ] || [ "$maxbright" -eq 0 ]; then
echo "N/A"
exit 0
fi
echo $((200 * curbright / maxbright - 100 * curbright / maxbright))