You are not logged in.

#1 2019-05-20 15:25:53

akobel
Member
From: Saarbrücken, Germany
Registered: 2016-02-12
Posts: 22
Website

[SOLVED] External monitor tearing with kernel 5.1 and i915

Hi,

updating linux-zen from 5.0.13 to 5.1.2 (or 5.1.3), I experienced tearing on my external monitor connected via HDMI to my Samsung NP900X4C (Intel HD4000 graphics).
The laptop screen is fine. On the external monitor, the image is flickering and moved to the right by appx. 100 pixels, and wrapped; that is, instead of a full screen-width line like

ABCdefghijklmnopqrstuvwxyz

I see

wxyzABCdefghijklmnopqrstuv

and the image is shaky and blurry as on an old CRT TV with poor cables. Resolution settings (1920x1080) are as expected according to xrandr; I use plain i3 on Xorg, nothing fancy.

Checking what's new in Linux 5.1, I though that i915.fastboot is the culprit. It should still default to off, as this machine is distinctly pre-Skylake (Core i5-3317U), but it was the only news that caught my eye at all. And indeed, using this parameter on boot with kernel 5.0 causes the same broken display; so it should be a matter of disabling that option on the newer kernel, right?

Unfortunately, i915.fastboot=0 does not help fixing the issue with kernel 5.1. The parameters are acknowledged correctly (both explicitly given in GRUB and via a mkinitcpio modconf-hook), and the parameters are identical on the working 5.0 and misbehaving 5.1, but the issue is not solved.

dmesg / journal does not show anything suspicious besides

Mai 20 16:05:26 s9 kernel: [drm:intel_set_pch_fifo_underrun_reporting [i915]] *ERROR* uncleared pch fifo underrun on pch transcoder B
Mai 20 16:05:26 s9 kernel: [drm:cpt_irq_handler [i915]] *ERROR* PCH transcoder B FIFO underrun

which I can parse, but not translate.

Any ideas or hints what I could try?

Last edited by akobel (2019-07-01 12:15:53)

Offline

#2 2019-05-20 20:53:11

loqs
Member
Registered: 2014-03-06
Posts: 17,321

Re: [SOLVED] External monitor tearing with kernel 5.1 and i915

Have you tried https://anongit.freedesktop.org/git/drm-tip.git as suggested by [1]?
If you want to use a package for drm-tip I would suggest using https://aur.archlinux.org/packages/linux-git/ change the source and pkgver function to the one for untagged repositories from [2].

[1] https://01.org/linuxgraphics/documentat … eport-bugs
[2] https://wiki.archlinux.org/index.php/VC … )_function

Offline

#3 2019-05-22 06:44:52

akobel
Member
From: Saarbrücken, Germany
Registered: 2016-02-12
Posts: 22
Website

Re: [SOLVED] External monitor tearing with kernel 5.1 and i915

Thank you for the suggestion. I had to first fiddle quite a while with repartitioning to make some space on /boot (bad luck in the first attempt), to install a third kernel without harming my daily driver linux-zen and linux-lts for emergencies.

A couple more findings:

  • The issue is only in Xorg; on the console (duplicated screen), external and internal output are crisp and clear, and correctly positioned.

  • It's not just in linux-zen 5.1.3, but also in linux 5.1; so zen is not the culprit. I could not yet check drm-tip, but will do as soon as I can find the time.

  • Strangely, the issue also seems to be monitor (or cable?) dependent: works like a charm for a Dell E series (connected via a MicroHDMI-to-DVI-adapter and a DVI cable), while it breaks for my iiyama ProLite with the same resolution (connected via direct MicroHDMI-to-HDMI). Unfortunately, the two are at different locations, so I can't easily switch and compare within minutes.

Offline

#4 2019-05-22 13:14:41

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: [SOLVED] External monitor tearing with kernel 5.1 and i915

Something you could try to check: on those two monitors where one works fine and one doesn't, is the "Modeline" used for the same resolution exactly the same or are the modelines slightly different between the two? If the modelines are different, you could manually copy the one from the Dell monitor and force it on your Iiyama monitor and see what happens.

About how to find the Modeline, you can see it in the output of "xrandr --verbose" somewhere like this:

  1920x1080 (0x62) 148.500MHz +HSync +VSync
        h: width  1920 start 2008 end 2052 total 2200 skew    0 clock  67.50KHz
        v: height 1080 start 1084 end 1089 total 1125           clock  60.00Hz

Or the driver prints it in the Xorg log file, for example here is how the xf86-video-amdgpu driver prints it there:

[     6.374] (II) AMDGPU(0): Printing probed modes for output DisplayPort-0
...
[     6.374] (II) AMDGPU(0): Modeline "1920x1080"x60.0  148.50  1920 2008 2052 2200  1080 1084 1089 1125 +hsync +vsync (67.5 kHz e)
...

You can force a modeline with an Xorg config file like this:

Section "Monitor"
    Identifier "DisplayPort-0"
    Modeline "1920x1080_r"  148.50  1920 2008 2052 2200  1080 1084 1089 1125 +hsync +vsync
    Option "PreferredMode" "1920x1080_r"
EndSection

You would save this into a file named for example "/etc/X11/xorg.conf.d/10-monitor.conf".

The "_r" in the mode name is there to make the name different from the default "1920x1080" mode. You will be able to switch between the default and your custom mode later with "xrandr --output ... --mode ...".

The "Identifier" in the config has to be set to the name of the output where your monitor is connected. You can find the name in the output of "xrandr" or in the Xorg log file.

Last edited by Ropid (2019-05-22 13:14:55)

Offline

#5 2019-05-27 06:33:22

akobel
Member
From: Saarbrücken, Germany
Registered: 2016-02-12
Posts: 22
Website

Re: [SOLVED] External monitor tearing with kernel 5.1 and i915

Hi all,

thanks for the hints. I decided to not investigate further for the time being, as I have one of the configurations (Samsung SSD, LUKS encryption) that are affected by the freshly discovered Linux 5.1 data loss bug due to TRIM/discard. Luckily, it seems that I wasn't hit; fortunately, I read the corresponding Phoronix news some 20 minutes before my weekly fstrim service would have activated. Nevertheless, I will wait for the dust to settle over the next couple of days before going post-5.0 again.

In the meantime, few more pieces of information, FWIW:

  • The issue only occurs if the external monitor was connected on boot (or, maybe, X startup), but then it persists after disconnecting and re-connecting the screen.

  • I was mistaken; the natural resolutions of my two monitors are different. However, the "good" one works "well" with the lower resolution of my screen at home, too.

  • Modelines are identical for both monitors, respectively, on 5.0 and 5.1.

Offline

#6 2019-07-01 12:20:37

akobel
Member
From: Saarbrücken, Germany
Registered: 2016-02-12
Posts: 22
Website

Re: [SOLVED] External monitor tearing with kernel 5.1 and i915

TL;DR: solved with 5.1.15.

Sorry for my silence. I finally found the time again to investigate, by checking with linux-drm-tip-git from AUR.

After hours of making space on /boot, compiling and testing, I suddenly realized that the issue has been resolved upstream at some point between appx. 5.1.9 and 5.1.15 (I kept back linux-zen to 5.0 in the meantime as my daily driver, and occasionally tested with the newer standard linux). The fix is in linux-zen as well by now; so problem solved for me.

Thanks for all suggestions, nevertheless!

Offline

Board footer

Powered by FluxBB