Nvidia X11 driver busy-polls kernel on clock_gettime in a tight loop

The Nvidia graphics stack for X11 comprises of two components (gross oversimplification): The Linux kernel graphics interface (nvidia_drm / nividia_modesetting, opensourced at GitHub - NVIDIA/open-gpu-kernel-modules: NVIDIA Linux open GPU kernel module source · GitHub) and the X11 graphics driver itself. The X11 graphics driver, “nvidia”, remains closed (and is huge):

lsmod | grep nvidia

nvidia_drm             73728  0
nvidia_modeset       1146880  1 nvidia_drm
nvidia_uvm           1286144  0
nvidia              40849408  74 nvidia_uvm,nvidia_modeset

The second column is the module size in bytes. All that polling and calling of clock_gettime is made in loops, inside nvidia (the X11 component).

I believe Nvidia have no plans to open up the X11 part (and reviewing something that ends up being a 40 MB binary for opensourcing is not exactly something that would offer terrific business value)

In all honesty, I do not have the energy to trace through compiled code which has been stripped of almost all supportive metadata (ELF symbols, debug symbols, …) - and that lack of metadata also implies that any tooling one might be able to employ has its hands tied behind its back.

The only recourse is for someone with knowledge of the overall driver architecture and with access to the source code to root cause this. I fear the end result might be a simple “works as designed” (where the design constraint might stem from non-technical issues).