Bug 109376 - FIFO underrun, visual glitches and instability with dual monitors
Summary: FIFO underrun, visual glitches and instability with dual monitors
Status: CLOSED WORKSFORME
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Intel GFX Bugs mailing list
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard: Triaged
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-16 11:11 UTC by Hin-Tak Leung
Modified: 2019-05-03 06:00 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
screenshot of visual glitches on the HDMI-connected montor (481.30 KB, image/jpeg)
2019-01-16 11:11 UTC, Hin-Tak Leung
no flags Details

Description Hin-Tak Leung 2019-01-16 11:11:46 UTC
Created attachment 143139 [details]
screenshot of visual glitches on the HDMI-connected montor

Here is a screenshot of visual glitches on waking the screens (pressing the esc key).

This seems to be accompanied by

[drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe A FIFO underrun

in dmesg.

There also seems to be general instability with a dual monitor set-up. We have 4 computers with identical hardware, except one is only hooked up with single monitor (VGA port) for a while. Have had screen-lock ups every few days on all dual-monitor set-ups.

0:02.0 VGA compatible controller: Intel Corporation Device 3e92 (prog-if 00 [VGA controller])
	Subsystem: ASUSTeK Computer Inc. Device 8694
	Flags: bus master, fast devsel, latency 0, IRQ 125
	Memory at a0000000 (64-bit, non-prefetchable) [size=16M]
	Memory at 90000000 (64-bit, prefetchable) [size=256M]
	I/O ports at 4000 [size=64]
	[virtual] Expansion ROM at 000c0000 [disabled] [size=128K]
	Capabilities: [40] Vendor Specific Information: Len=0c <?>
	Capabilities: [70] Express Root Complex Integrated Endpoint, MSI 00
	Capabilities: [ac] MSI: Enable+ Count=1/1 Maskable- 64bit-
	Capabilities: [d0] Power Management version 2
	Capabilities: [100] Process Address Space ID (PASID)
	Capabilities: [200] Address Translation Service (ATS)
	Capabilities: [300] Page Request Interface (PRI)
	Kernel driver in use: i915
	Kernel modules: i915

uname -a

... 4.18.0-13-generic #14-Ubuntu SMP Wed Dec 5 09:04:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux


mesa:
18.2.2-0ubuntu1


libdrm_intel
2.4.95-1

intel_drv.so
2:2.99.917+git20171229-1ubuntu1


${HOME}/.local/share/xorg/Xorg.0.log seems to suggest that intel_drv.so is not being used.
Comment 1 Hin-Tak Leung 2019-01-16 11:14:09 UTC
sorry, I think it should be under DRI, didn't notice the choice.
Comment 2 Francesco Balestrieri 2019-01-17 07:10:12 UTC
Could you try to reproduce the error using drm-tip (https://cgit.freedesktop.org/drm-tip) and kernel parameters drm.debug=0x1e log_buf_len=4M, and if the problem persists attach the full dmesg from boot.

Thanks!
Comment 3 Hin-Tak Leung 2019-01-18 14:16:51 UTC
Thanks for the advice. I'll give the latest code a try and get back to you at some point.
Comment 4 Hin-Tak Leung 2019-01-21 17:38:20 UTC
I am being a bit lazy and just grab the ubuntu nightly built drm-tip
(
cod/tip/drm-tip/2019-01-19 (6ab1ed5f8d8aa6db07bf4ee01627ab8246fc907e)

https://kernel.ubuntu.com/~kernel-ppa/mainline/drm-tip/2019-01-19/ )


I can't get the visual glitches any more after a few tries. 

In dmesg, there are still two drm related errors. One of them is very early in the boot process (appearing in the frame buffer during boot up), the 2nd a few minutes later:

journalctl  -b | grep  ERROR | grep drm
Jan 21 16:11:22 ... kernel: [drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe B FIFO underrun
Jan 21 16:15:28 ... kernel: [drm:intel_pipe_update_end [i915]] *ERROR* Atomic update failure on pipe B (start=18132 end=18133) time 174 us, min 1192, max 1199, scanline start 1190, end 1202

All in all it feels more responsive.

BTW, I still get the VT related X11 crash (similar to what's in https://bugzilla.redhat.com/show_bug.cgi?id=1630367 ) using drm-tip . Since I am running drm-tip, is there anything I can try for look into the X11 crash with VT switch also?
Comment 5 Lakshmi 2019-02-04 22:28:17 UTC
Can you please add full dmesg log from boot with kernel parameters drm.debug=0x1e log_buf_len=4M.
Comment 6 Hin-Tak Leung 2019-02-06 14:44:16 UTC
Since using drm-tip from 2019-01-19 (6ab1ed5f8d8aa6db07bf4ee01627ab8246fc907e), I have not observed the visual glitches.

The system has been up for 15 days, and there had been only one buffer under run under drm-tip (in a previous boot, not the current 15-day run); 
The "Atomic update failure on pipe B" error message seems to be new to running under drm-tip.

AFAIC, drm-tip is a lot better in a practical sense; the only remaining issue is the gnome-shell/xorg crash with VT Switch with dual montor. Do you still want a "drm.debug=0x1e log_buf_len=4M" dmesg? From my next reboot, obviously, since 15 days of dmesg is a lot.



--- details below ---
reboot   system boot  5.0.0-994-generi Tue Jan 22 09:19   still running
reboot   system boot  5.0.0-994-generi Mon Jan 21 16:11   still running
reboot   system boot  5.0.0-994-generi Mon Jan 21 15:25 - 16:09  (00:43)
reboot   system boot  4.18.0-13-generi Tue Jan 15 09:58 - 15:24 (6+05:25)
reboot   system boot  4.18.0-13-generi Wed Jan  9 17:16 - 15:24 (11+22:08)

# uptime
 11:45:26 up 15 days,  2:29,  1 user,  load average: 1.57, 2.53, 2.49

# uname -a
Linux hintak-System-Product-Name 5.0.0-994-generic #201901182103 SMP Sat Jan 19 02:05:29 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

# zcat kern.log.2.gz  | grep -a ERROR | grep -v xhci_hcd
Jan 21 16:11:22 hintak-System-Product-Name kernel: [    1.769318] [drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe B FIFO underrun
Jan 21 16:15:28 hintak-System-Product-Name kernel: [  262.995833] [drm:intel_pipe_update_end [i915]] *ERROR* Atomic update failure on pipe B (start=18132 end=18133) time 174 us, min 1192, max 1199, scanline start 1190, end 1202

# grep ERROR kern.log.1 | grep -v  xhci_hcd
Feb  1 17:05:40 hintak-System-Product-Name kernel: [889801.832299] [drm:intel_pipe_update_end [i915]] *ERROR* Atomic update failure on pipe B (start=162041 end=162042) time 163 us, min 1192, max 1199, scanline start 1190, end 1201
Feb  1 17:31:51 hintak-System-Product-Name kernel: [891373.487267] [drm:intel_pipe_update_end [i915]] *ERROR* Atomic update failure on pipe B (start=256262 end=256263) time 136 us, min 1192, max 1199, scanline start 1190, end 1200

# zcat kern.log.3.gz  | grep -a ERROR | grep -v xhci_hcd
Jan 14 09:34:23 hintak-System-Product-Name kernel: [404321.983346] [drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe A FIFO underrun
Jan 14 10:49:36 hintak-System-Product-Name kernel: [408834.886173] [drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe A FIFO underrun
Jan 14 11:42:15 hintak-System-Product-Name kernel: [411994.377269] [drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe A FIFO underrun
Jan 14 11:50:19 hintak-System-Product-Name kernel: [412477.700253] [drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe A FIFO underrun
Jan 14 12:08:12 hintak-System-Product-Name kernel: [413550.759648] [drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe A FIFO underrun
Jan 14 14:31:34 hintak-System-Product-Name kernel: [422153.054039] [drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe A FIFO underrun
Jan 14 15:32:34 hintak-System-Product-Name kernel: [425813.727762] [drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe A FIFO underrun
Jan 14 18:36:24 hintak-System-Product-Name kernel: [436844.394339] [drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe B FIFO underrun
Jan 15 14:25:33 hintak-System-Product-Name kernel: [16026.662778] [drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe B FIFO underrun
Jan 15 17:03:38 hintak-System-Product-Name kernel: [25512.416639] [drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe B FIFO underrun
Jan 15 19:54:53 hintak-System-Product-Name kernel: [35788.228936] [drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe B FIFO underrun
Jan 16 09:22:59 hintak-System-Product-Name kernel: [84276.145969] [drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe A FIFO underrun
Jan 18 11:54:35 hintak-System-Product-Name kernel: [205578.023007] [drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe B FIFO underrun

--- details ---
Comment 7 Ville Syrjala 2019-02-22 13:07:13 UTC
We seem to have fixed the original issue so I'm tempted to just close this bug.

However it might be interesting to know whether 4.19 and 4.20 are also affected. 4.18 is a lost cause since it's no longer maintained, but we might want to backport some of the fixes to 4.19 and 4.20. Can you test with 4.19/4.20?

In relation to bug 109248 Canonical identified commit ff43bc379e16 ("drm/i915: Move ddb/wm programming into plane update/disable hooks on skl+") as fixing their flickering screen problems. We might be after the same thing here.
Comment 8 Lakshmi 2019-02-25 16:21:11 UTC
Hin-Tak, Have you tried testing the same issue with kernel 4.19/4.20? Your feedback would be really helpful here:).
Comment 9 Hin-Tak Leung 2019-02-25 17:07:16 UTC
I am using drm-tip from 2019-01-19,  2019-02-12,  2019-02-20,  2019-02-22, successively and am hoping to switch to something less bleeding-edge for my next reboot. (the changes are basically whenever I had a lock-up...). I'll put 4.19/4.20 on and let you know.
Comment 10 Hin-Tak Leung 2019-03-05 11:17:49 UTC
boot to 4.20.12 and the visual glitches happened once on unlock, and have a FIFO underrun message also:

# uname -r
4.20.12-042012-generic

# grep FIFO kern.log
Mar  5 11:07:44 ... kernel: [ 2669.215740] [drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe B FIFO underrun
Comment 11 Hin-Tak Leung 2019-03-05 11:19:33 UTC
I took a picture of the glitch under 4.20.12 also, It is not very different from https://bugs.freedesktop.org/attachment.cgi?id=143139 .
Comment 12 Lakshmi 2019-03-07 15:03:11 UTC
(In reply to Hin-Tak Leung from comment #10)
> boot to 4.20.12 and the visual glitches happened once on unlock, and have a
> FIFO underrun message also:
> 
> # uname -r
> 4.20.12-042012-generic
> 
> # grep FIFO kern.log
> Mar  5 11:07:44 ... kernel: [ 2669.215740]
> [drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe B FIFO
> underrun

Can you attach full dmesg from boot with 4.20 where you see the issue?
Comment 13 Hin-Tak Leung 2019-03-08 16:34:48 UTC
I have a 97MB gz'ed kernel log... is there a place I could upload it? 

That's partly because I still have "drm.debug=0x1e log_buf_len=4M" on.

# grep FIFO kern.log
Mar  5 11:07:44 hintak-System-Product-Name kernel: [ 2669.215740] [drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe B FIFO underrun
Mar  5 12:41:22 hintak-System-Product-Name kernel: [ 8287.823276] [drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe A FIFO underrun
Mar  5 12:41:22 hintak-System-Product-Name kernel: [ 8287.823298] [drm:intel_fbc_underrun_work_fn [i915]] Disabling FBC due to FIFO underrun.
Mar  6 10:38:10 hintak-System-Product-Name kernel: [87298.948144] [drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe B FIFO underrun
Mar  6 14:41:16 hintak-System-Product-Name kernel: [101885.855603] [drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe B FIFO underrun

grep -E '(Mar  5 1|Mar  5 2|Mar  6 0|Mar  6 1)' kern.log | gzip -c > kern.log-subset.gz
Comment 14 Lakshmi 2019-04-12 09:14:02 UTC
(In reply to Ville Syrjala from comment #7)
> We seem to have fixed the original issue so I'm tempted to just close this
> bug.
> 
> However it might be interesting to know whether 4.19 and 4.20 are also
> affected. 4.18 is a lost cause since it's no longer maintained, but we might
> want to backport some of the fixes to 4.19 and 4.20. Can you test with
> 4.19/4.20?
> 
> In relation to bug 109248 Canonical identified commit ff43bc379e16
> ("drm/i915: Move ddb/wm programming into plane update/disable hooks on
> skl+") as fixing their flickering screen problems. We might be after the
> same thing here.

(In reply to Hin-Tak Leung from comment #13)
> I have a 97MB gz'ed kernel log... is there a place I could upload it? 
> 
> That's partly because I still have "drm.debug=0x1e log_buf_len=4M" on.
> 
> # grep FIFO kern.log
> Mar  5 11:07:44 hintak-System-Product-Name kernel: [ 2669.215740]
> [drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe B FIFO
> underrun
> Mar  5 12:41:22 hintak-System-Product-Name kernel: [ 8287.823276]
> [drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe A FIFO
> underrun
> Mar  5 12:41:22 hintak-System-Product-Name kernel: [ 8287.823298]
> [drm:intel_fbc_underrun_work_fn [i915]] Disabling FBC due to FIFO underrun.
> Mar  6 10:38:10 hintak-System-Product-Name kernel: [87298.948144]
> [drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe B FIFO
> underrun
> Mar  6 14:41:16 hintak-System-Product-Name kernel: [101885.855603]
> [drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe B FIFO
> underrun
> 
> grep -E '(Mar  5 1|Mar  5 2|Mar  6 0|Mar  6 1)' kern.log | gzip -c >
> kern.log-subset.gz

Any results from kernel 4.19?
Comment 15 Lakshmi 2019-04-12 09:16:00 UTC
(In reply to Ville Syrjala from comment #7)
> We seem to have fixed the original issue so I'm tempted to just close this
> bug.
> 
> However it might be interesting to know whether 4.19 and 4.20 are also
> affected. 4.18 is a lost cause since it's no longer maintained, but we might
> want to backport some of the fixes to 4.19 and 4.20. Can you test with
> 4.19/4.20?
> 
> In relation to bug 109248 Canonical identified commit ff43bc379e16
> ("drm/i915: Move ddb/wm programming into plane update/disable hooks on
> skl+") as fixing their flickering screen problems. We might be after the
> same thing here.

Ville, We have results from Kernel 4.20 and issue is reproducible. But we do not have results yet from 4.19. Should we wait for 4.19 results before we close this bug?
Comment 16 Lakshmi 2019-05-03 06:00:10 UTC
Hin-Tak, Thanks for your feedback. Since the issue is not seen on drmtip, I will close this bug as WORKSFORME.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.