I've been struggling with that for the last week. I've checked similar questions, and the proposed solutions worked only for a moment or reduced the glitches, but they didn't fix the issue. Also, I reinstalled Ubuntu, but it didn't help.

My setup is

```
XPS 13 9300
Ubuntu 22.04.2 LTS
Internal monitor
2 external monitors

```

The issue occurs only on the internal monitor. The 2 external ones are not affected. Which is opposite to other people's issues that I read. I found that when I change my internal monitor setting from `59.99 Hz` to `48.00 Hz`, the flickering is fixed. It occurs only during logging/screen lock.

I didn't install any new packages or drivers the day it happened. So I unplugged my laptop and went to my neighbor to help him. The issue appeared for the first time when I turned on the computer at his house. When I didn't touch the laptop, the screen was black. The flickering started occurring after touching the touchpad or keyboard.

I also found new warnings during boot:

```
x86/cpu: SGX disabled by BIOS
pci 0000:00:07.0: DPC: RP PIO log size 0 is invalid
pci 0000:00:07.2: DPC: RP PIO log size 0 is invalid
blacklist: Problem blacklisting hash (-13)
blacklist: Problem blacklisting hash (-13)
blacklist: Problem blacklisting hash (-13)
blacklist: Problem blacklisting hash (-13)
wmi: Failed to parse WDG method

```

I'm able to run Ubuntu with those warnings. I checked the BIOS configuration and SGX is  `software enabled`.

**SUMMARY**

Weirdly, something like that happens to the STABLE distro. So far, I've been a happy user of Ubuntu for at least three years. Also, this laptop was bought with Ubuntu 18.04 installed, so I think it has the hardware support. Thanks for your help; hopefully, I've given all the information needed to answer this problem.

**SUMMARY OF ATTEMPTS TO FIX IT**

* Suggestions from this question - [Screen flicker after a fresh install of Ubuntu 22.04](https://askubuntu.com/questions/1404771/screen-flicker-after-fresh-install-of-ubuntu-22-04)
* Checked the Launchpad bug - [[i915] screen is flickering in Ubuntu 22.04](https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1970426)
* Checked the other bug on Launchpad (same issue) - [[i915] Screen flickering in Ubuntu 22.04](https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1958191)
* fresh installation of Ubuntu 22.04.2 LTS

**Edit:**

* I also did the screen test from the BIOS menu. Dell provides such a tool, and my screen passed the test. So it makes me sure it is a software issue.

**Edit 2:**
I've been trying to get my backup restored. So I start the system from Live USB a lot. The problem is that the snapshots from timeshift won't boot, unfortunately. I noticed now on the Live version of Ubuntu; the problem doesn't exist. Again it seems to be due to different monitor settings.