摘要
本文讲述如何在 DAYU200,也即 RK3568 平台设置 CPU、GPU 等设备的运行频率。
CPU 频率设置
查看可用 Governor 和频率
cat /sys/devices/system/cpu/cpufreq/policy0/scaling_available_governors
# For DAYU200, output is conservative ondemand userspace powersave performance schedutil
cat /sys/devices/system/cpu/cpufreq/policy0/scaling_available_frequencies
# # For DAYU200, output is 408000 600000 816000 1104000 1416000 1608000 1800000 1992000
设置 Governor 和频率
echo <governor_name> > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor # set current governor
cat /sys/devices/system/cpu/cpufreq/policy0/scaling_governor # print current governor
echo <cpu_freq_value> > /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq; # set cpu min freq
echo <cpu_freq_value> > /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq; # set cpu max freq
cat /sys/devices/system/cpu/cpufreq/policy0/cpuinfo_cur_freq; # print current cpu freq
GPU 频率设置
查看可用 Governor 和频率
cat /sys/devices/platform/fde60000.gpu/devfreq/fde60000.gpu/available_governors
# For DAYU200, output is userspace powersave performance simple_ondemand
cat /sys/devices/platform/fde60000.gpu/devfreq/fde60000.gpu/available_frequencies
# For DAYU200, output is 800000000 700000000 600000000 400000000 300000000 200000000
设置 Governor 和频率
echo <governor_name> > /sys/devices/platform/fde60000.gpu/devfreq/fde60000.gpu/governor # set current governor
cat /sys/devices/platform/fde60000.gpu/devfreq/fde60000.gpu/governor # print current governor
echo <gpu_freq_value> > /sys/devices/platform/fde60000.gpu/devfreq/fde60000.gpu/min_freq; # set cpu min freq
echo <gpu_freq_value> > /sys/devices/platform/fde60000.gpu/devfreq/fde60000.gpu/max_freq; # set cpu max freq
cat /sys/devices/platform/fde60000.gpu/devfreq/fde60000.gpu/cur_freq; # print current cpu freq
参考
笔者自用的设置命令如下:
hdc shell "echo userspace > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor;cat /sys/devices/system/cpu/cpufreq/policy0/scaling_governor;echo 1992000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq;echo 1992000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq;cat /sys/devices/system/cpu/cpufreq/policy0/cpuinfo_cur_freq;echo userspace > /sys/devices/platform/fde60000.gpu/devfreq/fde60000.gpu/governor;cat /sys/devices/platform/fde60000.gpu/devfreq/fde60000.gpu/governor;echo 800000000 > /sys/devices/platform/fde60000.gpu/devfreq/fde60000.gpu/min_freq;echo 800000000 > /sys/devices/platform/fde60000.gpu/devfreq/fde60000.gpu/max_freq;cat /sys/devices/platform/fde60000.gpu/devfreq/fde60000.gpu/cur_freq;"
最后
有很多小伙伴不知道学习哪些鸿蒙开发技术?不知道需要重点掌握哪些鸿蒙应用开发知识点?而且学习时频繁踩坑,最终浪费大量时间。所以有一份实用的鸿蒙(HarmonyOS NEXT)资料用来跟着学习是非常有必要的。
鸿蒙HarmonyOS Next全套学习资料←点击领取!(安全链接,放心点击)
这份鸿蒙(HarmonyOS NEXT)资料包含了鸿蒙开发必掌握的核心知识要点,内容包含了(ArkTS、ArkUI开发组件、Stage模型、多端部署、分布式应用开发、音频、视频、WebGL、OpenHarmony多媒体技术、Napi组件、OpenHarmony内核、Harmony南向开发、鸿蒙项目实战等等)鸿蒙(HarmonyOS NEXT)技术知识点。
希望这一份鸿蒙学习资料能够给大家带来帮助,有需要的小伙伴自行领取,限时开源,先到先得~无套路领取!!
鸿蒙(HarmonyOS NEXT)最新学习路线
有了路线图,怎么能没有学习资料呢,小编也准备了一份联合鸿蒙官方发布笔记整理收纳的一套系统性的鸿蒙(OpenHarmony )学习手册(共计1236页)与鸿蒙(OpenHarmony )开发入门教学视频,内容包含:ArkTS、ArkUI、Web开发、应用模型、资源分类…等知识点。
获取以上完整版高清学习路线,请点击→纯血版全套鸿蒙HarmonyOS学习资料
HarmonyOS Next 最新全套视频教程
《鸿蒙 (OpenHarmony)开发基础到实战手册》
OpenHarmony北向、南向开发环境搭建
《鸿蒙开发基础》
- ArkTS语言
- 安装DevEco Studio
- 运用你的第一个ArkTS应用
- ArkUI声明式UI开发
- .……
《鸿蒙开发进阶》
- Stage模型入门
- 网络管理
- 数据管理
- 电话服务
- 分布式应用开发
- 通知与窗口管理
- 多媒体技术
- 安全技能
- 任务管理
- WebGL
- 国际化开发
- 应用测试
- DFX面向未来设计
- 鸿蒙系统移植和裁剪定制
- ……
《鸿蒙进阶实战》
- ArkTS实践
- UIAbility应用
- 网络案例
- ……
大厂面试必问面试题
鸿蒙南向开发技术
鸿蒙APP开发必备
鸿蒙生态应用开发白皮书V2.0PDF
获取以上完整鸿蒙HarmonyOS学习资料,请点击→
纯血版全套鸿蒙HarmonyOS学习资料
总结
总的来说,华为鸿蒙不再兼容安卓,对中年程序员来说是一个挑战,也是一个机会。只有积极应对变化,不断学习和提升自己,他们才能在这个变革的时代中立于不败之地。