This repository has been archived by the owner on May 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2468 from JustEnoughLinuxOS/dev
PR for release
- Loading branch information
Showing
73 changed files
with
1,069 additions
and
4,316 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
packages/hardware/quirks/devices/Anbernic RG552/sleep.d/post/002-freq
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/sh | ||
# SPDX-License-Identifier: GPL-2.0 | ||
# Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS) | ||
|
||
### Restore previous governors before going to sleep | ||
|
||
. /etc/profile | ||
|
||
### Set max/min freq to lowest available value | ||
echo 1008000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq | ||
echo 1008000 > /sys/devices/system/cpu/cpufreq/policy4/scaling_min_freq | ||
echo 600000000 > /sys/devices/platform/ff9a0000.gpu/devfreq/ff9a0000.gpu/min_freq | ||
|
||
echo 1608000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq | ||
echo 2088000 > /sys/devices/system/cpu/cpufreq/policy4/scaling_max_freq | ||
echo 900000000 > /sys/devices/platform/ff9a0000.gpu/devfreq/ff9a0000.gpu/max_freq | ||
|
||
### Grab the old governors. | ||
OLD_CPU_FREQ=$(get_setting "sleep.cpugovernor") | ||
if [ ! -n "${OLD_CPU_FREQ}" ]; then | ||
OLD_CPU_FREQ="schedutil" | ||
fi | ||
|
||
OLD_GPU_FREQ=$(get_setting "sleep.gpugovernor") | ||
if [ ! -n "${OLD_GPU_FREQ}" ]; then | ||
OLD_GPU_FREQ="simple_ondemand" | ||
fi | ||
|
||
# Restore old governors. | ||
set_cpu_gov "${OLD_CPU_FREQ}" | ||
set_dmc_gov "${OLD_CPU_FREQ}" | ||
set_gpu_gov "${OLD_GPU_FREQ}" |
28 changes: 28 additions & 0 deletions
28
packages/hardware/quirks/devices/Anbernic RG552/sleep.d/pre/002-freq
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/sh | ||
# SPDX-License-Identifier: GPL-2.0 | ||
# Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS) | ||
|
||
# Store current freq governors and set governors to powersave. | ||
|
||
. /etc/profile | ||
|
||
### Get the current cpu and gpu governor, save for when the device wakes from sleep. | ||
CUR_CPU_FREQ="$(cat /sys/devices/system/cpu/cpufreq/policy0/scaling_governor)" | ||
CUR_GPU_FREQ="$(cat /sys/devices/platform/ff9a0000.gpu/devfreq/ff9a0000.gpu/governor)" | ||
|
||
set_setting sleep.cpugovernor "${CUR_CPU_FREQ}" | ||
set_setting sleep.gpugovernor "${CUR_GPU_FREQ}" | ||
|
||
### Set all governors to powersave | ||
set_cpu_gov powersave | ||
set_dmc_gov powersave | ||
set_gpu_gov powersave | ||
|
||
### Set max/min freq to lowest available value | ||
echo 600000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq | ||
echo 600000 > /sys/devices/system/cpu/cpufreq/policy4/scaling_min_freq | ||
echo 200000000 > /sys/devices/platform/ff9a0000.gpu/devfreq/ff9a0000.gpu/min_freq | ||
|
||
echo 600000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq | ||
echo 600000 > /sys/devices/system/cpu/cpufreq/policy4/scaling_max_freq | ||
echo 200000000 > /sys/devices/platform/ff9a0000.gpu/devfreq/ff9a0000.gpu/max_freq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
packages/hardware/quirks/platforms/RK3326/sleep.d/post/002-freq
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/sh | ||
# SPDX-License-Identifier: GPL-2.0 | ||
# Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS) | ||
|
||
### Restore previous governors before going to sleep | ||
|
||
. /etc/profile | ||
|
||
### Grab the old governors. | ||
OLD_CPU_FREQ=$(get_setting "sleep.cpugovernor") | ||
if [ ! -n "${OLD_CPU_FREQ}" ]; then | ||
OLD_CPU_FREQ="schedutil" | ||
fi | ||
|
||
OLD_GPU_FREQ=$(get_setting "sleep.gpugovernor") | ||
if [ ! -n "${OLD_GPU_FREQ}" ]; then | ||
OLD_GPU_FREQ="simple_ondemand" | ||
fi | ||
|
||
# Restore old governors. | ||
set_cpu_gov "${OLD_CPU_FREQ}" | ||
set_dmc_gov "${OLD_CPU_FREQ}" | ||
set_gpu_gov "${OLD_GPU_FREQ}" |
19 changes: 19 additions & 0 deletions
19
packages/hardware/quirks/platforms/RK3326/sleep.d/pre/002-freq
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/sh | ||
# SPDX-License-Identifier: GPL-2.0 | ||
# Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS) | ||
|
||
# Store current freq governors and set governors to powersave. | ||
|
||
. /etc/profile | ||
|
||
### Get the current cpu and gpu governor, save for when the device wakes from sleep. | ||
CUR_CPU_FREQ="$(cat /sys/devices/system/cpu/cpufreq/policy0/scaling_governor)" | ||
CUR_GPU_FREQ="$(cat /sys/devices/platform/ff400000.gpu/devfreq/ff400000.gpu/governor)" | ||
|
||
set_setting sleep.cpugovernor "${CUR_CPU_FREQ}" | ||
set_setting sleep.gpugovernor "${CUR_GPU_FREQ}" | ||
|
||
### Set all governors to powersave | ||
set_cpu_gov powersave | ||
set_dmc_gov powersave | ||
set_gpu_gov powersave |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/sh | ||
# SPDX-License-Identifier: GPL-2.0 | ||
# Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS) | ||
|
||
# Minimal OS variable loading for performance | ||
. /etc/profile.d/001-functions | ||
. /etc/profile.d/099-freqfunctions | ||
|
||
tocon "Setting performance mode..." | ||
|
||
### Enable the desired number of threads. | ||
tocon "Restoring cpu threads..." | ||
NUMTHREADS=$(get_setting "system.threads") | ||
if [ -n "${NUMTHREADS}" ] | ||
then | ||
onlinethreads ${NUMTHREADS} 0 | ||
else | ||
onlinethreads all 1 | ||
fi | ||
|
||
### If we don't have a default governor set, set it | ||
### to schedutil but don't enable it. | ||
if [ -z "$(get_setting system.cpugovernor)" ] | ||
then | ||
set_setting system.cpugovernor schedutil | ||
fi | ||
|
||
### Set the default GPU performance mode | ||
GPUPERF=$(get_setting system.gpuperf) | ||
if [ -n "${GPUPERF}" ] | ||
then | ||
gpu_performance_level ${GPUPERF} | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/sh | ||
# SPDX-License-Identifier: GPL-2.0 | ||
# Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS) | ||
|
||
# Minimal OS variable loading for performance | ||
. /etc/profile.d/001-functions | ||
|
||
tocon "Configure suspend mode..." | ||
|
||
### Configure suspend mode. | ||
MYSLEEPMODE=$(get_setting system.suspendmode) | ||
if [ -n "${MYSLEEPMODE}" ] | ||
then | ||
/usr/bin/suspendmode ${MYSLEEPMODE} | ||
else | ||
/usr/bin/suspendmode mem | ||
fi |
Oops, something went wrong.