From 133fa5b6d0531e93a968c30fa0c5b9d10909b6d7 Mon Sep 17 00:00:00 2001 From: Boris Yumankulov Date: Wed, 16 Jul 2025 23:01:43 +0500 Subject: [PATCH] feat: replace gamemode with tuned Signed-off-by: Boris Yumankulov --- data_from_portwine/scripts/functions_helper | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/data_from_portwine/scripts/functions_helper b/data_from_portwine/scripts/functions_helper index 2bd1314e..49e3604e 100755 --- a/data_from_portwine/scripts/functions_helper +++ b/data_from_portwine/scripts/functions_helper @@ -2041,6 +2041,9 @@ stop_portwine () { pw_exit_tray pw_auto_create_shortcut add_in_stop_portwine + if [[ -n "$PW_TUNED_PROFILE" ]] ; then + tuned-adm profile $PW_TUNED_PROFILE + fi if [[ $PW_LOG != 1 ]] && [[ -n $START_PW_TIME_IN_GAME ]] ; then debug_timer --end -s "PW_TIME_IN_GAME" @@ -3608,6 +3611,15 @@ start_portwine () { else export PW_POWERPROFILECTL_SLR="" fi + elif command -v tuned-adm &>/dev/null ; then + export PW_TUNED_PROFILE=$(tuned-adm active | awk -F': ' '{print $2}') + if tuned-adm list | grep -q 'throughput-performance' ; then + tuned-adm profile throughput-performance + print_info "Gamemode replaced by tuned to avoid conflict with ananicy and sched-ext." + export PW_POWERPROFILECTL_SLR="" + else + export PW_POWERPROFILECTL_SLR="" + fi fi elif check_flatpak ; then export GAMEMODERUN=1