Skip to content

Instantly share code, notes, and snippets.

@vejeta
Created August 12, 2024 20:43
Show Gist options
  • Save vejeta/3b066bdf45a76c13779e1c25cdea2c83 to your computer and use it in GitHub Desktop.
Save vejeta/3b066bdf45a76c13779e1c25cdea2c83 to your computer and use it in GitHub Desktop.
Tentative fix for nvidia-legacy-340xx-kernel-dkms 340.108-21 module for Linux 6.10.4
--- nvidia-legacy-340xx-340.108/conftest.sh 2024-08-12 22:17:58.885145704 +0200
+++ b/conftest.sh 2024-08-12 22:20:26.971071281 +0200
@@ -197,7 +197,8 @@
build_cflags() {
BASE_CFLAGS="-O2 -D__KERNEL__ \
-DKBUILD_BASENAME=\"#conftest$$\" -DKBUILD_MODNAME=\"#conftest$$\" \
--nostdinc -isystem $ISYSTEM"
+-nostdinc -isystem $ISYSTEM \
+-Wno-implicit-function-declaration -Wno-strict-prototypes -Wno-incompatible-pointer-types"
if [ "$OUTPUT" != "$SOURCES" ]; then
OUTPUT_CFLAGS="-I$OUTPUT/include2 -I$OUTPUT/include"
@vejeta
Copy link
Author

vejeta commented Aug 12, 2024

The fix for Debian is applying this patch:

by copying it to: /usr/src/nvidia-legacy-340xx-340.108/patches and
adding the file name "nvidia-340xx-fix-linux-6.10.4.patch"
to line 12 at the end of the line in /usr/src/nvidia-legacy-340xx-340.108/dkms.conf
like:
PATCH=(... nvidia-340xx-fix-linux-6.10.4.patch)

Then, proceed reinstalling the debian kernel package as usual

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment