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

Rolling back the driver isn't the solution, but I remember the 525 driver also not having the flicker issue, you don't need to go back as far as 470.

530.41.03 works for beautifully me with options nvidia-drm modeset=1 though it requires a small patch for Linux kernel 6.4.

From 4981428cda825b415eea60313f71bf386cc9f7e1 Mon Sep 17 00:00:00 2001
From: Joan Bruguera <[email protected]>
Date: Sat, 25 Feb 2023 10:57:26 +0000
Subject: [PATCH] Tentative fix for NVIDIA 470.182.03 driver for Linux 6.4-rc1

---
 nvidia-drm/nvidia-drm-drv.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/nvidia-drm/nvidia-drm-drv.c b/nvidia-drm/nvidia-drm-drv.c
index 8ef4c27..85c43f2 100644
--- a/nvidia-drm/nvidia-drm-drv.c
+++ b/nvidia-drm/nvidia-drm-drv.c
@@ -20,6 +20,7 @@
  * DEALINGS IN THE SOFTWARE.
  */

+#include <linux/version.h>
 #include "nvidia-drm-conftest.h" /* NV_DRM_AVAILABLE and NV_DRM_DRM_GEM_H_PRESENT */

 #include "nvidia-drm-priv.h"
@@ -873,7 +874,11 @@ static void nv_drm_update_drm_driver_features(void)

     nv_drm_driver.dumb_create      = nv_drm_dumb_create;
     nv_drm_driver.dumb_map_offset  = nv_drm_dumb_map_offset;
+// Rel. commit "drm: remove dumb_destroy callback" (Christian König, 26 Jan 2023)
+// NB: No resources are leaked, the kernel releases the same resources by default
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0)
     nv_drm_driver.dumb_destroy     = nv_drm_dumb_destroy;
+#endif
 #endif /* NV_DRM_ATOMIC_MODESET_AVAILABLE */
 }

--
2.40.1

birdie-github avatar Aug 24 '23 00:08 birdie-github

I can also confirm that the 535.104.05 driver doesn't fix the flickering.

akb825 avatar Aug 24 '23 07:08 akb825

After a quick test I am under the impression that 535.104.05 did improve the flickering on X11 for me. However any game I tried launching was massively slowdown-ed, something like 1fps. I had to rollback to 535.98 which fixed the issue...

voodoos avatar Aug 24 '23 10:08 voodoos

No framerate problems here, fortunately. :sweat_smile: Tested with DooM³ running natively (both the original id version and the dhewm3 source port) and Portal running via Steam, all on Slackware64-15.0 & kernel 6.1.47.

z1atk0 avatar Aug 24 '23 14:08 z1atk0

Updated to 535.104. Flicker is gone. At least I haven't experienced any after several hours.

Edit: 48 hours later, still no flickering. I think it's good now.

Edit2: I should add that I'm running Xorg, it's been 3~4 days and I have had no flickering at all.

I updated to 535.98. I still get flicker on the top row of my main monitor but it's become rare, as in 1 or 2 every 10 minutes compared to the nonstop flickering from the previous driver it's an improvement but this is still undesirable. Does not happen in games, most likely to happen when it's been idlying or casual internet browsing.

From last time:

Chiming in to share my experience. I'm experiencing partial flickering on my main monitor in a dual monitor setup using 535.54.03 at 60Hz. Environment: Main monitor: 1920x1080@60Hz Second monitor: 1024x768@60Hz GPU1: GeForce GTX 1650 GPU2: Tesla M40 (not in use) OS: ArchLinux It's occasional, I suspect GPU is switching power states, the flickering only happens on the top of the screen. It doesn't matter what I'm running, I can be on X11 or Wayland, it happens on KDE Plasma and I3w, it happens with no applications running, it happens during the beginning of heavy GPU usage. Downgrading it to 530.41.03 shows none of these issues.

notfood avatar Aug 24 '23 21:08 notfood

I've tried 535.104 today. NVIDIA 2070 Super, 60 Hz Dell Monitor, GNOME, Arch Linux. Flicking is here. Yes, more rare, but it's still here.

AlexWayfer avatar Aug 24 '23 22:08 AlexWayfer

G-Sync still doesn't work with 535.104 on my laptop. Going back to the 525 controller again...

[vie ago 25 11:10:34 2023] ------------[ cut here ]------------
[vie ago 25 11:10:34 2023] WARNING: CPU: 1 PID: 610 at /var/lib/dkms/nvidia/535.104.05/build/nvidia-drm/nvidia-drm-crtc.h:264 nv_drm_handle_flip_occurred+0x105/0x200 [nvidia_drm]
[vie ago 25 11:10:34 2023] Modules linked in: snd_seq_dummy snd_seq snd_seq_device uinput ccm rfcomm hid_logitech_hidpp hid_logitech_dj cmac algif_hash algif_skcipher af_alg bnep btusb btrtl btbcm btintel btmtk xpad ff_memless bluetooth ecdh_generic zram snd_sof_pci_intel_cnl snd_sof_intel_hda_common soundwire_intel soundwire_cadence snd_sof_intel_hda_mlink snd_sof_intel_hda snd_sof_pci snd_sof_xtensa_dsp snd_sof snd_sof_utils soundwire_generic_allocation soundwire_bus snd_soc_skl snd_soc_hdac_hda snd_hda_ext_core snd_soc_sst_ipc intel_rapl_msr snd_soc_sst_dsp snd_soc_acpi_intel_match intel_rapl_common snd_soc_acpi intel_tcc_cooling uvcvideo x86_pkg_temp_thermal snd_hda_codec_realtek snd_soc_core intel_powerclamp coretemp videobuf2_vmalloc snd_hda_codec_generic snd_compress uvc ac97_bus videobuf2_memops ledtrig_audio videobuf2_v4l2 snd_hda_codec_hdmi kvm_intel snd_pcm_dmaengine iwlmvm videodev snd_hda_intel kvm videobuf2_common snd_intel_dspcfg mac80211 mc irqbypass snd_intel_sdw_acpi crct10dif_pclmul crc32_pclmul polyval_clmulni
[vie ago 25 11:10:34 2023]  snd_hda_codec polyval_generic vboxnetflt(OE) libarc4 gf128mul nvidia_drm(POE) nvidia_modeset(POE) joydev mousedev vboxnetadp(OE) ucsi_ccg mei_hdcp mei_pxp snd_hda_core iwlwifi ghash_clmulni_intel typec_ucsi hid_multitouch vboxdrv(OE) sha512_ssse3 aesni_intel typec vfat snd_hwdep msi_wmi nvidia_uvm(POE) crypto_simd cryptd snd_pcm rapl intel_cstate fat ee1004 wmi_bmof intel_wmi_thunderbolt roles mxm_wmi sparse_keymap gpio_keys cfg80211 mei_me snd_timer intel_uncore psmouse spi_nor pcspkr intel_lpss_pci video alx snd i2c_hid_acpi intel_lpss i2c_i801 mtd i2c_smbus rfkill mdio mei soundcore idma64 intel_pch_thermal i2c_nvidia_gpu i2c_hid wmi soc_button_array acpi_tad acpi_pad mac_hid nvidia(POE) ec_sys sg vhba crypto_user fuse dm_mod loop ip_tables x_tables ext4 sdhci_pci crc32c_generic hid_gt683r serio_raw crc16 cqhci mbcache atkbd usbhid jbd2 libps2 vivaldi_fmap sdhci nvme crc32c_intel spi_intel_pci mmc_core nvme_core spi_intel xhci_pci xhci_pci_renesas nvme_common i8042 serio
[vie ago 25 11:10:34 2023] CPU: 1 PID: 610 Comm: nvidia-modeset/ Tainted: P        W  OE      6.4.12-zen1-1-zen #1 fc2b2f2a83cacde5b3df8283dae0f37b220a16d6
[vie ago 25 11:10:34 2023] Hardware name: Micro-Star International Co., Ltd. GT75 Titan 8SG/MS-17A6, BIOS E17A6IMS.10D 03/17/2020
[vie ago 25 11:10:34 2023] RIP: 0010:nv_drm_handle_flip_occurred+0x105/0x200 [nvidia_drm]
[vie ago 25 11:10:34 2023] Code: 81 c7 98 00 00 00 e8 2a 99 ee d2 48 8b 3c 24 48 83 c4 18 5b 5d 41 5c 41 5d 41 5e 41 5f e9 63 0c 00 00 48 89 ef e8 db 28 d6 d3 <0f> 0b eb b1 4c 89 e7 e8 4f a1 4d d3 84 c0 74 10 49 8b 14 24 49 8b
[vie ago 25 11:10:34 2023] RSP: 0018:ffffafbc87ccbdf8 EFLAGS: 00010282
[vie ago 25 11:10:34 2023] RAX: ffff9262f95cd008 RBX: ffff9262f95cd000 RCX: ffff9262f42a92e0
[vie ago 25 11:10:34 2023] RDX: 0000000000000001 RSI: 0000000000000000 RDI: ffff9262f95cd018
[vie ago 25 11:10:34 2023] RBP: ffff9262f95cd018 R08: 0000000000000001 R09: 0000000000000000
[vie ago 25 11:10:34 2023] R10: ffff926377271600 R11: 0000000000000000 R12: ffff9262f95cd008
[vie ago 25 11:10:34 2023] R13: ffff9262c94f5808 R14: ffff9262d4a32100 R15: ffff9262f42a9000
[vie ago 25 11:10:34 2023] FS:  0000000000000000(0000) GS:ffff926a5da40000(0000) knlGS:0000000000000000
[vie ago 25 11:10:34 2023] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[vie ago 25 11:10:34 2023] CR2: 00007f9ac368f018 CR3: 00000001b4e20006 CR4: 00000000003706e0
[vie ago 25 11:10:34 2023] Call Trace:
[vie ago 25 11:10:34 2023]  <TASK>
[vie ago 25 11:10:34 2023]  ? __warn+0x81/0x1b0
[vie ago 25 11:10:34 2023]  ? nv_drm_handle_flip_occurred+0x105/0x200 [nvidia_drm d2b39ff123d3a57e3bfd25e7eddf6a2b32b45f8f]
[vie ago 25 11:10:34 2023]  ? report_bug+0x202/0x270
[vie ago 25 11:10:34 2023]  ? handle_bug+0x3c/0x80
[vie ago 25 11:10:34 2023]  ? exc_invalid_op+0x19/0xc0
[vie ago 25 11:10:34 2023]  ? asm_exc_invalid_op+0x1a/0x20
[vie ago 25 11:10:34 2023]  ? nv_drm_handle_flip_occurred+0x105/0x200 [nvidia_drm d2b39ff123d3a57e3bfd25e7eddf6a2b32b45f8f]
[vie ago 25 11:10:34 2023]  ? nv_drm_handle_flip_occurred+0x105/0x200 [nvidia_drm d2b39ff123d3a57e3bfd25e7eddf6a2b32b45f8f]
[vie ago 25 11:10:34 2023]  nv_drm_event_callback+0x82/0x90 [nvidia_drm d2b39ff123d3a57e3bfd25e7eddf6a2b32b45f8f]
[vie ago 25 11:10:34 2023]  nvKmsKapiHandleEventQueueChange+0xa0/0xd0 [nvidia_modeset 86f8c00a5d3e795238d015ed8a97f27c0204e5ce]
[vie ago 25 11:10:34 2023]  _main_loop+0x90/0x150 [nvidia_modeset 86f8c00a5d3e795238d015ed8a97f27c0204e5ce]
[vie ago 25 11:10:34 2023]  ? __pfx__main_loop+0x10/0x10 [nvidia_modeset 86f8c00a5d3e795238d015ed8a97f27c0204e5ce]
[vie ago 25 11:10:34 2023]  kthread+0xe5/0x120
[vie ago 25 11:10:34 2023]  ? __pfx_kthread+0x10/0x10
[vie ago 25 11:10:34 2023]  ret_from_fork+0x29/0x50
[vie ago 25 11:10:34 2023]  </TASK>
[vie ago 25 11:10:34 2023] ---[ end trace 0000000000000000 ]---
[vie ago 25 11:10:35 2023] ------------[ cut here ]------------

If in the KDE plasma settings I set the adaptive sync from "automatic" (=G-Sync only in full screen) to "never" (=G-Sync off) the errors in dmesg disappear. imagen I have always played on linux with the latest NVIDIA drivers and enjoyed G-Sync for over four years on this MSI laptop. I don't know what's happening with version 535 but it's a shame...

cyberconan avatar Aug 25 '23 09:08 cyberconan

Switching from wayland to X11 fixed all issues for me.

Kincior avatar Aug 26 '23 00:08 Kincior

I can also confirm that the 535.104.05 driver doesn't fix the flickering.

This version does not fix it for me either. I have a dual monitor.

clems4ever avatar Aug 26 '23 15:08 clems4ever

I just read the changelog for the latest version (535.104.05-0ubuntu0.22.04.1) and it says "Fixed a bug which could cause the screen to flicker". Well, I can confirm that it didn't fixed.

My solution was to downgrade to a previous version (525), which doesn't require any modification. Downgrading to 470 is also an option.

My environment:

  • Ubuntu 22.04.3 LTS
  • 6.2.0-26-generic
  • x11
  • GTX 1650 (TU116)

riotbr avatar Aug 26 '23 16:08 riotbr

Thanks everyone for sharing feedback with driver 535.104.05. However, I have been trying to repro on multiple setups locally but no luck so far. Can you please confirm exact repro steps with exact configuration setup including display model, resolution and frequency as well. It would be good to share nvidia bug report as well. HP OMEN by HP 25L Gaming Desktop GT15-0xxx + kernel 6.4.12-arch1-1 + Driver 535.104.05 + RTX 2070 + Asus VG27AQML1A + Asus VG279QM HP OMEN by HP 25L Gaming Desktop GT15-0xxx + Fedora release 38 + kernel 6.3.8-200.fc38.x86_64 + NVIDIA GeForce GTX 1650 SUPER + Driver 535.98 + AOC 27G2WG3 via DP +AOC 24G2W1G3 via HDMI HP OMEN by HP 25L Gaming Desktop GT15-0xxx + Ubuntu 22.04.1 LTS + kernel 6.4.1 + NVIDIA GeForce GTX 1650 SUPER + Driver 535.98 + AOC 27G2WG3 via DP +AOC 24G2W1G3 via HDMI HP OMEN by HP 25L Gaming Desktop GT15-0xxx + Ubuntu 22.04.1 LTS + kernel 6.4.1 + NVIDIA GeForce RTX 2080 + Driver 535.98 + AOC 27G2WG3 via DP +AOC 24G2W1G3 via HDMI Dell Precision T7610 + Arch Linux 6.4.1-arch1-1 + kernel 6.4.1-arch1-1 + NVIDIA GeForce RTX 2080 + Driver 535.98 + AOC 27G2WG3 via DP +AOC 24G2W1G3 via HDMI Dell Precision T7610 + Arch Linux 6.4.1-arch1-1 + kernel 6.4.1-arch1-1 + NVIDIA GeForce GTX 1650 SUPER + Driver 535.98 + AOC 27G2WG3 via DP +AOC 24G2W1G3 via HDMI

Opened Firefox browser and played steam game for around 30 mins but did not observe any flickering. I also kept systems in idle state for around 30 mins with multiple refresh rates 60 / 100 / 120 / 144 / 240 Hz but no luck in repro.

amrit1711 avatar Aug 28 '23 08:08 amrit1711

Distro: Arch Linux Kernel: 6.4.11-zen2-1-zen RAM: 16 GB GPU Driver: NVIDIA 535.104.05 GPU: NVIDIA GeForce RTX 2060 CPU: AMD Ryzen 5 3600 6-Core Monitor: Asus Tuf Gaming VG24VQ 144hz Adaptive-Sync/FreeSync, Connected via DP.

After few seconds on Firefox or Microsoft Edge Flickering appears with Gsync on and off.

sentakuhm avatar Aug 28 '23 09:08 sentakuhm

MSI GT75 Titan 8SG + Arch Linux + kernel 6.4.12-zen1-1 + NVIDIA GeForce RTX 2080 + Driver 535.104.05 + AUO 17.3" FHD 144Hz via eDP.

imagen nvidia-bug-report.log.gz

Thanks!

PS: Like @Kincior said, issue is not present using X11 instead wayland. VRR with my G-Sync monitor works and not flickering or screen tearing. Obviously there are no kernel errors in dmesg with drm-modeset.

cyberconan avatar Aug 28 '23 09:08 cyberconan

I still experience flickering with 535.104.05: Distribution: openSUSE Tumbleweed 20230823 Kernel: 6.4.11-1-default RAM: 16GB GPU Driver: NVIDIA 535.104.05 GPU: NVIDIA GeForce RTX 2070 Super CPU: Intel i9-9900K (16) @ 5.000GHz MOBO: Gigabyte Z390 AORUS MASTER, UEFI Firmware Version F11 Monitor: AOC AG273QX (AOC AG273QS3R4) 2560x1440 165hz Adaptive-Sync/FreeSync, Connected via DisplayPort 1.4.

How to Reproduce:

  1. Install NVIDIA 535.104.05 (via the .run file as 535.104.05 has not yet been packed for openSUSE)
  2. Shut down your system completely.
  3. Cold boot you system.
  4. Boot into SDDM and log into a KDE Plasma 5 session
  5. Open Mozilla Firefox
  6. Go to https://www.wikipedia.org/
  7. Wait approximately 1 minute without doing anything to let GPU clocks lower.
  8. You should now be able to observe occasional black flickering on the top half of the screen.

DarkWav avatar Aug 28 '23 12:08 DarkWav

@amrit1711

Monitors: 2x AOC 24G2SPU @ 60Hz, connected via HDMI

System info:

[root@disclosure:~]# inxi -S; inxi -M; inxi -C; inxi -G
System:
  Host: disclosure.zlatk0.net Kernel: 6.1.48 arch: x86_64 bits: 64
    Desktop: GNOME v: 44.3 Distro: Slackware 15.0
Machine:
  Type: Desktop Mobo: Intel model: DB75EN v: AAG39650-303 serial: BTEN250004N1
    BIOS: Intel v: ENB7510H.86A.0046.2013.0704.1354 date: 07/04/2013
CPU:
  Info: quad core model: Intel Core i7-2600K bits: 64 type: MT MCP cache:
    L2: 1024 KiB
  Speed (MHz): avg: 2630 min/max: 1600/3800 cores: 1: 2429 2: 2693 3: 2696
    4: 2694 5: 2697 6: 2694 7: 2443 8: 2694
Graphics:
  Device-1: NVIDIA TU116 [GeForce GTX 1660 Ti] driver: nvidia v: 535.104.05
  Device-2: Sunplus Innovation Full HD webcam driver: snd-usb-audio,uvcvideo
    type: USB
  Display: x11 server: X.Org v: 1.20.14 with: Xwayland v: 21.1.4 driver: X:
    loaded: nvidia unloaded: nouveau gpu: nvidia,nvidia-nvswitch resolution:
    1: 1920x1080~60Hz 2: 1920x1080~60Hz
  API: OpenGL v: 4.6.0 NVIDIA 535.104.05 renderer: NVIDIA GeForce GTX 1660
    Ti/PCIe/SSE2

Repro: just use the system normally (ie. "do desktop stuff") and wait for the flicker to appear :man_shrugging: I don't have any hard data, but it usually takes ~30-60 minutes max until the flickering starts.

nvidia-bug-report.log.gz

z1atk0 avatar Aug 28 '23 12:08 z1atk0

Obviously there where changes introduces somewhere between version 525 and 535 producing this issue for a lot of configurations. Cannot these changes be reverted back to 525 to fix the issue(s), while being worked out in some beta branch?

taleteller avatar Aug 28 '23 12:08 taleteller

@cyberconan wrote:

PS: Like @Kincior said, issue is not present using X11 instead wayland. VRR with my G-Sync monitor works and not flickering or screen tearing. Obviously there are no kernel errors in dmesg with drm-modeset.

JFTR, I can not confirm this, for me the flicker apperars in plain vanilla X.Org. I have never used Wayland on any of my systems.

z1atk0 avatar Aug 28 '23 12:08 z1atk0

The issue definitely happens using X11. Here's a video (sorry for the bad quality):

https://github.com/NVIDIA/open-gpu-kernel-modules/assets/27843666/59e24e2a-a3a8-4599-9bf0-57476ea54902

As you can see at the top, there's a black bar that flickers for like half a second. This happens every minute or so; seems unpredictable.

Card: GTX 1650 Super Driver: any 535.xx (currently 535.104.05) Display: any (tested on Asus VG279QM @280Hz, LG C1 48' @120Hz, Samsung 32' TV @60Hz, Philips 43' TV @60Hz) Cable: either HDMI or DisplayPort System: any Linux distro (tested on x64: PorteuX 0.5, Slackware current, Fedora 38 and Pop_OS! 22.04) Kernel: it seems it doesn't matter, but currently 6.3.13 and tested on 6.2.16

fulalas avatar Aug 28 '23 18:08 fulalas

@amrit1711

ViewSonic Elite XG270Q via DP @ 1440p 165Hz + 6.3.2-1-liquorix-amd64 + Lubuntu 22.04.2 + RTX 2070 + 530.41.03

  • Major flickering every 15 - 30 seconds
  • After some time .xsession-errors file grew to 15 GB

ViewSonic Elite XG270Q via DP @ 1440p 165Hz + 6.3.2-1-liquorix-amd64 + Lubuntu 22.04.2 + RTX 2070 + 525.116.04

  • Rolled back to previous driver

ViewSonic Elite XG270Q via DP @ 1440p 165Hz + 6.4.10-3-liquorix-amd64 + Lubuntu 22.04.2 + RTX 2070 + 535.98

  • Flickering every 1 - 5 mins @ 165 Hz; 5-15 mins 60 Hz

ViewSonic Elite XG270Q via DP @ 1440p 165Hz + 6.4.10-3-liquorix-amd64 + Lubuntu 22.04.2 + RTX 2070 + 535.104.05

  • Flickering every 1-5 mins @ 165 Hz; 5-15 mins 60 Hz or 165Hz @ Maximum Power mode

ViewSonic Elite XG270Q via DP @ 1440p 165Hz + 6.4.10-3-liquorix-amd64 + Lubuntu 22.04.2 + RTX 2070 + 525.47.35

  • Switched to Vulkan Branch (need Vulkan extensions for the development project I am working on)

All were installed from the binary blob. ./<NvidiaDriver>.run -s -X -z --dkms --install-libglvnd

UPDATE: Tested 535.43.08 vulkan beta, and flickering occurred within one minute of cold boot. It seemed more inline with the 530 branch than the 535 with how soon and how often it occurred. X11, G-Sync On, Adaptive power mode

qurious-pixel avatar Aug 28 '23 20:08 qurious-pixel

https://github.com/NVIDIA/open-gpu-kernel-modules/issues/511#issuecomment-1696135776

I also have that top-of-the-screen flickering as well on X11; for context, I use HDMI on a 3840x2160@60Hz TV (via 2080 Ti) I've had this issue on both Arch and Gentoo (moved from Arch to Gentoo recently)

ThisNekoGuy avatar Aug 28 '23 21:08 ThisNekoGuy