Mouse pointer is scaled as of display config is scaled
Environment
Windows build number: 10.0.21364.0
Your Distribution version: Ubuntu 20.04.2 LTS on Windows 10 x86_64
Your WSLg version: 1.0.17.1
Steps to reproduce
- Set display
Scale and layoutoption to more than 100% eg: 250%. - Install and run
gnome-terminal
WSL logs:
versions.txtWSLg ( x86_64 ): 1.0.17+3.Branch.master.Sha.a526dfd5ad03d126bb2d8c528f6c3563e86a40da Mariner: VERSION="1.0.20210224" FreeRDP: e4a2fc2053bd8c5f99455fcd08ffee7e5591567a weston: fd961f5cd116c9358d82ce94d139c1578e21bd00 pulseaudio: 2f0f0b8c3872780f15e275fc12899f4564f01bd5 mesa:
Expected behavior
The pointer should have a normal size compared to running apps. Text selection should be selected only under that cursor.
Actual behavior
It's scaled to a bigger size and does wrong text selection.
Demo Video:
https://user-images.githubusercontent.com/24957/115858942-bf180880-a459-11eb-83e1-1a0e587fbcab.mp4
Display Config:

@noomz , please refer https://github.com/microsoft/wslg/issues/23 and enable fractional scaling support and check if it solves.
@hideyukn88 Nope. It doesn't work. It's the UI interface that changes, the mouse pointer size is still big and fail on selection.
@hideyukn88 It can't be solved, and the mouse will be enlarged whether it is on 200% desktop or 100% desktop. I use archlinux. The system I used before wslg did not increase the size of the application mouse after upgrading to wslg, but my newly installed system showed that the mouse became larger.
When the mouse is placed on the border, it is not enlarged, only when it is placed in the menu or text area.
@ati46 , I am not able to reproduce that enlarged cursor in your video with Ubuntu 20.04 LTS with gnome-terminal. For reference, would you please check if your gnome-terminal is running in X11 backend or Wayland mode ? (For me I can't repro in both mode though) Normally by default, it runs on wayland mode (as WSLg runs on wayland compositor), but can switch to X11 backend by "export GDK_BACKEND=x11".
Also, the regarding to selection, the cursor's hotspot is upper left corner of cursor bounding box, not center of cursor image, please check if selection is made at hotspot? Thanks!
After restart yesterday, the mouse pointer is not large, and, gnome-terminal is not scaled too (previously scaled). No further configuration on WSLg. And the selection hotspot is at the center of the characters, not the left corner.
https://user-images.githubusercontent.com/24957/116803732-768cd900-ab44-11eb-9f19-a0d83e3440f8.mp4
After last windows 10 next updated today. The cursor is still scaled.
Windows 11 cursor it too big. But this solution can solve the issue as temporary solution.
sudo apt-get update
sudo apt-get install dconf-tools
dconf-editor
navigate to org.gnome.desktop.interface
and change cursor-size from 24 to 12.

I have the same issue here on Windows11/WSLg with a 4k screen / 200% scaling. The pointer is too big. I changed the pointer size using gsettings, with works for the standard cursor, but not for custom cursors which are created by some application (e.g., gnumeric).
Windows 11 cursor it too big. But this solution can solve the issue as temporary solution.
sudo apt-get updatesudo apt-get install dconf-toolsdconf-editornavigate toorg.gnome.desktop.interfaceand change cursor-size from 24 to 12.
I face this error E: Unable to locate package dconf-tools when I try sudo apt-get install dconf-tools can you please help me with this
Windows 11 cursor it too big. But this solution can solve the issue as temporary solution.
sudo apt-get updatesudo apt-get install dconf-toolsdconf-editornavigate toorg.gnome.desktop.interfaceand change cursor-size from 24 to 12.I face this error
E: Unable to locate package dconf-toolswhen I trysudo apt-get install dconf-toolscan you please help me with this
Just install dconf-editor is enough.
I have the same issue (in intellijidea). The cursor is correct on the menubar, but huge when over the text area. It's probably related to some old setting/configuration:

Try this >
Size - integer value
echo "Xcursor.size: Size" > ~/.Xresources
xrdb -load ~/.Xresources
If you're using wayland, this might work for you:
gsettings set org.gnome.desktop.interface cursor-size 12
This sets the size to 12 which looks to me about the same size as that of the native cursor. You can change the size to whatever you want.
To view the current value:
gsettings get org.gnome.desktop.interface cursor-size
The gsettings workaround is unacceptable if you are using waypipe to access a remote machine. Microsoft needs to fix this bug that has been reported more than two years ago. They haven't even acknowledged it.
I'm running into the same issue. The fractional scaling link didn't work. It affected the PyCharm window and its content, but not the mouse cursor.
The gsettings command did nothing for me either and I'm using Wayland.
WSL version: 2.2.4.0
Kernel version: 5.15.153.1-2
WSLg version: 1.0.61
MSRDC version: 1.2.5326
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26091.1-240325-1447.ge-release
Windows version: 10.0.19045.4529
My distro is Ubuntu-24.04 as of about 2024-06-18
FWIW, I don't have this problem with my Ubuntu-20.04 WSL2 distro on the same machine
echo "Xcursor.size: Size" > ~/.Xresources xrdb -load ~/.Xresources
The good news, this works for me. The bad news, I need to do this every time wsl restarts
Placing this inside .bashrc kind of fixes it. But only if I launch an interactive terminal first and then my gui app But not when launching an application via the windows side shortcut
Where can I put the xrdb -load ~/.Xresources so that it gets picked up when starting an application via its shortcut ?
I have tried creating ~/.xinitrc, /etc/X11/xinit/xinitrc and placing it there, but that did not help
Same issue here:
Ubuntu 22.0.4 OK Ubuntu 24.0.4 big mouse pointer
WSL-Version: 2.3.14.0 Kernelversion: 6.6.36.3-1 WSLg-Version: 1.0.64 MSRDC-Version: 1.2.5326 Direct3D-Version: 1.611.1-81528511 DXCore-Version: 10.0.26100.1-240331-1435.ge-release Windows-Version: 10.0.22621.4037
I put this in~/.profile which seems to work pretty well:
# load any xresrouce settings on login:
if [ -e "$HOME/.Xresources" ]; then
# echo "Not loading xresource file"
xrdb -load "$HOME/.Xresources"
fi
echo "Xcursor.size: Size" > ~/.Xresources xrdb -load ~/.Xresources
The good news, this works for me. The bad news, I need to do this every time wsl restarts
Placing this inside .bashrc kind of fixes it. But only if I launch an interactive terminal first and then my gui app But not when launching an application via the windows side shortcut
Where can I put the
xrdb -load ~/.Xresourcesso that it gets picked up when starting an application via its shortcut ?I have tried creating ~/.xinitrc, /etc/X11/xinit/xinitrc and placing it there, but that did not help
My particular problem was that PyCharm cursor was enlarged when using the app. I found a solution which I'm referencing here for the benefit of others...
Put this in your .profile or execute in shell before loading the IDE
export XCURSOR_SIZE=14
export XCURSOR_SIZE=14
It seems the value of the env var doesn't matter for me when using Hotspot and Heaptrack, just that it is set.
> wsl --version
WSL version: 2.4.13.0
Kernel version: 5.15.167.4-1
WSLg version: 1.0.65
MSRDC version: 1.2.5716
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.26100.4061
I put this in
~/.profilewhich seems to work pretty well:# load any xresrouce settings on login: if [ -e "$HOME/.Xresources" ]; then # echo "Not loading xresource file" xrdb -load "$HOME/.Xresources" fiecho "Xcursor.size: Size" > ~/.Xresources xrdb -load ~/.Xresources
The good news, this works for me. The bad news, I need to do this every time wsl restarts Placing this inside .bashrc kind of fixes it. But only if I launch an interactive terminal first and then my gui app But not when launching an application via the windows side shortcut Where can I put the
xrdb -load ~/.Xresourcesso that it gets picked up when starting an application via its shortcut ? I have tried creating ~/.xinitrc, /etc/X11/xinit/xinitrc and placing it there, but that did not help
Putting this on ~/.profile didn't work for me, unfortunately.
The xrdb -load ~/.Xresource command do work, but not going through the GUI app shorcut on windows. I always need to start wsl over terminal