Repeatable crash involving NvKmsKapiMemory when playing 4k60 videos on youtube

bug report log

nvidia-bug-report.log.gz (435.0 KB)

summary

The GPU driver crashes easily when multiple 4k60 videos are open in youtube tabs in chromium. The result ranges from:

  • all monitors are frozen
  • all monitors turn white but can barely see some functioning UI underneath
  • if lucky monitors do not freeze, only chromium, and you can still interact with the desktop

The error tends to be one of the following:

  • Failed to map NvKmsKapiMemory
  • Failed to ioremap_wc NvKmsKapiMemory

In the attached bug report log you’ll see this in dmesg

[  191.788628] NVRM: dmaAllocMapping_GM107: can't alloc VA space for mapping.
[  191.788636] NVRM: dmaAllocMapping_GM107: can't alloc VA space for mapping.
[  191.788747] NVRM: dmaAllocMapping_GM107: can't alloc VA space for mapping.
[  191.788749] NVRM: dmaAllocMapping_GM107: can't alloc VA space for mapping.
[  191.788823] NVRM: dmaAllocMapping_GM107: can't alloc VA space for mapping.
[  191.788840] NVRM: dmaAllocMapping_GM107: can't alloc VA space for mapping.
[  191.788859] NVRM: dmaAllocMapping_GM107: can't alloc VA space for mapping.
[  191.788874] NVRM: dmaAllocMapping_GM107: can't alloc VA space for mapping.
[  191.788914] NVRM: dmaAllocMapping_GM107: can't alloc VA space for mapping.
[  191.788916] NVRM: dmaAllocMapping_GM107: can't alloc VA space for mapping.
[  191.788917] NVRM: dmaAllocMapping_GM107: can't alloc VA space for mapping.
[  191.788919] NVRM: dmaAllocMapping_GM107: can't alloc VA space for mapping.
[  191.788920] NVRM: dmaAllocMapping_GM107: can't alloc VA space for mapping.
[  191.789007] [drm:__nv_drm_gem_nvkms_map [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to map NvKmsKapiMemory 0x000000004fb195a2
[  191.845943] traps: ThreadPoolForeg[4489] trap invalid opcode ip:55ccf5ea1bd7 sp:7f4fcd33d4c0 error:0 in chromium[9440bd7,55ccedd56000+d0b6000]

I’ve been getting this crash a few times a week and just figured out I can reproduce it as follows.

how to reproduce

  • arch linux system
  • Run a kde plasma wayland desktop startplasma-wayland
  • Run chromium --ozone-platform=wayland --password-store=basic
  • Maximize the window on a 4k screen
  • Opened 4 tabs of 4k 60Hz videos on youtube. I used this one to collect the bug, but others should work.
  • make sure in all the tabs to use the gear on the video player to select 4k60 quality
  • (optional) press play on all the videos so they all play

When I set this up to collect the bug info, it didn’t crash immediately, but it did after I played all 4 videos at the same time. Other times merely opening the 4 tabs with each on pause would crash it.

I’ve only confirmed I can reproduce with 4k60, I can’t say for sure this won’t crash with other video types.

My system

  • RTX 5070 Ti on arch linux
  • kde plasma wayland session
  • arch linux packages:
Name            : nvidia-open
Version         : 570.153.02-2

Name            : linux
Version         : 6.14.7.arch2-1

Name            : chromium
Version         : 136.0.7103.113-1

(also I just did a fresh update, the bug has been happening with older versions of these too).

kde info

KDE Plasma Version: 6.3.5
KDE Frameworks Version: 6.14.0
Qt Version: 6.9.0
Kernel Version: 6.14.7-arch2-1 (64-bit)
Graphics Platform: Wayland
Processors: 16 × Intel® Core™ i9-9900K CPU @ 3.60GHz
Memory: 62.7 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 5070 Ti
Product Name: PRIME Z390-A
System Version: 0506

monitors

My screen layout also looks like this. 4k120Hz screen is via HDMI

    HDMI-A-1    2560,417,3840x2160@120
    DP-1        0,1440,2560x1440@165
    DP-2        0,0,2560x1440@60
+---------------------------------------+
|                                       |
|                                       |
|                                       |-----------------------------------------------------------+
|                                       |                                                           |
|                 DP-2                  |                                                           |
|                                       |                                                           |
|                                       |                                                           |
|                                       |                                                           |
|                                       |                                                           |
|                                       |                                                           |
+---------------------------------------+                         HDMI-A-1                          |
|                                       |                                                           |
|                                       |                                                           |
|                                       |                                                           |
|                                       |                                                           |
|                 DP-1                  |                                                           |
|                                       |                                                           |
|                                       |                                                           |
|                                       |-----------------------------------------------------------+
|                                       |
|                                       |
+---------------------------------------+