Screen Flickering with UHD Graphics 620, probably related to PSR
I'm seeing occasional screen flickering on my Laptop. The laptop is a Lenovo X1 Carbon 2018 edition, the gpu according to lspci an Intel Corporation UHD Graphics 620.
This flickering appears occasionally, most of the times when I'm using the firefox browser. For reasons unclear to me I have one instance where I can reliably reproduce it in a very severe way, when visiting a specific webpage (see ). It's a relatively simple webpage so I don't see how there's a connection. Also when doing that the screen turns black after a while (this doesn't always happen when this bug appears, but it always happens on this webpage).
I've created a video showing the problem .
This happens with both the modesetting and the xf86-video-intel driver, so I believe the bug is in the kernel/drm part of the driver. Kernel version is 5.5.1, xorg-server 1.20.7. (I'm using Gentoo Linux.)
When the screen turns black the system is still running, which I can observe by ssh'ing from another system. Normal dmesg and the xorg log show nothing interesting, but when I increase drm debugging I get a few interesting looking messages:
[ 58.939360] [drm:drm_mode_addfb2] [FB:125] [ 71.799165] [drm:drm_mode_addfb2] [FB:129] [ 79.537173] [drm:intel_get_hpd_pins.isra.0] hotplug event received, stat 0x01000000, dig 0x11101010, pins 0x00000010, long 0x00000000 [ 79.537184] [drm:intel_hpd_irq_handler] digital hpd on [ENCODER:94:DDI A] - short [ 79.537271] [drm:intel_dp_hpd_pulse] got hpd irq on [ENCODER:94:DDI A] - short [ 79.537301] [drm:edp_panel_vdd_on] Turning [ENCODER:94:DDI A] VDD on [ 79.537350] [drm:edp_panel_vdd_on] PP_STATUS: 0x80000008 PP_CONTROL: 0xabcd000f [ 79.537775] [drm:intel_dp_read_dpcd] DPCD: 12 0a 84 41 00 00 01 80 02 00 00 00 0f 0b 00 [ 79.538688] [drm:intel_psr_short_pulse] PSR Link CRC error, disabling PSR [ 79.538693] [drm:intel_psr_disable_locked] Disabling PSR1 [ 82.549486] [drm:edp_panel_vdd_off_sync] Turning [ENCODER:94:DDI A] VDD off [ 82.549531] [drm:edp_panel_vdd_off_sync] PP_STATUS: 0x80000008 PP_CONTROL: 0xabcd0007
While I don't understand much of what this is telling me, it indicated that PSR is related to the problem. From what I understand PSR is a powersaving feature, so I tried disabling it (i915.enable_psr=0), and actually that makes the problem go away (at least for my reproducible testcase, I obviously can't tell if the bug will reappear unpredictably).