Debian 11 - Problem with 304 legacy driver NVIDIA driver installation

Hello,

I’m trying to install 304 nvidia driver on my old laptop as suggested by nvidia-detect tool:

Detected NVIDIA GPUs:
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation G72M [Quadro NVS 110M/GeForce Go 7300] [10de:01d7] (rev a1)

Checking card:  NVIDIA Corporation G72M [Quadro NVS 110M/GeForce Go 7300] (rev a1)
Your card is only supported by the 304 legacy drivers series, which is only available up to stretch.

I have disabled the nouveau driver, downloaded the legacy driver from the nvidia website NVIDIA-Linux-x86_64-304.137.run and started the installation.

Once I start the installation I got warning:

 WARNING: The path to the `modprobe` utility reported by '/proc/sys/kernel/modprobe',       
           `/sbin/modprobe`, differs from the path determined by `nvidia-installer`,         
           `/usr/sbin/modprobe`.  Please verify that `/sbin/modprobe` works correctly and    
           correct the path in '/proc/sys/kernel/modprobe' if it does not.

While this was just a warning it was followed up with Error:

ERROR: Unable to build the NVIDIA kernel module.

and here is the entire log file with additional error:

nvidia-installer log file ‘/var/log/nvidia-installer.log’
creation time: Mon Nov 28 11:10:28 2022
installer version: 304.137

PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

nvidia-installer command line:
./nvidia-installer

Using: nvidia-installer ncurses v6 user interface
→ License accepted.
→ Installing NVIDIA driver version 304.137.
→ Performing CC sanity check with CC=“cc”.
→ Performing CC version check with CC=“cc”.
→ Kernel source path: ‘/lib/modules/5.10.0-19-amd64/source’
→ Kernel output path: ‘/lib/modules/5.10.0-19-amd64/build’
→ Performing rivafb check.
→ Performing nvidiafb check.
→ Performing Xen check.
→ Cleaning kernel module build directory.
executing: ‘cd ./kernel; make clean’…
→ Building kernel module:
executing: ‘cd ./kernel; make module SYSSRC=/lib/modules/5.10.0-19-amd64/source SYSOUT=/lib/modules/5.10.0-19-amd64/build’…
NVIDIA: calling KBUILD…
make -C /usr/src/linux-headers-5.10.0-19-amd64 -f /usr/src/linux-headers-5.10.0-19-common/Makefile modules
/usr/src/linux-headers-5.10.0-19-common/Makefile:225: =============== ERROR ==============
/usr/src/linux-headers-5.10.0-19-common/Makefile:226: ‘SUBDIRS’ was removed in Linux 5.3
/usr/src/linux-headers-5.10.0-19-common/Makefile:227: Use ‘M=’ or ‘KBUILD_EXTMOD=’ instead
/usr/src/linux-headers-5.10.0-19-common/Makefile:228: ====================================
/usr/src/linux-headers-5.10.0-19-common/Makefile:229: *** … Stop.
make[2]: *** [Makefile:185: __sub-make] Error 2
NVIDIA: left KBUILD.
nvidia.ko failed to build!
make[1]: *** [Makefile:261: module] Error 1
make: *** [makefile:59: module] Error 2
→ Error.
ERROR: Unable to build the NVIDIA kernel module.
ERROR: Installation has failed. Please see the file ‘/var/log/nvidia-installer.log’ for details. You may find suggestions on fixing installation problems in the README available on the Linux driver download page at www.nvidia.com.

I was able to avoid the first error modprobe warning by:
echo /usr/sbin/modprobe > /proc/sys/kernel/modprobe

However, the installation failed as per the log file above. Any hints on how to proceed would be appreciated.

thanks

The article that you mentioned was tested/validated on Ubuntu 22.04 “Jammy”, which uses the Linux kernel version 5.15, but Debian 11 “Bullseye” uses kernel version 5.10 and it’s a different distro. So this alone may be 1 source of issues.

The second source of issues is reported by KBUILD:

These outputs by KBUILD indicate that the makefile script was not developed for Linux kernels version 5.3 or newer, yet your Debian 11 is running a kernel version 5.10. Hence, KBUILD fails to parse some of the makefile’s instructions due to build errors (i.e. due to your Linux kernel version being “too new”: KBUILD can’t build such Nvidia kernel module for kernel version 5.10).

Another issue is that GeForce Go 7300 was released in 2006, and its 304 Linux driver support reached EOL/S (i.e. end of life/support) on September, 2017. If you take a look at Nvidia’s 64-bit Linux driver repository, you’re going to notice that the first 304 driver upgrade release was 304.22, released in mid-2012, and that the last 304 driver upgrade release was 304.137, released on September 15, 2019. But Linux kernel version 5.10 was released on December, 2020, and Debian 11 was released on August, 2021, i.e. about 1 and 2 years (respectively) after the 304 driver reached its EOL/S.

Hence, getting this driver to run on Debian 11 has no future: even if you manage to get this driver working on Debian 11, eventually the XServer modules (which are constantly upgraded) are going to reach an upgrade point where such driver is going to break for good. You may try to find a patch that allows this latest version (i.e. 304.317) to compile with a recent kernel like your 5.10 one, but, even if you succeed in such time-consuming attempt, you’re just going to be buying a little more time prior to reaching the unavoidable EOL/S of your GPU.

Anyway… Because it’s always preferable to use your own distro’s driver utilities, I took a look at the Debian 11 full repository and found the package for the Nvidia Legacy Check utility. Hence, if I were you I would try this utility and see if it can help you force-install a legacy Nvidia driver. It’s likely going to show you some message letting you know whether Debian 11 has backport support for your old GPU (and, therefore, such utility is going to download and compile/install an obsolete but functional driver) or not.

Debian 11’s EOL/S is expected to happen somewhere around mid-2024. Hence, if the aforementioned utility manages to successfully download and install/compile an obsolete but compatible and functional Nvidia driver, don’t expect this compatibility/support to reach beyond mid-2024.

Good luck. :four_leaf_clover:

1 Like

I forgot to mention: if nothing works yet you truly want to use the 304-137 Nvidia driver in your old laptop, install Debian 9 “Stretch”, which was released in 2017 and reached its EOL/S on June, 2022. Even though it’s not a good idea to use an EOL/S OS (one of the many reasons is that its security updates are no longer provided), as your laptop becomes older and older, you are eventually going to have to do this, if you wish to keep using your old laptop.

The latest (i.e. version 304.137) Nvidia driver (kernel module) ported to Debian is in Stretch’s package nvidia-driver-bin-304.137, thus the need to install Debian 9 “Stretch” so you can use this driver.

1 Like

Hi Yuri,

The procedure on how to disable nouveau driver are valid so I do not think that this is our problem.

I think that you are right, it does not make sense to force driver installation, spend hours with it just to see it to break with next system upgrade. Installation of Debian 9 Stretch makes more sense.

However, I would like to still try the suggested nvidia-legacy-check utility first. Not sure how to use it. I can install it properly however, there seems to be no executable coming with the package:

dpkg -L nvidia-legacy-check
/.
/usr
/usr/share
/usr/share/bug
/usr/share/bug/nvidia-legacy-check
/usr/share/bug/nvidia-legacy-check/control
/usr/share/bug/nvidia-legacy-check/script
/usr/share/doc
/usr/share/doc/nvidia-legacy-check
/usr/share/doc/nvidia-legacy-check/changelog.Debian.gz
/usr/share/doc/nvidia-legacy-check/changelog.gz
/usr/share/doc/nvidia-legacy-check/copyright
/usr/share/lintian
/usr/share/lintian/overrides
/usr/share/lintian/overrides/nvidia-legacy-check

thank you for you help

If you installed this package, then you may make its script executable:

sudo chmod a+x /usr/share/bug/nvidia-legacy-check/script

…and then run it with this command:

/bin/bash /usr/share/bug/nvidia-legacy-check/script

I’m on XUbuntu and don’t want to break my distro, :sweat_smile: so I manually downloaded this package from http://ftp.us.debian.org/debian/pool/non-free/n/nvidia-graphics-drivers/nvidia-legacy-check_470.141.03-1~deb11u1_amd64.deb and extracted its content to /tmp with this command:

wget http://ftp.us.debian.org/debian/pool/non-free/n/nvidia-graphics-drivers/nvidia-legacy-check_470.141.03-1~deb11u1_amd64.deb -O /tmp/nvlc.deb ; dpkg-deb -x nvlc.deb /tmp/-

As a directory named - was created under /tmp, I executed such script from there:

chmod a+x /tmp/-/usr/share/bug/nvidia-legacy-check/script ; /bin/bash /tmp/-/usr/share/bug/nvidia-legacy-check/script

It outputs a lot of GPU-related info, but it does not attempt to download and install anything, i.e. it’s only a diagnostic tool. :frowning: I also looked into the script’s code: it definitely won’t install anything, in any scenario. :man_facepalming:t2:

I’d install Debian 9. It seems to be the most promising solution for your specific case.

No point to force install the driver. Installation of Debian 9 is under way. Thank you for your help and explanation.

Just a note for those trying to install Legacy nvidia drivers on Linux. I have another laptop which required 340 nvidia driver. As from the reasons explained above the installation failed. The following patched nvidia drivers worked perfectly with newer kernels: GitHub - MeowIce/nvidia-legacy: This repository includes patched legacy nVIDIA drivers for newer Linux kernels (5.8 - 6.0). Works on all Linux distros.

Unfortunately the 304 patch is not available.

2 Likes