Screen Flicker/Flashing While Booting and TTY

Hi,

A few days ago, I switched from Ubuntu to Manjaro. I love it except this flickering issue. I have a Dell Latitude 5490 laptop, and 10 seconds or so before the Manjaro login screen, the screen goes crazy with purple and white and green lines flickering all over the screen. This flickering happens every time I boot, but about 30% of the time, it ends with a black screen and I have to simply power cycle the machine to turn it on. I also got the black screen once after I suspended. Additionally, if I hit Ctrl-Alt-F2 to go into TTY mode, the screen does the same thing, and after 10-20 seconds, it typically will again go black and I have to power off/on.

This is dual boot with Windows 10, and I don’t see the problem when I boot into Windows, nor did I see it when I was using Ubuntu on this machine. So I know there has to be some setting that will fix this!

I’ve tried:

  • Different kernels: 5.13, 5.10, 5.4
  • Setting the refresh rate to 50 Hz
  • Setting the kernel option: i915.enable_psr=0

So far, no luck. The exact same problem persists.

Any help would be greatly appreciated.

Output of inxi -Fxza --no-host

System:    Kernel: 5.4.150-1-MANJARO x86_64 bits: 64 compiler: gcc v: 11.1.0
           parameters: BOOT_IMAGE=/boot/vmlinuz-5.4-x86_64
           root=UUID=b9d1c363-d2db-431f-9d58-6feaa66667b0 rw quiet splash apparmor=1
           security=apparmor udev.log_priority=3 i915.enable_psr=0
           Desktop: GNOME 40.5 tk: GTK 3.24.30 wm: gnome-shell dm: GDM 40.1
           Distro: Manjaro Linux base: Arch Linux
Machine:   Type: Laptop System: Dell product: Latitude 5490 v: N/A serial: <filter>
           Chassis: type: 10 serial: <filter>
           Mobo: Dell model: 0RC6D6 v: A00 serial: <filter> UEFI: Dell v: 1.14.0
           date: 07/15/2020
Battery:   ID-1: BAT0 charge: 33.3 Wh (82.0%) condition: 40.6/68.0 Wh (59.7%) volts: 8.4
           min: 7.6 model: LGC-LGC8.820 DELL FPT1C8B type: Li-ion serial: <filter>
           status: Charging
CPU:       Info: Dual Core model: Intel Core i5-7200U bits: 64 type: MT MCP
           arch: Amber/Kaby Lake note: check family: 6 model-id: 8E (142) stepping: 9
           microcode: EA cache: L2: 3 MiB
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
           bogomips: 21607
           Speed: 793 MHz min/max: 400/3100 MHz Core speeds (MHz): 1: 793 2: 800 3: 800
           4: 800
           Vulnerabilities: Type: itlb_multihit status: KVM: Split huge pages
           Type: l1tf
           mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable
           Type: mds mitigation: Clear CPU buffers; SMT vulnerable
           Type: meltdown mitigation: PTI
           Type: spec_store_bypass
           mitigation: Speculative Store Bypass disabled via prctl and seccomp
           Type: spectre_v1
           mitigation: usercopy/swapgs barriers and __user pointer sanitization
           Type: spectre_v2 mitigation: Full generic retpoline, IBPB: conditional,
           IBRS_FW, STIBP: conditional, RSB filling
           Type: srbds mitigation: Microcode
           Type: tsx_async_abort status: Not affected
Graphics:  Device-1: Intel HD Graphics 620 vendor: Dell driver: i915 v: kernel
           bus-ID: 00:02.0 chip-ID: 8086:5916 class-ID: 0300
           Device-2: Realtek Integrated Webcam HD type: USB driver: uvcvideo
           bus-ID: 1-5:2 chip-ID: 0bda:568c class-ID: 0e02 serial: <filter>
           Display: wayland server: X.Org 1.21.1.2 compositor: gnome-shell driver:
           loaded: i915 note: n/a (using device driver) - try sudo/root display-ID: :0
           screens: 1
           Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x286mm (20.0x11.3")
           s-diag: 583mm (23")
           Monitor-1: XWAYLAND0 res: 1920x1080 hz: 60 dpi: 157
           size: 310x170mm (12.2x6.7") diag: 354mm (13.9")
           OpenGL: renderer: Mesa Intel HD Graphics 620 (KBL GT2) v: 4.6 Mesa 21.2.3
           direct render: Yes
Audio:     Device-1: Intel Sunrise Point-LP HD Audio vendor: Dell driver: snd_hda_intel
           v: kernel alternate: snd_soc_skl bus-ID: 00:1f.3 chip-ID: 8086:9d71
           class-ID: 0403
           Sound Server-1: ALSA v: k5.4.150-1-MANJARO running: yes
           Sound Server-2: JACK v: 1.9.19 running: no
           Sound Server-3: PulseAudio v: 15.0 running: yes
           Sound Server-4: PipeWire v: 0.3.38 running: no
Network:   Device-1: Intel Ethernet I219-LM vendor: Dell driver: e1000e v: 3.2.6-k
           port: N/A bus-ID: 00:1f.6 chip-ID: 8086:15d7 class-ID: 0200
           IF: enp0s31f6 state: down mac: <filter>
           Device-2: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter
           vendor: Dell driver: ath10k_pci v: kernel bus-ID: 02:00.0 chip-ID: 168c:003e
           class-ID: 0280
           IF: wlp2s0 state: up mac: <filter>
Bluetooth: Device-1: Qualcomm Atheros type: USB driver: btusb v: 0.8 bus-ID: 1-7:3
           chip-ID: 0cf3:e007 class-ID: e001
           Report: rfkill ID: hci0 rfk-id: 5 state: up address: see --recommends
RAID:      Hardware-1: Intel 82801 Mobile SATA Controller [RAID mode] driver: ahci
           v: 3.0 port: f060 bus-ID: 00:17.0 chip-ID: 8086:282a rev: N/A class-ID: 0104
Drives:    Local Storage: total: 1.82 TiB used: 375.06 GiB (20.1%)
           SMART Message: Required tool smartctl not installed. Check --recommends
           ID-1: /dev/sda maj-min: 8:0 vendor: Western Digital model: WD20SPZX-22CRAT0
           size: 1.82 TiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
           type: HDD rpm: 5400 serial: <filter> rev: 1A01 scheme: GPT
Partition: ID-1: / raw-size: 1.33 TiB size: 1.31 TiB (98.35%) used: 220.06 GiB (16.4%)
           fs: ext4 dev: /dev/sda4 maj-min: 8:4
           ID-2: /boot/efi raw-size: 650 MiB size: 646 MiB (99.38%)
           used: 60.3 MiB (9.3%) fs: vfat dev: /dev/sda1 maj-min: 8:1
Swap:      Alert: No swap data was found.
Sensors:   System Temperatures: cpu: 36.5 C mobo: N/A
           Fan Speeds (RPM): cpu: 2806
Info:      Processes: 225 Uptime: 1h 19m wakeups: 8 Memory: 15.5 GiB
           used: 3.23 GiB (20.8%) Init: systemd v: 249 tool: systemctl Compilers:
           gcc: 11.1.0 Packages: pacman: 1261 lib: 327 flatpak: 0 Shell: Zsh v: 5.8
           running-in: gnome-terminal inxi: 3.3.08

Hi,
Try with early KMS maybe …
Edit /etc/mkinitcpio.conf on the MODULES line to contain i915, if you have nothing there it will look like so:

MODULES=(i915)

(if you have something there already use spaces to separate)
Then run

sudo mkinitcpio -P

(and reboot)

If you do not experience any issues, it is safe to leave it there.
(and likely reduce boot time)

But if it does not help, please try with boot option (in /etc/default/grub):

i915.fastboot=1

And then run:

sudo update-grub

(and reboot)
Please check also with this option off/on vs your bios equivalent off/on as well.

Good luck.

Thanks cscs for your help.

I tried adding MODULES=(i915) to mkinitcpio.conf. The flickering persisted. But strangely, the boot screen looks a little better. Before, the screen would just show the three blinking dots near the upper left indicating it was booting. I always thought that was a weird looking boot screen. Now it shows the Dell logo, the three dots, and the word “Manjaro”, centered.

Then I tried i915.fastboot=1. Unfortunately the flickering is still there.

I then looked through my BIOS options, but didn’t see anything that looked like fastboot, so I didn’t change anything.

So the flickering is still there (though the boot screen looks nicer!).

Thanks

I seem to have fixed it by adding

idle=halt

to the kernal parameters in Grub. I’m also leaving

MODULES=(i915)

in mkinitcpio.conf, as cscs suggested. It might not be necessary to cure the flicker problem, but it makes the boot screen look as it was intended.

I timed exactly when the video started flickering during boot, then looked at the journal logs at that moment and saw this error message:

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

That led me to this posting:

https://unix.stackexchange.com/questions/588457/drmintel-cpu-fifo-underrun-irq-handler-i915-error-cpu-pipe-a-fifo-underru

This person fixed the issue by turning off C-States in the BIOS. I tried that, and indeed it worked, though I’d rather not have to change the BIOS to fix the problem. More searching led to this white paper from Dell:

https://wiki.bu.ost.ch/infoportal/_media/embedded_systems/ethercat/controlling_processor_c-state_usage_in_linux_v1.1_nov2013.pdf

Apparently the intel_idle driver uses knowledge of the various CPUs to control C-states without input from the system firmware (BIOS). Setting

intel_idle.max_cstate=0

disables that driver. Unfortunately, that alone didn’t fix my problem. But you can limit C-states to C1 with the parameter

idle=halt

which also disables the intel_idle driver in “newer” kernels (as of 2013).

That parameter alone fixed my problem. Why did C-states cause the video errors? No idea. But at least this works.

If anyone thinks this setting is a bad idea, let me know, cause otherwise, I’m making it permanent!

1 Like

Whoa, nice catch.
The thing about limiting cstates is power consumption. As in you will use more of it.
(I had to do this with a baytrail - though a max of 1 or 2)
If this doesnt bother you … it shouldnt be much of a problem.

Did you encounter any problems with not being able to wake the laptop from sleep/suspend? I’ve had this issue on almost every distro. It’s mostly not there on Fedora, but I want to use Manjaro as my daily driver now.

@muga Thanks for the solution! I suffered this issue for some time now and now I’m free!