From dfa725c58d58e78bc2c552a43b5542a011726929 Mon Sep 17 00:00:00 2001 From: Concedo <39025047+LostRuins@users.noreply.github.com> Date: Tue, 3 Feb 2026 19:49:38 +0800 Subject: [PATCH] make the dpi fix more universal. not a perfect solution --- koboldcpp.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/koboldcpp.py b/koboldcpp.py index f89f0eaeb..31beebdb7 100755 --- a/koboldcpp.py +++ b/koboldcpp.py @@ -5244,11 +5244,8 @@ def show_gui(): def get_problematic_scaler(): if sys.platform != "linux": return False - import xml.etree.ElementTree as ET - from pathlib import Path - fractional_enabled = False # Check if fractional scaling is enabled xdg_curr_desk = os.environ.get("XDG_CURRENT_DESKTOP") - if xdg_curr_desk and "KDE" in xdg_curr_desk and os.environ.get("XDG_SESSION_TYPE") == "wayland": #first handle kde + if xdg_curr_desk and ("KDE" in xdg_curr_desk or "GNOME" in xdg_curr_desk or "Cinnamon" in xdg_curr_desk): # broad spectrum dpi handler dpi = 0 try: output = subprocess.check_output(["xrdb", "-query"], text=True).strip() @@ -5261,6 +5258,10 @@ def show_gui(): pass if dpi > 100: return True + + import xml.etree.ElementTree as ET + from pathlib import Path + fractional_enabled = False # Check if fractional scaling is enabled try: features = subprocess.check_output( ["gsettings", "get", "org.gnome.mutter", "experimental-features"],