[i915] Screen flickering in Ubuntu 22.04 (until i915.enable_dc=0 intel_idle.max_cstate=2 are added) (fixed in 5.17.7 and later)

Bug #1958191 reported by lotuspsychje
226
This bug affects 44 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Triaged
High
Unassigned

Bug Description

Ubuntu 22.04 development branch on kernel 5.15.0-17-generic @ 18/1/2022

Booting into desktop gets heavy screen flickering and disforming (unusable)
both booting on xorg and wayland

on kernel 5.13 it did not occur so heavy (only little glitches once in a while see bug 1948778)

adding the kernel paramater intel_idle.max_cstate=4 fixed this

i had these same bugs on this machine before:

https://bugs.launchpad.net/ubuntu/+source/linux-hwe/+bug/1838644

https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/1948778

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: linux-image-5.15.0-17-generic 5.15.0-17.17
ProcVersionSignature: Ubuntu 5.15.0-17.17-generic 5.15.12
Uname: Linux 5.15.0-17-generic x86_64
ApportVersion: 2.20.11-0ubuntu75
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: lotuspsychje 1201 F.... pipewire-media-
                      lotuspsychje 1207 F.... pulseaudio
 /dev/snd/seq: lotuspsychje 1193 F.... pipewire
CasperMD5CheckResult: unknown
CurrentDesktop: ubuntu:GNOME
Date: Tue Jan 18 04:22:00 2022
Lsusb:
 Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
 Bus 001 Device 004: ID 8087:0025 Intel Corp. Wireless-AC 9260 Bluetooth Adapter
 Bus 001 Device 003: ID 04f2:b59e Chicony Electronics Co., Ltd Chicony USB2.0 Camera
 Bus 001 Device 002: ID 046d:c534 Logitech, Inc. Unifying Receiver
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
MachineType: Notebook N7x0WU
ProcFB: 0 i915drmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-5.15.0-17-generic root=UUID=a41247d1-3bc3-453e-849a-e07fdcca6201 ro quiet splash intel_idle.max_cstate=4 vt.handoff=7
RelatedPackageVersions:
 linux-restricted-modules-5.15.0-17-generic N/A
 linux-backports-modules-5.15.0-17-generic N/A
 linux-firmware 1.204
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 01/07/2019
dmi.bios.release: 7.13
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 7.13
dmi.board.asset.tag: Tag 12345
dmi.board.name: N7x0WU
dmi.board.vendor: Notebook
dmi.board.version: Not Applicable
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: No Enclosure
dmi.chassis.version: N/A
dmi.ec.firmware.release: 7.14
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr7.13:bd01/07/2019:br7.13:efr7.14:svnNotebook:pnN7x0WU:pvrNotApplicable:rvnNotebook:rnN7x0WU:rvrNotApplicable:cvnNoEnclosure:ct10:cvrN/A:skuNotApplicable:
dmi.product.family: Not Applicable
dmi.product.name: N7x0WU
dmi.product.sku: Not Applicable
dmi.product.version: Not Applicable
dmi.sys.vendor: Notebook

Revision history for this message
lotuspsychje (lotuspsychje) wrote :
Revision history for this message
lotuspsychje (lotuspsychje) wrote :

adding dmesg for 5.15 without cstate paramater

Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
lotuspsychje (lotuspsychje) wrote : Re: Flickering and disforming booting into desktop both on wayland/xorg

on 5/04/2022 Ubuntu 22.04 Beta with kernel 5.15.0-25-generic

this flickering is still persisting and needs the parameter intel_idle.max_cstate=4
to be usable again

Revision history for this message
lotuspsychje (lotuspsychje) wrote :
Revision history for this message
lotuspsychje (lotuspsychje) wrote :

booting with kernel parameter i915.enable_psr=0 does not influence the flickering

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Does it look like the flickering shown in bug 1970426 and its duplicates?

Changed in linux (Ubuntu):
status: Confirmed → Incomplete
tags: added: flicker i915
Revision history for this message
lotuspsychje (lotuspsychje) wrote :

@ Daniel #7

the bug reports look very similar to my flickering, but mine are much worst
when booting into desktop i have a few seconds till the flickering gets
unworkable and scrambles up the screen to almost black

so i'm not sure its a dupe or not myself

if you look at my upstream bug on #5 that guy Ozan has very similar symptons
to what i experience, + the kernel versions tested are similar to his

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Can you provide a video?

Revision history for this message
lotuspsychje (lotuspsychje) wrote :

Video with the flickering, currently testing kernel 5.15.0-27-generic

Revision history for this message
lotuspsychje (lotuspsychje) wrote :

also worth mentioning, on the kernels of ubuntu 20.04 i never had this flickering

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thanks for the video. Although it looks a little different to bug 1970426 I would definitely still class it as the same bug until proven otherwise (when a fix for that bug is available and if it doesn't work for your machine).

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

The solution to bug 1970426 ended up being:

  i915.enable_dc=0
  intel_idle.max_cstate=2

Can you try those?

summary: - Flickering and disforming booting into desktop both on wayland/xorg
+ [i915] Flickering and deformed booting into desktop both on wayland/xorg
Revision history for this message
lotuspsychje (lotuspsychje) wrote : Re: [i915] Flickering and deformed booting into desktop both on wayland/xorg

@ Daniel #13

That kernel parameter looks promising! on cstate=4 i still had some glitches here and there
now they seem to be gone

great job!

Revision history for this message
lotuspsychje (lotuspsychje) wrote :

Adding dmesg with kernel parameter i915.enable_dc=0 intel_idle.max_cstate=2

summary: - [i915] Flickering and deformed booting into desktop both on wayland/xorg
+ [i915] Screen flickering in Ubuntu 22.04 (until i915.enable_dc=0
+ intel_idle.max_cstate=2 are added)
tags: added: regression-release rls-jj-incoming
Changed in linux (Ubuntu):
status: Incomplete → Triaged
importance: Undecided → High
Revision history for this message
Diogo Duarte (diogofd8) wrote : Re: [i915] Screen flickering in Ubuntu 22.04 (until i915.enable_dc=0 intel_idle.max_cstate=2 are added)

I'm having the same issue, I'd like to add that I've tested both Xubuntu 22.04 and Ubuntu 22.04 and was able to reproduce the same error. Now I'm running Kubuntu 22.04 with the following spec:

OS: Kubuntu 22.04 LTS x86_64
Kernel: 5.15.0-27-generic
Shell: bash 5.1.16
Resolution: 1920x1080 @ 120Hz
DE: KDE Plasma 5.24.5
KDE Frameworks Version: 5.93.0
WN: Kwin 5.24.5
Qt Version: 5.15.3
Graphics Platform: X11

Host: GL62 6QF REV:1.0
CPU: Intel i5-6300HQ (4) @ 3.200GHz
GPU: Mesa Intel® HD Graphics 530
GPU: NVIDIA GeForce GTX 960M

Here's another video of the issue: https://streamable.com/b9792p

PS: I added GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i915.enable_dc=0 intel_idle.max_cstate=2" to /etc/default/grub and I still have some instances of screen shaking.

Revision history for this message
lotuspsychje (lotuspsychje) wrote :

@ Diogo #16

did you also sudo update-grub after the kernel paramater?
and doublechecked if you are using your intel card and not your nvidia on wayland?

Revision history for this message
Diogo Duarte (diogofd8) wrote :

I'm not using wayland. I stated that I was on X11.

I did sudo update-grub indeed!

Revision history for this message
Oibaf (oibaf) wrote (last edit ):

Daniel van Vugt (vanvugt) asked for a kernel bisect with the kernel mainline PPA:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1970426/comments/22

If someone is willing to do it he can do this (from https://wiki.ubuntu.com/Kernel/KernelBisection#Version_bisecting_upstream_kernels):

The first step in the bisect process is to find the last "Good" kernel version, followed consecutively in version by the first "Bad" one. That is done by downloading, installing and testing kernels from https://kernel.ubuntu.com/~kernel-ppa/mainline/?C=N;O=A

Thanks.

Revision history for this message
Ernst Sjöstrand (ernstp) wrote :

When I upgraded to 22.04 I started getting flicker on my external HDMI monitor.
Latitude 7300, i7-8665U.
A batch of flicker every 15 or 30 minutes or so, not very easy to use for bisecting...
There are instances of
[336186.058517] i915 0000:00:02.0: [drm] *ERROR* CPU pipe B FIFO underrun
in dmesg but it doesn't always appear when there is flickering.

Revision history for this message
lotuspsychje (lotuspsychje) wrote :

@ Oibaf #19

If it can help, i start helping debug ubuntu 22.04 from the start
with kernel 5.13.0-19.19-generic with light flickering (workable)

see bug https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/1948778

and heavy unworkable flickering started (in this bug) with kernel series
5.15.0-17-generic

Revision history for this message
svierne (svierne) wrote :

I can confirm that adding `i915.enable_dc=0 intel_idle.max_cstate=2` works for me on i7-7600u. No more screen flickering in the last two days. Without the workaround the flickering occurs randomly and definitively in correlation to mouse movement, but I'm not sure how exactly. As already stated by ernstp (#20), kernel bisection is going to be a rocky road ...

Revision history for this message
kjur (kjur) wrote :

@Oibaf (oibaf) - I experienced the same issue on Xubuntu 22.04 too. The very last available xubuntu 21.10 kernel was fine. I upgraded from fully updated 21.10 to 22.40 and then the problem started.
Not sure what is the latest 21.10 available kernel. Perhaps 5.13.0.1022.23 ? Not sure how to do a full research on that.

Revision history for this message
Oibaf (oibaf) wrote :

@lotuspsychje : I think it would be useful to detect a behaviour change, even if symptoms are slight different (eventually it can still help for bug 1948778 if there are two different bugs).

@kjur : kernel series from https://kernel.ubuntu.com/~kernel-ppa/mainline/?C=N;O=A are vanilla kernels, Ubuntu kernels has some more patches added. If you can bisect you could start with 5.13.19, hopefully it should be bug free. If so then try 5.15. If 5.15 is "bugged", then select a kernel between 5.13.19 and 5.15 (says 5.14) then continue until you find the first one with the problem.

Revision history for this message
Diogo Duarte (diogofd8) wrote (last edit ):

Following up on this: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1958191/comments/16

Booting with 5.15.0-25-generic and the i915.enable_dc=0 intel_idle.max_cstate=2 configs seems to fix the issue on my hardware.

5.15.0-27-generic won't stop shaking randomly no matter what value I test on intel_idle.max_cstate. It seems to get worse when there are many windows on the screen or something is zoomed in/out. For example, on shopping sites like aliexpress, hovering with the mouse on the product normally spawns this window with the zoomed product, I noticed that this caused a lot of shaking. Reading stuff, especially with images seems to cause it more regularly as well. However, watching videos was fine all the time.

I can also confirm that the kernel 5.13.0-20-generic works without an issue with the same hardware as some of my work colleagues have the same machine running Ubuntu 21.10 with that kernel.

Revision history for this message
Anaggh S (anaggh) wrote (last edit ):

Hi, following up on this - https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1970426/comments/9

GRUB PARAM - `i915.enable_dc=0 intel_idle.max_cstate=2` has fixed the flicker for me.

$ uname -a
Linux home 5.15.0-30-generic #31-Ubuntu SMP Thu May 5 10:00:34 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

$ grep GRUB_CMDLINE_LINUX_DEFAULT /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i915.enable_dc=0 intel_idle.max_cstate=2"

---

Also in additional to Debian Unstable (5.17.x kernel), this flicker problem (without GRUB workaround) does not exist in recent Fedora 36 release (5.17.x kernel) as well during my testing.

---

Responding to this: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1970426/comments/22

Last kernel without the bug was definitely 5.13.x on Xubuntu 21.10 (used it for about 6 months)
The bug started when I wiped and installed 22.04 release (5.15.x)

Also, I remember when 1st release - 5.15.x was released, I installed it on 21.10 release with https://github.com/bkw777/mainline and the flicker problem occurred and I reverted back to stock Ubuntu 5.13.x. So bug could be somewhere between >= 5.14.x and <= 1st release of 5.15.x.

Revision history for this message
Melika (meliana00) wrote :

I just updated my Ubuntu to 22.04 and I'm having the same issue. Hopefully it'll get fixed ASAP.

Revision history for this message
Dee (dmusil-x) wrote :

Updated ubuntu from 21.04 and no matter what I do with settings, all monitors go black every 30 seconds I do not touch the keyboard or mouse (or running movie). I hope it will be fixed soon.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

The monitor going black is a different bug. Please don't discuss that here, but open a new bug by running:

  ubuntu-bug linux

Revision history for this message
David Bellot (david-bellot) wrote (last edit ):

Half-related to this bug but worth mentioning it because it is certainly linked to it. On a HP x360 Spectre (i7-8565U WhiskeyLake-U GT2 [UHD Graphics 620]), the trick with GRUB_CMDLINE_LINUX_DEFAULT.

The problem is more serious here because the screen flickers and goes to black, purple, green, entirely, immediately after the boot (so basically when the kernel presumably changes the graphics mode)

I tried different kernels:
- 5.17.8: failed
- 5.15.x: all failed (from Ubuntu 22.04)
- 5.13.19: works and back to normal

I found the following errors in the logs:
* i915 0000:00:02.0: [drm] *ERROR* Atomic update failure on pipe A (start=43426 end=43427) time 300 us, min 2146, max 2159, scanline start 2131, end 2171
* i915 0000:00:02.0: [drm] Finished loading DMC firmware i915/kbl_dmc_ver1_04.bin (v1.4)
* i915 0000:00:02.0: [drm] [ENCODER:102:DDI B/PHY B] is disabled/in DSI mode with an ungated DDI clock, gate it
* i915 0000:00:02.0: [drm] [ENCODER:113:DDI C/PHY C] is disabled/in DSI mode with an ungated DDI clock, gate it
* i915 0000:00:02.0: [drm] *ERROR* CPU pipe A FIFO underrun

So the problem is > 5.13.x series

I solved it by downgrading to 5.13.19 from ubuntu mainline on a newly updated ubuntu 22.04!

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

David, please open a new bug for the above.

Revision history for this message
David Bellot (david-bellot) wrote :

done in Bug #1973676
Thanks Daniel

Revision history for this message
Manuel Pégourié-Gonnard (mpg) wrote :

I also experience flickering with Ubuntu 22.04's 5.15.0-27-generic kernel, which goes away with i915.enable_dc=0 intel_idle.max_cstate=2, and was not present with Ubuntu 20.04's latest 5.13 kernel.

Due to another bug affecting my machine, I'm now running the vanilla 5.14.20 kernel from the mainline-ppa. Out of curiosity, I tried removing "i915.enable_dc=0 intel_idle.max_cstate=2" and I've been flicker-free for several days now (I used to experience flickering a few times a day initially).

So, either the problem is specific to Ubuntu kernels, or it was introduced between 5.14 and 5.15.

Due to that other bug, and the fact the the flickering used to be infrequent, I'm not sure I'll be able to version-bisect this issue, but I'll give it a try if I can find the time.

Revision history for this message
João Pedro Seara (jpseara) wrote :

Having the same issue on a Lenovo T480s laptop.

Linux JP 5.15.0-30-generic #31-Ubuntu SMP Thu May 5 10:00:34 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

        *-display
             description: VGA compatible controller
             product: UHD Graphics 620
             vendor: Intel Corporation
             physical id: 2
             bus info: pci@0000:00:02.0
             logical name: /dev/fb0
             version: 07
             width: 64 bits
             clock: 33MHz
             capabilities: pciexpress msi pm vga_controller bus_master cap_list ro
m fb
             configuration: depth=32 driver=i915 latency=0 resolution=1920,1080
             resources: irq:160 memory:e7000000-e7ffffff memory:c0000000-cfffffff ioport:e000(size=64) memory:c0000-dffff

Revision history for this message
kjur (kjur) wrote :

adding "i915.enable_dc=0 intel_idle.max_cstate=2" doesn't help in my case (kernel 5.15, Intel UHD / i915 graphics)

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

If the suggested solution doesn't work for you then please open a separate new bug by running:

  ubuntu-bug linux

Revision history for this message
Peter (vp2177) wrote :

Shouldn't an update be released that adds the workaround(s) mentioned above (the Kernel boot parameters i915.enable_dc=0 or/and, if necessary, intel_idle.max_cstate=$MAX_CSTATE_THAT_WORKS)?

So the Ubuntu 22.04 experience is improved for users with Intel graphics while the kernel regression is tracked down and patched?

Revision history for this message
Nikolai Kotsifas (nikolai-kotsifas) wrote :

Peter, I don't think it's a fix, but only a workaround that limits two important power management functionalities (cpu cstates and gpu display cstates). I hope and believe they're still working on finding a real fix for the bug.

Revision history for this message
kjur (kjur) wrote :

Reported a new bug here:
https://bugs.launchpad.net/ubuntu/+source/linux-signed-lowlatency/+bug/1976398
as in my case adding extra option to GRUB didn't help.
Please follow there if you are also affected.

Revision history for this message
Pedro Daniel Vieira Rosado (pdvrsd) wrote :

Same issue here. Heavy black flickering on the screen with Ubuntu 22.04 after upgrade from 20.04 and after a clean install. No extra repos, only default packages.

Aspire 3 A315-31 series
N17Q2

Mesa Intel® HD Graphics 500 (APL 2)

Linux laptop 5.15.0-33-generic #34-Ubuntu SMP Wed May 18 13:34:26 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Revision history for this message
Michael Barker (mikeb01) wrote :

I have the same problem on an Lenovo X260, i7-6500U. Using the "i915.enable_dc=0 intel_idle.max_cstate=2" workaround has made the system more stable.

This mostly seems to occur when playing a game in the browser (chrome & firefox), e.g. chess.com.

Revision history for this message
Anaggh S (anaggh) wrote :

Hi, following up on this https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1958191/comments/26

I installed 5.18.2 today using mainline https://github.com/bkw777/mainline

$ uname -a
Linux home 5.18.2-051802-generic #202206060740 SMP PREEMPT_DYNAMIC Mon Jun 6 07:46:45 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Removed the earlier GRUB workarounds `i915.enable_dc=0 intel_idle.max_cstate=2`

sudo update-grub
reboot

No screen flicker!!! No GRUB workaround needed when using 5.18.2 kernel for me. Can anyone else confirm?

Revision history for this message
Manuel Pégourié-Gonnard (mpg) wrote :

I've installed 5.18.2 from the mainline ppa yesterday and have been running it without i915.enable_dc=0 intel_idle.max_cstate=2 since then. No flickering so far.

Revision history for this message
Anaggh S (anaggh) wrote :

Thanks for confirming! This is great news.

Revision history for this message
Nikolai Kotsifas (nikolai-kotsifas) wrote :

I can confirm that 5.18.13 kernel has no flickers and no GRUB workaround is needed.

Revision history for this message
Tushar (rafattushar) wrote :

Installing the 5.18.2 kernel eliminates the problem, but my laptop is overheating with no applications running.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

To find a fix that can be released in updates to 22.04 we will need to start by identifying what the last kernel version with the bug was, and the first kernel version with the fix.

Revision history for this message
Tushar (rafattushar) wrote (last edit ):

Daniel, I faced this problem on the last Ubuntu kernel version 5.15.0.37.39.
I have been using the immediate-next mainline kernel version 5.15.1-051501.202111061036 for two days, and the problem did not occur so far.

Can anybody confirm this?

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

5.15.0-37.39 actually is not based on 5.15.0 but 5.15.35 according to its source code. Weird naming I know...

Maybe start on 5.15.35 in https://kernel.ubuntu.com/~kernel-ppa/mainline/?C=M;O=D, verify the bug exists there, and then try 5.16/ and 5.17/

Revision history for this message
Tushar (rafattushar) wrote :

The bug exists on 5.15.35, 5.16.20, 5.17.5, 5.15.36.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

> The bug exists on 5.15.35, 5.16.20, 5.17.5, 5.15.36.

Then the range to search is between 5.17.5 (failing) and 5.18.2 (working). We need to find adjacent version numbers where one is failing and the next is working.

Revision history for this message
Tushar (rafattushar) wrote (last edit ):

> The bug exists on 5.15.35, 5.16.20, 5.17.5, 5.15.36.
In addition to this, the bug exists on 5.15.37 and 5.17.6.
I have been using 5.17.7 for around 16 hours, and the problem has not occurred so far.

UPDATE: Now, I can confirm that the bug does not exist on 5.17.7 (5.17.7-051707). The list of all the kernels with bugs' existence,
5.15.35-051535 (failing)
5.16.20-051620 (failing)
5.17.5-051705 (failing)
5.15.36-051536 (failing)
5.15.37-051537 (failing)
5.17.6-051706 (failing)
5.15.38-051538 (failing)
5.15.39-051539 (failing)
5.17.7-051707 (working)

Can anybody confirm that 5.17.7 is working?

Revision history for this message
Anaggh S (anaggh) wrote :

Can confirm.

(Has Flicker): 5.17.6-051706-generic #202205090841 SMP PREEMPT Mon May 9 08:51:54 UTC 2022 x86_64 GNU/Linux

(No Flicker): 5.17.7-051707-generic #202205121146 SMP PREEMPT Thu May 12 13:20:51 UTC 2022 x86_64 GNU/Linux

@Daniel: I think this is what you were looking for? Hope this is fixed in the 5.15.x stock ubuntu kernel.

Anyway, I am back to using 5.18.x since 5.17.x has gone EOL - https://kernel.org/

summary: [i915] Screen flickering in Ubuntu 22.04 (until i915.enable_dc=0
- intel_idle.max_cstate=2 are added)
+ intel_idle.max_cstate=2 are added) (fixed in 5.17.7 and later)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

There actually aren't any changes in the i915 driver between 5.17.6 and 5.17.7. But there are changes to iommu code... Please try this with one of the failing kernel versions:

  intel_iommu=off

Revision history for this message
Tushar (rafattushar) wrote :

Adding "intel_iommu=off" to grub fixes this problem on affected kernels.

Revision history for this message
lotuspsychje (lotuspsychje) wrote :

@ #55 and #57

i tested intel_iommu=off on kernel 5.15.0-39-generic ( 22.04) wich still results in flickering

back to i915.enable_dc=0 intel_idle.max_cstate=2 for me

Revision history for this message
Tushar (rafattushar) wrote (last edit ):

@lotuspsychje, does upgrading to kernel 5.17.7 stop flickering for you (without i915.enable_dc=0 intel_idle.max_cstate=2)?
Because there may be two different bugs here. My error looks more like bug #1970426: Flickering occurs at some specific cursor positions and does not stop until the cursor moves to another point.

Revision history for this message
Peter (vp2177) wrote :

@Tushar: That bug is marked as a duplicate if this bug though. Perhaps it shouldn't be?

Revision history for this message
Peter (vp2177) wrote (last edit ):

I have been facing the "flickering occurs at some specific cursor positions and does not stop until the cursor moves" issue.
Now I have tried with `intel_iommu=off`, using the `Linux 5.15.0-39-generic #42-Ubuntu SMP Thu Jun 9 23:42:32 UTC 2022` kernel (latest 22.04 HWE).
Can no longer reproduce the flickering, and in general, graphics seem much more "stable", animations don't "stutter" like before etc.

Revision history for this message
Anaggh S (anaggh) wrote (last edit ):

+1 Confirm.

Adding "intel_iommu=off" to grub fixes the problem.

Tested on
* 5.17.6-051706-generic #202205090841 SMP PREEMPT Mon May 9 08:51:54 UTC 2022 x86_64 GNU/Linux
* 5.15.0-39-generic #42-Ubuntu SMP Thu Jun 9 23:42:32 UTC 2022 x86_64 GNU/Linux

Like Tushar and Peter, the flickers I experienced are like https://launchpadlibrarian.net/598521946/glitches.mp4 and not the ones lotuspsychje experienced here https://launchpadlibrarian.net/599782137/20220504_113918.mp4

Revision history for this message
cascagrossa (cascagrossa-cascao) wrote :

+1 confirm.

Adding "intel_iommu=off" to grub fixes the flickering for me!

Revision history for this message
lotuspsychje (lotuspsychje) wrote :

@ Daniel

i think we got 2 bugs mixed up here

Revision history for this message
kjur (kjur) wrote (last edit ):

I'm using 5.15.0-39-lowlatency and "intel_iommu=off" has solved the flickering problem. I was having the same issue as Anaggh showed on the first video in his comment above.
Still have "i915.enable_dc=0 intel_idle.max_cstate=2" for now too (but that on it's own didn't help before).

Revision history for this message
Peter (vp2177) wrote (last edit ):

I think there are potentially 4 or 5 different bugs that all result in forms of "flickering" on Intel graphics:

- One related to panel self-refresh (i915.enable_psr), this one has been around for a while, predates 22.04. I think it even predates 20.04
- "Kaleidoscope patterns" flickering, apparently memory other than the framebuffer is being displayed, or it's read from the wrong offset. This eventually leads to a crash in the iris Mesa driver. May not be kernel related. Personally I've only seen it happen in Xorg sessions, not Wayland. Freedesktop bug: #6341
- The one discussed above: in this case, flickering starts with the cursor in specific positions. Related to the I/O memory management unit (intel_iommu), new in 22.04.
- The issue solved by i915.enable_dc=0 + intel_idle.max_cstate=2, as some people reported here. However, for me (and also @kjur above) these options didn't solve the flicker, but intel_iommu=off did. So these are separate issues

For those whose issue is solved by enable_dc=0 + max_cstate=2, it would be worth trying i915.enable_psr=0 alone, without the other workarounds, to ascertain if it's the same issue or a different one

- And there's yet another one related to framebuffer compression (i915.enable_fbc)

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Every time a bug like this is reported, we ask the user to try i915.enable_psr=0 early on to exclude that possibility.

If anyone has an issue that is not described by the title of this page then it should be discussed in a separate bug report.

Revision history for this message
Tushar (rafattushar) wrote :

@Daniel, this bug is reported as a duplicate of bug #1970426, and first, like others, I did not know those were separate bugs.
At least we know the solution for bug #1970426, which you said to be in "between 5.17.6 and 5.17.7. But there are changes to iommu code".

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Bug 1970426 is arguably not separate because it's a duplicate of this one. Only if the original reporter of that bug (Nikolai Kotsifas) thinks it should be separated would we do so.

Revision history for this message
Tushar (rafattushar) wrote :

Then, should I create a new bug report?

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Yes please create a separate bug for every issue you encounter.

Revision history for this message
Anaggh S (anaggh) wrote (last edit ):

Today's stock Ubuntu kernel update has fixed the flicker for me. No need for any GRUB workarounds.

$ uname -a
Linux home 5.15.0-40-generic #43-Ubuntu SMP Wed Jun 15 12:54:21 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

So bug #1970426 is officially fixed.

Revision history for this message
lotuspsychje (lotuspsychje) wrote :

No difference for me testing on kernel 5.15.0-40-generic
the flickering continues

Revision history for this message
cascagrossa (cascagrossa-cascao) wrote :

Good news, with updated stock kernel, I don't have any flickering.

$ uname -a
Linux cerebro 5.15.0-40-generic #43-Ubuntu SMP Wed Jun 15 12:54:21 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

sudo lshw -c display
  *-display
       description: VGA compatible controller
       product: WhiskeyLake-U GT2 [UHD Graphics 620]
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       logical name: /dev/fb0
       version: 02
       width: 64 bits
       clock: 33MHz
       capabilities: pciexpress msi pm vga_controller bus_master cap_list rom fb
       configuration: depth=32 driver=i915 latency=0 resolution=1366,768
       resources: irq:136 memory:c0000000-c0ffffff memory:b0000000-bfffffff ioport:4000(size=64) memory:c0000-dffff

Revision history for this message
Dimitris Moraitidis (dimisjim) wrote :

Same here as cascagrossa-cascao and others above, baring the same config, running on latest mesa drivers, with 620 graphics & 5.15.0-40 kernel, I haven't experienced since yesterday a single flickering thingy!

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Unfortunately comment #73 being the OP here keeps the bug open.

Before we can ask the kernel team to get involved we need to know if 5.17.7-051707-generic and later does fix the issue for lotuspsychje in particular.

Revision history for this message
Daniel van Vugt (vanvugt) wrote (last edit ):

The kernel team has confirmed that intel_iommu=off was reintroduced in kernel 5.15.0-40-generic (see bug 1971699). So hopefully that solves it for most people. Just not the OP :(

Revision history for this message
lotuspsychje (lotuspsychje) wrote :

@Daniel # 76

just tested mainline kernel Linux R00TB00K 5.17.7-051707-generic #202205121146

and i can confirm the flickering has resolved!

tnx a lot to all devs & testers!

Tushar (rafattushar)
information type: Public → Public Security
information type: Public Security → Public
Revision history for this message
kjur (kjur) wrote :

Same for me. The very recent 5.15.0-40-lowlatency kernel has fixed the issue.

Abdul Wahhab (rock5436)
Changed in linux (Ubuntu):
status: Triaged → Confirmed
tags: added: iommu
Revision history for this message
Heinrich Schuchardt (xypron) wrote :

intel_iommu=off may result in a security risk PCIe devices can access all of the RAM. intel_iommu=igfx_off should be enough to resolve issues with GPUs.

Revision history for this message
Joan (joannaji18) wrote (last edit ):
Changed in linux (Ubuntu Jammy):
status: New → Fix Released
Changed in linux (Ubuntu Kinetic):
status: Confirmed → Triaged
Changed in linux (Ubuntu Jammy):
importance: Undecided → High
Revision history for this message
Peter Sabaini (peter-sabaini) wrote :

I'm unsure if this is really fixed in Jammy

I'm seeing flickering with 5.15.0-41 as well which seems to improve with i915.enable_dc=0 intel_idle.max_cstate=2

cat /proc/cmdline
BOOT_IMAGE=/vmlinuz-5.15.0-41-generic root=/dev/mapper/vgubuntu-root ro quiet splash i915.enable_dc=0 intel_idle.max_cstate=2 vt.handoff=7

sudo lshw -c display
  *-display
       description: VGA compatible controller
       product: TU117GLM [Quadro T2000 Mobile / Max-Q]
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: pci@0000:01:00.0
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
       configuration: driver=nvidia latency=0
       resources: irq:205 memory:ad000000-adffffff memory:80000000-8fffffff memory:90000000-91ffffff ioport:3000(size=128) memory:ae080000-ae0fffff
  *-display
       description: VGA compatible controller
       product: CometLake-H GT2 [UHD Graphics]
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       logical name: /dev/fb0
       version: 05
       width: 64 bits
       clock: 33MHz
       capabilities: pciexpress msi pm vga_controller bus_master cap_list rom fb
       configuration: depth=32 driver=i915 latency=0 mode=1920x1080 resolution=1920,1080 visual=truecolor xres=1920 yres=1080
       resources: iomemory:600-5ff iomemory:400-3ff irq:185 memory:6040000000-6040ffffff memory:4000000000-400fffffff ioport:4000(size=64) memory:c0000-dffff

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Well it's fixed for the majority of people in kernel 5.15.0-40 but I had forgotten that doesn't include the OP (comment #73).

Changed in linux (Ubuntu Jammy):
status: Fix Released → Triaged
importance: High → Medium
Changed in linux (Ubuntu Kinetic):
importance: High → Medium
Changed in linux (Ubuntu Jammy):
importance: Medium → High
Changed in linux (Ubuntu Kinetic):
importance: Medium → High
no longer affects: linux (Ubuntu Jammy)
no longer affects: linux (Ubuntu Kinetic)
Revision history for this message
lotuspsychje (lotuspsychje) wrote :

@ Daniel #83 thank you!

the last kernel version i tested was 5.15.0-40-generic

please let me know wich kernel version to test next that will inclde the fix

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Based on comment #78, I expect the main task at the top of this bug should close when kernel 5.19 is (soon) released to Ubuntu 22.10. Assuming there's no regression in 5.19.

I don't know if or when such a fix will ever reach Ubuntu 22.04 because we really thought it was the same fix at play in both 5.17.7 and 5.15.0-40. Turns out we need two different fixes, unless...

Can you double check that 5.15.0-40 or 5.15.0-41 still has the bug?

Revision history for this message
lotuspsychje (lotuspsychje) wrote :

@ Daniel #85

just tested linux-image-5.15.0-41-generic and linux-image-5.15.0-43-generic

wich both still result in flickering indeed,

5.15.0-40 i tested before in #73

back to 5.17.7-051707-generic #202205121146 to fix

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

lotuspsychje,

If you need a different fix to the rest of us then it may not have been introduced in 5.17.7 but earlier. Please try to find the earliest kernel version that works for you, or the latest kernel version that still has the bug. Without this information there isn't much hope of a 20.04 fix. The bug would just be closed as fixed in 5.19 (Ubuntu 22.10).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.