open-gpu-kernel-modules icon indicating copy to clipboard operation
open-gpu-kernel-modules copied to clipboard

[REGRESSION] [535.54.03] The entire screen is frequently flickering

Open birdie-github opened this issue 3 years ago • 252 comments

NVIDIA Open GPU Kernel Modules Version

535.43.02

Does this happen with the proprietary driver (of the same version) as well?

Yes

Operating System and Version

Fedora 38

Kernel Release

6.3.5

Hardware: GPU

NVIDIA GeForce GTX 1660 Ti

Describe the bug

The screen is constantly flickering, no matter what applications are running.

In Firefox it's happening every few seconds. In other "simple" applications it's less frequent.

To Reproduce

Install.

Bug Incidence

All the time

nvidia-bug-report.log.gz

nvidia-bug-report.log.gz

More Info

This is a regression.

I've reverted to 530.41.03 and it's all good.

Windows users seem to be affected as well. Could be a code change which affects both drivers.

birdie-github avatar May 31 '23 11:05 birdie-github

We have filed a bug 4164132 internally for tracking purpose. I do have local repro now but it is not 100% consistent on my setup. However this will help us to debug issue further and will keep updated on the same.

amrit1711 avatar Jun 21 '23 13:06 amrit1711

Also I feel like there are three types of "symptoms" that (at least for me) are present in 535 but no in 530.

  1. "Blackouts" - as if the display was disconnected and connected again. Only happens with both displays on and with high refresh rate, but only the main display turns off. And seems to happen when changing P-states (I think mainly between P0<->P5). (And it seems that on 530 my GPU is always at P0, so that might be a clue).
  2. Partial flickers - top ~third of the display goes black for a frame or so. I can't see any obvious correlations with other things, so it's hard to reliably reproduce (using Firefox it may happen every few seconds, but also may not happen at all for a minute or two)
  3. Corrupted redraws with VRR - if I turn on VRR, when parts of the screen get redrawn, most of the time about 15% of the redrawn area is black. This one isn't confined to the top of the screen and is much more visible. But this only happens with VRR on.

(I also get some artifacts - parts of screen not being updated or being updated incorrectly - but this seems even more unrelated and it might be a Firefox issue (but it's on 535 driver only))

Do you think those three "symptoms" show the same underlying issue? Or are they likely unrelated to each other?

LoipesMas avatar Jun 21 '23 13:06 LoipesMas

I do have local repro now but it is not 100% consistent on my setup.

You can induce flickering more frequently by :

  • Opening nvidia-settings on the "powermizer" tab.
  • Open multiple instances of vkcube

With my GPU, an RTX 2080 and a monitor with a refresh rate of 144hz, after 6 or 7 instances open, the pstates start switching between P0 and P1 constantly. It is at this moment that the flickering occur very often.

My clocks at idle are :

  • Graphics 300 mhz
  • SM 300 mhz
  • Memory 405 mhz
  • Video 540 mhz

PowerDraw

  • Approximately 12 watt single monitor (144hz)
  • Approximately 20 watt dual monitor (60hz - 120hz)

Whether with the 525 or 530 or 535, the clocks are the same, even when their change when pstates start switching.

Also I feel like there are three types of "symptoms"

Yes, you are right from what I have read here and elsewhere. But do you experience all 3 depending on the situation? About me, whether with 1 or 2 screens, I am in case number 2, a flicker on the top of the screen. Not a complete black screen. Whatever the situation, whatever the frequency, I am always in case 2.

dbrhks490 avatar Jun 21 '23 17:06 dbrhks490

Thanks @dbrhks490 I will try the recommended steps for consistent repro.

amrit1711 avatar Jun 21 '23 17:06 amrit1711

You can induce flickering more frequently by :

* Opening `nvidia-settings` on the "powermizer" tab.

* Open multiple instances of `vkcube`

I tried this and in my case it didn't seem any more "effective" than normal usage

But do you experience all 3 depending on the situation?

Yes, depending on how I set up my displays I can be in either of the 3 cases.

LoipesMas avatar Jun 21 '23 22:06 LoipesMas

Reading you guys are talking about VRR I realized one of my monitors, the flickering one, supports FreeSync. I found that disabling FreeSync helps my scenario (Wayland only flickering). I updated my original https://github.com/NVIDIA/open-gpu-kernel-modules/issues/511#issuecomment-1596567416 now with this find and a video explaining the kind of flicker I get.

GrzegorzKozub avatar Jun 22 '23 05:06 GrzegorzKozub

I can confirm, disabling FreeSync on the display does fix that issue. I was greeted with 2 minor flickers, but after that no issues: neither case 1 "blackouts" or case 2 "partial flickers". But it also causes the GPU to stay in P0 all the time, so that's in-line with previous observations. With FreeSync On (even with VRR disabled on the WM/Compositor) it switches between P0, P5 and P8, and that's when the issues occur.

Looking at the comments here again, it seems that @thesword53 had it figured out from the start.

LoipesMas avatar Jun 22 '23 14:06 LoipesMas

I'm also having this issue after updating from 525 to 535 (on Arch Linux). I have a 2080 TI and no compositor with X11. I can confirm it happens when the pstate changes as setting the PowerMizer to 1 with nvidia-settings -a "[gpu:0]/GPUPowerMizerMode=1" prevents the flickering.

My primary monitor is 240hz over display port, my secondary monitor is 60hz over HDMI. The flicker happens on both monitors. I haven't tested whether or not it stops when only using one monitor. A fix would be appreciated.

errantmind avatar Jun 23 '23 00:06 errantmind

Yesterday after connecting and disconnecting a 4K TV via HDMI, the upper one third of my monitor connected via DP started flickering with 530.41.03 drivers :-( After a few reboots, a complete power off and booting into Windows for an hour, the bug disappeared. It's all quite unnerving. Windows is running 531.68 drivers.

birdie-github avatar Jun 23 '23 08:06 birdie-github

@birdie-github have you tried 535 with FreeSync/GSync disabled on the display?

LoipesMas avatar Jun 23 '23 10:06 LoipesMas

Same Issue here. I upgraded to 535 because I have to use Wayland and hoped reducing the legion of bugs having nvidia/wayland/kde plasma. My scenario:

Monitor 1: 1920x1200@60Hz 100% scaling Monitor 2: 3840x2160@60Hz 150% scaling GPU: GTX 2070

With version 535 driver I see flickering on the top on any screen every few seconds. Never at the same time, but on both screens. After downgrading to the latest 525 the issue is gone.

taleteller avatar Jun 23 '23 14:06 taleteller

I'm not having the issue on a certified G-Sync compatible monitor: LG 27GN950. I suggest listing your monitor and confirm if it's a G-Sync compatible certified monitor.

G-Sync compatible uses VESA's Adaptive-Sync/HDMI VRR protocols. FreeSync is an AMD technology that only works on AMD GPUs which also uses VESA's Adaptive-Sync/HDMI VRR protocols.

WannaBeOCer avatar Jun 23 '23 17:06 WannaBeOCer

I don't think this is related to G-Sync / FreeSync. I'm having an issue on my 240hz XL2546 (and my secondary monitor XL2411 running at 60hz) which doesn't support either one. I mentioned my other details above.

errantmind avatar Jun 23 '23 17:06 errantmind

My main monitor doesn't have G-Sync or FreeSync support yet it flickers the top.

notfood avatar Jun 24 '23 05:06 notfood

Do you have 2+ monitors?

I think it's a problem with VRR and dual monitor setup. I also have the issue on Windows with the 530 and 535 drivers and Linux with the 535 drivers. The 530 Linux drivers are not affected because of another bug sticking GPU at higher power state on multi-monitor and >60Hz setup. I also noticed flickering is caused by VRR/G-Sync screen frequency stuttering and happens when GPU is switching power state.

Looking at the comments here again, it seems that @thesword53 had it figured out from the start.

The issue I explained before is another bug. More details here: https://forums.developer.nvidia.com/t/monitors-literally-stutter-when-vrr-g-sync-is-enabled/256836/2

thesword53 avatar Jun 24 '23 10:06 thesword53

Updated today to 535.54.03. Secondary screen turns on and off constantly + flickering. Disabling G-Sync for both screens works for me.

Fedora 37 (6.3.8-100.fc37) 535.54.03-2

NVIDIA GeForce RTX 2070 GBT M32Q @144Hz (Primary) LG 32 32GN600-B @144hz

binarysafari avatar Jun 25 '23 11:06 binarysafari

I'm not sure if it is related, but there was a clock management change in the regression window that we're a little suspicious of.

If anyone who is seeing this problem would like to perform an experiment:

  • Install the 535.54.03 NVIDIA driver, enabling open-gpu-kernel-modules (e.g., install from .run file with -m=kernel-open).
  • Confirm you can reproduce the flickering problem.
  • git clone open-gpu-kernel-modules, and check out the 535.54.03 tag.
  • Apply the attached patch (git am 0001-test-revert-NV0073_CTRL_CMD_SYSTEM_CONFIG_VRR_PSTATE.patch.txt); rebuild and install the open-gpu-kernel-modules.

Does the problem still reproduce with that patch applied?

0001-test-revert-NV0073_CTRL_CMD_SYSTEM_CONFIG_VRR_PSTATE.patch.txt

aritger avatar Jun 26 '23 22:06 aritger

If anyone who is seeing this problem would like to perform an experiment: [...]

  1. I installed the new drivers without giving any specific -m=kernel/kernel-open option. Which one is the default, which version is now active on my system?
  2. My monitors (AOC 24G2SPU) claim to be GSYNC compatible, but although I have set "GSYNC: ON", it says "SYNC Technology: 60Hz", so apparently GSYNC is not enabled. Both monitors are connected via HDMI.
  3. Flicker happens only on the upper few centimeters on both monitors (so they do not completely turn off as they would do on signal loss or input source change).

Given 1.-3. above, would it make sense to perform the suggested experiment?

z1atk0 avatar Jun 27 '23 09:06 z1atk0

Just chiming in that I am also experiencing this:

I'm on dual monitors, rtx2080, no gsync/adaptivesync - I see flickering across the top quarter of the screen but infrequently (about once a minute). It usually seems to happen when scrolling content.

NVIDIA-SMI 535.54.03 Driver Version: 535.54.03

Started since I upgraded from the 525 driver.

tinklern avatar Jun 27 '23 12:06 tinklern

I'm not sure if it is related, but there was a clock management change in the regression window that we're a little suspicious of.

If anyone who is seeing this problem would like to perform an experiment:

* Install the 535.54.03 NVIDIA driver, enabling open-gpu-kernel-modules (e.g., install from .run file with `-m=kernel-open`).

* Confirm you can reproduce the flickering problem.

* git clone open-gpu-kernel-modules, and check out the 535.54.03 tag.

* Apply the attached patch (`git am 0001-test-revert-NV0073_CTRL_CMD_SYSTEM_CONFIG_VRR_PSTATE.patch.txt`); rebuild and install the open-gpu-kernel-modules.

Does the problem still reproduce with that patch applied?

0001-test-revert-NV0073_CTRL_CMD_SYSTEM_CONFIG_VRR_PSTATE.patch.txt

I'm experiencing the top of my screen flickering after updating to 535.54.03. I tried the Nvidia Open driver and it still happens, and I have also tested with the patch and it is also still happening for me.

EDIT: If I revert to 530 it stops happening, ymmv I suppose

Arch Linux NVIDIA GeForce RTX 2070 KDE Plasma 5.27.6 on Wayland

Running dual monitors: Dell G2422HS Dell S2721DGF

jessicamaybe avatar Jun 28 '23 21:06 jessicamaybe