How to Set Up HiDPI and 4K Displays on Linux
Configure HiDPI and 4K scaling on Linux across GNOME, KDE, Sway, and X11—including fractional scaling and mixed-DPI multi-monitor setups.
Before you start
- ▸A HiDPI, 4K, or mixed-DPI multi-monitor setup already physically connected
- ▸GNOME 45+, KDE Plasma 6, or a wlroots compositor (Sway 1.9+, Hyprland) for best results
- ▸sudo access to edit system-wide display manager configuration if needed
- ▸Basic familiarity with editing dotfiles and reloading a desktop session
Running a 4K or HiDPI display on Linux has improved dramatically, but it still requires deliberate configuration. The core challenge is that X11 and Wayland handle scaling differently, desktop environments each add their own layer, and multi-monitor setups with mixed DPI are notoriously awkward. This guide works through each environment methodically so you end up with crisp text and correctly sized UI elements—not just a zoomed-in mess.
Understanding the Scaling Stack
Before touching any settings, understand what you're configuring. DPI scaling on Linux works at multiple layers:
- Display server: X11 uses a global scale factor; Wayland supports per-output scaling natively.
- Desktop environment: GNOME, KDE, etc. apply their own scale on top of the server.
- Toolkit: GTK and Qt each have their own DPI variables that applications read.
- Individual apps: Electron, Java, and some legacy X apps ignore system settings entirely and need their own flags.
A 4K (3840×2160) display at 27 inches has roughly 163 PPI. At 100% scaling, UI elements are uncomfortably small. Integer scaling (2×) makes everything exactly crisp; fractional scaling (1.5×, 1.25×) trades some sharpness for a better fit and is the realistic choice for 24-inch 4K or 1440p panels.
GNOME on Wayland (Recommended Path)
GNOME on Wayland is the most capable environment for HiDPI right now. Integer scaling is stable; fractional scaling is available but experimental—enable it only if integer scaling doesn't suit you.
Integer Scaling
Open Settings → Displays and set Scale to 200%. That's it for most hardware. To do this via CLI:
gsettings set org.gnome.desktop.interface scaling-factor 2
Fractional Scaling
Enable the experimental feature flag first, then the option appears in Displays:
gsettings set org.gnome.mutter experimental-features "['scale-monitor-framebuffer']"
# Or, if you also need Xwayland fractional scaling:
gsettings set org.gnome.mutter experimental-features "['scale-monitor-framebuffer','xwayland-native-scaling']"
Log out and back in. Settings → Displays will now offer 125%, 150%, 175% in addition to 100% and 200%. Pick 150% for a 27-inch 4K panel—it's a comfortable fit without requiring 2× panel real estate.
Per-Monitor Scaling (Mixed DPI)
On Wayland, GNOME sets scale per output. Plug in both monitors, go to Settings → Displays, select each display individually, and apply its own scale. No extra configuration is needed—the compositor handles it.
KDE Plasma on Wayland
Plasma 6 (released early 2024) made Wayland the default and brought solid fractional scaling. On Plasma 5 the story is patchier; upgrade if you can.
Setting Scale in Plasma 6
Go to System Settings → Display and Monitor → Displays and use the Scale slider. Plasma accepts any value from 1.0 to 3.0 in 0.25 steps. You can also set it with kscreen-doctor:
# List outputs
kscreen-doctor -o
# Set 150% on output named DP-1
kscreen-doctor output.DP-1.scale.1.5
Changes take effect immediately without a logout on Plasma 6.
Plasma on X11 (Fallback)
Plasma's X11 session uses a global scale. In System Settings → Display and Monitor, "Global Scale" applies to the whole session. For non-integer values, Plasma renders at 2× and downscales—it looks decent but wastes some GPU bandwidth. Mixed-DPI setups on X11 in Plasma are painful; Wayland is the right answer here.
X11 Environments (XFCE, Cinnamon, i3, etc.)
X11 has no native per-output fractional scaling. Your options are a global integer scale via Xft DPI, or using RandR scaling hacks.
Setting Xft DPI
The Xft.dpi resource controls text rendering size across all toolkits that respect it. 96 is baseline 1×; 192 is 2×; 144 is 1.5×.
# Add to ~/.Xresources
echo 'Xft.dpi: 144' >> ~/.Xresources
xrdb -merge ~/.Xresources
Set GDK and Qt scales to match:
# Add to ~/.profile or your DE's autostart environment file
export GDK_SCALE=2
export GDK_DPI_SCALE=0.75 # corrects GTK if panel renders too large
export QT_AUTO_SCREEN_SCALE_FACTOR=1
export QT_SCALE_FACTOR=1.5
Log out and back in for these to fully apply. The GDK_SCALE value must be an integer; GDK_DPI_SCALE is a float that fine-tunes within that integer step.
RandR Downscaling for Mixed DPI on X11
The common workaround for a HiDPI + 1080p combo is to render the HiDPI output at 2× and tell RandR to scale the 1080p output up to match:
# Example: eDP-1 is 4K built-in, HDMI-1 is external 1080p
# Run the 4K screen at native resolution
xrandr --output eDP-1 --mode 3840x2160 --scale 1x1
# Scale up 1080p output by 2× so its UI elements match physical size
xrandr --output HDMI-1 --mode 1920x1080 --scale 2x2 --panning 3840x2160
The 1080p panel will look slightly soft because it's being upscaled in software. This is the best X11 can do without a compositor that supports per-output scaling (some compositors like compton/picom don't; wlroots-based Wayland compositors do).
Sway and wlroots-Based Compositors
Sway, Hyprland, and River all use wlroots, which has first-class per-output scaling.
# In ~/.config/sway/config
output eDP-1 scale 2
output DP-1 scale 1.5
# Hyprland: in ~/.config/hypr/hyprland.conf
monitor=eDP-1,3840x2160@60,0x0,2
monitor=DP-1,2560x1440@144,3840x0,1.5
Reload the compositor config after editing (Sway: swaymsg reload; Hyprland: hyprctl reload).
Toolkit and Application Overrides
GTK Apps
GTK 4 respects Wayland scaling automatically. GTK 3 apps sometimes need a nudge:
export GDK_SCALE=2
Qt Apps
export QT_QPA_PLATFORM=wayland # use Wayland backend
export QT_AUTO_SCREEN_SCALE_FACTOR=1
Electron Apps (VS Code, Slack, etc.)
Electron 22+ supports Wayland natively. Launch with:
code --enable-features=UseOzonePlatform --ozone-platform=wayland
For permanent effect, add those flags to the app's .desktop file Exec= line, or create a local override:
cp /usr/share/applications/code.desktop ~/.local/share/applications/
# Then edit the Exec= line in the copy
Firefox and Chromium
Both run natively on Wayland and pick up compositor scaling without extra flags on modern releases. If Firefox appears blurry, check about:config and ensure widget.use-xdg-desktop-portal is true and set MOZ_ENABLE_WAYLAND=1 in your environment if on an older version.
Verification
Check that the system reports the correct DPI and that applications render at the expected size.
# On X11: query reported DPI
xdpyinfo | grep -A2 resolution
# Expected output on a 4K panel with 2× scale:
# resolution: 192x192 dots per inch
# On Wayland (GNOME): confirm active scaling
gsettings get org.gnome.desktop.interface text-scaling-factor
mutter --print-config 2>/dev/null | grep scale # varies by version
Open a terminal and a browser side by side. Text should look identical in physical size to a correctly scaled Windows or macOS machine. If one app looks dramatically larger or smaller than others, that application is ignoring system scaling and needs an explicit environment variable or launch flag.
Troubleshooting
- Blurry Xwayland apps: Enable
xwayland-native-scalingin GNOME mutter experimental features (see above). In KDE, this is on by default from Plasma 6.1. - Cursor size inconsistent: Set
XCURSOR_SIZE=48(or 32 for 1.5×) in your environment, and in GNOME/KDE set cursor size in accessibility or cursor settings to match. - Second monitor wrong size after resume: This is a known Wayland compositor bug on some GPU drivers. As a workaround, add a udev rule or systemd service to re-apply RandR/kscreen settings on resume. KDE's kscreen-doctor can be called from a systemd
sleep.targethook. - Login screen (GDM/SDDM) not scaled: GDM reads
/usr/share/glib-2.0/schemas/overrides; create/usr/share/glib-2.0/schemas/93_hidpi.gschema.overridewith[org.gnome.desktop.interface]\nscaling-factor=2then runglib-compile-schemas /usr/share/glib-2.0/schemas/. SDDM: setEnableHiDPI=truein/etc/sddm.conf. - Steam and games rendering at wrong resolution: In Steam settings, under Display, enable "Zoom level" for the client. For games, set the in-game resolution to your panel's native resolution; scaling is handled by the game engine, not the compositor.
Frequently asked questions
- Is fractional scaling on Wayland safe to use daily?
- On GNOME with the scale-monitor-framebuffer flag it's been stable for most users since GNOME 45. On KDE Plasma 6 it's fully supported and on by default. It renders at a higher internal resolution and downsamples, so GPU usage is slightly higher, but it's production-ready on modern hardware.
- Why do some apps still look blurry on Wayland?
- Apps running through the Xwayland compatibility layer don't always receive the Wayland scale signal. Enable xwayland-native-scaling in GNOME mutter, or upgrade to Plasma 6.1+ on KDE. Apps that can run natively on Wayland (using the ozone-platform flag for Electron, for example) will be sharper.
- Can I use different scaling on my laptop screen and an external 1080p monitor?
- On Wayland (GNOME, Plasma, Sway, Hyprland) yes—each output gets its own scale factor set independently. On X11 there is no true per-monitor fractional scaling; the RandR upscaling workaround is the closest approximation and involves some softness on the upscaled output.
- My cursor is tiny on some apps and huge on others. How do I fix it?
- Set XCURSOR_SIZE in your environment (e.g., export XCURSOR_SIZE=48 for 2× scaling) and ensure the cursor theme size matches in your DE's settings. The mismatch usually occurs because X11 apps read XCURSOR_SIZE while Wayland-native apps read the portal or DE setting.
- Does GDK_SCALE work for all GTK applications?
- GDK_SCALE must be a whole integer and applies to GTK 3 and GTK 4 apps that use the X11 backend. On Wayland, GTK 4 reads the compositor scale directly and ignores GDK_SCALE, so the variable is mainly needed on X11 sessions or for forcing GTK 3 apps to scale correctly.
Related guides
Linux Clipboards Explained (+ Clipboard Managers)
Learn the difference between Linux's PRIMARY and CLIPBOARD selections, use xclip, xsel, and wl-clipboard from the terminal, and manage history with GPaste or Klipper.
Configure LibreOffice for Daily Use
Configure LibreOffice for daily use: set default save formats for MS Office interop, tune autosave, install fonts, and add productivity extensions.
Configure the Touchpad and Multitouch Gestures
Configure Linux touchpad behavior and multitouch gestures using libinput, libinput-gestures, and native GNOME and KDE Plasma settings on both Wayland and X11.
Wayland vs X11: How to Choose and Configure Each
Know when to run Wayland or X11, how to check your current session, switch at login with GDM/SDDM/LightDM, and handle NVIDIA and XWayland edge cases.