Lately I have been unable to update the nvidia driver, or more specifically; the kernel module will not register with MOK and it is impossible to enroll it. The result is of course no graphics. The “sudo snapper rollback” has been a life saver, but I am stuck with an “old” system.
The main suspect for the root of the problem is that /sys/firmware/efi/efivars is full. It seems to be filling up for each update of the nvidia driver.
tmp:bash$ df | grep efivars
efivarfs 192 187 1 100% /sys/firmware/efi/efivars
I have 159 entries in this directory
tmp:bash$ ls -l /sys/firmware/efi/efivars | wc
159 1424 14877
and 33 of these are of the type MokListRT*
mp:bash$ ls -al /sys/firmware/efi/efivars/MokListRT* | wc
33 297 3883
31 of these are related to the nvidia driver. There seem to be an entry for every driver ever installed.
tmp:bash$ hexdump -C /sys/firmware/efi/efivars/MokListRT2-605dab50-e046-4300-abb6-3dd810dd8b23
00000000 06 00 00 00 a1 59 c0 a5 e4 94 a7 4a 87 b5 ab 15 |.....Y.....J....|
.
.
000000d0 03 55 04 03 0c 3a 4c 6f 63 61 6c 20 62 75 69 6c |.U...:Local buil|
000000e0 64 20 66 6f 72 20 6e 76 69 64 69 61 2d 64 72 69 |d for nvidia-dri|
000000f0 76 65 72 2d 47 30 36 20 35 35 30 2e 31 30 37 2e |ver-G06 550.107.|
00000100 30 32 20 6f 6e 20 32 30 32 34 2d 30 39 2d 31 38 |02 on 2024-09-18|
.
.
All of these are also enrolled:
tmp:bash$ mokutil --list-enrolled > enrolled.txt
tmp:bash$ cat enrolled.txt | grep nvidia | grep Subject
Subject: CN=Local build for nvidia-driver-G06 550.107.02 on 2024-09-18
Subject: CN=Local build for nvidia-driver-G06 550.107.02 on 2024-09-22
Subject: CN=Local build for nvidia-driver-G06 550.107.02 on 2024-09-28
.
-
.
When I try to unregister I get:
tmp:bash$ sudo mokutil --root-pw --delete /usr/share/nvidia-pubkeys/MOK-nvidia-driver-G06-550.107.02-26.1-default.der
[sudo] passord for root:
Failed to delete keys
And removing the files does also not work (files and directory is read/write)
tmp:bash$ sudo chattr -i /sys/firmware/efi/efivars/MokListRT2-605dab50-e046-4300-abb6-3dd810dd8b23
tmp:bash$ lsattr /sys/firmware/efi/efivars/MokListRT2-605dab50-e046-4300-abb6-3dd810dd8b23
---------------------- /sys/firmware/efi/efivars/MokListRT2-605dab50-e046-4300-abb6-3dd810dd8b23
tmp:bash$ sudo rm /sys/firmware/efi/efivars/MokListRT2-605dab50-e046-4300-abb6-3dd810dd8b23
rm: klarte ikke å fjerne '/sys/firmware/efi/efivars/MokListRT2-605dab50-e046-4300-abb6-3dd810dd8b23': Ugyldig argument
Does anyone have any idea about what goes wrong?
Suggestions on how to remove the unwanted, and unused stuff, in efivars, either from the linux command line or in BIOS are highly welcome,