Giter Club home page Giter Club logo

fas-rs's Introduction

FAS-RS

简介

假如肉眼看到的画面能直接反映在调度上, 也就是说以把调度器放在观看者的角度来决定性能, 是否就能实现完美的性能控制和最大化体验? FAS (Frame Aware Scheduling)就是这种调度概念, 通过监视画面渲染来尽量控制性能以在保证渲染时间的同时实现最小化开销

  • 什么是fas-rs?

    • fas-rs是运行在用户态的FAS(Frame Aware Scheduling)实现, 对比核心思路一致但是在内核态的MI FEAS有着近乎在任何设备通用的兼容性和灵活性方面的优势
    • 对比其它用户态FAS实现(如scene fas), fas-rs采用了侵入性更强的inline hook方法获取渲染时间, 这带来了更准确的数据和更小的开销, 然而这本质上是注入, 可能被反作弊系统误判断, 虽然我还没遇到过

自定义(配置)

  • 配置路径 : /sdcard/Android/fas-rs/games.toml

  • 参数(config)说明 :

    • keep_std

      • 类型 : Bool
      • true : 永远在配置合并时保持标准配置的profile, 保留本地配置的应用列表, 其它地方和false相同 *
      • false : 见配置合并的默认行为
    • * : 默认配置

  • 游戏列表(game_list)说明 :

    • "package" = target_fps

      • package : 字符串, 应用包名
      • target_fps : 一个数组(如[30, 60, 120, 144])或者单个整数, 表示游戏会渲染到的目标帧率, fas-rs会在运行时动态匹配
  • powersave / balance / performance / fast 说明 :

    • mode :
      • 目前fas-rs还没有官方的切换模式的管理器, 而是接入了scene的配置接口, 如果你不用scene则默认使用balance的配置
      • 如果你有在linux上编程的一些了解, 向/dev/fas_rs/mode节点写入4模式中的任意一个即可切换到对应模式, 同时读取它也可以知道现在fas-rs所处的模式
    • 参数说明 :
      • fas_boost(bool): fas-rs的目的是限制功耗还是减少游戏掉帧, true时为减少掉帧模式
      • scale(f64): fas-rs可以容忍的掉帧数
      • jank_scale(f64): fas-rs判定小卡顿的掉帧数
      • big_jank_scale(f64): fas-rs判定大卡顿的掉帧数
      • use_performance_governor(bool): fas-rs是否在工作时使用performance内核cpufreq策略(fas_boost开启时此配置无效)

games.toml配置标准例 :

[config]
keep_std = 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.mojang.minecraftpe" = [60, 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]
fas_boost = false
scale = 0.5
jank_scale = 3.0
big_jank_scale = 5.0
use_performance_governor = false

[balance]
fas_boost = false
scale = 0.25
jank_scale= 3.0
big_jank_scale = 5.0
use_performance_governor = true

[performance]
fas_boost = false
scale = 0.2
jank_scale= 1.5
big_jank_scale = 3.0
use_performance_governor = true

[fast]
fas_boost = true
scale = 0.1
jank_scale= 1.5
big_jank_scale = 3.0
use_performance_governor = false

配置合并

  • fas-rs内置配置合并系统, 来解决未来的配置功能变动问题。它的行为如下

    • 删除本地配置中, 标准配置不存在的配置
    • 插入本地配置缺少, 标准配置存在的配置
    • 保留标准配置和本地配置都存在的配置
  • 注意

    • 使用自动序列化和反序列化实现, 无法保存注释等非序列化必须信息
    • 安装时的自动合并配置不会马上应用,不然可能会影响现版本运行,而是会在下一次重启时用合并后的新配置替换掉本地的
  • 手动合并

    • 模块每次安装都会自动调用一次

    • 手动例

      fas-rs merge /path/to/std/profile

编译

# Termux
apt install rust zip ndk* clang binutils-is-llvm shfmt git-lfs

# Ubuntu(NDK is required)
apt install gcc-multilib git-lfs clang
# Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup target add aarch64-linux-android armv7-linux-androideabi x86_64-linux-android i686-linux-android
# Cargo-ndk
cargo install cargo-ndk

# Clone
git clone https://github.com/shadow3aaa/fas-rs
cd fas-rs

# Compile
chmod +x ./make.sh
./make.sh build --release
  • 💩

I'm here to introduce you the greatest thief @tryigitx !
So, what did he do?

    1. He kept stealing FAS-RS module from me without any permission, and pretended to be co-developed with me.
      In fact, he hasn't developed any kind of project, just because he is not able to. From his homepage (https://linktr.ee/tryigitx), we can see he is an eXpErT! lmfao🤣🤣
      I just can't imagine how can a real expert do these things. If @tryigitx is a real expert, pLeAsE fOrGiVe Me😭😭
    1. He also stole other modules, like "Play Integrity Fix".
      He copied it and changed the author to his own, but that's not all.
      Maybe it's some kind of self-deception, he also changed the name to "China Play Integrity Fix".
      He seemed to want to express that this is for China Version ROMs, but everyone can see what he really wanted to do. Now that you've all seen these, make your own judgment based on your own values.

fas-rs's People

Contributors

shadow3aaa avatar death8023 avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.