Triple buffer flickering and weird display updating

Bug #1808626 reported by P Touchman
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
xserver-xorg-video-intel (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I've got a dual display setup, with one monitor rotated and I've been running into some weird bugs. The screen will not update properly at times and there will be areas that will intermittently flicker and show old areas that should have been overdrawn.

Once it starts doing this, the only way to get things back to normal is to reboot.

Going into standby and coming out of standby won't fix it. Actually, sometimes coming out of standby the screen won't refresh properly and I'll see the whole screen get some triple-buffer epilepsy inducing flicker.

When I move the mouse from screen to screen and hover over the ubuntu launcher dock so that it scrolls the icons it will flip the triple buffers and the areas that have old data flickers.

I think the display is triple buffered and one of the buffers gets old data. I can refresh the screen by dragging windows around manually like an "eraser" where I'm using the window to "erase old data" but this tends to get super annoying.

It seems to get brought out by rotating one of my displays. I have a 1920x1200 pivoting display that is rotated to the left. My other display is 1920x1080 normal at position +1200+364.

I seem to hit this a lot because my monitor doesn't have a good EDID so it comes up in ubuntu with an error message about crtcs (since it wants to do a 1920x1080 and it thinks the max is 1024x768) so after I set a new mode with:

$ xrandr --newmode "1920x1080R" 138.50 1920 1968 2000 2080 1080 1083 1088 1111 +hsync -vsync; xrandr --addmode VGA-1 "1920x1080R"

Once the new mode gets added Ubuntu will automatically restore my desktop to its old settings pre-reboot and I start getting the flicker/update problems.

I would imagine that the bug should show itself up if you do a few rotate/unrotate displays.

$ lsb_release -rd
Description: Ubuntu 18.04.1 LTS
Release: 18.04

$ apt-cache policy xserver-xorg-video-intel
xserver-xorg-video-intel:
  Installed: 2:2.99.917+git20171229-1
  Candidate: 2:2.99.917+git20171229-1
  Version table:
 *** 2:2.99.917+git20171229-1 500
        500 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
        100 /var/lib/dpkg/status

$ xrandr
Screen 0: minimum 320 x 200, current 3120 x 1920, maximum 8192 x 8192
VGA-1 connected primary 1920x1080+1200+364 (normal left inverted right x axis y axis) 0mm x 0mm
   1024x768 60.00
   800x600 60.32 56.25
   848x480 60.00
   640x480 59.94
   1920x1080R 59.93*
HDMI-1 connected 1200x1920+0+0 left (normal left inverted right x axis y axis) 519mm x 324mm
   1920x1200 59.95*+
   1600x1200 60.00
   1680x1050 59.88
   1600x1000 60.01
   1280x1024 85.02 75.02 60.02
   1280x960 60.00
   1152x864 75.00
   1152x720 59.97
   1024x768 75.03 60.00
   832x624 74.55
   800x600 75.00 60.32
   640x480 75.00 59.94
   720x400 70.08
DP-1 disconnected (normal left inverted right x axis y axis)

Revision history for this message
P Touchman (ptouchman) wrote :
Download full text (5.4 KiB)

Here's a listing of my hardware:

$ lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Thread(s) per core: 2
Core(s) per socket: 2
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 58
Model name: Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz
Stepping: 9
CPU MHz: 1596.441
CPU max MHz: 3300.0000
CPU min MHz: 1600.0000
BogoMIPS: 6585.26
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 3072K
NUMA node0 CPU(s): 0-3
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt tsc_deadline_timer xsave avx f16c lahf_lm cpuid_fault epb pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid fsgsbase sme

$ lspci -nn
00:00.0 Host bridge [0600]: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor DRAM Controller [8086:0150] (rev 09)
00:02.0 VGA compatible controller [0300]: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller [8086:0152] (rev 09)
00:16.0 Communication controller [0780]: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 [8086:1c3a] (rev 04)
00:1a.0 USB controller [0c03]: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 [8086:1c2d] (rev 04)
00:1b.0 Audio device [0403]: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller [8086:1c20] (rev 04)
00:1c.0 PCI bridge [0604]: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 [8086:1c10] (rev b4)
00:1c.5 PCI bridge [0604]: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 6 [8086:1c1a] (rev b4)
00:1d.0 USB controller [0c03]: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 [8086:1c26] (rev 04)
00:1f.0 ISA bridge [0601]: Intel Corporation H61 Express Chipset Family LPC Controller [8086:1c5c] (rev 04)
00:1f.2 SATA controller [0106]: Intel Corporation 6 Series/C200 Series Chipset Family SATA AHCI Controller [8086:1c02] (rev 04)
00:1f.3 SMBus [0c05]: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller [8086:1c22] (rev 04)
02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 06)

$ lspci -k
00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor DRAM Controller (rev 09)
 Subsystem: Lenovo Xeon E3-1200 v2/3rd Gen Core processor DRAM Controller
 Kernel driver in use: ivb_uncore
 Kernel modules: ie31200_edac
00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller (rev 09)
 Subsystem: Lenovo Xeon E3-1200 v2/3rd Gen Core proces...

Read more...

Revision history for this message
P Touchman (ptouchman) wrote :

I've been running the same setup and it runs absolutely perfectly if I boot up with editing the Ubuntu command line in grub and add video=VGA-1:e

BOOT_IMAGE=/boot/vmlinuz-4.15.0-43-generic root=UUID=xxxxxxxx ro drm_kms_helper.edid_firmware=VGA-1:edid/hannsg.bin video=VGA-1:e

adding the video=VGA-1:e will allow the drm_kms_helper.edid_firmware parameter to work and I get my proper display.

If I don't add the video=VGA-1:e line it will come up at 1024x768 mode and give a "Could not apply the stored configuration for monitors". After I do this following xrandr command and the stored configuration is restored I get the flickering problem virtually INSTANTLY.

$ xrandr --newmode "1920x1080R" 138.50 1920 1968 2000 2080 1080 1083 1088 1111 +hsync -vsync; xrandr --addmode VGA-1 "1920x1080R"

With the video=VGA-1:e the stored configuration comes up properly on initial boot and the video drivers work perfectly, no flickering.

https://ptouchman.blogspot.com/2018/12/my-edid-was-going-unrecognized-until-i.html

I'll post a video when I dig out my digital camera.

Revision history for this message
P Touchman (ptouchman) wrote :

I've been hesitant to try to reproduce this because my system runs so well for a long time when this doesn't crop up.

So I rebooted without the video=VGA-1:e parameter and it starts doing this sort of thing immediately.

I uploaded a video at youtube:

https://www.youtube.com/watch?v=2JOy_ilLAlw

Strangely, when I add the video=VGA-1:e parameter it comes up fine and I tried to rotate and unrotate my monitors and various manipulations with ubuntu's display settings and xrandr and I couldn't get it to do the flickering thing.

And I think I misspoke, it doesn't seem like triple buffering flicker but perhaps double buffering flicker.

Revision history for this message
P Touchman (ptouchman) wrote :

And another video of just dragging the display settings window around:

https://www.youtube.com/watch?v=8Eo9hzA51X4

Revision history for this message
P Touchman (ptouchman) wrote :

Been fiddling with rotating and unrotating displays and when it starts drawing improperly when rotated, I can unrotate the displays and the improper drawing/flickering disappears.

Also the improper drawing disappears when I go to mirror mode.

I would imagine most people don't see this bug because few people have one monitor rotated left and have a second monitor in normal orientation.

Revision history for this message
P Touchman (ptouchman) wrote :

I didn't think that Ubuntu's SimpleScreenRecorder would record the corruption but it records it just fine:

Here's an HD video of the screen corruption:

https://www.youtube.com/watch?v=6dG_awbM5oo

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in xserver-xorg-video-intel (Ubuntu):
status: New → Confirmed
Revision history for this message
Michał Skrzypczak (mskrzypczak) wrote :

Any other workarounds?

For me adding video=VGA-1:e helped only for limited time: after the computer got into sleep mode and woke up again, the flickering problem was back.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.