390.xxx legacy driver for 5.18.x kernels

Can we get an updated legacy driver in the 390 series that builds against the 5.18.x kernel please?

1 Like

Could you provide a little more information why the currently available options are not sufficient - thanks!

@nadeemm this is to support as many nvidia devices on our custom linux distribution for game emulation.
our users have requested older nvidia cards to be supported.
we compile a complete image & keep modern packages
the current kernel is 5.18.2 in our image, only production & legacy 470 compiles against it.
it would be great to support 390 based nvidia gpu devices

1 Like
/var/lib/dkms/nvidia-legacy-390xx/390.151/build/nvidia/nv-dma.c: In function ‘nv_dma_map_contig’:
/var/lib/dkms/nvidia-legacy-390xx/390.151/build/nvidia/nv-dma.c:30:11: error: implicit declaration of function ‘pci_map_page’; did you mean ‘dma_map_page’? [-Werror=implicit-function-declaration]
   30 |     *va = pci_map_page(dma_map->dev, dma_map->pages[0], 0,
      |           ^~~~~~~~~~~~
      |           dma_map_page
/var/lib/dkms/nvidia-legacy-390xx/390.151/build/nvidia/nv-dma.c:31:46: error: ‘PCI_DMA_BIDIRECTIONAL’ undeclared (first use in this function); did you mean ‘DMA_BIDIRECTIONAL’?
   31 |             dma_map->page_count * PAGE_SIZE, PCI_DMA_BIDIRECTIONAL);
      |                                              ^~~~~~~~~~~~~~~~~~~~~
      |                                              DMA_BIDIRECTIONAL
/var/lib/dkms/nvidia-legacy-390xx/390.151/build/nvidia/nv-dma.c:31:46: note: each undeclared identifier is reported only once for each function it appears in
In file included from /var/lib/dkms/nvidia-legacy-390xx/390.151/build/nvidia/nv-dma.c:15:
/var/lib/dkms/nvidia-legacy-390xx/390.151/build/common/inc/nv-linux.h:348:5: error: implicit declaration of function ‘pci_dma_mapping_error’; did you mean ‘dma_mapping_error’? [-Werror=implicit-function-declaration]
  348 |     pci_dma_mapping_error(dev, addr)
      |     ^~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/nvidia-legacy-390xx/390.151/build/nvidia/nv-dma.c:32:9: note: in expansion of macro ‘NV_PCI_DMA_MAPPING_ERROR’
   32 |     if (NV_PCI_DMA_MAPPING_ERROR(dma_map->dev, *va))
      |         ^~~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/nvidia-legacy-390xx/390.151/build/nvidia/nv-dma.c: In function ‘nv_dma_unmap_contig’:
/var/lib/dkms/nvidia-legacy-390xx/390.151/build/nvidia/nv-dma.c:60:5: error: implicit declaration of function ‘pci_unmap_page’; did you mean ‘dma_unmap_page’? [-Werror=implicit-function-declaration]
   60 |     pci_unmap_page(dma_map->dev, dma_map->mapping.contig.dma_addr,
      |     ^~~~~~~~~~~~~~
      |     dma_unmap_page
/var/lib/dkms/nvidia-legacy-390xx/390.151/build/nvidia/nv-dma.c:61:46: error: ‘PCI_DMA_BIDIRECTIONAL’ undeclared (first use in this function); did you mean ‘DMA_BIDIRECTIONAL’?
   61 |             dma_map->page_count * PAGE_SIZE, PCI_DMA_BIDIRECTIONAL);
      |                                              ^~~~~~~~~~~~~~~~~~~~~
      |                                              DMA_BIDIRECTIONAL
/var/lib/dkms/nvidia-legacy-390xx/390.151/build/nvidia/nv-dma.c: In function ‘nv_map_dma_map_scatterlist’:
/var/lib/dkms/nvidia-legacy-390xx/390.151/build/nvidia/nv-dma.c:169:32: error: implicit declaration of function ‘pci_map_sg’; did you mean ‘pci_map_rom’? [-Werror=implicit-function-declaration]
  169 |         submap->sg_map_count = pci_map_sg(dma_map->dev,
      |                                ^~~~~~~~~~
      |                                pci_map_rom
/var/lib/dkms/nvidia-legacy-390xx/390.151/build/nvidia/nv-dma.c:172:17: error: ‘PCI_DMA_BIDIRECTIONAL’ undeclared (first use in this function); did you mean ‘DMA_BIDIRECTIONAL’?
  172 |                 PCI_DMA_BIDIRECTIONAL);
      |                 ^~~~~~~~~~~~~~~~~~~~~
      |                 DMA_BIDIRECTIONAL
/var/lib/dkms/nvidia-legacy-390xx/390.151/build/nvidia/nv-dma.c: In function ‘nv_unmap_dma_map_scatterlist’:
/var/lib/dkms/nvidia-legacy-390xx/390.151/build/nvidia/nv-dma.c:200:9: error: implicit declaration of function ‘pci_unmap_sg’; did you mean ‘pci_unmap_rom’? [-Werror=implicit-function-declaration]
  200 |         pci_unmap_sg(dma_map->dev, NV_DMA_SUBMAP_SCATTERLIST(submap),
      |         ^~~~~~~~~~~~
      |         pci_unmap_rom
/var/lib/dkms/nvidia-legacy-390xx/390.151/build/nvidia/nv-dma.c:202:17: error: ‘PCI_DMA_BIDIRECTIONAL’ undeclared (first use in this function); did you mean ‘DMA_BIDIRECTIONAL’?
  202 |                 PCI_DMA_BIDIRECTIONAL);
      |                 ^~~~~~~~~~~~~~~~~~~~~
      |                 DMA_BIDIRECTIONAL
cc1: some warnings being treated as errors
make[3]: *** [/usr/src/linux-headers-5.18.0-1parrot1-common/scripts/Makefile.build:293: /var/lib/dkms/nvidia-legacy-390xx/390.151/build/nvidia/nv-dma.o] Error 1

I have SEARCHED for DAYS trying to find an answer for this, and have yet to come up with a satisfactory solution. The one thing I haven’t tried is build 5.16 yet, but I’m going to after I’m done here.
WHY you ask do we want it fixed? Because some of us have these old cards laying around and can’t afford new ones. We have usable systems otherwise and would like to have the full functionality of our current systems until money becomes available. Perhaps it’s because we like nVidia more than AMD… Perhaps it’s because we spent a lot of money once upon a time for something that is still working.
No matter the reason, the net is full of issues relating to recent kernel updates and older legacy cards. I’m not a linux guru by any stretch of the imagination, just know enough to be a system destroyer because of trying so many different proposed solutions. Just once I’d like to pull down a file, execute it, and have it do as it’s supposed to. And the very little I know of programming, it seems to me this is a variable definition issue which SHOULD be an easy fix for someone.

That’s why… how about it nvidia? Going to fix it or do we just need to go buy some AMD hardware since yall don’t seem to care about us folks using older stuff we worked hard for to buy in the first place?

Ideally I’d suggest to use LTS branch of the kernel when using legacy drivers, e.g. kernel 5.15.x branch is still being updated (Edit: current 5.15.58 was released July 29 2022) and works just fine with 390.151

While I still recommend LTS to avoid future issues (esp with 390 end of support coming in December), 390.154 supports kernel up to 5.19 now