Blurry fonts on using Windows default scaling with WSL GUI applications (HiDPI)

Disclaimer: The following procedure may vary with the actual hardware in system. The settings may change in your setup.

First, enable high DPI settings for the X server executable. Close any running instance of that X server. Open the folder where you have installed the X Server e.g. VcxSrv, Xming, X410 etc. Here I choose D:\MyFolder and VcxSrv as example. Open that folder, right click on vcxsrv.exe for VcxSrv or Xming.exe for Xming. Choose Properties > Compatibility tab > Change high DPI settings > Enable Override high DPI scaling > change to 'Application' (or 'System Enhanced' option). Here is the screenshot looks like after changing the settings:

Enable_Dpi_Awareness_vcxsrv

Also do the above steps for xlaunch.exe file. This change will add the following registry values:

[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers]
"D:\\MyFolder\\xlaunch.exe"="~ HIGHDPIAWARE"
"D:\\MyFolder\\vcxsrv.exe"="~ HIGHDPIAWARE"

Next, override GTK+ settings for the X11 environment. This Gnome article has in-depth view of the environment variables. GDK_SCALE will scale the windows by specific factor. GDK_DPI_SCALE will scale DPI for scale aware applications. Enable the settings with the following commands in bash (or other shell).

export GDK_SCALE=0.5
export GDK_DPI_SCALE=2

Change those value according to your system. Now execute the X server and the X11 programs. This reddit thread also helps.


Choose Properties > Compatibility tab > Change high DPI settings > Enable Override high DPI scaling > change to 'Application' (or 'System Enhanced' option).

use Application ,not 'System Enhanced'