File tree 1 file changed +9
-4
lines changed
data_from_portwine/scripts
1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -167,8 +167,13 @@ pw_gui_for_edit_db () {
167
167
168
168
GET_GPU_NAMES=$( " $PW_VULKANINFO_PORTABLE " 2> /dev/null | awk -F ' =' ' /deviceName/{print $2}' | sed ' /llvm/d' | sort -u | sed ' s/^ //' | paste -sd ' !' )
169
169
170
-
171
- logical_cores=$( grep -c " ^processor" /proc/cpuinfo)
170
+ logical_cores=$( nproc 2> /dev/null)
171
+
172
+ if [[ $( cat " /sys/devices/system/cpu/smt/active" ) == " 1" ]] ; then
173
+ # Currently (2024) SMT allows 2 threads per core, this might change in the future
174
+ logical_cores=$(( logical_cores / 2 ))
175
+ fi
176
+
172
177
if [[ " ${logical_cores} " -le " 4" ]] ; then
173
178
GET_LOGICAL_CORE=" 1!$( seq -s! 1 $(( ${logical_cores} - 1 )) ) "
174
179
else
@@ -249,9 +254,9 @@ pw_gui_for_edit_db () {
249
254
PW_GPU_USE=" ` cat " ${PORT_WINE_TMP_PATH} /tmp_output_yad_fps_limit" | awk -F" %" ' {print $8}' ` "
250
255
GAMESCOPE_ARGS=" ` cat " ${PORT_WINE_TMP_PATH} /tmp_output_yad_fps_limit" | awk -F" %" ' {print $9}' ` "
251
256
# PW_AMD_VULKAN_USE="`cat "${PORT_WINE_TMP_PATH}/tmp_output_yad_fps_limit" | awk -F"%" '{print $10}'`"
252
-
257
+
253
258
if [[ " ${CPU_LIMIT} " != " disabled" ]] ; then
254
- export PW_WINE_CPU_TOPOLOGY=" ${CPU_LIMIT} :$( seq -s, 0 $(( ${CPU_LIMIT} - 1 )) ) "
259
+ export PW_WINE_CPU_TOPOLOGY=" ${CPU_LIMIT} :$( seq -s, 0 $(( ${CPU_LIMIT} - 1 )) ) "
255
260
else
256
261
export PW_WINE_CPU_TOPOLOGY=" disabled"
257
262
fi
You can’t perform that action at this time.
0 commit comments