Akmods fails on latest kernel 6.17.4-200.fc42.x86_64

From the logs:

2025/10/22 19:25:58 akmodsbuild: nvidia-drm/nvidia-drm-drv.c:165:18: error: initialization of ‘struct drm_framebuffer * (*)(struct drm_device *, struct drm_file *, const struct drm_format_info *, const struct drm_mode_fb_cmd2 *)’ from incompatible pointer type ‘struct drm_framebuffer * (*)(struct drm_device *, struct drm_file *, const struct drm_mode_fb_cmd2 *)’ [-Wincompatible-pointer-types]
2025/10/22 19:25:58 akmodsbuild:   165 |     .fb_create = nv_drm_framebuffer_create,
2025/10/22 19:25:58 akmodsbuild:       |                  ^~~~~~~~~~~~~~~~~~~~~~~~~
2025/10/22 19:25:58 akmodsbuild: nvidia-drm/nvidia-drm-drv.c:165:18: note: (near initialization for ‘nv_mode_config_funcs.fb_create’)
2025/10/22 19:25:58 akmodsbuild: nvidia-drm/nvidia-drm-drv.c:137:32: note: ‘nv_drm_framebuffer_create’ declared here
2025/10/22 19:25:58 akmodsbuild:   137 | static struct drm_framebuffer *nv_drm_framebuffer_create(
2025/10/22 19:25:58 akmodsbuild:       |                                ^~~~~~~~~~~~~~~~~~~~~~~~~
2025/10/22 19:25:58 akmodsbuild: make[4]: *** [/usr/src/kernels/6.17.4-200.fc42.x86_64/scripts/Makefile.build:287: nvidia-drm/nvidia-drm-drv.o] Error 1
2025/10/22 19:25:58 akmodsbuild: make[4]: *** Waiting for unfinished jobs....
2025/10/22 19:25:58 akmodsbuild: make[3]: *** [/usr/src/kernels/6.17.4-200.fc42.x86_64/Makefile:2047: .] Error 2
2025/10/22 19:25:58 akmodsbuild: make[2]: *** [/usr/src/kernels/6.17.4-200.fc42.x86_64/Makefile:248: __sub-make] Error 2
2025/10/22 19:25:58 akmodsbuild: make[2]: Leaving directory '/tmp/akmodsbuild.YTkRnZbe/BUILD/nvidia-470xx-kmod-470.256.02-build/nvidia-470xx-kmod-470.256.02/_kmod_build_6.17.4-200.fc42.x86_64'
2025/10/22 19:25:58 akmodsbuild: make[1]: *** [Makefile:248: __sub-make] Error 2
2025/10/22 19:25:58 akmodsbuild: make[1]: Leaving directory '/usr/src/kernels/6.17.4-200.fc42.x86_64'
2025/10/22 19:25:58 akmodsbuild: make: *** [Makefile:90: modules] Error 2
2025/10/22 19:25:58 akmodsbuild: error: Bad exit status from /var/tmp/rpm-tmp.7Dg68l (%build)
2025/10/22 19:25:58 akmodsbuild:
2025/10/22 19:25:58 akmodsbuild: RPM build errors:
2025/10/22 19:25:58 akmodsbuild:     Bad exit status from /var/tmp/rpm-tmp.7Dg68l (%build)

Hopefully this gets fixed pretty soon..

Try reporting the issue at https://bugzilla.rpmfusion.org/enter_bug.cgi

1 Like

I receive one report here Making sure you're not a bot! I’m working a fix

I, too, am having akmod build errors on latest 6.17 kernels:

2025/10/29 05:45:55 akmodsbuild: nvidia-drm/nvidia-drm-drv.c:165:18: error: initialization of ‘struct drm_framebuffer * (*)(struct drm_device *, struct drm_file *, const struct drm_format_info *, const struct drm_mode_fb_cmd2 )’ from incompatible pointer type ‘struct drm_framebuffer * ()(struct drm_device *, struct drm_file *, const struct drm_mode_fb_cmd2 *)’ [-Wincompatible-pointer-types]

I can confirm the same DKMS build failure on Fedora 42 when updating to kernel 6.17.5-200.fc42.x86_64.

My setup:

  • Laptop: Dell (Intel + NVIDIA hybrid)

  • GPU: NVIDIA GeForce RTX 3060 Mobile / Max-Q (GA106M)

  • Current working kernel: 6.16.12-200.fc42.x86_64

  • NVIDIA driver: 575.64.05

  • Installation type: DKMS (not akmods)

The DKMS build fails with the following error in /var/lib/dkms/nvidia/575.64.05/build/make.log:

nvidia-drm/nvidia-drm-drv.c:240:18: error: initialization of ‘struct drm_framebuffer \* (\*)(struct drm_device \*, struct drm_file \*, const struct drm_format_info \*, const struct drm_mode_fb_cmd2 *)’ from incompatible pointer type ‘struct drm_framebuffer \* (*)(struct drm_device \*, struct drm_file \*, const struct drm_mode_fb_cmd2 \*)’ \[-Wincompatible-pointer-types\]
nvidia-drm/nvidia-drm-fb.c:308:5: error: too few arguments to function ‘drm_helper_mode_fill_fb_struct’; expected 4, have 3

This appears to be due to DRM API changes introduced in Linux 6.17, which the current NVIDIA 575.64.05 driver doesn’t yet support.
Fedora and NVIDIA are aware of this, and patches or an updated driver should land soon.

How to Set the Default Kernel (to stay on the working one):

#List all available kernels

sudo awk -F' ‘/menuentry / {print $2}’ /boot/grub2/grub.cfg

#Set 6.16.12 as the default

sudo grubby --set-default /boot/vmlinuz-6.16.12-200.fc42.x86_64

#Confirm

grubby --default-kernel

How to Lock the Kernel Version

sudo dnf versionlock add kernel kernel-core kernel-modules kernel-modules-core

To remove the lock

sudo dnf versionlock delete

575.xx driver is EOL, either use 570.xx or 580.xx

Thanks much. I will work on that now.

Your issue is different than the OP.
The OP was using drivers from rpmfusion with akmods.
You are apparently using the drivers from a different source with dkms.

In most cases, removing the drivers from another source then reinstalling from rpmfusion gets both the latest drivers and the automatic management with akmods.

1 Like

Thanks much.

Moved to 580.95.05.

Reinstalled the new 6.17 kernel versions. All seems good.

You can use the little checkbox at the bottom of peoples posts if they come up with the ‘solution’ to your question.

I’m hitting this problem as well with 6.17.5. From the bug it looks like we need to wait until akmod-nvidia-470xx-470.256.02-13.fc42.x86_64 is pushed to stable, but I appear to have 256.02-10. Any idea when this might be pushed to stable? I know I could enable the testing repo, but I’d rather just wait.

Thanks.

2025/11/01 11:01:12 akmodsbuild: nvidia-drm/nvidia-drm-drv.c:165:18: error: initialization of ‘struct drm_framebuffer * (*)(struct drm_device *, struct drm_file *, const struct drm_format_info *, const struct drm_mode_fb_cmd2 *)’ from incompatible pointer type ‘struct drm_framebuffer * (*)(struct drm_device *, struct drm_file *, const struct drm_mode_fb_cmd2 *)’ [-Wincompatible-pointer-types]
2025/11/01 11:01:12 akmodsbuild:   165 |     .fb_create = nv_drm_framebuffer_create,
2025/11/01 11:01:12 akmodsbuild:       |                  ^~~~~~~~~~~~~~~~~~~~~~~~~
2025/11/01 11:01:12 akmodsbuild: nvidia-drm/nvidia-drm-drv.c:165:18: note: (near initialization for ‘nv_mode_config_funcs.fb_create’)
2025/11/01 11:01:12 akmodsbuild: nvidia-drm/nvidia-drm-drv.c:137:32: note: ‘nv_drm_framebuffer_create’ declared here
2025/11/01 11:01:12 akmodsbuild:   137 | static struct drm_framebuffer *nv_drm_framebuffer_create(
2025/11/01 11:01:12 akmodsbuild:       |                                ^~~~~~~~~~~~~~~~~~~~~~~~~
2025/11/01 11:01:12 akmodsbuild: make[4]: *** [/usr/src/kernels/6.17.5-200.fc42.x86_64/scripts/Makefile.build:287: nvidia-drm/nvidia-drm-drv.o] Error 1
2025/11/01 11:01:12 akmodsbuild: make[4]: *** Waiting for unfinished jobs....
2025/11/01 11:01:12 akmodsbuild: make[3]: *** [/usr/src/kernels/6.17.5-200.fc42.x86_64/Makefile:2047: .] Error 2
2025/11/01 11:01:12 akmodsbuild: make[2]: *** [/usr/src/kernels/6.17.5-200.fc42.x86_64/Makefile:248: __sub-make] Error 2
2025/11/01 11:01:12 akmodsbuild: make[2]: Leaving directory '/tmp/akmodsbuild.fd4lULB2/BUILD/nvidia-470xx-kmod-470.256.02-build/nvidia-470xx-kmod-470.256.02/_kmod_build_6.17.5-200.fc42.x86_64'
2025/11/01 11:01:12 akmodsbuild: make[1]: *** [Makefile:248: __sub-make] Error 2
2025/11/01 11:01:12 akmodsbuild: make[1]: Leaving directory '/usr/src/kernels/6.17.5-200.fc42.x86_64'
2025/11/01 11:01:12 akmodsbuild: make: *** [Makefile:90: modules] Error 2
2025/11/01 11:01:12 akmodsbuild: error: Bad exit status from /var/tmp/rpm-tmp.kbjYLi (%build)
2025/11/01 11:01:12 akmodsbuild: 
2025/11/01 11:01:12 akmodsbuild: RPM build errors:
2025/11/01 11:01:12 akmodsbuild:     Bad exit status from /var/tmp/rpm-tmp.kbjYLi (%build)
2025/11/01 11:01:12 akmodsbuild: 
2025/11/01 11:01:17 akmods: Building rpms failed; see /var/cache/akmods/nvidia-470xx/470.256.02-10-for-6.17.5-200.fc42.x86_64.failed.log for details

sudo dnf upgrade --enable-repo=rpmfusion-nonfree-updates-testing akmod-nvidia-470xx

1 Like

Testing is usually a week unless problems show up