18

Unhappy with the unreasonably large text on my 1920x1080 external screen connected to a laptop with a 3200x1800 display in Fedora 24, I tried rescaling the external screen by using:

xrandr --output HDMI-2 --scale 2x2 --mode 1920x1080 --fb 7040x2160 --pos 0x0
xrandr --output eDP-1 --scale 1x1 --pos 3840x0

This has the desired effect, but it causes the cursor to flicker when I move the mouse on the laptop screen. The cursor does not flicker when it is on the external screen. Flickering stops when I revert to 1x1 scaling on the external screen:

xrandr --output HDMI-2 --scale 1x1 --mode 1920x1080 --fb 4120x1800 --pos 0x0
xrandr --output eDP-1 --scale 1x1 --pos 1920x0

How can I stop this flickering?

Jeff Schaller
  • 66,199
  • 35
  • 114
  • 250
stardt
  • 281
  • 1
  • 2
  • 4
  • Possibly related to a bug in the modesetting driver.[See here](https://bugs.freedesktop.org/show_bug.cgi?id=101225). – jadelord Jan 31 '18 at 08:59

3 Answers3

17

This workaround helped me. What I do now is after performing a xrandr scale, I run an extra command which stops the mouse flicker.

xrandr --output eDP-1 --auto --output HDMI-2 --auto --scale 2x2 --right-of eDP-1  # Simpler oneliner scaling
xrandr --output eDP-1 --scale 0.9999x0.9999  # Stop flicker
jadelord
  • 340
  • 2
  • 7
10

I had the exact problem after using scaling with xrandr although with a slightly different setup. Strangely, what helped was the first section on https://wiki.archlinux.org/index.php/intel_graphics#Xorg_configuration . Namely,

"However, to take advantage of some driver options, you will need to create a Xorg configuration file similar to the one below:"

/etc/X11/xorg.conf.d/20-intel.conf
Section "Device"
   Identifier  "Intel Graphics"
   Driver      "intel"
EndSection

That is probably only relevant if you're running on Intel graphics (and not on a dedicated gpu)

Anonymous
  • 101
  • 1
  • 3
  • 3
    Worked for me in Ubuntu, however the relevant file to create is /usr/share/X11/xorg.conf.d/20-intel.conf – Simon D Jul 28 '18 at 14:28
  • This worked fine for me in ubuntu 18.04 (unity) – Jithin Jose Sep 29 '18 at 07:37
  • 1
    Works perfectly, Ubuntu 18.04 LTS by creating said content in /usr/share/X11/xorg.conf.d/20-intel.conf on a Macbook pro. Note that you have to log out and back in again for the change to take effect. – Johan May 28 '19 at 19:24
  • `/usr/share/X11/xorg.conf.d/20-intel.conf` worked on Fedora 31. BTW the file content starts from `Section...`. – Lubo Kanev Apr 28 '20 at 09:24
  • Tested and worked for me with Ubuntu 19.10 running on a Dell Precision 7510 with dual Nvidia and Intel graphics when only the Intel graphics is used. – Yan Li Jun 28 '20 at 22:54
  • Fixed issues on Linux Mint 20 as well. (Ubuntu 20.04 base) The config file path was same as in Ubuntu mentioned above by Simon D. Thanks! – darkless Oct 26 '20 at 07:38
  • Started flickering for me after I attached an external USB monitor (wacom tablet), wouldn't stop after disconnecting it and rebooting. Doing this helped instantly. – Pawel Veselov Apr 12 '22 at 00:13
2

On a MacBook Pro with resolution of 2560x1600 and a Samsung TV with the resolution of 1680x1050 I found the following command useful:

xrandr --output eDP-1 --auto --scale 0.9999x0.9999 --output HDMI-2 --auto --scale 2x2 --right-of eDP-1

I found it via reading arch-linux wiki and the 0.9999x0.9999 scaling solution in answers on this page.