Bug#1036173: nvidia-legacy-340xx-kernel-dkms: dkms module does not build against kernel 6.3

Juan Mendez vejeta at gmail.com
Tue May 16 15:47:09 BST 2023


Package: nvidia-legacy-340xx-kernel-dkms
Version: 340.108-18
Severity: important

Dear Maintainer,

   * What led up to the situation?

     When compiling the module when installing a 6.3.2 linux kernel, the
dkms modules compilation failed with:
     /var/lib/dkms/nvidia-legacy-340xx/340.108/build/nv-mmap.c:315:23:
error: assignment of read-only member ‘vm_flags’


     See the cause explained in:
https://lore.kernel.org/lkml/ZA7x9y60sfGOanHl@kroah.com/T/
     The write access to vm_flags needs to be done now through some
wrappers.

   * What exactly did you do (or not do) that was effective (or
     ineffective)?

   The fix is applying this patch:
https://gist.github.com/vejeta/9078219f082d2bfd62b08b6eada780e6
   by copying it to: /usr/src/nvidia-legacy-340xx-340.108/patches and
adding the file name "nvidia-340xx-fix-linux-6.3.patch"
   to line 12 in /usr/src/nvidia-legacy-340xx-340.108/dkms.conf
   like:
   PATCH=(bashisms.patch 0001-backport-error-on-unknown-conftests.patch
0002-backport-error-on-unknown-conftests-uvm-part.patch
unregister_procfs_on_failure.patch kmem_cache_create_usercopy.patch buil
nvidia-340xx-fix-linux-6.3.patch)

   * What was the outcome of this action?

     The kernel could compile the nvidia 340 module and the system worked
perfectly after it.



-- Package-specific info:
uname -a:
Linux camelot 6.3.2-1-liquorix-amd64 #1 ZEN SMP PREEMPT liquorix
6.3-1.1~bookworm (2023-05-13) x86_64 GNU/Linux

/proc/version:
Linux version 6.3.2-1-liquorix-amd64 (steven at liquorix.net) (gcc (Debian
12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 ZEN SMP
PREEMPT liquorix 6.3-1.1~bookworm (2023-05-13)

/proc/driver/nvidia/version:
NVRM version: NVIDIA UNIX x86_64 Kernel Module  340.108  Wed Dec 11
11:06:58 PST 2019
GCC version:  gcc version 12.2.0 (Debian 12.2.0-14)

lspci 'display controller [030?]':
04:00.0 VGA compatible controller [0300]: NVIDIA Corporation G86 [GeForce
8400 GS] [10de:0422] (rev a1) (prog-if 00 [VGA controller])
        Subsystem: Point of View BV G86 [GeForce 8400 GS] [1acc:0853]
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0
        Interrupt: pin A routed to IRQ 29
        Region 0: Memory at fd000000 (32-bit, non-prefetchable) [size=16M]
        Region 1: Memory at e0000000 (64-bit, prefetchable) [size=256M]
        Region 3: Memory at fa000000 (64-bit, non-prefetchable) [size=32M]
        Region 5: I/O ports at ec00 [size=128]
        Expansion ROM at 000c0000 [virtual] [disabled] [size=128K]
        Capabilities: <access denied>
        Kernel driver in use: nvidia
        Kernel modules: nvidia

/etc/X11/xorg.conf.d/:
total 12
drwxr-xr-x  2 root root 4096 Jan 17 01:14 .
drwxr-xr-x 11 root root 4096 Jan 21 16:51 ..
lrwxrwxrwx  1 root root   53 Jan 17 01:14 20-nvidia-legacy-340xx.conf ->
/etc/alternatives/nvidia--20-nvidia-legacy-340xx.conf
-rw-r--r--  1 root root   79 Oct 28  2019 20-nvidia.conf

/etc/nvidia/:
total 24
drwxr-xr-x   4 root root  4096 Mar 19 21:14 .
drwxr-xr-x 199 root root 12288 May 16 14:46 ..
drwxr-xr-x   2 root root  4096 Jan 17 00:15 current
drwxr-xr-x   2 root root  4096 Mar 19 21:16 legacy-340xx
lrwxrwxrwx   1 root root    56 Jan 17 00:15 nvidia-blacklists-nouveau.conf
-> /etc/alternatives/nvidia--nvidia-blacklists-nouveau.conf
lrwxrwxrwx   1 root root    53 Jan 17 00:15 nvidia-drm-outputclass.conf ->
/etc/alternatives/nvidia--nvidia-drm-outputclass.conf
lrwxrwxrwx   1 root root    12 Mar 17 20:36 nvidia-legacy-340xx-340.108 ->
legacy-340xx
lrwxrwxrwx   1 root root    42 Jan 17 00:15 nvidia-load.conf ->
/etc/alternatives/nvidia--nvidia-load.conf
lrwxrwxrwx   1 root root    46 Jan 17 00:15 nvidia-modprobe.conf ->
/etc/alternatives/nvidia--nvidia-modprobe.conf

Files from nvidia-installer:

Config and logfiles:

<<<<<<<<<< /etc/modprobe.d/nvidia-blacklists-nouveau.conf >>>>>>>>>>
# You need to run "update-initramfs -u" after editing this file.

# see #580894
blacklist nouveau
^^^^^^^^^^ /etc/modprobe.d/nvidia-blacklists-nouveau.conf ^^^^^^^^^^

<<<<<<<<<< /etc/X11/xorg.conf.d/20-nvidia-legacy-340xx.conf >>>>>>>>>>
# The EoL driver does not get updated to support newer Xserver versions.
Section "ServerFlags"
  Option "IgnoreABI" "1"
EndSection
^^^^^^^^^^ /etc/X11/xorg.conf.d/20-nvidia-legacy-340xx.conf ^^^^^^^^^^



Kernel modules: nvidia.ko
/lib/modules/6.2.13-1-liquorix-amd64/updates/dkms/nvidia-legacy-340xx.ko
/lib/modules/6.2.13-1-liquorix-amd64/updates/dkms/nvidia-legacy-340xx-uvm.ko
/lib/modules/6.1.0-9-amd64/kernel/drivers/platform/x86/nvidia-wmi-ec-backlight.ko
/lib/modules/6.1.0-7-amd64/updates/dkms/nvidia-legacy-340xx.ko
/lib/modules/6.1.0-7-amd64/updates/dkms/nvidia-legacy-340xx-uvm.ko
/lib/modules/6.1.0-7-amd64/kernel/drivers/platform/x86/nvidia-wmi-ec-backlight.ko


-- System Information:
Debian Release: 12.0
  APT prefers testing-security
  APT policy: (500, 'testing-security'), (500, 'testing'), (500,
'oldstable'), (100, 'bullseye-fasttrack'), (100,
'bullseye-backports-staging')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.3.2-1-liquorix-amd64 (SMP w/2 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages nvidia-legacy-340xx-kernel-dkms depends on:
ii  dkms
 3.0.10-8
ii  nvidia-installer-cleanup
 20220217+2
ii  nvidia-legacy-340xx-kernel-support [nvidia-legacy-340xx-kernel-
340.108-18
    support--v1]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-nvidia-devel/attachments/20230516/5f904af2/attachment.htm>


More information about the pkg-nvidia-devel mailing list