Applications do not repaint in a timely fashion, resulting in screen corruption
Overview
I am using a Dell XPS 13 7390 (i7-10710U integrated video) with modesetting 2:1.20.8-2ubuntu2.4 on Ubuntu 20.04 and kernel 5.4.0-42-generic on the same. I have reported this to Ubuntu via this Launchpad bug, but they requested that I report it here:
https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/1898210
I experience delayed repaints in many applications, which resolve only when the application is disturbed or the application focus changes to another window. I am attaching a video of this problem:
Affected applications
- rxvt-unicode v9.22
- Firefox 80.0.1
- Emacs 26.3
- Xournal 0.4.8
- Various Electron apps
- Slack
- Element
- Discord
- Keybase
- others!
Desktop environment
My WM is Awesome v4.3. I have reproduced this bug both without a compositor running (the video attached above has no compositor running) and with compton; it does not appear to make a difference.
I have three displays attached:
- eDP-1, a 3840x2160 laptop display panel
- DP-2-8, a 1920x1080 DisplayPort monitor connected to the laptop via USB C
- DP-2-1, a 1980x1080 DisplayPort monitor connected to DP-2-8 via DisplayPort chaining
My desktop is 11520 x 2160, and the two external monitors are scaled from 3840x2160. I use the following XRandR configuration:
HIX=3840
HIY=2160
HI=${HIX}x${HIY}
xrandr --fb $(($HIX * 3))x$HIY \
--output eDP-1 --auto --panning ${HI}+$(($HIX * 2))+0 \
--output DP-2-8 --auto --panning ${HI}+$HIX+0 \
--scale-from $HI --left-of eDP-1 --scale 2x2 \
--output DP-2-1 --auto --panning $HI+0+0 \
--scale-from $HI --left-of DP-2-8 --scale 2x2
Other maybe-related symptoms
With the three displays attached, GL performance on eDP-1 is very bad -- something like 1/4 the performance of either external display best case, and sometimes far worse, according to glxgears with vertical blanking synchronization disabled. Electron applications are nearly unusable on eDP-1 without --disable-gpu, as simple typing takes several seconds for keystrokes to appear.
There are glitches when configuring DP-2-8 for scaling; it doesn't "take" the first time, the display port is about 1/2 a screen too far to the left, and pans when the mouse hits the borders. Re-running the configuration for just DP-2-8 via xrandr
fixes it up and it behaves normally thereafter.
Related bugs
https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/1898210 https://bugs.launchpad.net/ubuntu/+source/emacs/+bug/1893969
Both have videos and screen shots attached (the video on the first of these bugs is attached to this bug).