Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copying drm_legacy.h from previous linux headers (6.7) to fix the drm issue #8

Open
Rainb0-0 opened this issue Apr 28, 2024 · 6 comments

Comments

@Rainb0-0
Copy link

Hello.
I'm no expert on this stuff, but I noticed this comment on the aur page for this repo suggesting :

  1. extracting drm_legacy.h file from linux-headers-6.7
  2. moving the file over to /usr/lib/modules/6.8.4-arch1-1/build/include/drm/drm_legacy.h
  3. running dkms command and mkinitcpio

it apparently solves the issue. Is there any viable method for using this in action ?
Thanks in advance

@isjerryxiao
Copy link
Member

I don't see any issue disabling drm on 340xx. Please point your issue out exactly other than providing a fix for no reason.

@Anakiev2
Copy link

@isjerryxiao
Copy link
Member

It was reported few times that with drm disabled there is no 3d acceleration: https://aur.archlinux.org/packages/nvidia-340xx-dkms#comment-962276 https://aur.archlinux.org/packages/nvidia-340xx-dkms#comment-963213

Configure your xorg server according to what the .install says. Those comments have nothing to do with this issue.

@Anakiev2
Copy link

I can confirm that there is no issue. Thank you for your work!
Then why the people complain about it?
I use the LTS kenrel and I've never updated past nvidia-340xx-dkms 340.108-35.

@12sunflowers
Copy link

Artix.
kernel 6.8 error building.

  406 |         if (sectors >= bio_sectors(bio))
      |                     ^~
/home/freeartist-artix/.cache/yay/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel/nv-linux.h: At top level:
/home/freeartist-artix/.cache/yay/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel/nv-linux.h:326:2: error: #error "NV_PCI_DMA_MAPPING_ERROR() undefined!"
  326 | #error "NV_PCI_DMA_MAPPING_ERROR() undefined!"
      |  ^~~~~
/home/freeartist-artix/.cache/yay/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel/nv.c:709:12: warning: no previous prototype for ‘nvidia_init_module’ [-Wmissing-prototypes]
  709 | int __init nvidia_init_module(void)
      |            ^~~~~~~~~~~~~~~~~~
/home/freeartist-artix/.cache/yay/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel/nv.c:1054:6: warning: no previous prototype for ‘nvidia_exit_module’ [-Wmissing-prototypes]
 1054 | void nvidia_exit_module(void)
      |      ^~~~~~~~~~~~~~~~~~
make[3]: *** [scripts/Makefile.build:243: /home/freeartist-artix/.cache/yay/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel/nv.o] Error 1
make[2]: *** [/usr/lib/modules/6.8.9-artix1-2/build/Makefile:1921: /home/freeartist-artix/.cache/yay/nvidia-340xx/src/NVIDIA-Linux-x86_64-340.108-no-compat32/kernel] Error 2
make[1]: *** [Makefile:240: __sub-make] Error 2
make[1]: Leaving directory '/usr/lib/modules/6.8.9-artix1-2/build'
NVIDIA: left KBUILD.
nvidia.ko failed to build!
make: *** [Makefile:202: nvidia.ko] Error 1
==> ERROR: A failure occurred in build().
    Aborting...
 -> error making: nvidia-340xx-exit status 4
 -> Failed to install the following packages. Manual intervention is required:
nvidia-340xx-dkms - exit status 4
home:[freeartist-artix]:~/Downloads/yay$ 

lts-kernel 6.6


home:[freeartist-artix]:~$ yay -S nvidia-340xx-dkms
AUR Explicit (1): nvidia-340xx-dkms-340.108-36
:: PKGBUILD up to date, skipping download: nvidia-340xx
  1 nvidia-340xx                             (Build Files Exist)
==> Packages to cleanBuild?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> 
  1 nvidia-340xx                             (Build Files Exist)
==> Diffs to show?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> 
==> Making package: nvidia-340xx 340.108-36 (Thu 09 May 2024 09:53:18 EEST)
==> Retrieving sources...
  -> Found NVIDIA-Linux-x86_64-340.108-no-compat32.run
  -> Found 20-nvidia.conf
  -> Found 0001-kernel-5.7.patch
  -> Found 0002-kernel-5.8.patch
  -> Found 0003-kernel-5.9.patch
  -> Found 0004-kernel-5.10.patch
  -> Found 0005-kernel-5.11.patch
  -> Found 0006-kernel-5.14.patch
  -> Found 0007-kernel-5.15.patch
  -> Found 0008-kernel-5.16.patch
  -> Found 0009-kernel-5.17.patch
  -> Found 0010-kernel-5.18.patch
  -> Found 0011-kernel-6.0.patch
  -> Found 0012-kernel-6.2.patch
  -> Found 0013-kernel-6.3.patch
  -> Found 0014-kernel-6.5.patch
  -> Found 0015-kernel-6.6.patch
  -> Found 0016-kernel-6.8.patch
==> WARNING: Skipping verification of source file PGP signatures.
==> Validating source files with b2sums...
    NVIDIA-Linux-x86_64-340.108-no-compat32.run ... Passed
    20-nvidia.conf ... Passed
    0001-kernel-5.7.patch ... Passed
    0002-kernel-5.8.patch ... Passed
    0003-kernel-5.9.patch ... Passed
    0004-kernel-5.10.patch ... Passed
    0005-kernel-5.11.patch ... Passed
    0006-kernel-5.14.patch ... Passed
    0007-kernel-5.15.patch ... Passed
    0008-kernel-5.16.patch ... Passed
    0009-kernel-5.17.patch ... Passed
    0010-kernel-5.18.patch ... Passed
    0011-kernel-6.0.patch ... Passed
    0012-kernel-6.2.patch ... Passed
    0013-kernel-6.3.patch ... Passed
    0014-kernel-6.5.patch ... Passed
    0015-kernel-6.6.patch ... Passed
    0016-kernel-6.8.patch ... Passed
:: (1/1) Parsing SRCINFO: nvidia-340xx
==> Making package: nvidia-340xx 340.108-36 (Thu 09 May 2024 09:53:21 EEST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found NVIDIA-Linux-x86_64-340.108-no-compat32.run
  -> Found 20-nvidia.conf
  -> Found 0001-kernel-5.7.patch
  -> Found 0002-kernel-5.8.patch
  -> Found 0003-kernel-5.9.patch
  -> Found 0004-kernel-5.10.patch
  -> Found 0005-kernel-5.11.patch
  -> Found 0006-kernel-5.14.patch
  -> Found 0007-kernel-5.15.patch
  -> Found 0008-kernel-5.16.patch
  -> Found 0009-kernel-5.17.patch
  -> Found 0010-kernel-5.18.patch
  -> Found 0011-kernel-6.0.patch
  -> Found 0012-kernel-6.2.patch
  -> Found 0013-kernel-6.3.patch
  -> Found 0014-kernel-6.5.patch
  -> Found 0015-kernel-6.6.patch
  -> Found 0016-kernel-6.8.patch
==> Validating source files with b2sums...
    NVIDIA-Linux-x86_64-340.108-no-compat32.run ... Passed
    20-nvidia.conf ... Passed
    0001-kernel-5.7.patch ... Passed
    0002-kernel-5.8.patch ... Passed
    0003-kernel-5.9.patch ... Passed
    0004-kernel-5.10.patch ... Passed
    0005-kernel-5.11.patch ... Passed
    0006-kernel-5.14.patch ... Passed
    0007-kernel-5.15.patch ... Passed
    0008-kernel-5.16.patch ... Passed
    0009-kernel-5.17.patch ... Passed
    0010-kernel-5.18.patch ... Passed
    0011-kernel-6.0.patch ... Passed
    0012-kernel-6.2.patch ... Passed
    0013-kernel-6.3.patch ... Passed
    0014-kernel-6.5.patch ... Passed
    0015-kernel-6.6.patch ... Passed
    0016-kernel-6.8.patch ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
==> Starting prepare()...
Creating directory NVIDIA-Linux-x86_64-340.108-no-compat32
Verifying archive integrity... OK
Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86_64 340.108...........................................................................................................................................................................................................
Applying patch 0001-kernel-5.7.patch...
patching file kernel/Makefile
patching file kernel/conftest.sh
patching file kernel/dkms.conf
patching file kernel/nv-drm.c
patching file kernel/nv-linux.h
patching file kernel/nv-procfs.c
patching file kernel/nv-time.h
patching file kernel/nv.c
patching file kernel/os-interface.c
patching file kernel/uvm/Makefile
patching file kernel/uvm/conftest.sh
patching file kernel/uvm/nvidia_uvm_lite.c
Applying patch 0002-kernel-5.8.patch...
patching file kernel/nv-linux.h
patching file kernel/nvidia-modules-common.mk
patching file kernel/os-mlock.c
patching file kernel/uvm/nvidia_uvm_lite_api.c
Applying patch 0003-kernel-5.9.patch...
patching file kernel/nv-drm.c
patching file kernel/nv-linux.h
patching file kernel/nv.c
patching file kernel/uvm/nvidia_uvm_linux.h
Applying patch 0004-kernel-5.10.patch...
patching file kernel/nv-drm.c
Hunk #1 succeeded at 364 (offset 42 lines).
Applying patch 0005-kernel-5.11.patch...
patching file kernel/conftest.sh
patching file kernel/nv-drm.c
Hunk #1 succeeded at 59 (offset -1 lines).
Hunk #2 succeeded at 211 (offset -1 lines).
Hunk #3 succeeded at 242 (offset -1 lines).
Hunk #4 succeeded at 278 (offset -1 lines).
Hunk #5 succeeded at 408 (offset -2 lines).
Hunk #6 succeeded at 459 (offset -2 lines).
patching file kernel/nv-linux.h
patching file kernel/uvm/nvidia_uvm_linux.h
Applying patch 0006-kernel-5.14.patch...
patching file kernel/nv-drm.c
patching file kernel/os-interface.c
Applying patch 0007-kernel-5.15.patch...
patching file kernel/nv-drm.c
Hunk #1 succeeded at 606 (offset 77 lines).
Applying patch 0008-kernel-5.16.patch...
patching file kernel/os-interface.h
patching file kernel/nv.h
Applying patch 0009-kernel-5.17.patch...
patching file kernel/conftest.sh
patching file kernel/nv-linux.h
patching file kernel/uvm/conftest.sh
Applying patch 0010-kernel-5.18.patch...
patching file kernel/nv-acpi.c
patching file kernel/nv-dma.c
patching file kernel/nv-drm.c
patching file kernel/nv-vm.c
patching file kernel/nv-frontend.c
Applying patch 0011-kernel-6.0.patch...
patching file kernel/nv-acpi.c
Applying patch 0012-kernel-6.2.patch...
patching file kernel/conftest.sh
patching file kernel/nv-acpi.c
Hunk #2 succeeded at 302 (offset -58 lines).
Hunk #3 succeeded at 357 (offset -58 lines).
Applying patch 0013-kernel-6.3.patch...
patching file kernel/nv-mmap.c
patching file kernel/uvm/nvidia_uvm_lite.c
Applying patch 0014-kernel-6.5.patch...
patching file kernel/conftest.sh
patching file kernel/nv-linux.h
Applying patch 0015-kernel-6.6.patch...
patching file kernel/nv-drm.c
Applying patch 0016-kernel-6.8.patch...
patching file kernel/conftest.sh
==> Sources are ready.
 -> nvidia-340xx-340.108-36 already made -- skipping build
==> Making package: nvidia-340xx 340.108-36 (Thu 09 May 2024 09:53:32 EEST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Sources are ready.
[sudo] password for freeartist-artix: 
loading packages...
resolving dependencies...
looking for conflicting packages...

Packages (1) nvidia-340xx-dkms-340.108-36

Total Installed Size:  14.69 MiB

:: Proceed with installation? [Y/n] 
(1/1) checking keys in keyring                                                                                                 [#############################################################################] 100%
(1/1) checking package integrity                                                                                               [#############################################################################] 100%
(1/1) loading package files                                                                                                    [#############################################################################] 100%
(1/1) checking for file conflicts                                                                                              [#############################################################################] 100%
(1/1) checking available disk space                                                                                            [#############################################################################] 100%
:: Processing package changes...
(1/1) installing nvidia-340xx-dkms                                                                                             [#############################################################################] 100%

>>> You must tell Xorg to use the nvidia driver with kernels >=5.11.0.
    You must also set IgnoreABI option with Xorg version >= 21.1.1.
    Minimal config example provided in /usr/share/nvidia-340xx/20-nvidia.conf
    which you should manually place in /etc/X11/xorg.conf.d/

Optional dependencies for nvidia-340xx-dkms
    linux-headers: Build the module for Arch kernel [installed]
:: Running post-transaction hooks...
(1/2) Install DKMS modules
==> dkms install --no-depmod nvidia/340.108 -k 6.6.30-1-lts
Error! Bad return status for module build on kernel: 6.6.30-1-lts (x86_64)
Consult /var/lib/dkms/nvidia/340.108/build/make.log for more information.
==> WARNING: `dkms install --no-depmod nvidia/340.108 -k 6.6.30-1-lts' exited 10
==> dkms install --no-depmod nvidia/340.108 -k 6.8.9-artix1-2
==> depmod 6.8.9-artix1-2
(2/2) Updating linux initcpios...
==> Building image from preset: /etc/mkinitcpio.d/linux-lts.preset: 'default'
==> Using default configuration file: '/etc/mkinitcpio.conf'
  -> -k /boot/vmlinuz-linux-lts -g /boot/initramfs-linux-lts.img
==> Starting build: '6.6.30-1-lts'
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [autodetect]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
  -> Running build hook: [keyboard]
  -> Running build hook: [keymap]
  -> Running build hook: [consolefont]
==> WARNING: consolefont: no font found in configuration
  -> Running build hook: [filesystems]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: '/boot/initramfs-linux-lts.img'
  -> Early uncompressed CPIO image generation successful
==> Initcpio image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux-lts.preset: 'fallback'
==> Using default configuration file: '/etc/mkinitcpio.conf'
  -> -k /boot/vmlinuz-linux-lts -g /boot/initramfs-linux-lts-fallback.img -S autodetect
==> Starting build: '6.6.30-1-lts'
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: 'wd719x'
==> WARNING: Possibly missing firmware for module: 'qla1280'
==> WARNING: Possibly missing firmware for module: 'bfa'
==> WARNING: Possibly missing firmware for module: 'qed'
==> WARNING: Possibly missing firmware for module: 'aic94xx'
==> WARNING: Possibly missing firmware for module: 'qla2xxx'
==> WARNING: Possibly missing firmware for module: 'xhci_pci'
  -> Running build hook: [keyboard]
  -> Running build hook: [keymap]
  -> Running build hook: [consolefont]
==> WARNING: consolefont: no font found in configuration
  -> Running build hook: [filesystems]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: '/boot/initramfs-linux-lts-fallback.img'
  -> Early uncompressed CPIO image generation successful
==> Initcpio image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
==> Using default configuration file: '/etc/mkinitcpio.conf'
  -> -k /boot/vmlinuz-linux -g /boot/initramfs-linux.img
==> Starting build: '6.8.9-artix1-2'
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [autodetect]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
  -> Running build hook: [keyboard]
  -> Running build hook: [keymap]
  -> Running build hook: [consolefont]
==> WARNING: consolefont: no font found in configuration
  -> Running build hook: [filesystems]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: '/boot/initramfs-linux.img'
  -> Early uncompressed CPIO image generation successful
==> Initcpio image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'fallback'
==> Using default configuration file: '/etc/mkinitcpio.conf'
  -> -k /boot/vmlinuz-linux -g /boot/initramfs-linux-fallback.img -S autodetect
==> Starting build: '6.8.9-artix1-2'
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: 'wd719x'
==> WARNING: Possibly missing firmware for module: 'qla1280'
==> WARNING: Possibly missing firmware for module: 'bfa'
==> WARNING: Possibly missing firmware for module: 'qed'
==> WARNING: Possibly missing firmware for module: 'aic94xx'
==> WARNING: Possibly missing firmware for module: 'qla2xxx'
==> WARNING: Possibly missing firmware for module: 'xhci_pci'
  -> Running build hook: [keyboard]
  -> Running build hook: [keymap]
  -> Running build hook: [consolefont]
==> WARNING: consolefont: no font found in configuration
  -> Running build hook: [filesystems]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: '/boot/initramfs-linux-fallback.img'
  -> Early uncompressed CPIO image generation successful
==> Initcpio image generation successful
home:[freeartist-artix]:~$ 

@12sunflowers
Copy link

12sunflowers commented May 9, 2024

Driver seems installed at kernel-lts 6.6, but not loading and Xorg not start
20-nvidia.conf

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 418.56

Section "ServerFlags"
    Option "IgnoreABI" "1"
EndSection

Section "Monitor"
    Identifier     "<default monitor>"
    VendorName     "DEL"
    ModelName      "a16c"
   # Modeline "1920x1080_75" 185.63 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync
   # Modeline "1920x1080@75" 185.63 1920 2008 2052 2200 1080 1084 1089 1125 +hsync -vsync
   # Modeline "1920x1080@75" 185.63 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync
   # Modeline "1920x1080_75.00"  220.75  1920 2064 2264 2608  1080 1083 1088 1130 -hsync +vsync
   # Modeline "1920x1080_75.00"  220.75  1920 2064 2264 2608  1080 1083 1088 1130 +hsync +vsync
   # Modeline "1920x1080_75.00"  220.75  1920 2064 2264 2608  1080 1083 1088 1130 -hsync +vsync 
   # Modeline "1920x1080_75.00" 164.13 1920 1940 1960 2004 1080 1083 1087 1092 +hsync -vsync
     Modeline "1920x1080_72.00" 160.85 1920 1928 1960 2000 1080 1103 1111 1117 +hsync -vsync
     Modeline "1920x1080_75.00" 164.81 1920 1928 1960 1962 1080 1105 1113 1120 +hsync -vsync
     Modeline "1920x1080_120.00" 280.80 1920 1968 2000 2080 1080 1083 1088 1125 +hsync +vsync
EndSection

Section "Device"
    Identifier     "NVIDIA  GF9800 GTX"
    Driver         "nvidia"
    Option         "ModeValidation" "NoMaxPClkCheck, NoVertRefreshCheck, AllowNonEdidModes, NoExtendedGpuCapabilitiesCheck"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "NVIDIA  GF9800 GTX"
    Monitor        "<default monitor>"
    DefaultDepth    24
    Option         "Stereo" "0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Xorg.0.log
kernel.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants