Ya I’ve skipped that on purpose as secure-boot instruction referred to /usr/share/doc/akmods/README.secureboot
:
[user@fedora ~]$ cat /usr/share/doc/akmods/README.secureboot
Secure boot is a setup using UEFI firmware to check cryptographic
signatures on the bootloader and associated OS kernel to ensure they
have not been tampered with or bypassed in the boot process.
This verification can be extended to Kernel and its modules.
It's default case in Fedora with UEFI and Secure boot enabled.
Fedora Project have signed kernels and also main modules with Fedora
Key, but 3rd party modules as NVidia, VirtualBox, etc. need to be signed
to load.
Akmods provides an enroll process to sign third party modules with your
own keypair.
At the first run of the akmods.service, certificate and keypair will be
created with default value using the '/usr/sbin/kmodgenca' script.
You may also wish to manually create your own certificate and keypair
with `/usr/sbin/kmodgenca` command.
If '/usr/sbin/kmodgenca' is launched with the '-a' parameter, it will
use default values to complete the cacert.config file, and to generate
automatically the cert and the private key.
If '/usr/sbin/kmodgenca' is launched without parameters, user will be
prompted to complete manually the cacert.config file, then the cert and
the private key will be automatically generated.
If the cert and the private key files already exist,
'/usr/sbin/kmodgenca' will exit unless the '-f' parameter is used.
The cert and the private key are stored respectively in
/etc/pki/akmods/certs and /etc/pki/akmods/private/ directories.
Now you need to enroll the public key in MOK, this process is described
below.
- Ask MOK to enroll new keypair with certificate with the command
`mokutil --import /etc/pki/akmods/certs/public_key.der`.
- mokutil asks to generate a password to enroll the public key.
- Rebooting the system is needed for MOK to enroll the new public key.
- On next boot MOK Management is launched and you have to choose
"Enroll MOK".
- Choose "Continue" to enroll the key or "View key 0" to show the keys
already enrolled.
- Confirm enrollment by selecting "Yes".
- You will be invited to enter the password generated above.
WARNING: keyboard is mapped to QWERTY!
- The new key is enrolled, and system ask you to reboot.
You can confirm the enrollment of the new keypair once the system
rebooted with:
`mokutil --list-enrolled | grep Issuer`
or with:
`mokutil --test-key /etc/pki/akmods/certs/public_key.der`
This part:
At the first run of the akmods.service, certificate and keypair will be
created with default value using the '/usr/sbin/kmodgenca' script.
As for the instruction:
[user@fedora ~]$ dnf list installed kmod-nvidia*
Installed Packages
kmod-nvidia-5.17.3-302.fc36.x86_64.x86_64 3:510.60.02-1.fc36 @@commandline
[user@fedora ~]$ sudo dnf remove kmod-nvidia-5.17.4*
No match for argument: kmod-nvidia-5.17.4*
No packages marked for removal.
Dependencies resolved.
Nothing to do.
Complete!
[user@fedora ~]$ sudo kmodgenca
[user@fedora ~]$ sudo mokutil --import /etc/pki/akmods/certs/public_key.der
SKIP: /etc/pki/akmods/certs/public_key.der is already enrolled
As for the next command, I’ve tried it multiple times but same result:
[user@fedora ~]$ sudo akmods --force
Checking kmods exist for 5.17.4-300.fc36.x86_64 [ OK ]
Files needed for building modules against kernel
5.17.4-300.fc36.x86_64 could not be found as the following
directories are missing:
/usr/src/kernels/5.17.4-300.fc36.x86_64/
/lib/modules/5.17.4-300.fc36.x86_64/build/Is the correct ke[FAILED]el package installed?
Checking kmods exist for 5.17.3-302.fc36.x86_64 [ OK ]
[user@fedora ~]$ sudo akmods --force
Checking kmods exist for 5.17.4-300.fc36.x86_64 [ OK ]
Files needed for building modules against kernel
5.17.4-300.fc36.x86_64 could not be found as the following
directories are missing:
/usr/src/kernels/5.17.4-300.fc36.x86_64/
/lib/modules/5.17.4-300.fc36.x86_64/build/Is the correct ke[FAILED]el package installed?
Checking kmods exist for 5.17.3-302.fc36.x86_64 [ OK ]
[user@fedora ~]$ sudo akmods --force
Checking kmods exist for 5.17.4-300.fc36.x86_64 [ OK ]
Files needed for building modules against kernel
5.17.4-300.fc36.x86_64 could not be found as the following
directories are missing:
/usr/src/kernels/5.17.4-300.fc36.x86_64/
/lib/modules/5.17.4-300.fc36.x86_64/build/Is the correct ke[FAILED]el package installed?
Checking kmods exist for 5.17.3-302.fc36.x86_64 [ OK ]
[user@fedora ~]$ dnf list installed kmod-nvidia*
Installed Packages
kmod-nvidia-5.17.3-302.fc36.x86_64.x86_64 3:510.60.02-1.fc36 @@commandline
As you see since import was skipped so after restarting dkms page didnt came up to enroll the keys and for the dnf list installed kmod-nvidia*
got the same result after reboot.
Other info:
[user@fedora ~]$ dnf list installed kernel*5.17.4*
Installed Packages
kernel.x86_64 5.17.4-300.fc36 @updates-testing
kernel-core.x86_64 5.17.4-300.fc36 @updates-testing
kernel-headers.x86_64 5.17.4-300.fc36 @updates-testing
kernel-modules.x86_64 5.17.4-300.fc36 @updates-testing
kernel-modules-extra.x86_64 5.17.4-300.fc36 @updates-testing
After all of that I also did Uninstall the NVIDIA driver and Recover from NVIDIA installer steps from RPM Fusion.
After that :
[user@fedora ~]$ sudo rm -r /etc/pki/akmods/*
[user@fedora ~]$ sudo /usr/sbin/kmodgenca
sudo: /usr/sbin/kmodgenca: command not found
[user@fedora ~]$ sudo dnf install akmod-nvidia
Installed:
akmod-nvidia-3:510.60.02-1.fc36.x86_64 akmods-0.5.7-7.fc36.noarch annobin-docs-10.66-2.fc36.noarch
annobin-plugin-gcc-10.66-2.fc36.x86_64 bison-3.8.2-2.fc36.x86_64 debugedit-5.0-3.fc36.x86_64
dwz-0.14-2.fc35.x86_64 ed-1.14.2-12.fc36.x86_64 efi-srpm-macros-5-5.fc36.noarch
egl-gbm-1.1.0-2.fc36.x86_64 egl-wayland-1.1.9-4.fc36.x86_64 elfutils-libelf-devel-0.186-3.fc36.x86_64
fakeroot-1.27-1.fc36.x86_64 fakeroot-libs-1.27-1.fc36.x86_64 flex-2.6.4-10.fc36.x86_64
fonts-srpm-macros-1:2.0.5-7.fc36.noarch fpc-srpm-macros-1.3-5.fc36.noarch ghc-srpm-macros-1.5.0-6.fc36.noarch
gnat-srpm-macros-4-15.fc36.noarch go-srpm-macros-3.0.15-1.fc36.noarch http-parser-2.9.4-6.fc36.x86_64
info-6.8-3.fc36.x86_64 kernel-devel-5.17.3-302.fc36.x86_64 kernel-devel-matched-5.17.3-302.fc36.x86_64
kernel-srpm-macros-1.0-14.fc36.noarch kmodtool-1.1-3.fc36.noarch koji-1.28.0-1.fc36.noarch
libgit2-1.3.0-2.fc36.x86_64 lua-srpm-macros-1-6.fc36.noarch m4-1.4.19-3.fc36.x86_64
nim-srpm-macros-3-6.fc36.noarch nvidia-settings-3:510.60.02-1.fc36.x86_64 ocaml-srpm-macros-6-6.fc36.noarch
openblas-srpm-macros-2-11.fc36.noarch openssl-1:3.0.2-1.fc36.x86_64 openssl-devel-1:3.0.2-1.fc36.x86_64
package-notes-srpm-macros-0.4-14.fc36.noarch patch-2.7.6-16.fc36.x86_64 perl-srpm-macros-1-43.fc36.noarch
python-srpm-macros-3.10-17.fc36.noarch python3-decorator-5.1.1-2.fc36.noarch python3-gssapi-1.7.2-2.fc36.x86_64
python3-koji-1.28.0-1.fc36.noarch python3-progressbar2-3.53.2-4.fc36.noarch python3-pygit2-1.7.1-3.fc36.x86_64
python3-requests-gssapi-1.2.3-4.fc36.noarch python3-rpmautospec-0.2.5-1.fc35.noarch python3-utils-2.5.6-5.fc36.noarch
qt5-srpm-macros-5.15.3-1.fc36.noarch redhat-rpm-config-212-1.fc36.noarch rpm-build-4.17.0-10.fc36.x86_64
rpmautospec-rpm-macros-0.2.5-1.fc35.noarch rpmdevtools-9.6-1.fc36.noarch rust-srpm-macros-21-1.fc36.noarch
xorg-x11-drv-nvidia-3:510.60.02-1.fc36.x86_64 xorg-x11-drv-nvidia-cuda-libs-3:510.60.02-1.fc36.x86_64 xorg-x11-drv-nvidia-kmodsrc-3:510.60.02-1.fc36.x86_64
xorg-x11-drv-nvidia-libs-3:510.60.02-1.fc36.x86_64 xorg-x11-drv-nvidia-power-3:510.60.02-1.fc36.x86_64 zlib-devel-1.2.11-31.fc36.x86_64
which installed the kernel-devel-5.17.3-302.fc36.x86_64
.
After this I’ve booted into 5.17.3 and did the:
sudo /usr/sbin/kmodgenca
sudo mokutil --import /etc/pki/akmods/certs/public_key.der
which did work (kinda) after enrolling the key I’ve booted into 5.17.3 and it seemed that the driver is installed my second monitor(connected directly to nvidia via hdmi) was working and nvidia settings was showing the driver version and everything but my laptop screen(main) wasnt working also my wasnt working either.
rebooting into 5.17.4 resulted in same error that I’ve got at first place.
so I think its RPM Fusion problem which is not supporting drivers for kernel 5.17.4 (just a guess).
Again thank you for help
.