Resequence thread and gpu setting as it was being excuted too early on some devices.

This commit is contained in:
fewtarius 2023-11-27 13:17:55 +00:00
parent 08ed8e3b6b
commit caec8f9d4d
No known key found for this signature in database
GPG key ID: F4AE55305D1B8C1A
3 changed files with 53 additions and 36 deletions

View file

@ -25,42 +25,9 @@ fi
### to last known good state if corrupt.
/usr/bin/chksysconfig verify
### Clean up settings
sort_settings
### We do not want to mount the cloud drive on startup
### so we'll reset the mount option to 0.
set_setting clouddrive.mounted 0
### 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.
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
### Configure suspend mode.
MYSLEEPMODE=$(get_setting system.suspendmode)
if [ -n "${MYSLEEPMODE}" ]
then
/usr/bin/suspendmode ${MYSLEEPMODE}
else
/usr/bin/suspendmode mem
fi
### Clean up settings
sort_settings

View file

@ -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

View file

@ -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