⚠ Warning: This document is gpt-translated and may contain inaccuracies or errors.
If the scene seen by the naked eye can be directly reflected in the scheduling, that is, if the scheduler is placed from the viewer's perspective to decide performance, can perfect performance control and maximum experience be achieved?
FAS (Frame Aware Scheduling)
is this scheduling concept, which tries to control performance by monitoring frame rendering to minimize overhead while ensuring rendering time.
-
fas-rs
is a user-space implementation ofFAS (Frame Aware Scheduling)
, which has the advantage of near-universal compatibility and flexibility on any device compared to the kernel-spaceMI FEAS
.
- To maximize user-space flexibility,
fas-rs
has its own extension system. For development instructions, see the extension template repository.
-
-
keep_std
- Type:
bool
true
: Always keep the standard configuration profile when merging configurations, retaining the local configuration's application list, and other aspects are the same as false *false
: See default behavior of configuration merging
- Type:
-
scene_game_list
- Type:
bool
true
: Use scene game list *false
: Do not use scene game list
- Type:
-
*
: Default configuration
-
-
-
"package"
=target_fps
package
: String, application package nametarget_fps
: An array (e.g.,[30, 60, 120, 144]
) or a single integer, representing the target frame rate the game will render to,fas-rs
will dynamically match at runtime.
-
-
-
- Currently,
fas-rs
does not have an official mode switching manager but integrates with thescene
configuration interface. If you do not use scene, the defaultbalance
configuration is used. - If you have some understanding of programming on Linux, you can switch to the corresponding mode by writing any of the 4 modes to the
/dev/fas_rs/mode
node, and you can also read it to know the current mode offas-rs
.
- Currently,
-
-
margin:
- Type:
integer
- Unit:
milliseconds
- Allowed frame drop margin, the smaller the margin, the higher the frame rate, the larger the margin, the more power-saving (0 <= margin < 1000)
- Type:
-
core_temp_thresh:
- Type:
integer
or"disabled"
integer
: Core temperature to trigger thermal control byfas-rs
(unit 0.001℃)"disabled"
: Disablefas-rs
built-in thermal control
- Type:
-
-
[config]
keep_std = true
scene_game_list = true
[game_list]
"com.hypergryph.arknights" = [30, 60]
"com.miHoYo.Yuanshen" = [30, 60]
"com.miHoYo.enterprise.NGHSoD" = [30, 60, 90]
"com.miHoYo.hkrpg" = [30, 60]
"com.kurogame.mingchao" = [24, 30, 45, 60]
"com.pwrd.hotta.laohu" = [25, 30, 45, 60, 90]
"com.mojang.minecraftpe" = [60, 90, 120]
"com.netease.party" = [30, 60]
"com.shangyoo.neon" = 60
"com.tencent.tmgp.pubgmhd" = [60, 90, 120]
"com.tencent.tmgp.sgame" = [30, 60, 90, 120]
[powersave]
margin = 3
core_temp_thresh = 80000
[balance]
margin = 2
core_temp_thresh = 90000
[performance]
margin = 1
core_temp_thresh = 95000
[fast]
margin = 0
core_temp_thresh = 95000
-
fas-rs
has a built-in configuration merging system to address future configuration feature changes. Its behavior is as follows- Delete configurations in the local configuration that do not exist in the standard configuration
- Insert configurations that are missing in the local configuration but exist in the standard configuration
- Retain configurations that exist in both the standard and local configurations
-
- Implemented using automatic serialization and deserialization, unable to preserve comments and other non-serialization necessary information
- The automatic merging configuration during installation will not be applied immediately to avoid affecting the current version's operation but will replace the local configuration with the merged new configuration on the next restart.
-
-
The module will automatically call once every time it is installed
-
Manual example
fas-rs merge /path/to/std/profile
-
# Ubuntu (NDK is required)
apt install gcc-multilib git-lfs clang python3
# ruff (Python lints & format)
pip install ruff
# Rust (Nightly version is required)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup default nightly
rustup target add aarch64-linux-android armv7-linux-androideabi x86_64-linux-android i686-linux-android
rustup component add rust-src
# Cargo-ndk
cargo install cargo-ndk
# Clone
git clone https://github.com/shadow3aaa/fas-rs
cd fas-rs
# Compile
python3 ./make.py build --release
# Use the `--nightly` option when building(Some nightly flags will be added to produce smaller artifacts)
python3 ./make.py build --release --nightly