Commit 1c1860db authored by Mikhail Tergoev's avatar Mikhail Tergoev

Scripts version 2213

parent c0c48c32
...@@ -2,6 +2,12 @@ You can help us in the development of the project on the website: boosty.to/linu ...@@ -2,6 +2,12 @@ You can help us in the development of the project on the website: boosty.to/linu
----------------------------------------- -----------------------------------------
Changelog: Changelog:
###Scripts version 2213### Date: 03.87.2023 / Update download size: 250 megabytes.
* updated PROTON_LG to version 8-10
* an update from Boria138 has been adopted and finalized, adding a setting for limiting the use of CPU cores. (WINE_CPU_TOPOLOGY)
* added a fix that significantly reduces the CPU load and increases FPS in Unity games (assuming more than 8 logical processor cores)
* fixed changing and disabling FPS cutting
###Scripts version 2212### Date: 01.08.2023 / Update download size: 10 megabytes. ###Scripts version 2212### Date: 01.08.2023 / Update download size: 10 megabytes.
* added D8VK (DirectX 8 to Vulkan API) * added D8VK (DirectX 8 to Vulkan API)
......
...@@ -2,6 +2,12 @@ ...@@ -2,6 +2,12 @@
----------------------------------------- -----------------------------------------
История изменений: История изменений:
###Scripts version 2213### Дата: 03.08.2023 / Размер скачиваемого обновления: 250 мегабайт
* обновлен PROTON_LG до версии 8-10 (фикс UBISOFT: купленные игры работают, для магазина нужен VPN)
* принято и доработано обновение от Boria138 добавляющее настройку ограничения использования ядер ЦПУ. (WINE_CPU_TOPOLOGY)
* добавлен фикс значительно уменьшающий нагрузку CPU и повышающий FPS в Unity играх (при условии более 8 логических ядер процессора)
* исправлены изменение и отключение огранчения FPS
###Scripts version 2212### Дата: 01.08.2023 / Размер скачиваемого обновления: 10 мегабайт ###Scripts version 2212### Дата: 01.08.2023 / Размер скачиваемого обновления: 10 мегабайт
* добавлено использование D8VK (транслятор DirectX 8 в Vulkan API) для старых игр, при использовании DXVK и VKD3D * добавлено использование D8VK (транслятор DirectX 8 в Vulkan API) для старых игр, при использовании DXVK и VKD3D
......
...@@ -840,9 +840,20 @@ pw_init_db () { ...@@ -840,9 +840,20 @@ pw_init_db () {
init_wine_ver && init_wine_ver &&
print_info "Use ${PORTWINE_DB_FILE} db file." print_info "Use ${PORTWINE_DB_FILE} db file."
fi fi
if [ -z "$PATH_TO_GAME" ] ; then if [ -z "${PATH_TO_GAME}" ] ; then
export PATH_TO_GAME="$( cd "$( dirname "${portwine_exe}" )" >/dev/null 2>&1 && pwd )" export PATH_TO_GAME="$( cd "$( dirname "${portwine_exe}" )" >/dev/null 2>&1 && pwd )"
fi fi
if [[ "${PW_WINE_CPU_TOPOLOGY}" == "disabled" ]] && [[ -n "${WINE_CPU_TOPOLOGY}" ]] ; then
export PW_WINE_CPU_TOPOLOGY="${WINE_CPU_TOPOLOGY}"
fi
if ls "${PATH_TO_GAME}"/*_Data/Resources/ | grep "unity" &>/dev/null && \
[[ "${PW_WINE_CPU_TOPOLOGY}" == "disabled" ]] && \
[[ $(grep -c "^processor" /proc/cpuinfo) -gt "8" ]]
then
export PW_WINE_CPU_TOPOLOGY="8:0,1,2,3,4,5,6,7"
print_info "Automatic added fix for unity games: WINE_CPU_TOPOLOGY=8:0,1,2,3,4,5,6,7"
fi
fi fi
return 0 return 0
} }
......
...@@ -236,8 +236,8 @@ if [[ "${update_loc}" == "RUS" ]] ; then ...@@ -236,8 +236,8 @@ if [[ "${update_loc}" == "RUS" ]] ; then
export loc_gui_mango_fps="Ограничить FPS (0 - выключено)" export loc_gui_mango_fps="Ограничить FPS (0 - выключено)"
export loc_gui_mango_fps_help="Включение ограничения количества кадров в секунду средстами MANGOHUD встроенного в PortProton." export loc_gui_mango_fps_help="Включение ограничения количества кадров в секунду средстами MANGOHUD встроенного в PortProton."
export loc_gui_cpu_limit="Ограничить использование ядер процессора (0 - не ограничивать)" export loc_gui_cpu_limit="Ограничить использование ядер процессора"
export loc_gui_cpu_limit_help="Ограничения количества ядер процессора полезно для игр на движке Unity (Рекомендуется выставить значение равное ${half_cores})" export loc_gui_cpu_limit_help="Ограничения количества ядер процессора полезно для игр на движке Unity (Рекомендуется выставить значение равное 8)"
export loc_gui_check_new_wine="Проверяем новые версии WINE на GitHub" export loc_gui_check_new_wine="Проверяем новые версии WINE на GitHub"
export loc_gui_check_new_wine_error="Не удается установить соединение с GitHub\nдля проверки новых версии WINE." export loc_gui_check_new_wine_error="Не удается установить соединение с GitHub\nдля проверки новых версии WINE."
...@@ -487,8 +487,8 @@ A brief instruction: ...@@ -487,8 +487,8 @@ A brief instruction:
export loc_gui_mango_fps="MANGOHUD FPS LIMIT (0-disabled)" export loc_gui_mango_fps="MANGOHUD FPS LIMIT (0-disabled)"
export loc_gui_mango_fps_help="Enabling FPS limits using MANGOHUD built into ${portname}" export loc_gui_mango_fps_help="Enabling FPS limits using MANGOHUD built into ${portname}"
export loc_gui_cpu_limit="Limit the use of processor cores (0 - do not limit)" export loc_gui_cpu_limit="Limit the use of processor cores"
export loc_gui_cpu_limit_help="Limiting the number of CPU cores is useful for Unity games (It is recommended to set the value equal to ${half_cores})" export loc_gui_cpu_limit_help="Limiting the number of CPU cores is useful for Unity games (It is recommended to set the value equal to 8)"
export loc_gui_check_new_wine="Check new version WINE from GitHub" export loc_gui_check_new_wine="Check new version WINE from GitHub"
export loc_gui_check_new_wine_error="Error: check wine from github." export loc_gui_check_new_wine_error="Error: check wine from github."
......
...@@ -39,4 +39,3 @@ export PW_GUI_DISABLED_CS=0 ...@@ -39,4 +39,3 @@ export PW_GUI_DISABLED_CS=0
export PW_MANGOHUD=1 export PW_MANGOHUD=1
export PW_USE_RUNTIME=1 export PW_USE_RUNTIME=1
export PW_USE_GAMEMODE=1 export PW_USE_GAMEMODE=1
export MANGOHUD_CONFIG=font_size=24,position=top-left,toggle_hud=Shift_R+F12,no_display,resolution,wine,gpu_name,vulkan_driver,gpu_stats,vkbasalt,fps_limit=0
...@@ -511,6 +511,12 @@ start_portwine () { ...@@ -511,6 +511,12 @@ start_portwine () {
unset WINE_FULLSCREEN_FAKE_CURRENT_RES WINE_FULLSCREEN_FSR_STRENGTH WINE_FULLSCREEN_INTEGER_SCALING unset WINE_FULLSCREEN_FAKE_CURRENT_RES WINE_FULLSCREEN_FSR_STRENGTH WINE_FULLSCREEN_INTEGER_SCALING
fi fi
if [[ "${PW_WINE_CPU_TOPOLOGY}" != "disabled" ]] ; then
export WINE_CPU_TOPOLOGY="${PW_WINE_CPU_TOPOLOGY}"
else
unset WINE_CPU_TOPOLOGY
fi
for try_cp_dll_from_wine in "ntdll.dll" "vulkan-1.dll" "winevulkan.dll" "amd_ags_x64.dll" "ir50_32.dll" ; do for try_cp_dll_from_wine in "ntdll.dll" "vulkan-1.dll" "winevulkan.dll" "amd_ags_x64.dll" "ir50_32.dll" ; do
if try_copy_file "${WINEDIR}/lib/wine/i386-windows/${try_cp_dll_from_wine}" "${WINEPREFIX}/drive_c/windows/syswow64/${try_cp_dll_from_wine}" if try_copy_file "${WINEDIR}/lib/wine/i386-windows/${try_cp_dll_from_wine}" "${WINEPREFIX}/drive_c/windows/syswow64/${try_cp_dll_from_wine}"
then print_info "Try copy $try_cp_dll_from_wine to syswow64... OK." then print_info "Try copy $try_cp_dll_from_wine to syswow64... OK."
...@@ -607,7 +613,7 @@ pw_run () { ...@@ -607,7 +613,7 @@ pw_run () {
pw_vkbasalt_check pw_vkbasalt_check
PW_LOG_TO_FILE="${PORT_WINE_PATH}/${portname}.log" PW_LOG_TO_FILE="${PORT_WINE_PATH}/${portname}.log"
print_var "WINEDIR" "WINEPREFIX" "WINEDLLOVERRIDES" "PATH_TO_GAME" "PW_WINE_USE" "PW_VULKAN_USE" "VKD3D_CONFIG" \ print_var "WINEDIR" "WINEPREFIX" "WINEDLLOVERRIDES" "PATH_TO_GAME" "PW_WINE_USE" "PW_VULKAN_USE" "VKD3D_CONFIG" \
"PW_LD_LIBRARY_PATH" "PATH" "WINEESYNC" "WINEFSYNC" "WINEFSYNC_FUTEX2" "WINEDLLPATH" "PW_LD_LIBRARY_PATH" "PATH" "WINEESYNC" "WINEFSYNC" "WINEFSYNC_FUTEX2" "WINEDLLPATH" "WINE_CPU_TOPOLOGY"
if [[ "${PW_LOG}" == 1 ]] ; then if [[ "${PW_LOG}" == 1 ]] ; then
echo "WINEDLLOVERRIDES=${WINEDLLOVERRIDES}" >> "${PW_LOG_TO_FILE}" echo "WINEDLLOVERRIDES=${WINEDLLOVERRIDES}" >> "${PW_LOG_TO_FILE}"
echo "------------------------------------" >> "${PW_LOG_TO_FILE}" echo "------------------------------------" >> "${PW_LOG_TO_FILE}"
...@@ -658,15 +664,11 @@ fi ...@@ -658,15 +664,11 @@ fi
unset MANGOHUD MANGOHUD_DLSYM PW_NO_ESYNC PW_NO_FSYNC PW_VULKAN_USE WINEDLLOVERRIDES PW_NO_WRITE_WATCH PW_YAD_SET PW_ICON_FOR_YAD unset MANGOHUD MANGOHUD_DLSYM PW_NO_ESYNC PW_NO_FSYNC PW_VULKAN_USE WINEDLLOVERRIDES PW_NO_WRITE_WATCH PW_YAD_SET PW_ICON_FOR_YAD
unset PW_CHECK_AUTOINSTAL PW_VKBASALT_EFFECTS PW_VKBASALT_FFX_CAS PORTWINE_DB PORTWINE_DB_FILE PW_DISABLED_CREATE_DB unset PW_CHECK_AUTOINSTAL PW_VKBASALT_EFFECTS PW_VKBASALT_FFX_CAS PORTWINE_DB PORTWINE_DB_FILE PW_DISABLED_CREATE_DB
unset CHK_SYMLINK_FILE MESA_GL_VERSION_OVERRIDE PATH_TO_GAME PW_START_DEBUG PORTPROTON_NAME PORTWINE_CREATE_SHORTCUT_NAME unset CHK_SYMLINK_FILE MESA_GL_VERSION_OVERRIDE PATH_TO_GAME PW_START_DEBUG PORTPROTON_NAME PORTWINE_CREATE_SHORTCUT_NAME
unset PW_PREFIX_NAME WINEPREFIX VULKAN_MOD PW_WINE_VER PW_ADD_TO_ARGS_IN_RUNTIME PW_GAMEMODERUN_SLR AMD_VULKAN_ICD unset PW_PREFIX_NAME WINEPREFIX VULKAN_MOD PW_WINE_VER PW_ADD_TO_ARGS_IN_RUNTIME PW_GAMEMODERUN_SLR AMD_VULKAN_ICD PW_WINE_CPU_TOPOLOGY
unset PW_NAME_D_NAME PW_NAME_D_ICON PW_NAME_D_EXEC PW_EXEC_FROM_DESKTOP PW_ALL_DF PW_GENERATE_BUTTONS PW_NAME_D_ICON PW_NAME_D_ICON_48 unset PW_NAME_D_NAME PW_NAME_D_ICON PW_NAME_D_EXEC PW_EXEC_FROM_DESKTOP PW_ALL_DF PW_GENERATE_BUTTONS PW_NAME_D_ICON PW_NAME_D_ICON_48
export portname=PortProton export portname=PortProton
logical_cores=$(grep -c "^processor" /proc/cpuinfo)
half_cores=$((logical_cores / 2))
export half_cores
cd "$(dirname "`readlink -f "$0"`")" && export PORT_SCRIPTS_PATH="$(pwd)" cd "$(dirname "`readlink -f "$0"`")" && export PORT_SCRIPTS_PATH="$(pwd)"
cd "${PORT_SCRIPTS_PATH}/../../" && export PORT_WINE_PATH="$(pwd)" cd "${PORT_SCRIPTS_PATH}/../../" && export PORT_WINE_PATH="$(pwd)"
export PORT_WINE_TMP_PATH="${PORT_WINE_PATH}/data/tmp" export PORT_WINE_TMP_PATH="${PORT_WINE_PATH}/data/tmp"
......
#!/usr/bin/env bash #!/usr/bin/env bash
#Author: Castro-Fidel (linux-gaming.ru) #Author: Castro-Fidel (linux-gaming.ru)
#SCRIPTS_NEXT_VERSION=2212 #SCRIPTS_NEXT_VERSION=2213
######################################################################## ########################################################################
export PW_MANGOHUD=0 export PW_MANGOHUD=0
export MANGOHUD_CONFIG=cpu_stats,cpu_temp,cpu_mhz,cpu_color=2e97cb,cpu_text=CPU,gpu_stats,gpu_temp,gpu_core_clock,gpu_mem_clock,vulkan_driver,gpu_name,gpu_color=2e9762,gpu_text=GPU,vram,vram_color=ad64c1,ram,ram_color=c26693,io_color=a491d3,frame_timing=1,frametime_color=00ff00,time,arch,wine,wine_color=eb5b5b,engine_color=eb5b5b,background_alpha=0.2,font_size=24,background_color=020202,text_color=ffffff,toggle_hud=Shift_R+F12,resolution,vkbasalt export MANGOHUD_CONFIG=cpu_stats,cpu_temp,cpu_mhz,cpu_color=2e97cb,cpu_text=CPU,gpu_stats,gpu_temp,gpu_core_clock,gpu_mem_clock,vulkan_driver,gpu_name,gpu_color=2e9762,gpu_text=GPU,vram,vram_color=ad64c1,ram,ram_color=c26693,io_color=a491d3,frame_timing=1,frametime_color=00ff00,time,arch,wine,wine_color=eb5b5b,engine_color=eb5b5b,background_alpha=0.2,font_size=24,background_color=020202,text_color=ffffff,toggle_hud=Shift_R+F12,resolution,vkbasalt
...@@ -24,6 +24,7 @@ export PW_PREFIX_NAME="DEFAULT" ...@@ -24,6 +24,7 @@ export PW_PREFIX_NAME="DEFAULT"
export WINE_WIN_START="start /wait /high /unix" export WINE_WIN_START="start /wait /high /unix"
export WINE_ALLOW_XIM="0" export WINE_ALLOW_XIM="0"
export PW_USE_SHADER_CACHE="1" export PW_USE_SHADER_CACHE="1"
export PW_WINE_CPU_TOPOLOGY="disabled"
export STAGING_SHARED_MEMORY="1" export STAGING_SHARED_MEMORY="1"
export PROTON_DISABLE_LSTEAMCLIENT="0" export PROTON_DISABLE_LSTEAMCLIENT="0"
export PW_FORCE_LARGE_ADDRESS_AWARE="1" export PW_FORCE_LARGE_ADDRESS_AWARE="1"
...@@ -37,7 +38,7 @@ export PW_WINE_USE="PROTON_LG" ...@@ -37,7 +38,7 @@ export PW_WINE_USE="PROTON_LG"
export PW_PLUGINS_VER="_v12" export PW_PLUGINS_VER="_v12"
export PW_FAKE_DLSS_VER="230506" export PW_FAKE_DLSS_VER="230506"
###WINE_PROTON_LG### ###WINE_PROTON_LG###
export PW_LG_VER="8-9" export PW_LG_VER="8-10"
export PW_PROTON_LG_VER="PROTON_LG_${PW_LG_VER}" export PW_PROTON_LG_VER="PROTON_LG_${PW_LG_VER}"
###WINE_PROTON_GE### ###WINE_PROTON_GE###
export PW_GE_VER="8-3" export PW_GE_VER="8-3"
......
...@@ -150,19 +150,25 @@ pw_tray_icon () { ...@@ -150,19 +150,25 @@ pw_tray_icon () {
pw_gui_for_edit_db () { pw_gui_for_edit_db () {
KEY_EDIT_DB_GUI=$RANDOM KEY_EDIT_DB_GUI=$RANDOM
if [[ -n "`echo "${MANGOHUD_CONFIG}" | grep "fps_limit"`" ]] ; then if echo "${MANGOHUD_CONFIG}" | grep "fps_limit" ; then
FPS_LIMIT_VAR="`echo ${MANGOHUD_CONFIG} | sed 's/.*fps_limit=//g' | awk -F, '{print $1}'`" FPS_LIMIT_VAR="$(echo ${MANGOHUD_CONFIG} | sed 's/.*fps_limit=//' | awk -F, '{print $1}')"
else else
FPS_LIMIT_VAR=0 FPS_LIMIT_VAR=0
fi fi
if [[ -n $WINE_CPU_TOPOLOGY ]] ; then if [[ -n "${PW_WINE_CPU_TOPOLOGY}" ]] && [[ "${PW_WINE_CPU_TOPOLOGY}" != "disabled" ]] ; then
CPU_LIMIT_VAR="`echo ${WINE_CPU_TOPOLOGY%%:*}`" CPU_LIMIT_VAR="`echo ${PW_WINE_CPU_TOPOLOGY%%:*}`"
else else
CPU_LIMIT_VAR=0 CPU_LIMIT_VAR="disabled"
fi fi
echo "FPS_LIMIT_VAR=$FPS_LIMIT_VAR"
echo "CPU_LIMIT_VAR=$CPU_LIMIT_VAR" logical_cores=$(grep -c "^processor" /proc/cpuinfo)
if [[ "${logical_cores}" -le "4" ]] ; then
GET_LOGICAL_CORE="$(seq -s! 1 $((${logical_cores} - 1)))"
else
GET_LOGICAL_CORE="2!$(seq -s! 4 4 $((${logical_cores} - 1)))"
fi
unset ADD_CHK_BOX_EDIT_DB unset ADD_CHK_BOX_EDIT_DB
edit_db_field_add () { edit_db_field_add () {
for int_to_boole in $@ ; do for int_to_boole in $@ ; do
...@@ -194,7 +200,7 @@ pw_gui_for_edit_db () { ...@@ -194,7 +200,7 @@ pw_gui_for_edit_db () {
--field=":LBL" "" \ --field=":LBL" "" \
--field="${loc_gui_arg_exe}!${loc_gui_arg_exe_help} :CBE" "\\${LAUNCH_PARAMETERS[@]}!-dx11 -skipintro 1" \ --field="${loc_gui_arg_exe}!${loc_gui_arg_exe_help} :CBE" "\\${LAUNCH_PARAMETERS[@]}!-dx11 -skipintro 1" \
--field=":LBL" "" \ --field=":LBL" "" \
--field="${loc_gui_cpu_limit}!${loc_gui_cpu_limit_help}" ${CPU_LIMIT_VAR} \ --field="${loc_gui_cpu_limit}!${loc_gui_cpu_limit_help} :CB" "${CPU_LIMIT_VAR}!disabled!${GET_LOGICAL_CORE}" \
--field="${loc_gui_mango_fps}!${loc_gui_mango_fps_help} :SCL" ${FPS_LIMIT_VAR} 2>/dev/null 1> "${PORT_WINE_TMP_PATH}/tmp_output_yad_fps_limit" 2>/dev/null & --field="${loc_gui_mango_fps}!${loc_gui_mango_fps_help} :SCL" ${FPS_LIMIT_VAR} 2>/dev/null 1> "${PORT_WINE_TMP_PATH}/tmp_output_yad_fps_limit" 2>/dev/null &
"${pw_yad_v12_3}" --paned --key="$KEY_EDIT_DB_GUI" --title "EDIT_DB" --text-align=center --height="650" \ "${pw_yad_v12_3}" --paned --key="$KEY_EDIT_DB_GUI" --title "EDIT_DB" --text-align=center --height="650" \
--text "${loc_gui_edit_db} <b>${PORTWINE_DB}</b>\n ${loc_gui_edit_db_help}" --separator=" " --borders=3 \ --text "${loc_gui_edit_db} <b>${PORTWINE_DB}</b>\n ${loc_gui_edit_db_help}" --separator=" " --borders=3 \
...@@ -228,19 +234,22 @@ pw_gui_for_edit_db () { ...@@ -228,19 +234,22 @@ pw_gui_for_edit_db () {
CPU_LIMIT="`cat "${PORT_WINE_TMP_PATH}/tmp_output_yad_fps_limit" | awk -F"%" '{print $7}'`" CPU_LIMIT="`cat "${PORT_WINE_TMP_PATH}/tmp_output_yad_fps_limit" | awk -F"%" '{print $7}'`"
FPS_LIMIT="`cat "${PORT_WINE_TMP_PATH}/tmp_output_yad_fps_limit" | awk -F"%" '{print $8}'`" FPS_LIMIT="`cat "${PORT_WINE_TMP_PATH}/tmp_output_yad_fps_limit" | awk -F"%" '{print $8}'`"
if [ "${FPS_LIMIT}" != 0 ] ; then if [[ "${FPS_LIMIT}" != 0 ]] && [[ "${FPS_LIMIT_VAR}" != 0 ]] ; then
export MANGOHUD_CONFIG="$(echo ${MANGOHUD_CONFIG} | sed "s/fps_limit=${FPS_LIMIT_VAR}/fps_limit=${FPS_LIMIT}/")"
export PW_MANGOHUD=1
elif [[ "${FPS_LIMIT}" != 0 ]] && [[ "${FPS_LIMIT_VAR}" == 0 ]] ; then
export MANGOHUD_CONFIG=${MANGOHUD_CONFIG},fps_limit=${FPS_LIMIT} export MANGOHUD_CONFIG=${MANGOHUD_CONFIG},fps_limit=${FPS_LIMIT}
export PW_MANGOHUD=1 export PW_MANGOHUD=1
elif [[ "${FPS_LIMIT}" == 0 ]] && [[ "${FPS_LIMIT_VAR}" != 0 ]] ; then
export MANGOHUD_CONFIG="$(echo ${MANGOHUD_CONFIG} | sed "s/,fps_limit=${FPS_LIMIT_VAR}//")"
fi fi
if [ "${CPU_LIMIT}" != 0 ] ; then if [[ "${CPU_LIMIT}" != "disabled" ]] ; then
cores=${CPU_LIMIT} export PW_WINE_CPU_TOPOLOGY="${CPU_LIMIT}:$(seq -s, 0 $((${CPU_LIMIT} - 1)))"
topology="${cores}:$(seq -s, 0 $((cores - 1)))"
export WINE_CPU_TOPOLOGY="$topology"
else else
unset WINE_CPU_TOPOLOGY export PW_WINE_CPU_TOPOLOGY="disabled"
fi fi
echo "pw_gui_for_edit_db PORTWINE_DB_FILE=$PORTWINE_DB_FILE" echo "pw_gui_for_edit_db PORTWINE_DB_FILE=$PORTWINE_DB_FILE"
edit_db_from_gui $@ MANGOHUD_CONFIG LAUNCH_PARAMETERS PW_WINDOWS_VER PW_DLL_INSTALL WINEDLLOVERRIDES edit_db_from_gui $@ MANGOHUD_CONFIG LAUNCH_PARAMETERS PW_WINDOWS_VER PW_DLL_INSTALL WINEDLLOVERRIDES PW_WINE_CPU_TOPOLOGY
return 0 return 0
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment