I am experiencing a mouse cursor flickering on my primary display when I enable fractional scaling. I am running Ubuntu 20.04 desktop on a Dell Inspiron XPS 9380 with Intel UHD620 graphics.
I have a dual monitor set-up and, as such, I have 200% scaling on my primary screen (13 inches up to 4k) and 100% scaling on my second monitor which sits above and extends the desktop ('join displays'). To achieve this configuration, I enabled fractional scaling in the screen display tab of the settings GUI.
The scaling is just how I want it to be, but, the cursor flickers very rapidly and erratically on the primary display only. It is unpleasant to look at and very distracting when using any program. The click function works fine, and the cursor tracks perfectly smoothly despite the flickering.
I have been unable to achieve the same display configuration by using 'xrandr' in the command line, so ideally I will continue to use the fractional scaling setting available in the GUI.
Another workaround which worked for me was to set the scaling to different value than 200%, e.g. 175% or 150% both worked for me. It was still close to 200% which I initially wanted, but I am also ok with this. No screen tearing nor impact on the performance in comparison to what other users reported with the
0.9999x0.9999
hack and most importantly I do not see the cursor flickering anymore. Also you can comfortably set this up in the settings.I am on X1 carbon 7th gen with Ubuntu 20.04 desktop.
Primary display: 1920x1080, scale 100%
Secondary display: 2560x1440 (built-in WQHD), scale 175%
UPDATE: In case your machine seems too slow, check this answer because you might want to avoid fractional scaling completely.
To configure screens with xrandr
Here is a script for using xrandr to modify one display to use fractional scaling while the primary does not scale. Take this and modify it to fit your needs.
To fix the mouse flickering bug
As for the flickering, this is a known issue with xorg. There is an open issue waiting to be picked up to fix this bug: https://gitlab.freedesktop.org/xorg/xserver/issues/70
The workaround is to set your non-scaled display to scale at
0.9999x0.9999
, this doesn't cause any noticeable difference in the display's scale but I have read it causes some lag and possibly some screen tearing.Example xrandr configuration script with mouse flicker work around applied
The simplest way I came across for my machine Dell Inspiron 16 with GeForce RTX 3060 Mobile / Max-Q GPU was to use BetterScale project. It has a step:
After this finally, the flickering problem was gone in my case. For the detailed guide, please refer to this UbuntuHandbook article.
I had the same issue with my dell 4k display, after I installed driver for my graphic card, the problem is solved.