Nvidia driver modpost "was exported twice errors" dkms build error

Hello I’ve tried to install NVIDIA open drivers on my debian 13 with kernel version 6.12.63+deb13-amd64.

I have an rtx 5060 ti blackwell which means according to debian documentation that I can only install the open drivers.

But not matter which kernel version I try:

- 6.12.38+deb13

- 6.12.43+deb13

- 6.12.63+deb13

  • 6.18.0-061800-generic

I tried different driver versions too: 575, 580, 590 and also the master branch of NVIDIA/open-gpu-kernel-modules

I also tried: https://github.com/devleonardoamaral/debian-nvidia-installer
I keep getting the same issue.

I have built other kernel modules with dkms. Namely zfs

Here is a ticket opened on open-gpu-kernel-modules github with more information including logs. I’m open to any suggestions

https://github.com/NVIDIA/open-gpu-kernel-modules/issues/1006

A snippet of the logs, but the exported twice is repeated thousands of times:

ERROR: modpost: net/qrtr/qrtr: 'qrtr_endpoint_unregister' exported twice. Previous export was in net/qrtr/qrtr.ko ERROR: modpost: net/qrtr/qrtr: 'qrtr_ns_init' exported twice. Previous export was in net/qrtr/qrtr.ko ERROR: modpost: net/qrtr/qrtr: 'qrtr_ns_remove' exported twice. Previous export was in net/qrtr/qrtr.ko ERROR: modpost: virt/lib/irqbypass: 'irq_bypass_register_producer' exported twice. Previous export was in virt/lib/irqbypass.ko ERROR: modpost: virt/lib/irqbypass: 'irq_bypass_unregister_producer' exported twice. Previous export was in virt/lib/irqbypass.ko ERROR: modpost: virt/lib/irqbypass: 'irq_bypass_register_consumer' exported twice. Previous export was in virt/lib/irqbypass.ko ERROR: modpost: virt/lib/irqbypass: 'irq_bypass_unregister_consumer' exported twice. Previous export was in virt/lib/irqbypass.ko make[5]: *** [/usr/src/linux-headers-6.12.43+deb13-common/scripts/Makefile.modpost:145: /tmp/open-gpu-kernel-modules/kernel-open/Module.symvers] Error 1 make[4]: *** [/usr/src/linux-headers-6.12.43+deb13-common/Makefile:1922: modpost] Error 2 make[3]: *** [/usr/src/linux-headers-6.12.43+deb13-common/Makefile:236: __sub-make] Error 2 make[3]: Leaving directory '/usr/src/linux-headers-6.12.43+deb13-amd64' make[2]: *** [Makefile:236: __sub-make] Error 2 make[2]: Leaving directory '/usr/src/linux-headers-6.12.43+deb13-common' make[1]: *** [Makefile:138: modules] Error 2 make[1]: Leaving directory '/tmp/open-gpu-kernel-modules/kernel-open' make: *** [Makefile:59: modules] Error 2

  • which packaging method are you using?
  • have you tried the official kernel 6.17 from trixie-backports?

Hello, yes I tried kernel version 6.17.13. Same thing.

I tried multiple, with 6.17.13 I only tried by downloading the .run file version 590.48.01

using dot-run installers is not recommended generally: DontBreakDebian - Debian Wiki . It is possible that the scripts are picking a wrong toolchain or something like that…

I’d recommend to try the packages from the NV DC repo (the document lacks specific Debian-13 subsection, but instructions for 12 work as explained in the wiki)

those steps are what failed for 6.18 and 6.12. I did like you asked and I still get the same result.

6.18.0-061800-generic is not a Debian kernel (Ubuntu I guess?). Therefore it is unlikely that a Debian toolchain would be able to compile modules for it.

To double-check: you have added Nvidia DC repo to your apt sources, attempted to install nvidia-open package and you got a compilation error specifically for Debian’s 6.12 kernel, correct? (remember that dkms will try to build for every kernel you have installed by default, including the foreign 6.18, so it is possible that error message comes from it). If this is the case, then please post your bug report file.

so when I change kernels let me tell you what I try to do.

When manually installing nvidia I use cli args to target specific kernel.
When using packages. I install the new kernel.
I rebuild all kernel modules that I have other than nvidia (e.g zfs).
I reboot to the new kernel, I delete the others.
Then I attempt building nvidia. And I can see in the output of the command and also in dkms status, for which kernel dkms is trying to build nvidia modules.

I have completely removed 6.18 before posting this post, it was simply to test if it is working. And yes I got it from mainline ubuntu.

so whenever I’m installing, I try to keep a single kernel available to narrow down the issue.

Please confirm that this means adding Nvidia DC repo to your apt sources and running sudo apt-get install nvidia-open

2 bonus questions:

  • when switching between driver packaging methods (dot-run vs apt), have you completely uninstalled the previous driver each time? because if there were any leftovers, that would explain a lot…
  • given that you have a tendency to install stuff from outside of apt-sources, do you have any other software installed not coming from either Debian or Nvidia apt repos?

yeah I clean everything. to avoid overlap
I do build stuff locally either when it doesn’t exist in repos or if it’s too old, but the paths are well contained for example:
ffmpeg and dependencies (e.g libavif svt-av1, etc)
zfs
zig