External monitor flickers constantly

Same issue running Fedora 34 with kernel 5.13.13. The external 4k monitor flickering occurs using both the Framework HDMI expansion card and a third party USB-C HDMI adapter. Flickering and blackouts were rendering the display useless. Lowering the resolution from 3840x2160@30hz to 2560x1440@30hz made a huge difference. Mostly stable with but still blackouts occasionally. I did notice with every blackout dmesg would spit out the following:

[73612.269389] WARNING: CPU: 3 PID: 4613 at drivers/gpu/drm/drm_atomic.c:1377 drm_atomic_check_only+0x77f/0x880 [drm]
[73612.269437] Modules linked in: xt_nat veth hidp uinput rfcomm snd_seq_dummy snd_hrtimer nf_conntrack_netlink xt_CHECKSUM xt_MASQUERADE xt_conntrack ipt_REJECT nf_nat_tftp nf_conntrack_tftp xt_addrtype br_netfilter bridge stp llc nft_objref nf_conntrack_netbios_ns nf_conntrack_broadcast nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nft_chain_nat ip6table_nat ip6table_mangle ip6table_raw ip6table_security iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 iptable_mangle iptable_raw iptable_security ip_set nf_tables overlay nfnetlink ip6table_filter ip6_tables iptable_filter bnep sunrpc vfat fat snd_hda_codec_hdmi snd_sof_pci_intel_tgl snd_sof_intel_hda_common soundwire_intel soundwire_generic_allocation soundwire_cadence snd_sof_intel_hda snd_sof_pci snd_sof_xtensa_dsp snd_sof snd_soc_hdac_hda snd_hda_ext_core snd_soc_acpi_intel_match snd_soc_acpi snd_soc_core snd_hda_codec_realtek iTCO_wdt snd_compress
[73612.269496]  snd_hda_codec_generic intel_pmc_bxt iwlmvm snd_pcm_dmaengine intel_tcc_cooling mei_hdcp iTCO_vendor_support ee1004 x86_pkg_temp_thermal ac97_bus ledtrig_audio intel_pmt_telemetry intel_powerclamp intel_pmt_class intel_rapl_msr snd_hda_intel coretemp snd_intel_dspcfg mac80211 snd_intel_sdw_acpi kvm_intel snd_hda_codec kvm libarc4 snd_hda_core snd_hwdep uvcvideo snd_seq irqbypass snd_seq_device videobuf2_vmalloc intel_cstate videobuf2_memops intel_uncore iwlwifi snd_pcm videobuf2_v4l2 pcspkr wmi_bmof snd_timer videobuf2_common cfg80211 btusb snd btrtl i2c_i801 mei_me btbcm btintel soundcore i2c_smbus mei bluetooth videodev joydev mc idma64 hid_sensor_als hid_sensor_trigger hid_sensor_iio_common ecdh_generic industrialio_triggered_buffer rfkill kfifo_buf apple_mfi_fastcharge ecc industrialio thunderbolt intel_pmt processor_thermal_device processor_thermal_rfim ucsi_acpi processor_thermal_mbox processor_thermal_rapl typec_ucsi intel_rapl_common intel_soc_dts_iosf typec
[73612.269555]  int3403_thermal int340x_thermal_zone acpi_pad int3400_thermal acpi_thermal_rel zram ip_tables hid_apple hid_sensor_hub intel_ishtp_loader intel_ishtp_hid hid_multitouch i915 i2c_algo_bit crct10dif_pclmul drm_kms_helper crc32_pclmul crc32c_intel cec nvme intel_ish_ipc drm ghash_clmulni_intel nvme_core serio_raw intel_ishtp wmi i2c_hid_acpi i2c_hid video pinctrl_tigerlake fuse
[73612.269607] CPU: 3 PID: 4613 Comm: gnome-shell Tainted: G        W         5.13.13-200.fc34.x86_64 #1
[73612.269611] Hardware name: Framework Laptop/FRANBMCP06, BIOS 03.02 07/01/2021
[73612.269613] RIP: 0010:drm_atomic_check_only+0x77f/0x880 [drm]
[73612.269649] Code: 32 c0 89 04 24 bf 10 00 00 00 e8 7c b5 00 00 8b 04 24 e9 f5 fa ff ff 8b 74 24 0c 44 89 e2 48 c7 c7 b0 8e 32 c0 e8 ac 68 8b d4 <0f> 0b 31 c0 e9 6c fe ff ff 49 8b 4f 18 41 8b 57 58 bf 10 00 00 00
[73612.269653] RSP: 0018:ffffaa6e4216fc98 EFLAGS: 00010292
[73612.269656] RAX: 0000000000000045 RBX: 0000000000000008 RCX: 0000000000000027
[73612.269658] RDX: ffff96468fad8a08 RSI: 0000000000000001 RDI: ffff96468fad8a00
[73612.269661] RBP: ffff964009c28c00 R08: 0000000000000000 R09: ffffaa6e4216fad0
[73612.269662] R10: ffffaa6e4216fac8 R11: ffffffff95d468c8 R12: 000000000000000f
[73612.269664] R13: 0000000000000008 R14: ffff963f6538f000 R15: ffff963f097a9c00
[73612.269666] FS:  00007f35a5ad2d80(0000) GS:ffff96468fac0000(0000) knlGS:0000000000000000
[73612.269669] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[73612.269671] CR2: 00007f35902ea000 CR3: 0000000106a12002 CR4: 0000000000770ee0
[73612.269674] PKRU: 55555554
[73612.269675] Call Trace:
[73612.269681]  drm_atomic_nonblocking_commit+0x13/0x50 [drm]
[73612.269715]  drm_mode_atomic_ioctl+0x8d0/0xa60 [drm]
[73612.269762]  ? drm_atomic_set_property+0xb10/0xb10 [drm]
[73612.269806]  drm_ioctl_kernel+0x84/0xd0 [drm]
[73612.269848]  drm_ioctl+0x220/0x3e0 [drm]
[73612.269890]  ? drm_atomic_set_property+0xb10/0xb10 [drm]
[73612.269925]  ? security_file_ioctl+0x2f/0x50
[73612.269932]  __x64_sys_ioctl+0x7f/0xb0
[73612.269941]  do_syscall_64+0x3d/0x80
[73612.269950]  entry_SYSCALL_64_after_hwframe+0x44/0xae
[73612.269956] RIP: 0033:0x7f35a9d3a0ab
[73612.269960] Code: ff ff ff 85 c0 79 9b 49 c7 c4 ff ff ff ff 5b 5d 4c 89 e0 41 5c c3 66 0f 1f 84 00 00 00 00 00 f3 0f 1e fa b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 9d bd 0c 00 f7 d8 64 89 01 48
[73612.269964] RSP: 002b:00007fff10e2e678 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[73612.269969] RAX: ffffffffffffffda RBX: 00007fff10e2e6c0 RCX: 00007f35a9d3a0ab
[73612.269972] RDX: 00007fff10e2e6c0 RSI: 00000000c03864bc RDI: 000000000000000b
[73612.269975] RBP: 00000000c03864bc R08: 0000000000000001 R09: 0000000000000001
[73612.269977] R10: 00007f35a9e06a00 R11: 0000000000000246 R12: 000055f1e6a657e0
[73612.269980] R13: 000000000000000b R14: 000055f1e49ee580 R15: 000055f1e695cd60
[73612.269986] ---[ end trace 7747026d25171890 ]---

I can’t decode most of this but I’m assuming this has something to do with the new Intel hardware and the latest Gnome desktop.

2 Likes

I’m seeing this as well on a new 4K monitor (LG 109NTTQMT073, resolution 3840x2160 60Hz). Every once in a while (somewhere between 30sec and 5min) the screen turns black for about 1 second, then restores the image.

Reducing refresh rate to 30Hz seems to be a temporary workaround.

dmesg:

i915 0000:00:02.0: [drm] *ERROR* CPU pipe B FIFO underrun: transcoder,

There’s also a message earlier in the dmesg boot sequence (about 6 seconds in) that seems to warn:

i915 0000:00:02.0: [drm] Reducing the compressed framebuffer size. This may lead to less power savings than a non-reduced-size. Try to increase stolen memory size if available in BIOS.

Pop!_OS 21.10 running kernel 5.15.11

2 Likes

Thought I’d share my experience here as well, this thread helped a lot.

I’m running Ubuntu 21.10 on GNOME 40

I like to use 2 external 3840x2160 displays while at work, and had constant screen flickering and blackouts especially when playing videos and moving the mouse between monitors. Scaling down the resolution helped, but even at 30hz the full resolution was unusable. Something I tried recently that seemed to help was logging in to a GNOME session on Xorg instead of the default Wayland display manager. In Xorg I was able to use the full 3840x2160 resolution at 30hz just fine!

2 Likes

@Kevin_Kinney I’ve been having the exact same problem for the past few months. Same setup.

And as of yesterday both external monitors aren’t being recognized despite rebooting, plugging and unplugging, trying USB-C and HDMI cables. What’s weird is that the monitor seems to know that something’s connected, but the laptop doesn’t see the connected monitor or recognizes the monitor, but there’s no signal being sent to the monitor.

1 Like

There may be a fix here:

https://patchwork.freedesktop.org/series/102149/

I’m working on building my kernel to test it now.

3 Likes

Same here. New TB4 cable, 4k@60Hz (arch linux, kernel 5.16.16-arch1-1 and also 5.17.0)

Constant blacking out of the monitor. Reducing the amount of data helped. For me, either 4k@50Hz or 2560x1440@60Hz work. 30Hz might work too, but, honestly I cannot stand this. Might be OK for movies, but for work?

@Duane_Johnson do I understand that patch correctly in that using a second DRAM channel (aka 2nd RAM module) would help?

1 Like

Yes, that seems to be what the original bug reporter is saying! To me, quite a surprising outcome, if true. Do we all have just one DRAM stick? (I have only 1).

3 Likes

So do I.
Also, experienced this issue years back with a XPS 13, also only one channel.

2 Likes

I’m affected by this and only have one DRAM stick.

1 Like

Huh, so after easter vacations (2 weeks), I will try. More RAM is always good :slight_smile:

1 Like

Also wanted to +1 this bug, I get screen flickering on my 4K monitor at 60 Hz and I also only have 1 DRAM stick.

1 Like

I read up on some related issues reported, most importantly Issue 4321 on freedesktop.org. As already posted, that patch seems to be the solution as it solves the issue with a single DRAM: Patch 481006

I’m quite new to Linux and want to ask for advice: does it make sense for me to try and build the kernel with that patch or is that only recommended for experienced programmers?

When is that patch expected to land in a regular Fedora / Ubuntu release?

Sorry for the basic questions, I tried my best in reading through bug reports to make sense of this issue :slight_smile:

2 Likes

FYI, I built my Pop!_OS kernel with the most minimal patch applied (see above) and anecdotally it seems to have improved, but the situation is still not perfect. Even with the new patch, I would occasionally still see blackouts, unfortunately. I will continue to “monitor” the situation and report back :slight_smile:

Note that in this first test, I did not use the drm_tip kernel (I used my distro kernel + only the patch specific to this issue), so it’s possible the patch only works in conjunction with something else that has changed in the drm_tip source.

1 Like

I have a similar situation – on Ubuntu 21, have a single DRAM stick, and have improved the situation by tweaking the refresh rate. But I haven’t found a combination that eliminates the problem completely. I don’t think I need more memory now, but if it would fix the issue I’d consider it for sure.

So, very interested in hearing how your experience goes @Michael_Siebert!

1 Like

If patch 102149 is the solution we are waiting for, the contributor just mentioned that the fix might be part of kernel 5.19 :partying_face:

1 Like

I just installed the 2nd memory stick, tuned to 4k60, not a single flicker!

4 Likes

Just to chime in on this for anyone else, I had a serious problem with image tearing when using fractional scaling on Linux (thread here). I also had the external monitor screen flicker problem. I didn’t put the two together.

I moved to two RAM channels (added the second stick) based on some reading around the Xe GPU and how much it likes symmetrical memory. That solved (more or less) my tearing issue, but I didn’t think to check for effects on the flickering. I just tested and sure enough, my flicker went away, too.

It looks like the Xe GPU really likes symmetrical memory, at least with the Linux drivers.

1 Like

So, maybe the Framework team should say this for their future customers to know & order 2 memory sticks?

Beware, if you want to run linux on your framework, better get 2 memory modules, because it saves you tons of headache (no matter if you’re a wayland or x11 person)

3 Likes

For folks on Ubuntu, I upgraded to Ubuntu 22.04 (the newly-minted LTS) this morning, and am mildly surprised to see a significant improvement in my external monitor: no flickering or black-outs … even with single-channel memory (1 32GB stick).

So far it’s only been a few hours, but the external monitor has been rock-solid. And my second memory stick is set to arrive later today (classic timing), but this is working for me right now.

I can confirm that two memory modules completely fixed the issue for me.

2 Likes