summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--package.json7
-rw-r--r--py_modules/lsfg_vk/constants.py1
-rw-r--r--py_modules/lsfg_vk/installation.py22
3 files changed, 28 insertions, 2 deletions
diff --git a/package.json b/package.json
index 0174f9a..7d1ac8b 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "decky-lsfg-vk",
- "version": "0.12.2",
+ "version": "0.12.3",
"description": "Use Lossless Scaling on the Steam Deck using the lsfg-vk vulkan layer",
"type": "module",
"scripts": {
@@ -63,6 +63,11 @@
"name": "org.freedesktop.Platform.VulkanLayer.lsfg_vk_25.08.flatpak",
"url": "https://github.com/PancakeTAS/lsfg-vk/releases/download/v1.0.0/org.freedesktop.Platform.VulkanLayer.lsfg_vk_25.08.flatpak",
"sha256hash": "0651bda96751ef0f1314a5179585926a0cd354476790ca2616662c39fe6fae54"
+ },
+ {
+ "name": "liblsfg-vk-arm64.so",
+ "url": "https://github.com/xXJSONDeruloXx/lsfg-vk/releases/download/arm-test/liblsfg-vk.so",
+ "sha256hash": "c745893b3798eb1acb422775a43107fc3f2efb2ae2711090b90b04941d8de309"
}
],
"pnpm": {
diff --git a/py_modules/lsfg_vk/constants.py b/py_modules/lsfg_vk/constants.py
index 3d8e44a..795c1bf 100644
--- a/py_modules/lsfg_vk/constants.py
+++ b/py_modules/lsfg_vk/constants.py
@@ -14,6 +14,7 @@ CONFIG_FILENAME = "conf.toml"
LIB_FILENAME = "liblsfg-vk.so"
JSON_FILENAME = "VkLayer_LS_frame_generation.json"
ZIP_FILENAME = "lsfg-vk_noui.zip"
+ARM_LIB_FILENAME = "liblsfg-vk-arm64.so"
FLATPAK_23_08_FILENAME = "org.freedesktop.Platform.VulkanLayer.lsfg_vk_23.08.flatpak"
FLATPAK_24_08_FILENAME = "org.freedesktop.Platform.VulkanLayer.lsfg_vk_24.08.flatpak"
diff --git a/py_modules/lsfg_vk/installation.py b/py_modules/lsfg_vk/installation.py
index 4329d49..f041ea3 100644
--- a/py_modules/lsfg_vk/installation.py
+++ b/py_modules/lsfg_vk/installation.py
@@ -3,6 +3,7 @@ Installation service for lsfg-vk.
"""
import os
+import platform
import shutil
import traceback
import zipfile
@@ -14,7 +15,7 @@ from typing import Dict, Any
from .base_service import BaseService
from .constants import (
LIB_FILENAME, JSON_FILENAME, ZIP_FILENAME, BIN_DIR,
- SO_EXT, JSON_EXT
+ SO_EXT, JSON_EXT, ARM_LIB_FILENAME
)
from .config_schema import ConfigurationManager
from .types import InstallationResponse, UninstallationResponse, InstallationCheckResponse
@@ -48,6 +49,16 @@ class InstallationService(BaseService):
self._extract_and_install_files(zip_path)
+ # If on ARM, overwrite the .so with the ARM version
+ if self._is_arm_architecture():
+ self.log.info("Detected ARM architecture, using ARM binary")
+ arm_so_path = plugin_dir / BIN_DIR / ARM_LIB_FILENAME
+ if arm_so_path.exists():
+ shutil.copy2(arm_so_path, self.lib_file)
+ self.log.info(f"Overwrote with ARM binary: {self.lib_file}")
+ else:
+ self.log.warning(f"ARM binary not found at {arm_so_path}, using x86_64 version")
+
self._create_config_file()
self._create_lsfg_launch_script()
@@ -64,6 +75,15 @@ class InstallationService(BaseService):
self.log.error(error_msg)
return self._error_response(InstallationResponse, str(e), message="")
+ def _is_arm_architecture(self) -> bool:
+ """Check if running on ARM architecture
+
+ Returns:
+ True if running on ARM (aarch64/arm64), False otherwise
+ """
+ machine = platform.machine().lower()
+ return machine in ('aarch64', 'arm64', 'armv8l', 'armv8b')
+
def _extract_and_install_files(self, zip_path: Path) -> None:
"""Extract zip file and install files to appropriate locations