Akmods fails to compile Nvidia 470xx module on kernel 6.8.4-200 | Workarounds & Solutions

This is the error I encountered trying to run the command sudo akmods --force

2024/04/06 19:30:39 akmods: Building and installing nvidia-470xx-kmod
2024/04/06 19:30:39 akmods: Building RPM using the command '/usr/sbin/akmodsbuild --kernels 6.8.4-200.fc39.x86_64 /usr/src/akmods/nvidia-470xx-kmod.latest'
2024/04/06 19:31:42 akmods: Building rpms failed; see /var/cache/akmods/nvidia-470xx/470.223.02-2-for-6.8.4-200.fc39.x86_64.failed.log for details
2024/04/06 19:31:42 akmods: Hint: Some kmods were ignored or failed to build or install.
2024/04/06 19:31:42 akmods: You can try to rebuild and install them by by calling
2024/04/06 19:31:42 akmods: '/usr/sbin/akmods --force' as root.
2024/04/06 19:44:28 akmods: Checking kmods exist for 6.7.11-200.fc39.x86_64

I uploaded the content with the details of the .failed.log with fpaste at the following link
https://paste.centos.org/view/598b265e

This has been reported as RPMFusion bug 6904, which indicates that Nvidia knows about the bug. There are often delays getting Nvidia fixes than then RPMFusion package. Nouveau is working for me with Wayland, but with Xorg I see a black screen with an X cursor.

Note: You may need to edit /etc/gdm/custom.conf to add comment out the WaylandEnable=false line (I presume this was set because Nvida 470xx doesn’t do Wayland). I normally use nouveau+Wayland, and switch to Nvidia+Xorg when I need Xorg.

2 Likes

I use the Cinnamon spin which has not yet adopted Wayland and, fortunately, the nouveau driver works normally with Xorg.

Anyway, I preferred to fall back on using the previous kernel, waiting for the fix to be released by RPMFusion.

Added akmods, rpmfusion

Nvidia 470xx does not support wayland at all. The update of nvidia drivers to 495 or later is required to support wayland.

Please post the output of inxi -Gxx so we may see the actual hardware involved.

If the GPU is capable of using the newer drivers then this may be overcome.

~ inxi -Gxx
Graphics:
  Device-1: Intel Xeon E3-1200 v2/3rd Gen Core processor Graphics
    vendor: ASRock driver: i915 v: kernel arch: Gen-7 ports: active: none
    empty: DP-1, DP-2, DP-3, HDMI-A-1, HDMI-A-2, HDMI-A-3, VGA-1
    bus-ID: 00:02.0 chip-ID: 8086:0152
  Device-2: NVIDIA GK208B [GeForce GT 730] vendor: ZOTAC driver: nvidia
    v: 470.223.02 arch: Kepler pcie: speed: 2.5 GT/s lanes: 2 ports:
    active: none off: DVI-D-1 empty: HDMI-A-4,VGA-2 bus-ID: 01:00.0
    chip-ID: 10de:1287
  Display: x11 server: X.Org v: 1.20.14 with: Xwayland v: 23.2.4 driver: X:
    loaded: modesetting,nvidia unloaded: fbdev,nouveau,vesa alternate: nv
    dri: crocus gpu: nvidia,nvidia-nvswitch display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1366x768 s-dpi: 84
  Monitor-1: DVI-D-1 mapped: DVI-D-0 note: disabled model: AOC 1950W
    res: 1366x768 dpi: 85 diag: 470mm (18.5")
  API: OpenGL v: 4.6.0 vendor: nvidia v: 470.223.02 glx-v: 1.4
    direct-render: yes renderer: NVIDIA GeForce GT 730/PCIe/SSE2
  API: Vulkan v: 1.3.275 surfaces: xcb,xlib device: 0 type: discrete-gpu
    driver: N/A device-ID: 10de:1287 device: 1 type: integrated-gpu driver: N/A
    device-ID: 8086:0152 device: 2 type: cpu driver: N/A device-ID: 10005:0000
  API: EGL Message: EGL data requires eglinfo. Check --recommends.

That shows the proper driver for that GPU.
Your title implies that the driver is not properly built for the newer kernel
Please post the output of uname -r and dnf list installed \*nvidia\*

There are circumstances where the driver may become corrupted with new kernel installs and driver builds. (often caused by rebooting too soon during the updates). This can usually be solved by doing the recovery as follows.

  1. sudo dnf remove kmod-nvidia-6.8.4-200.fc39.x86_64
    then rebuild that driver with
  2. sudo akmods --force --kernels 6.8.4-200.fc39.x86_64
    following which a reboot should show a full repair.

I usually always try to wait at least 5 minutes, often not even rebooting the PC after updating the kernel.

Sometimes I have only needed to run the command sudo akmods --force, anyway these are the required outputs:

~ uname -r
6.8.4-200.fc39.x86_64
~ dnf list installed \*nvidia\*
Pacchetti installati
akmod-nvidia-470xx.x86_64                3:470.223.02-2.fc39  @rpmfusion-nonfree-updates
kmod-nvidia-470xx-6.7.10-200.fc39.x86_64.x86_64
                                         3:470.223.02-2.fc39  @@commandline     
kmod-nvidia-470xx-6.7.11-200.fc39.x86_64.x86_64
                                         3:470.223.02-2.fc39  @@commandline     
nvidia-gpu-firmware.noarch               20240312-1.fc39      @updates          
nvidia-persistenced.x86_64               3:550.67-1.fc39      @rpmfusion-nonfree-updates
nvidia-settings-470xx.x86_64             3:470.223.02-1.fc39  @rpmfusion-nonfree
xorg-x11-drv-nvidia-470xx.x86_64         3:470.223.02-1.fc39  @rpmfusion-nonfree
xorg-x11-drv-nvidia-470xx-cuda.x86_64    3:470.223.02-1.fc39  @rpmfusion-nonfree
xorg-x11-drv-nvidia-470xx-cuda-libs.i686 3:470.223.02-1.fc39  @rpmfusion-nonfree
xorg-x11-drv-nvidia-470xx-cuda-libs.x86_64
                                         3:470.223.02-1.fc39  @rpmfusion-nonfree
xorg-x11-drv-nvidia-470xx-kmodsrc.x86_64 3:470.223.02-1.fc39  @rpmfusion-nonfree
xorg-x11-drv-nvidia-470xx-libs.i686      3:470.223.02-1.fc39  @rpmfusion-nonfree
xorg-x11-drv-nvidia-470xx-libs.x86_64    3:470.223.02-1.fc39  @rpmfusion-nonfree

As you can see there is no module kmod-nvidia-470xx for the latest kernel, so it’s not possible to remove it and probably because of the bug reported on the first comment of this thread, the other command you suggested fails during the building process

~ sudo akmods --force --kernels 6.8.4-200.fc39.x86_64
[sudo] password di paco:
Checking kmods exist for 6.8.4-200.fc39.x86_64             [  OK  ]
Building and installing nvidia-470xx-kmod                  [FALLITO]
Building rpms failed; see /var/cache/akmods/nvidia-470xx/470.223.02-2-for-6.8.4-200.fc39.x86_64.failed.log for details

Hint: Some kmods were ignored or failed to build or install.
You can try to rebuild and install them by by calling
'/usr/sbin/akmods --force' as root.

I assume that the logs provided are not that different from those already posted.

Same problem here. I’ve got an ancient Athlon II processor but it seems the problem is with a header file used when compiling the kmod. As the driver code seems to be unchanged maybe a packaging error at rpmfusion?
In file included from /tmp/akmodsbuild.Dy9sO2UZ/BUILD/nvidia-470xx-kmod-470.223.02/_kmod_build_6.8.4-200.fc39.x86_64/nvidia-drm/nvidia-drm-drv.c:60:
/tmp/akmodsbuild.Dy9sO2UZ/BUILD/nvidia-470xx-kmod-470.223.02/_kmod_build_6.8.4-200.fc39.x86_64/nvidia-drm/nvidia-drm-drv.c:748:40: error: ‘DRM_UNLOCKED’ undeclared here (not in a function); did you mean ‘VM_LOCKED’?
748 | DRM_RENDER_ALLOW|DRM_UNLOCKED),
| ^~~~~~~~~~~~

2 Likes

@iznogud78 @hooston Hi.
It can be resolved by downloading the latest nvidia 470 driver from the nvidia website.
The driver also asks whether to install in the dkms for automatic recompilation with future kernels.

The only annoyance I had was to, is download drivers first, blacklist nouveau, reboot, and install from console (and ignore the messages about the absence of the X configuration file).

Honestly I am seriously starting to consider buying an AMD video card instead, also because I’m also experiencing the same problem with kernel version 6.8.5-201

It’s unfortunate, though all too understandable, that for NVIDIA video cards there is still no open source driver that has provided decent graphics acceleration.
Unfortunately nouveau has always had this limitation, otherwise we wouldn’t be here fretting about closed source drivers that fail to compile the module on the latest kernel.

I hope that Nova will be able to address this limitation, but I fear that by that time my video card may be too outdated to appreciate any improvements.

Linux on Nvidia hardware is “high maintenance”, which diverts resources from other linux development and orphaned packages for older Nvidia hardware.

Apple Silicon is another option for some users.

Asahi Linux OpenGL Support on Apple Silicon Officially Surpasses Apple’s.

There is a “low risk” issue: Apple Silicon allows extraction of “secret” encryption keys. Quoting 9to5mac Unpatchable Security Flaw in Apple M1-3:

The flaw is present in M1, M2, and M3 chips, and because the failing is part of > the architecture of the chips, there’s no way for Apple to fix it in current devices.

I’m thinking of replacing my Nvidia card with an AMD card.
Mine is old enough (GeForce GT 740 4GB DDR3 PCI Express 3.0 x16) to require the 470xx driver which is not running with the current kernel.
If any one has any recommendations for a decent AMD card with similar of better specs (for a low price) … please comment.

Mine has the previous graphics processor model, a GeForce GT 730 but with half the VRAM and PCIe link width. It’s indeed quite old and its already been supported only by legacy drivers for a few years now.

in any case I agree that any advice on a discrete video card (AMD would be preferable) that can replace it is welcome.

AMD RX 580 would be the “Price Conscious” purchase. It is also old, but anything would be an upgrade over the GT7xx which is 10yrs old.

1 Like

For nvidia, anything of the 1650 or newer (2000 and up series) would also work well. My laptop has a 1650, my daily driver has a 3050, and my server runs 2 discrete 1050s. I have never had an issue with any of those and the newer drivers.

Given the spotty Linux support from Nvidia, I’m not buying another one of their boards. I don’t want to be in the same spot three years down the road.

2 Likes

I’m also having this issue, so I’ve been researching solutions. I found good news and bad.

It seems this is an issue caused by the lack of a maintainer at RPM Fusion for this driver. RPM Fusion packages Nvidia drivers and utilities for the 470 series for Fedora 39 with a version from late 2023 (ver. 470.223.02-1.fc39). Package list here. Latest Nvidia drivers are from February 2024, and it seems they include patches for compatibility with Linux 6.8.

The RPM Fusion bug report linked in George’s post above mentions that some have had success installing Nvidia’s drivers on Fedora 39, but as of the time of this post, the newest drivers are not packaged by RPM Fusion due to a lack of maintainer. Anyone wanna volunteer? :grin:

1 Like

To solve the problem just install the driver by downloading it from the nvidia website, which also has support for dkms.

akmod is not essential, it just makes things easier, it can be abandoned.

1 Like

I am always sorry to learn that there is a lack of a manteiner for such a useful project for us users.

As mentioned above, I hope that whoever is working on the Nova drivers may be able to release an open source driver that can replace the proprietary drivers once and for all.

I will definitely try to install the officially released drivers from NVIDIA, but I seriously plan to replace my graphics card with a better supported model.