[BUG] Use-after-free in nvidia_modeset + Flickering & suspend issues on 1050 Ti (Manjaro KDE)

🐞 NVIDIA Bug Report β€” Use-after-free in nvidia_modeset on Manjaro (driver 570.144)

πŸ“Œ Summary

When using the proprietary NVIDIA driver 570.144 on Manjaro KDE with a GTX 1050 Ti, I encounter:

  • A use-after-free error in nvidia_modeset detected by KFENCE in kernel logs
  • Graphical instability under both Wayland and X11
  • System was freshly reinstalled, yet the issue persists, indicating it’s not due to user configuration or package conflict
  • Driver taints the kernel and causes flickering, screen blackout, or session lock-up depending on the display server

πŸ”§ System Information

  • OS: Manjaro Linux (KDE)
  • Kernel: 6.12.28-1-MANJARO
  • Driver: NVIDIA 570.144, CUDA 12.8
  • GPU: NVIDIA GeForce GTX 1050 Ti (GP107)
  • Motherboard: ASUS P7P55D-E DELUXE
  • BIOS: 1601 (09/28/2012)
  • Display Server: Wayland (KWin), also tested under X11

πŸ’₯ Kernel Error (dmesg excerpt)

[ 4062.652806] BUG: KFENCE: use-after-free read in _nv000177kms+0x439/0x2a10 [nvidia_modeset]
[ 4062.652840] Use-after-free read at 0x00000000905564d6 (in kfence-#104)
[ 4062.653415] CPU: 4 UID: 1000 PID: 877 Comm: DP-1 Tainted: P OE 6.12.28-1-MANJARO #1

πŸ“Ί Graphical Instability

Under X11:

  • After suspend/resume, the screen remains black
  • Mouse cursor is visible and moves
  • Recovery only possible by switching TTY or restarting the session

Under Wayland:

  • The screen flickers black repeatedly
  • Happens particularly when:
    • Using Spectacle (screenshot utility)
    • Watching videos (any player)
  • Flickering cycles (black β†’ image β†’ black) multiple times

πŸ§ͺ Reproduction

  • Wayland: Open Spectacle or play any video
  • X11: Suspend the session and resume

πŸ“Š GPU Status (nvidia-smi)

  • Driver: 570.144
  • Memory usage: 879 MiB / 4096 MiB
  • Processes: kwin_wayland, Xwayland, plasmashell, firefox, thunderbird, etc.

βœ… Expected Behavior

  • No memory errors in kernel logs
  • No flickering or black screens under normal use
  • Stable suspend/resume cycle

πŸ” Driver/Kernels

  • Kernel is tainted: Tainted: P OE
  • KFENCE detects the problem in nvidia_modeset
  • No custom kernel patches β€” default Manjaro packages used

❓ Questions

  1. Is this use-after-free in nvidia_modeset known?
  2. Is it resolved in another version (e.g. older 535.x or beta drivers)?
  3. Is there a known workaround (kernel flags, driver options)?
  4. Any fixes pending upstream?

πŸ“Ž Attachments

  • Can provide full dmesg
  • Can run nvidia-bug-report.sh if needed

πŸ™ Thanks in advance for your support. Let me know if further debugging info or test feedback is useful.

Date: June 03, 2025

nvidia-bug-report.log.gz (1.2 MB)

Yup.

From the 575.64 release notes…

  • Fixed a bug that could cause a kernel use-after-free on pre-Turing GPUs.

Currently running the 575.64 New Feature Branch driver release, and will mark the issue report as solved after a few days if there are zero occurrences of the use-after-free error.