From 8b0dcf7339fb6e59ea13e62704caef2817e6cd7d Mon Sep 17 00:00:00 2001 From: Boris Yumankulov Date: Tue, 14 Jul 2026 20:44:26 +0500 Subject: [PATCH 1/2] fix: unset Vulkan driver override in AppImage runtime Signed-off-by: Boris Yumankulov --- build-aux/share/portproton/scripts/functions_helper | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build-aux/share/portproton/scripts/functions_helper b/build-aux/share/portproton/scripts/functions_helper index f05ff452..9cfe2be7 100755 --- a/build-aux/share/portproton/scripts/functions_helper +++ b/build-aux/share/portproton/scripts/functions_helper @@ -1216,6 +1216,10 @@ pw_init_runtime () { return 0 fi + if [[ -n "${APPIMAGE:-}" ]] ; then + unset VK_DRIVER_FILES VK_ICD_FILENAMES VK_ADD_DRIVER_FILES + fi + if grep -i "altlinux" "/etc/os-release" &>/dev/null ; then export LIBGL_DRIVERS_PATH="/usr/lib/X11/modules/dri:/usr/lib64/X11/modules/dri" if [[ "${LSPCI_VGA,,}" == *nvidia* ]] ; then -- 2.54.0 From 92560a4446aed682786c43c8e03323e00c045d91 Mon Sep 17 00:00:00 2001 From: Boris Yumankulov Date: Thu, 16 Jul 2026 10:04:23 +0500 Subject: [PATCH 2/2] fix: clear AppImage Vulkan overrides before runtime launch Signed-off-by: Boris Yumankulov --- .../share/portproton/scripts/functions_helper | 8 ++++---- tests/test_portproton_config.py | 14 ++++++++++++++ 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/build-aux/share/portproton/scripts/functions_helper b/build-aux/share/portproton/scripts/functions_helper index 9cfe2be7..0c09cb31 100755 --- a/build-aux/share/portproton/scripts/functions_helper +++ b/build-aux/share/portproton/scripts/functions_helper @@ -1216,10 +1216,6 @@ pw_init_runtime () { return 0 fi - if [[ -n "${APPIMAGE:-}" ]] ; then - unset VK_DRIVER_FILES VK_ICD_FILENAMES VK_ADD_DRIVER_FILES - fi - if grep -i "altlinux" "/etc/os-release" &>/dev/null ; then export LIBGL_DRIVERS_PATH="/usr/lib/X11/modules/dri:/usr/lib64/X11/modules/dri" if [[ "${LSPCI_VGA,,}" == *nvidia* ]] ; then @@ -1278,6 +1274,10 @@ ${PW_PV_OVERRIDES}/i386-linux-gnu/aliases:\ env PATH=$PW_PATH " fi + if [[ -n "${APPIMAGE:-}" ]] ; then + export pw_runtime="env -u VK_DRIVER_FILES -u VK_ICD_FILENAMES ${pw_runtime}" + fi + if [[ "$PW_USE_SYSTEM_VK_LAYERS" == "1" ]] ; then export PRESSURE_VESSEL_IMPORT_VULKAN_LAYERS=1 unset PW_VK_LAYER_PATH diff --git a/tests/test_portproton_config.py b/tests/test_portproton_config.py index 57166916..4b2489e2 100644 --- a/tests/test_portproton_config.py +++ b/tests/test_portproton_config.py @@ -182,3 +182,17 @@ def test_run_after_batch_is_created_next_to_exe() -> None: assert 'start "" /unix "${PW_RUN_AFTER_EXE}"' in helper assert 'LAUNCH_PARAMETERS="" proxy_launch_parameters="" \\' in helper assert 'pw_run "${PW_VD_TMP[@]}" "${run_after_bat}"' in helper + + +def test_appimage_vulkan_override_is_cleared_at_runtime_boundary() -> None: + helper = Path("build-aux/share/portproton/scripts/functions_helper").read_text( + encoding="utf-8", + ) + runtime_init = helper.index("pw_init_runtime ()") + runtime_env = "env -u VK_DRIVER_FILES -u VK_ICD_FILENAMES" + runtime_cleanup = helper.index(runtime_env, runtime_init) + runtime_ready = helper.index('print_info "RUNTIME is enabled"', runtime_cleanup) + + assert runtime_init < runtime_cleanup < runtime_ready + assert "VK_ADD_DRIVER_FILES" not in runtime_env + assert "unset VK_DRIVER_FILES" not in helper -- 2.54.0