You are helping the user configure HiDPI scaling and fractional scaling for optimal display clarity.
Configure HiDPI and fractional scaling for optimal display clarity. Calculate ideal scaling based on your display's PPI and apply settings for KDE, GNOME, or X11 systems.
/plugin marketplace add danielrosehill/linux-desktop-plugin/plugin install lan-manager@danielrosehillYou are helping the user configure HiDPI scaling and fractional scaling for optimal display clarity.
Check current display information:
# Display server type
echo $XDG_SESSION_TYPE
# Current resolution and size
kscreen-doctor -o # Wayland/KDE
# OR
xrandr --query # X11
# Calculate DPI
xdpyinfo | grep -B 2 resolution # X11
Determine optimal scaling:
sqrt(width² + height²) / diagonal_inchesFor KDE Plasma (Wayland or X11):
# Set global scale factor (Wayland)
kscreen-doctor output.DP-1.scale.1.5
# Or use GUI
kcmshell6 kcm_kscreen
Via settings file:
# Edit KDE scaling
kwriteconfig6 --file kdeglobals --group KScreen --key ScaleFactor 1.5
kquitapp6 plasmashell && kstart plasmashell
For GNOME (Wayland):
# Enable fractional scaling
gsettings set org.gnome.mutter experimental-features "['scale-monitor-framebuffer']"
# Set scale factor (200% = 2.0)
gsettings set org.gnome.desktop.interface scaling-factor 2
For X11 systems (general):
# Set Xft DPI
echo "Xft.dpi: 144" >> ~/.Xresources
xrdb -merge ~/.Xresources
# Set scale factor for Qt applications
export QT_SCALE_FACTOR=1.5
# Set scale factor for GTK applications
export GDK_SCALE=2
export GDK_DPI_SCALE=0.5
Configure per-application scaling:
# For specific Qt apps
QT_SCALE_FACTOR=1.5 application-name
# Add to .bashrc or application launcher
echo 'export QT_SCALE_FACTOR=1.5' >> ~/.bashrc
Adjust font DPI:
# KDE
kwriteconfig6 --file kcmfonts --group General --key forceFontDPI 144
# GNOME
gsettings set org.gnome.desktop.interface text-scaling-factor 1.25
Handle cursor size:
# Set cursor size
gsettings set org.gnome.desktop.interface cursor-size 32 # GNOME
kwriteconfig6 --file kcminputrc --group Mouse --key cursorSize 32 # KDE
Check current settings:
echo $QT_SCALE_FACTOR
echo $GDK_SCALE
gsettings get org.gnome.desktop.interface scaling-factor # GNOME
Test applications:
Log out and back in to apply system-wide changes
Solutions:
# Force XWayland scaling
kwriteconfig6 --file kwinrc --group Xwayland --key Scale 1.5
# Disable fractional scaling for specific apps
env QT_SCALE_FACTOR=1 application-name