22
  • Cursor flickers on primary display (display 1 of 2) when fractional scaling is enabled (200% scaling on primary display and 100% scaling on external monitor).
  • Ubuntu 20.04; Dell Inspiron XPS 9380; Intel UHD620 graphics.
  • Unable to achieve the same display configuration by using 'xrandr' in the command line; ideally able to use the fractional scaling setting available in the GUI.

4 Answers4

38

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.

Paloha
  • 1,187
  • 1
  • 12
  • 17
6

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.

xrandr  --output DP-1 --off --output HDMI-1 --off --output DP-2 --off --output HDMI-2 --off --output DP-1-1 --off --output DP-1-2 --off  # --output eDP-1 --off --output DP-1-3 --off
echo "turned off all displays except eDP-1 DP-1-3"

xrandr --output eDP-1 --mode 2560x1440 --pos 0x300 --scale 0.7x0.7
echo "Updating on eDP-1"
xrandr --output DP-1-3 --mode 2560x1440 --pos 2560x0 --primary
echo "Updating on DP-1-3"

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

xrandr  --output DP-1 --off --output HDMI-1 --off --output DP-2 --off --output HDMI-2 --off --output DP-1-1 --off --output DP-1-2 --off  # --output eDP-1 --off --output DP-1-3 --off
echo "turned off all displays except eDP-1 DP-1-3"

xrandr --output eDP-1 --mode 2560x1440 --pos 0x300 --scale 0.7x0.7
echo "Updating on eDP-1"
xrandr --output DP-1-3 --mode 2560x1440 --pos 2560x0 --primary --scale 0.9999x0.9999 #Scale added her to fix mouse flicker bug https://gitlab.freedesktop.org/xorg/xserver/issues/70
echo "Updating on DP-1-3"
Chart96
  • 171
  • you can also just use --scale 0.9999, it will automatically set the y to the same if it is omitted – sabujp Mar 09 '22 at 18:29
2

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:

enter image description here

After this finally, the flickering problem was gone in my case. For the detailed guide, please refer to this UbuntuHandbook article.

Pablo Bianchi
  • 17,552
jwpol
  • 121
  • 3
0

I had the same issue with my dell 4k display, after I installed driver for my graphic card, the problem is solved.

Chen
  • 1