Nvidia and Virtualbox akmod build fails due to SSL errors, even though I do not use Secure boot

I do not use secure boot and when I install a new kernel, building the new drivers (both for Nvidia and VirtualBox) fails. I think the corresponding errors are:

- SSL error:1E08010C:DECODER routines::unsupported: crypto/encode_decode/decoder_lib.c:104
sign-file: /etc/pki/akmods/private/private_key.priv
At main.c:140:
- SSL error:1E08010C:DECODER routines::unsupported: crypto/encode_decode/decoder_lib.c:104
sign-file: /etc/pki/akmods/private/private_key.priv
At main.c:140:
- SSL error:1E08010C:DECODER routines::unsupported: crypto/encode_decode/decoder_lib.c:104
sign-file: /etc/pki/akmods/private/private_key.priv
At main.c:140:
- SSL error:1E08010C:DECODER routines::unsupported: crypto/encode_decode/decoder_lib.c:104
sign-file: /etc/pki/akmods/private/private_key.priv
At main.c:140:
- SSL error:1E08010C:DECODER routines::unsupported: crypto/encode_decode/decoder_lib.c:104

As per AI, running

sudo rm /etc/pki/akmods/private/private_key.priv
sudo rm /etc/pki/akmods/certs/public_key.der

Fixes the issue. As I do not use Secure boot, no signing is actually required. However, I am using sd-boot (installed via netinstall). Why is the signing still taking place?

Also, the experience of this is rather suboptimal. When splash is enabled, the Fedora logo just spins for over a minute before giving up and proceeding. Pressing escape to get rid of the splash does not work. Without the splash, there is just underscore blinking for the same amount of time. I was really left in the dark and first forced-turned off my computer thinking it just got stuck. No idea where to report such a UI bug though.

Are you using rawhide?
I can’t reproduce on F44 with my akmods keys from Jun 2022.

The keys are going to be recreated on next system boot. Can you reproduce this with new set of keys?

@felagund
If you are using rawhide there may be issues that cannot be solved here since that is the development version of fedora and users must be aware that there are often things that may break. The only fixes are by directly contacting the developers since those issues are caused by changes in apps as the process moves toward the next release version.

When you remove those keys, the next boot will recreate them as an automatic function of akmods and the kmodgenca command.

The errors you report seem to be from ssl and have nothing to do with the key itself.

Signing of locally compiled kernel modules is automatic when akmods creates those modules. It is necessary when secure boot is enabled and harmless when secure boot is disabled.

No, I am on Fedora 44.

The only other nonstandard thing is that my laptop battery ran to zero twice, so the inner computer clock got reset (I booted up and it was reporting nonsensical time until NTP kicked in, which happens quite fast actually). Could it be that SSL somehow checks the time and smells something fishy? It has happened twice already. To try to reproduce it I need to wait for a new kernel to come to updates.

Unless the signing fails, in which case the modules are thrown away even if they compiled just fine.

time and date is important, the key is valid only for a certain time

e.g. my key: from 2022

 Validity
            Not Before: Jun  8 13:07:41 2022 GMT
            Not After : Jun  5 13:07:41 2032 GMT

also SSL/TLS connections cannot be establlished if date and time is not current.

you can rebuild the kernel modules for an older kernel, e.g
sudo akmods --rebuild --akmod nvidia --kernels 7.0.13-200.fc44.x86_64

Well, a new kernel is here. It still fails. Time on my system is correct, so that will not be the problem.

First, when I try to run

$sudo akmods --force
Could not find files needed to compile modules for /boot/efi//3df672eef9054350b62cccb2eae56a38/7.0.12-201.fc44.x86_64/linux
Are the development files for kernel /boot/efi//3df672eef9054350b62cccb2eae56a38/7.0.12-201.fc44.x86_64/linux or the appropriate kernel-devel package installed?

So I indeed need to run

sudo akmods --force --rebuild --kernels 7.1.3-201.fc44.x86_64

However, unless I remove the keys, it fails. It very much feels like a bug, only I am not sure what against I should report it, against akmods? I can imagine there is something weird on my system, but apart from installing sdboot, I do not think I did anything too weird to it.

Also check the key

sudo openssl x509 -in /etc/pki/akmods/certs/public_key.der -noout -dates

That gives:

/boot
/boot/efi
/boot/efi/3df672eef9054350b62cccb2eae56a38
/boot/efi/3df672eef9054350b62cccb2eae56a38/0-rescue
/boot/efi/3df672eef9054350b62cccb2eae56a38/0-rescue/initrd
/boot/efi/3df672eef9054350b62cccb2eae56a38/0-rescue/linux
/boot/efi/3df672eef9054350b62cccb2eae56a38/7.0.13-200.fc44.x86_64
/boot/efi/3df672eef9054350b62cccb2eae56a38/7.0.13-200.fc44.x86_64/initrd
/boot/efi/3df672eef9054350b62cccb2eae56a38/7.0.13-200.fc44.x86_64/linux
/boot/efi/3df672eef9054350b62cccb2eae56a38/7.1.3-200.fc44.x86_64
/boot/efi/3df672eef9054350b62cccb2eae56a38/7.1.3-200.fc44.x86_64/initrd
/boot/efi/3df672eef9054350b62cccb2eae56a38/7.1.3-200.fc44.x86_64/linux
/boot/efi/3df672eef9054350b62cccb2eae56a38/7.1.3-201.fc44.x86_64
/boot/efi/3df672eef9054350b62cccb2eae56a38/7.1.3-201.fc44.x86_64/initrd
/boot/efi/3df672eef9054350b62cccb2eae56a38/7.1.3-201.fc44.x86_64/linux
/boot/efi/EFI
/boot/efi/EFI/BOOT
/boot/efi/EFI/BOOT/BOOTX64.EFI
/boot/efi/EFI/fedora
/boot/efi/EFI/Linux
/boot/efi/EFI/systemd
/boot/efi/EFI/systemd/systemd-bootx64.efi
/boot/efi/loader
/boot/efi/loader/entries
/boot/efi/loader/entries/3df672eef9054350b62cccb2eae56a38-0-rescue.conf
/boot/efi/loader/entries/3df672eef9054350b62cccb2eae56a38-7.0.13-200.fc44.x86_64.conf
/boot/efi/loader/entries/3df672eef9054350b62cccb2eae56a38-7.1.3-200.fc44.x86_64.conf
/boot/efi/loader/entries/3df672eef9054350b62cccb2eae56a38-7.1.3-201.fc44.x86_64.conf
/boot/efi/loader/entries.srel
/boot/efi/loader/keys
/boot/efi/loader/loader.conf
/boot/efi/loader/random-seed
/boot/symvers-7.0.13-200.fc44.x86_64.xz
/boot/symvers-7.1.3-200.fc44.x86_64.xz
/boot/symvers-7.1.3-201.fc44.x86_64.xz

What am I looking for? I checked your link, but this is a freshly installed Fedora 44, so I think it does not apply (and I only started to use Fedora with Fedora 42).

I think they got recreated:

notBefore=Jul 15 16:30:48 2026 GMT
notAfter=Jul 12 16:30:48 2036 GMT

Could some package be missing for example? I frankly have no idea what to look for.

This directory and everything under it should not exist for normal installations.
See the link by @vgaetera above for why.

If you were to remove that directory and its content then reinstall the latest kernel the system probably would function properly.

Are you by chance using systemd-boot? If so then that directory may be needed.

Yes I am, as stated in the first post :-).

My hypothesis is that if I removed or renamed that directory, my system would become unbootable. Still, since systemd-boot is supported (you can install it via net-install), this should not be happening. However, I seriously doubt I am the only one using both systemd-boot and having NVidia, so there must be something else that is causing this.

For systemd-boot, leave those as they are. The lack of any grub components would be typical if you select sdboot during install from the netinstall image.

You mentioned something about the RTC clock. Is that now fixed or is that an issue? Do you run your updates using offline update? Doing so could be problematic if the clock isn’t set correctly before the actual update is run.

You also meantioned that removing the keys fixed the problem. So is the problem fixed or not?

The clock has been fine now for days, I think. I mean, both KDE and date and sudo hwclock correct time.

I run updates via sudo dnf update when I am online.

It fixes the immediate problem. When I remove the keys, I can run (with the appropriate kernel version)

sudo akmods --force --rebuild --kernels 7.1.3-201.fc44.x86_64

When a new kernel is installed via a DNF update, the keys get regenerated, so I need to remove them again. Even when they are removed, sudo akmods complains about the source not being installed.

Hm, so I ran sudo /usr/sbin/kmodgenca -a and it seems to fix the compilation problem. Which is kind of weird, as, at least to my understanding, that is what is run when the keys are not present when installing a new kernel. Now I have:

ls -la /etc/pki/akmods/private/ 
total 24 
drwxr-x---. 2 root akmods 4096 2026-07-16 23:00 **.** 
drwxr-xr-x. 4 root root   4096 2026-05-30 14:31 **..** 
-rw-r-----. 1 root akmods    0 2026-05-30 14:32 GreenOne_1780144319_0f76738c.priv 
-rw-r-----. 1 root akmods 3272 2026-06-15 10:35 GreenOne_1781512534_81aab627.priv 
-rw-r-----. 1 root akmods 3272 2026-07-14 16:57 GreenOne_1784041020_dd10b26a.priv 
-rw-r-----. 1 root akmods 3272 2026-07-15 18:30 GreenOne_1784133048_a1730acf.priv 
-rw-r-----. 1 root akmods 3272 2026-07-16 23:00 GreenOne_1784235614_bab56726.priv 
lrwxrwxrwx. 1 root akmods   57 2026-07-16 23:00 **private_key.priv** -> /etc/pki/akmods/private/GreenOne_1784235614_bab56726.priv 

ls -la /etc/pki/akmods/certs/ 
total 24 
drwxr-x---. 2 root akmods 4096 2026-07-16 23:00 **.** 
drwxr-xr-x. 4 root root   4096 2026-05-30 14:31 **..** 
-rw-r-----. 1 root akmods    0 2026-05-30 14:32 GreenOne_1780144319_0f76738c.der 
-rw-r-----. 1 root akmods 1536 2026-06-15 10:35 GreenOne_1781512534_81aab627.der 
-rw-r-----. 1 root akmods 1536 2026-07-14 16:57 GreenOne_1784041020_dd10b26a.der 
-rw-r-----. 1 root akmods 1536 2026-07-15 18:30 GreenOne_1784133048_a1730acf.der 
-rw-r-----. 1 root akmods 1536 2026-07-16 23:00 GreenOne_1784235614_bab56726.der 
lrwxrwxrwx. 1 root akmods   54 2026-07-16 23:00 **public_key.der** -> /etc/pki/akmods/certs/GreenOne_1784235614_bab56726.der

And sudo akmods --force --rebuild --kernels 7.1.3-201.fc44.x86_64 now runs fine.

I still get:

sudo akmods
Could not find files needed to compile modules for /boot/efi//3df672eef9054350b62cccb2eae56a38/7.1.3-201.fc44.x86_64/linux
Are the development files for kernel /boot/efi//3df672eef9054350b62cccb2eae56a38/7.1.3-201.fc44.x86_64/linux or the appropriate kernel-devel package installed?
Checking kmods exist for 7.1.3-201.fc44.x86_64 [  OK  ]

It seems like the akmods error message is an actual bug though:

It would appear that you have been removing the links /etc/pki/akmods/certs/public_key.der and /etc/pki/akmods/private/private_key.priv but have been failing to remove the actual key files those links point to.

On my system I see this

$ sudo ls -l /etc/pki/akmods/private/
total 12
-rw-r-----. 1 root akmods 3272 Jul 28  2024 fedora-1006998633.priv
lrwxrwxrwx. 1 root root     46 Jul 28  2024 private_key.priv -> /etc/pki/akmods/private/fedora-1006998633.priv

$ sudo ls -l /etc/pki/akmods/certs
total 12
-rw-r-----. 1 root akmods 1498 Jul 28  2024 fedora-1006998633.der
lrwxrwxrwx. 1 root root     43 Jul 28  2024 public_key.der -> /etc/pki/akmods/certs/fedora-1006998633.der

I suggest that you remove all those files with sudo rm /etc/pki/akmods/certs/* and sudo rm /etc/pki/akmods/private/* then reboot. It should then show only the actual newly created key file and the new link to that file in each of those directories.

A kernel update has nothing to do with those keys. When those keys do not exist a reboot with akmods installed causes new keys to be generated. If they already exist they are not altered.

I mean the time as shown by bios or UEFI setup before booting.

I just checked and time there is correct too.

Yes, that happened and now I only have one key and sudo akmods suceeds. You must be right I was only removing the link. And it seems problematic that the size of the key from May 30 was zero. However, it is very unclear why it was failing with keys from June 15 and July 14–16. Maybe the link was wrongly being recreated to point to the key from May 30? Hard to say now.

As can be seen from your post above the links pointed to only the most recently created key file.

I cannot say why the extra files may have been the problem, but having a key file with no content certainly may have been the issue. Without knowing how akmods determines which key file to use it is hard to say. Potentially akmods may have been trying to use ALL the key files (not just the link) and having an empty file could then cause the issue seen.

Well, I doubt that, because with the situation here: Nvidia and Virtualbox akmod build fails due to SSL errors, even though I do not use Secure boot - #15 by felagund

the compile was already successful. So just having multiple keys and having and empty key in the directory was not a problem.

But that was after manually running sudo /usr/sbin/kmodgenca -a - maybe when it is run automatically at boot, it does something differently and it was linking to a different key? Who knows. If this happens again, I would investigate further, but for now I would let it be. Thanks for all the advice.